AC_FUNC_WAIT3
AC_CHECK_FUNCS([clock_gettime closefrom ctermid])
AC_CHECK_FUNCS([dup2])
+AC_CHECK_FUNCS([expm1])
AC_CHECK_FUNCS([fcntl fdatasync feclearexcept fedisableexcept feenableexcept])
AC_CHECK_FUNCS([fegetenv fegetexcept fegetexceptflag fegetround feholdexcept])
AC_CHECK_FUNCS([feraiseexcept fesetenv fesetexceptflag fesetround])
AC_CHECK_FUNCS([getcwd gethostbyname gethostname getlogin getpagesize getpgrp])
AC_CHECK_FUNCS([getpt gettimeofday getwd grantpt])
AC_CHECK_FUNCS([kill])
-AC_CHECK_FUNCS([lockf])
+AC_CHECK_FUNCS([lockf log1p])
AC_CHECK_FUNCS([madvise memcpy mkdir mktime modf])
AC_CHECK_FUNCS([nice ntp_adjtime ntp_gettime])
AC_CHECK_FUNCS([poll posix_madvise prealloc])
#include "prims.h"
#include <errno.h>
-#ifndef M_LN2
-# define M_LN2 0.693147180559945309417232121458176568 /* log e2 */
-#endif
-
-#ifndef M_SQRT1_2
-# define M_SQRT1_2 0.707106781186547524400844362104849039 /* 1/sqrt(2) */
-#endif
-
double
arg_flonum (int arg_number)
{
}
DEFINE_PRIMITIVE ("FLONUM-EXPM1", Prim_flonum_expm1, 1, 1, 0)
+#ifdef HAVE_EXPM1
RESTRICTED_TRANSCENDENTAL_FUNCTION
(expm1, ((x >= - M_LN2) && (x <= M_LN2)))
+#else
+{
+ error_unimplemented_primitive ();
+ PRIMITIVE_RETURN (UNSPECIFIC);
+}
+#endif
+
DEFINE_PRIMITIVE ("FLONUM-LOG1P", Prim_flonum_log1p, 1, 1, 0)
+#ifdef HAVE_LOG1P
RESTRICTED_TRANSCENDENTAL_FUNCTION
(log1p, ((x >= (M_SQRT1_2 - 1.0)) && (x <= (1.0 - M_SQRT1_2))))
+#else
+{
+ error_unimplemented_primitive ();
+ PRIMITIVE_RETURN (UNSPECIFIC);
+}
+#endif
DEFINE_PRIMITIVE ("FLONUM-EXP", Prim_flonum_exp, 1, 1, 0)
SIMPLE_TRANSCENDENTAL_FUNCTION (exp)