remove leftover declarations for removed functions from pthread_impl.h
[musl.git] / src / math / sinhf.c
blob6ad19ea2b0c8d2d639d49feef32106a80b7f0235
1 #include "libm.h"
3 float sinhf(float x)
5 union {float f; uint32_t i;} u = {.f = x};
6 uint32_t w;
7 float t, h, absx;
9 h = 0.5;
10 if (u.i >> 31)
11 h = -h;
12 /* |x| */
13 u.i &= 0x7fffffff;
14 absx = u.f;
15 w = u.i;
17 /* |x| < log(FLT_MAX) */
18 if (w < 0x42b17217) {
19 t = expm1f(absx);
20 if (w < 0x3f800000) {
21 if (w < 0x3f800000 - (12<<23))
22 return x;
23 return h*(2*t - t*t/(t+1));
25 return h*(t + t/(t+1));
28 /* |x| > logf(FLT_MAX) or nan */
29 t = 2*h*__expo2f(absx);
30 return t;