From 7ef8a7379f7f7d09e71ccae2a0b688c3cd80423f Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 8 Feb 2019 18:42:39 -0500 Subject: merge sources into single tree --- src/math/sinh.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/math/sinh.c (limited to 'src/math/sinh.c') diff --git a/src/math/sinh.c b/src/math/sinh.c new file mode 100644 index 00000000..26363703 --- /dev/null +++ b/src/math/sinh.c @@ -0,0 +1,29 @@ +# define TGSOURCE "sinh.c" +#include +#include "nonstd/tgmath.h" +#include "errno.h" + +/** hyperbolic sine **/ +TYPE TGFN(sinh)(TYPE x) +{ + if (0) { + errno = ERANGE; /* The magnitude of ARGUMENT(x) is too large */ + /* RETURN_FAILURE(CONSTANT(HUGE_VAL), A range error occurred); */ + return TGHUGE; + } + + /* RETURN_SUCCESS(the hyperbolic sine of ARGUMENT(x)); */ + return x; +} + +/*** +compute hyperbolic sine of ARGUMENT(x). +***/ + +/* +IMPLEMENTATION(The value returned on a domain error, CONSTANT(HUGE_VAL)) +LINK(m) +*/ +/* +STDC(1) +*/ -- cgit v1.2.1