summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-12-07 14:07:57 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-12-07 14:07:57 -0800
commit6a88c55cdf0bd3bd6fc33086529bf4e79fd1e03e (patch)
tree82f3c89dab1bdd8a577346802b0e01d9795a24a9 /configure
parentf018af6fe6b0c867c747217890b8b02d8e6d7ffb (diff)
downloadtxr-6a88c55cdf0bd3bd6fc33086529bf4e79fd1e03e.tar.gz
txr-6a88c55cdf0bd3bd6fc33086529bf4e79fd1e03e.tar.bz2
txr-6a88c55cdf0bd3bd6fc33086529bf4e79fd1e03e.zip
Add hyperbolic functions: sinh, cosh, and others.
* arith.c (sinh_s, cosh_s, tanh_s, asinh_s, acosh_s, atanh_s): New symbol variables. (sinh, cosh, tanh, asinh, acosh, atanh): New static functions. (sineh, cosih, tangh, asineh, acosih, atangh): New functions. (arith_init): Register sinh, cosh, tanh, asinh, acosh and atanh intrinsic functions, and initialize the new symbol variables. * configure: Detect availability of hyperbolic functions in math library and defne HAVE_HYPERBOLICS as 1 in config.h accordingly. * lib.h (sineh, cosih, tangh, asineh, acosih, atangh): Declared. * txr.1: Documented new hyperbolic functions and their method counterparts that a numeric struct can implement.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index 87631366..21523893 100755
--- a/configure
+++ b/configure
@@ -2334,7 +2334,27 @@ else
printf "no\n"
fi
+printf "Checking for hyperbolic functions (sinh, ...) ... "
+cat > conftest.c <<!
+#include <math.h>
+int main(void)
+{
+ double a = cosh(0.5);
+ double b = sinh(0.5);
+ double c = tanh(0.5);
+ double d = acosh(0.5);
+ double e = asinh(0.5);
+ double f = atanh(0.5);
+ return 0;
+}
+!
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_HYPERBOLICS 1\n" >> config.h
+else
+ printf "no\n"
+fi
printf "Checking for glob ... "