diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-12-07 14:07:57 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-12-07 14:07:57 -0800 |
commit | 6a88c55cdf0bd3bd6fc33086529bf4e79fd1e03e (patch) | |
tree | 82f3c89dab1bdd8a577346802b0e01d9795a24a9 /configure | |
parent | f018af6fe6b0c867c747217890b8b02d8e6d7ffb (diff) | |
download | txr-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-x | configure | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 ... " |