31#define USE_SCALEDOUBLE_1
32#define USE_SCALEDOUBLE_2
33#define USE_INFINITY_WITH_FLAGS
34#define USE_VAL_WITH_FLAGS
35#define USE_HANDLE_ERROR
38#undef USE_SCALEDOUBLE_1
39#undef USE_SCALEDOUBLE_2
40#undef USE_INFINITY_WITH_FLAGS
41#undef USE_VAL_WITH_FLAGS
42#undef USE_HANDLE_ERROR
68 max_cosh_arg = 7.10475860073943977113e+02,
69 thirtytwo_by_log2 = 4.61662413084468283841e+01,
70 log2_by_32_lead = 2.16608493356034159660e-02,
71 log2_by_32_tail = 5.68948749532545630390e-11,
73 small_threshold = 20.0;
79 static const double sinh_lead[ 37] = {
80 0.00000000000000000000e+00,
81 1.17520117759704589844e+00,
82 3.62686038017272949219e+00,
83 1.00178747177124023438e+01,
84 2.72899169921875000000e+01,
85 7.42032089233398437500e+01,
86 2.01713153839111328125e+02,
87 5.48316116333007812500e+02,
88 1.49047882080078125000e+03,
89 4.05154187011718750000e+03,
90 1.10132326660156250000e+04,
91 2.99370708007812500000e+04,
92 8.13773945312500000000e+04,
93 2.21206695312500000000e+05,
94 6.01302140625000000000e+05,
95 1.63450865625000000000e+06,
96 4.44305525000000000000e+06,
97 1.20774762500000000000e+07,
98 3.28299845000000000000e+07,
99 8.92411500000000000000e+07,
100 2.42582596000000000000e+08,
101 6.59407856000000000000e+08,
102 1.79245641600000000000e+09,
103 4.87240166400000000000e+09,
104 1.32445608960000000000e+10,
105 3.60024494080000000000e+10,
106 9.78648043520000000000e+10,
107 2.66024116224000000000e+11,
108 7.23128516608000000000e+11,
109 1.96566712320000000000e+12,
110 5.34323724288000000000e+12,
111 1.45244246507520000000e+13,
112 3.94814795284480000000e+13,
113 1.07321789251584000000e+14,
114 2.91730863685632000000e+14,
115 7.93006722514944000000e+14,
116 2.15561576592179200000e+15};
118 static const double sinh_tail[ 37] = {
119 0.00000000000000000000e+00,
120 1.60467555584448807892e-08,
121 2.76742892754807136947e-08,
122 2.09697499555224576530e-07,
123 2.04940252448908240062e-07,
124 1.65444891522700935932e-06,
125 3.53116789999998198721e-06,
126 6.94023870987375490695e-06,
127 4.98876893611587449271e-06,
128 3.19656024605152215752e-05,
129 2.08687768377236501204e-04,
130 4.84668088325403796299e-05,
131 1.17517985422733832468e-03,
132 6.90830086959560562415e-04,
133 1.45697262451506548420e-03,
134 2.99859023684906737806e-02,
135 1.02538800507941396667e-02,
136 1.26787628407699110022e-01,
137 6.86652479544033744752e-02,
138 4.81593627621056619148e-01,
139 1.70489513795397629181e+00,
140 1.12416073482258713767e+01,
141 7.06579578070110514432e+00,
142 5.91244512999659974639e+01,
143 1.68921736147050694399e+02,
144 2.60692936262073658327e+02,
145 3.62419382134885609048e+02,
146 4.07689930834187271103e+03,
147 1.55377375868385224749e+04,
148 2.53720210371943067003e+04,
149 4.78822310734952334315e+04,
150 1.81871712615542812273e+05,
151 5.62892347580489004031e+05,
152 6.41374032312148716301e+05,
153 7.57809544070145115256e+06,
154 3.64177136406482197344e+06,
155 7.63580561355670914054e+06};
157 static const double cosh_lead[ 37] = {
158 1.00000000000000000000e+00,
159 1.54308062791824340820e+00,
160 3.76219564676284790039e+00,
161 1.00676617622375488281e+01,
162 2.73082327842712402344e+01,
163 7.42099475860595703125e+01,
164 2.01715633392333984375e+02,
165 5.48317031860351562500e+02,
166 1.49047915649414062500e+03,
167 4.05154199218750000000e+03,
168 1.10132329101562500000e+04,
169 2.99370708007812500000e+04,
170 8.13773945312500000000e+04,
171 2.21206695312500000000e+05,
172 6.01302140625000000000e+05,
173 1.63450865625000000000e+06,
174 4.44305525000000000000e+06,
175 1.20774762500000000000e+07,
176 3.28299845000000000000e+07,
177 8.92411500000000000000e+07,
178 2.42582596000000000000e+08,
179 6.59407856000000000000e+08,
180 1.79245641600000000000e+09,
181 4.87240166400000000000e+09,
182 1.32445608960000000000e+10,
183 3.60024494080000000000e+10,
184 9.78648043520000000000e+10,
185 2.66024116224000000000e+11,
186 7.23128516608000000000e+11,
187 1.96566712320000000000e+12,
188 5.34323724288000000000e+12,
189 1.45244246507520000000e+13,
190 3.94814795284480000000e+13,
191 1.07321789251584000000e+14,
192 2.91730863685632000000e+14,
193 7.93006722514944000000e+14,
194 2.15561576592179200000e+15};
196 static const double cosh_tail[ 37] = {
197 0.00000000000000000000e+00,
198 6.89700037027478056904e-09,
199 4.43207835591715833630e-08,
200 2.33540217013828929694e-07,
201 5.17452463948269748331e-08,
202 9.38728274131605919153e-07,
203 2.73012191010840495544e-06,
204 3.29486051438996307950e-06,
205 4.75803746362771416375e-06,
206 3.33050940471947692369e-05,
207 9.94707313972136215365e-06,
208 6.51685096227860253398e-05,
209 1.18132406658066663359e-03,
210 6.93090416366541877541e-04,
211 1.45780415323416845386e-03,
212 2.99862082708111758744e-02,
213 1.02539925859688602072e-02,
214 1.26787669807076286421e-01,
215 6.86652631843830962843e-02,
216 4.81593633223853068159e-01,
217 1.70489514001513020602e+00,
218 1.12416073489841270572e+01,
219 7.06579578098005001152e+00,
220 5.91244513000686140458e+01,
221 1.68921736147088438429e+02,
222 2.60692936262087528121e+02,
223 3.62419382134890611269e+02,
224 4.07689930834187453002e+03,
225 1.55377375868385224749e+04,
226 2.53720210371943103382e+04,
227 4.78822310734952334315e+04,
228 1.81871712615542812273e+05,
229 5.62892347580489004031e+05,
230 6.41374032312148716301e+05,
231 7.57809544070145115256e+06,
232 3.64177136406482197344e+06,
233 7.63580561355670914054e+06};
235 unsigned long long ux,
aux, xneg;
242 aux = ux & ~SIGNBIT_DP64;
243 if (
aux < 0x3e30000000000000)
257 return infinity_with_flags(0);
265 if (
y >= max_cosh_arg)
272 else if (
y >= small_threshold)
282 splitexp(
y, 1.0, thirtytwo_by_log2, log2_by_32_lead,
283 log2_by_32_tail, &
m, &z1, &z2);
287 z = scaleDouble_1((z1+z2),
m);
289 z = scaleDouble_2((z1+z2),
m);
302 double dy, dy2, sdy, cdy;
308 sdy =
dy*dy2*(0.166666666666666667013899e0 +
309 (0.833333333333329931873097e-2 +
310 (0.198412698413242405162014e-3 +
311 (0.275573191913636406057211e-5 +
312 (0.250521176994133472333666e-7 +
313 (0.160576793121939886190847e-9 +
314 0.7746188980094184251527126e-12*dy2)*dy2)*dy2)*dy2)*dy2)*dy2);
316 cdy = dy2*(0.500000000000000005911074e0 +
317 (0.416666666666660876512776e-1 +
318 (0.138888888889814854814536e-2 +
319 (0.248015872460622433115785e-4 +
320 (0.275573350756016588011357e-6 +
321 (0.208744349831471353536305e-8 +
322 0.1163921388172173692062032e-10*dy2)*dy2)*dy2)*dy2)*dy2)*dy2);
329 ux &= 0xfffffffff8000000;
331 sdy2 = sdy + (
dy - sdy1);
333 z = ((((((cosh_tail[ind]*cdy + sinh_tail[ind]*sdy2)
334 + sinh_tail[ind]*sdy1) + cosh_tail[ind])
335 + cosh_lead[ind]*cdy) + sinh_lead[ind]*sdy2)
336 + sinh_lead[ind]*sdy1) + cosh_lead[ind];
338 z = ((((((cosh_tail[ind]*cdy + sinh_tail[ind]*sdy)
339 + sinh_tail[ind]*
dy) + cosh_tail[ind])
340 + cosh_lead[ind]*cdy) + sinh_lead[ind]*sdy)
341 + sinh_lead[ind]*
dy) + cosh_lead[ind];
double __cdecl _handle_error(char *fname, int opcode, unsigned long long value, int type, int flags, int error, double arg1, double arg2, int nargs)
Handles an error condition.
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
#define GET_BITS_DP64(x, ux)
#define PUT_BITS_DP64(ux, x)