From 6a88c55cdf0bd3bd6fc33086529bf4e79fd1e03e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 7 Dec 2019 14:07:57 -0800 Subject: 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. --- txr.1 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 13f082f3..6d214246 100644 --- a/txr.1 +++ b/txr.1 @@ -38606,6 +38606,22 @@ and .meta y to an angle in polar coordinates in the range [0, 2\(*p). +.coNP Functions @, sinh @, cosh @, tanh @, asinh @ acosh and @ atanh +.synb +.mets (sinh << argument ) +.mets (cosh << argument ) +.mets (tanh << argument ) +.mets (atanh << argument ) +.mets (asinh << argument ) +.mets (acosh << argument ) +.syne +.desc +These functions are the hyperbolic analogs of the trigonometric functions +.codn sin , +.code cos +and so forth. They convert their argument to floating point and +return a float result. + .coNP Functions @, exp @, log @ log10 and @ log2 .synb .mets (exp << arg ) @@ -40635,6 +40651,12 @@ arguments must be integers. .um atan .bmnl atan2 .bmnr r-atan2 atan2 +.um sinh +.um cosh +.um tanh +.um asinh +.um acosh +.um atanh .um log .um log2 .um log10 -- cgit v1.2.3