summaryrefslogtreecommitdiff
path: root/src/math/sinh.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/sinh.c')
-rw-r--r--src/math/sinh.c29
1 files changed, 29 insertions, 0 deletions
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 <math.h>
+#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)
+*/