17 * Returns hyperbolic sine of argument in the range MINLOG to
20 * The range is partitioned into two segments. If |x| <= 1, a
21 * rational function of the form x + x**3 P(x)/Q(x) is employed.
22 * Otherwise the calculation is sinh(x) = ( exp(x) - exp(-x) )/2.
29 * arithmetic domain # trials peak rms
30 * DEC +- 88 50000 4.0e-17 7.7e-18
31 * IEEE +-MAXLOG 30000 2.6e-16 5.7e-17
36 Cephes Math Library Release 2.8: June, 2000
37 Copyright 1984, 1995, 2000 by Stephen L. Moshier
44 -7.89474443963537015605E-1,
45 -1.63725857525983828727E2,
46 -1.15614435765005216044E4,
47 -3.51754964808151394800E5
50 /* 1.00000000000000000000E0,*/
51 -2.77711081420602794433E2,
52 3.61578279834431989373E4,
53 -2.11052978884890840399E6
58 static unsigned short P[] = {
59 0140112,0015377,0042731,0163255,
60 0142043,0134721,0146177,0123761,
61 0143464,0122706,0034353,0006017,
62 0144653,0140536,0157665,0054045
64 static unsigned short Q[] = {
65 /*0040200,0000000,0000000,0000000,*/
66 0142212,0155404,0133513,0022040,
67 0044015,0036723,0173271,0011053,
68 0145400,0150407,0023710,0001034
73 static unsigned short P[] = {
74 0x3cd6,0xe8bb,0x435f,0xbfe9,
75 0xf4fe,0x398f,0x773a,0xc064,
76 0x6182,0xc71d,0x94b8,0xc0c6,
77 0xab05,0xdbf6,0x782b,0xc115
79 static unsigned short Q[] = {
80 /*0x0000,0x0000,0x0000,0x3ff0,*/
81 0x6484,0x96e9,0x5b60,0xc071,
82 0x2245,0x7ed7,0xa7ba,0x40e1,
83 0x0044,0xe4f9,0x1a20,0xc140
88 static unsigned short P[] = {
89 0xbfe9,0x435f,0xe8bb,0x3cd6,
90 0xc064,0x773a,0x398f,0xf4fe,
91 0xc0c6,0x94b8,0xc71d,0x6182,
92 0xc115,0x782b,0xdbf6,0xab05
94 static unsigned short Q[] = {
95 0xc071,0x5b60,0x96e9,0x6484,
96 0x40e1,0xa7ba,0x7ed7,0x2245,
97 0xc140,0x1a20,0xe4f9,0x0044
102 extern double fabs ( double );
103 extern double exp ( double );
104 extern double polevl ( double, void *, int );
105 extern double p1evl ( double, void *, int );
107 double fabs(), exp(), polevl(), p1evl();
109 extern double INFINITY, MINLOG, MAXLOG, LOGE2;
121 if( (x > (MAXLOG + LOGE2)) || (x > -(MINLOG-LOGE2) ) )
123 mtherr( "sinh", DOMAIN );
131 if( a >= (MAXLOG - LOGE2) )
147 return( x + x * a * (polevl(a,P,3)/p1evl(a,Q,3)) );