#if !math_misc_h
#define math_misc_h 1
+#include <float.h>
#include <math.h>
+#define EPSILON (10 * DBL_EPSILON)
+
/* HUGE_VAL is traditionally defined as positive infinity, or
alternatively, DBL_MAX. */
#if !HAVE_ISINF
int intlog10 (unsigned);
+/* Returns the square of X. */
+static inline double
+pow2 (double x)
+{
+ return x * x;
+}
+
+/* Returns the cube of X. */
+static inline double
+pow3 (double x)
+{
+ return x * x * x;
+}
+
+/* Returns the fourth power of X. */
+static inline double
+pow4 (double x)
+{
+ double y = x * x;
+ y *= y;
+ return y;
+}
+
#endif /* math/misc.h */