1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #include "cdefs-compat.h"
- #include <openlibm.h>
- #include "math_private.h"
- static const double one = 1.0, shuge = 1.0e307;
- DLLEXPORT double
- __ieee754_sinh(double x)
- {
- double t,h;
- int32_t ix,jx;
-
- GET_HIGH_WORD(jx,x);
- ix = jx&0x7fffffff;
-
- if(ix>=0x7ff00000) return x+x;
- h = 0.5;
- if (jx<0) h = -h;
-
- if (ix < 0x40360000) {
- if (ix<0x3e300000)
- if(shuge+x>one) return x;
- t = expm1(fabs(x));
- if(ix<0x3ff00000) return h*(2.0*t-t*t/(t+one));
- return h*(t+t/(t+one));
- }
-
- if (ix < 0x40862E42) return h*__ieee754_exp(fabs(x));
-
- if (ix<=0x408633CE)
- return h*2.0*__ldexp_exp(fabs(x), -1);
-
- return x*shuge;
- }
|