1 /* file: libm_error.c */
4 // Copyright (c) 2000 - 2003, Intel Corporation
5 // All rights reserved.
7 // Contributed 2000 by the Intel Numerics Group, Intel Corporation
9 // Redistribution and use in source and binary forms, with or without
10 // modification, are permitted provided that the following conditions are
13 // * Redistributions of source code must retain the above copyright
14 // notice, this list of conditions and the following disclaimer.
16 // * Redistributions in binary form must reproduce the above copyright
17 // notice, this list of conditions and the following disclaimer in the
18 // documentation and/or other materials provided with the distribution.
20 // * The name of Intel Corporation may not be used to endorse or promote
21 // products derived from this software without specific prior written
25 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
33 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 // Intel Corporation is the author of this code, and requests that all
38 // problem reports or change requests be submitted to it directly at
39 // http://www.intel.com/software/products/opensource/libraries/num.htm.
42 //==============================================================
43 // 2/02/00: Initial version
44 // 3/22/00: Updated to support flexible and dynamic error handling.
45 // 8/16/00: Changed all matherr function-calls to use the pmatherr
47 // 10/03/00: Corrected a scalb type.
48 // 11/28/00: Changed INPUT_XL to INPUT_XD for scalb_underflow case.
49 // 12/07/00: Added code to make scalbn error support equivalent to ldexp.
50 // 2/07/01: Added __declspec(align(16)) to long double constants to correct
52 // 4/23/01: Added code for remquo
53 // 6/07/01: Added code for fdim, lrint, lround, llrint, llround
54 // Deleted code for remquo
55 // 8/15/01: Added code for scalbln, nexttoward
56 // 12/10/01: Added code for erfc
57 // 12/27/01: Added code for degree argument functions
58 // 01/02/02: Added code for tand, cotd
59 // 01/15/02: Corrected SVID/XOPEN code for log1p, pow, and acosh
60 // 01/25/02: Corrected ISOC for lgamma and gamma to return EDOM for neg ints
61 // 01/28/02: Corrected SVID/XOPEN stderr message for log2
62 // 05/20/02: Added code for cot
63 // 07/01/02: Added code for sinhcosh
64 // 10/04/02: Underflow detection in ISOC path redefined to
65 // be zero rather than tiny and inexact
66 // 12/06/02: Added code for annuity and compound
67 // 01/30/03: Corrected test for underflow in ISOC path to not set denormal
68 // 04/10/03: Corrected ISOC branch for gamma/lgamma to return ERANGE for neg ints.
69 // Added code for tgamma
70 // 04/11/03: Corrected POSIX/SVID/XOPEN branches for gamma/lgamma
71 // to return EDOM for neg ints.
77 #include "libm_support.h"
80 # define pmatherr matherr
81 # define pmatherrf matherrf
82 # define pmatherrl matherrl
85 #if defined( __POSIX__ )
86 _LIB_VERSIONIMF
= _POSIX_
;
87 #elif defined( __XOPEN__ )
88 _LIB_VERSIONIMF
= _XOPEN_
;
89 #elif defined( __SVID__ )
90 _LIB_VERSIONIMF
= _SVID_
;
91 #elif defined( __IEEE__ )
92 _LIB_VERSIONIMF
= _IEEE_
;
94 _LIB_VERSIONIMF
= _ISOC_
;
97 /************************************************************/
98 /* matherrX function pointers and setusermatherrX functions */
99 /************************************************************/
100 int (*pmatherrf
)(struct exceptionf
*) = MATHERR_F
;
101 int (*pmatherr
)(struct EXC_DECL_D
*) = MATHERR_D
;
102 int (*pmatherrl
)(struct exceptionl
*) = matherrl
;
104 void __libm_setusermatherrf( int(*user_merrf
)(struct exceptionf
*) )
105 { pmatherrf
= ( (user_merrf
==NULL
)? (MATHERR_F
) : (user_merrf
) ); }
107 void __libm_setusermatherr( int(*user_merr
)(struct EXC_DECL_D
*) )
108 { pmatherr
= ( (user_merr
==NULL
)? (MATHERR_D
) : (user_merr
) ); }
110 void __libm_setusermatherrl( int(*user_merrl
)(struct exceptionl
*) )
111 { pmatherrl
= ( (user_merrl
==NULL
)? (matherrl
) : (user_merrl
) ); }
115 /***********************************************/
116 /* error-handling function, libm_error_support */
117 /***********************************************/
118 void __libm_error_support(void *arg1
,void *arg2
,void *retval
,error_types input_tag
)
122 struct __exception exc
;
124 struct exception exc
;
127 struct exceptionf excf
;
128 struct exceptionl excl
;
130 # if defined(__GNUC__)
131 #define ALIGNIT __attribute__ ((__aligned__ (16)))
132 # elif defined opensource
135 #define ALIGNIT __declspec(align(16))
138 # ifdef SIZE_LONG_INT_64
139 #define __INT_64__ signed long
141 #define __INT_64__ __int64
144 const char float_inf
[4] = {0x00,0x00,0x80,0x7F};
145 const char float_huge
[4] = {0xFF,0xFF,0x7F,0x7F};
146 const char float_zero
[4] = {0x00,0x00,0x00,0x00};
147 const char float_neg_inf
[4] = {0x00,0x00,0x80,0xFF};
148 const char float_neg_huge
[4] = {0xFF,0xFF,0x7F,0xFF};
149 const char float_neg_zero
[4] = {0x00,0x00,0x00,0x80};
151 const char double_inf
[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F};
154 const char double_huge
[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0x7F};
157 const char double_zero
[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
159 const char double_neg_inf
[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF};
162 const char double_neg_huge
[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF};
165 const char double_neg_zero
[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80};
167 const char long_double_inf
[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00};
170 const char long_double_huge
[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00};
173 const char long_double_zero
[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
175 const char long_double_neg_inf
[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00};
178 const char long_double_neg_huge
[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x00,0x00,0x00,0x00,0x00,0x00};
181 const char long_double_neg_zero
[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00};
183 #define RETVAL_HUGE_VALL *(long double *)retval = *(long double *)long_double_inf
184 #define RETVAL_NEG_HUGE_VALL *(long double *)retval = *(long double *)long_double_neg_inf
185 #define RETVAL_HUGEL *(long double *)retval = (long double)*(float *)float_huge
186 #define RETVAL_NEG_HUGEL *(long double *)retval =(long double)*(float*)float_neg_huge
188 #define RETVAL_HUGE_VALD *(double *)retval = *(double *) double_inf
189 #define RETVAL_NEG_HUGE_VALD *(double *)retval = *(double *) double_neg_inf
190 #define RETVAL_HUGED *(double *)retval = (double) *(float *)float_huge
191 #define RETVAL_NEG_HUGED *(double *)retval = (double) *(float *) float_neg_huge
193 #define RETVAL_HUGE_VALF *(float *)retval = *(float *) float_inf
194 #define RETVAL_NEG_HUGE_VALF *(float *)retval = *(float *) float_neg_inf
195 #define RETVAL_HUGEF *(float *)retval = *(float *) float_huge
196 #define RETVAL_NEG_HUGEF *(float *)retval = *(float *) float_neg_huge
198 #define RETVAL_ZEROL *(long double *)retval = *(long double *)long_double_zero
199 #define RETVAL_ZEROD *(double *)retval = *(double *)double_zero
200 #define RETVAL_ZEROF *(float *)retval = *(float *)float_zero
202 #define RETVAL_NEG_ZEROL *(long double *)retval = *(long double *)long_double_neg_zero
203 #define RETVAL_NEG_ZEROD *(double *)retval = *(double *)double_neg_zero
204 #define RETVAL_NEG_ZEROF *(float *)retval = *(float *)float_neg_zero
206 #define RETVAL_ONEL *(long double *)retval = (long double) 1.0
207 #define RETVAL_ONED *(double *)retval = 1.0
208 #define RETVAL_ONEF *(float *)retval = 1.0f
210 #define NOT_MATHERRL excl.arg1=*(long double *)arg1;excl.arg2=*(long double *)arg2;excl.retval=*(long double *)retval;if(!pmatherrl(&excl))
211 #define NOT_MATHERRD exc.arg1=*(double *)arg1;exc.arg2=*(double *)arg2;exc.retval=*(double *)retval;if(!pmatherr(&exc))
212 #define NOT_MATHERRF excf.arg1=*(float *)arg1;excf.arg2=*(float *)arg2;excf.retval=*(float *)retval;if(!pmatherrf(&excf))
214 #define ifSVID if(_LIB_VERSIONIMF==_SVID_)
216 #define NAMEL excl.name
217 #define NAMED exc.name
218 #define NAMEF excf.name
221 // These should work OK for MS because they are ints -
222 // leading underbars are not necessary.
232 #define SINGL excl.type = SING
233 #define DOMAINL excl.type = DOMAIN
234 #define OVERFLOWL excl.type = OVERFLOW
235 #define UNDERFLOWL excl.type = UNDERFLOW
236 #define TLOSSL excl.type = TLOSS
237 #define SINGD exc.type = SING
238 #define DOMAIND exc.type = DOMAIN
239 #define OVERFLOWD exc.type = OVERFLOW
240 #define UNDERFLOWD exc.type = UNDERFLOW
241 #define TLOSSD exc.type = TLOSS
242 #define SINGF excf.type = SING
243 #define DOMAINF excf.type = DOMAIN
244 #define OVERFLOWF excf.type = OVERFLOW
245 #define UNDERFLOWF excf.type = UNDERFLOW
246 #define TLOSSF excf.type = TLOSS
248 #define INPUT_XL (excl.arg1=*(long double*)arg1)
249 #define INPUT_XD (exc.arg1=*(double*)arg1)
250 #define INPUT_XF (excf.arg1=*(float*)arg1)
251 #define INPUT_YL (excl.arg2=*(long double*)arg2)
252 #define INPUT_YD (exc.arg2=*(double*)arg2)
253 #define INPUT_YF (excf.arg2=*(float*)arg2)
254 #define INPUT_RESL (*(long double *)retval)
255 #define INPUT_RESD (*(double *)retval)
256 #define INPUT_RESF (*(float *)retval)
258 #define WRITEL_LOG_ZERO fputs("logl: SING error\n",stderr)
259 #define WRITED_LOG_ZERO fputs("log: SING error\n",stderr)
260 #define WRITEF_LOG_ZERO fputs("logf: SING error\n",stderr)
261 #define WRITEL_LOG_NEGATIVE fputs("logl: DOMAIN error\n",stderr)
262 #define WRITED_LOG_NEGATIVE fputs("log: DOMAIN error\n",stderr)
263 #define WRITEF_LOG_NEGATIVE fputs("logf: DOMAIN error\n",stderr)
264 #define WRITEL_Y0_ZERO fputs("y0l: DOMAIN error\n",stderr)
265 #define WRITED_Y0_ZERO fputs("y0: DOMAIN error\n",stderr)
266 #define WRITEF_Y0_ZERO fputs("y0f: DOMAIN error\n",stderr)
267 #define WRITEL_Y0_NEGATIVE fputs("y0l: DOMAIN error\n",stderr)
268 #define WRITED_Y0_NEGATIVE fputs("y0: DOMAIN error\n",stderr)
269 #define WRITEF_Y0_NEGATIVE fputs("y0f: DOMAIN error\n",stderr)
270 #define WRITEL_Y1_ZERO fputs("y1l: DOMAIN error\n",stderr)
271 #define WRITED_Y1_ZERO fputs("y1: DOMAIN error\n",stderr)
272 #define WRITEF_Y1_ZERO fputs("y1f: DOMAIN error\n",stderr)
273 #define WRITEL_Y1_NEGATIVE fputs("y1l: DOMAIN error\n",stderr)
274 #define WRITED_Y1_NEGATIUE fputs("y1: DOMAIN error\n",stderr)
275 #define WRITEF_Y1_NEGATIVE fputs("y1f: DOMAIN error\n",stderr)
276 #define WRITEL_YN_ZERO fputs("ynl: DOMAIN error\n",stderr)
277 #define WRITED_YN_ZERO fputs("yn: DOMAIN error\n",stderr)
278 #define WRITEF_YN_ZERO fputs("ynf: DOMAIN error\n",stderr)
279 #define WRITEL_YN_NEGATIVE fputs("ynl: DOMAIN error\n",stderr)
280 #define WRITED_YN_NEGATIVE fputs("yn: DOMAIN error\n",stderr)
281 #define WRITEF_YN_NEGATIVE fputs("ynf: DOMAIN error\n",stderr)
282 #define WRITEL_LOG1P_ZERO fputs("log1pl: SING error\n",stderr)
283 #define WRITED_LOG1P_ZERO fputs("log1p: SING error\n",stderr)
284 #define WRITEF_LOG1P_ZERO fputs("log1pf: SING error\n",stderr)
285 #define WRITEL_LOG1P_NEGATIVE fputs("log1pl: DOMAIN error\n",stderr)
286 #define WRITED_LOG1P_NEGATIVE fputs("log1p: DOMAIN error\n",stderr)
287 #define WRITEF_LOG1P_NEGATIVE fputs("log1pf: DOMAIN error\n",stderr)
288 #define WRITEL_LOG10_ZERO fputs("log10l: SING error\n",stderr)
289 #define WRITED_LOG10_ZERO fputs("log10: SING error\n",stderr)
290 #define WRITEF_LOG10_ZERO fputs("log10f: SING error\n",stderr)
291 #define WRITEL_LOG10_NEGATIVE fputs("log10l: DOMAIN error\n",stderr)
292 #define WRITED_LOG10_NEGATIVE fputs("log10: DOMAIN error\n",stderr)
293 #define WRITEF_LOG10_NEGATIVE fputs("log10f: DOMAIN error\n",stderr)
294 #define WRITEL_LOG2_ZERO fputs("log2l: SING error\n",stderr)
295 #define WRITED_LOG2_ZERO fputs("log2: SING error\n",stderr)
296 #define WRITEF_LOG2_ZERO fputs("log2f: SING error\n",stderr)
297 #define WRITEL_LOG2_NEGATIVE fputs("log2l: DOMAIN error\n",stderr)
298 #define WRITED_LOG2_NEGATIVE fputs("log2: DOMAIN error\n",stderr)
299 #define WRITEF_LOG2_NEGATIVE fputs("log2f: DOMAIN error\n",stderr)
300 #define WRITEL_POW_ZERO_TO_ZERO fputs("powl(0,0): DOMAIN error\n",stderr)
301 #define WRITED_POW_ZERO_TO_ZERO fputs("pow(0,0): DOMAIN error\n",stderr)
302 #define WRITEF_POW_ZERO_TO_ZERO fputs("powf(0,0): DOMAIN error\n",stderr)
303 #define WRITEL_POW_ZERO_TO_NEGATIVE fputs("powl(0,negative): DOMAIN error\n",stderr)
304 #define WRITED_POW_ZERO_TO_NEGATIVE fputs("pow(0,negative): DOMAIN error\n",stderr)
305 #define WRITEF_POW_ZERO_TO_NEGATIVE fputs("powf(0,negative): DOMAIN error\n",stderr)
306 #define WRITEL_POW_NEG_TO_NON_INTEGER fputs("powl(negative,non-integer): DOMAIN error\n",stderr)
307 #define WRITED_POW_NEG_TO_NON_INTEGER fputs("pow(negative,non-integer): DOMAIN error\n",stderr)
308 #define WRITEF_POW_NEG_TO_NON_INTEGER fputs("powf(negative,non-integer): DOMAIN error\n",stderr)
309 #define WRITEL_ATAN2_ZERO_BY_ZERO fputs("atan2l: DOMAIN error\n",stderr)
310 #define WRITED_ATAN2_ZERO_BY_ZERO fputs("atan2: DOMAIN error\n",stderr)
311 #define WRITEF_ATAN2_ZERO_BY_ZERO fputs("atan2f: DOMAIN error\n",stderr)
312 #define WRITEL_SQRT fputs("sqrtl: DOMAIN error\n",stderr)
313 #define WRITED_SQRT fputs("sqrt: DOMAIN error\n",stderr)
314 #define WRITEF_SQRT fputs("sqrtf: DOMAIN error\n",stderr)
315 #define WRITEL_FMOD fputs("fmodl: DOMAIN error\n",stderr)
316 #define WRITED_FMOD fputs("fmod: DOMAIN error\n",stderr)
317 #define WRITEF_FMOD fputs("fmodf: DOMAIN error\n",stderr)
318 #define WRITEL_REM fputs("remainderl: DOMAIN error\n",stderr)
319 #define WRITED_REM fputs("remainder: DOMAIN error\n",stderr)
320 #define WRITEF_REM fputs("remainderf: DOMAIN error\n",stderr)
321 #define WRITEL_ACOS fputs("acosl: DOMAIN error\n",stderr)
322 #define WRITED_ACOS fputs("acos: DOMAIN error\n",stderr)
323 #define WRITEF_ACOS fputs("acosf: DOMAIN error\n",stderr)
324 #define WRITEL_ASIN fputs("asinl: DOMAIN error\n",stderr)
325 #define WRITED_ASIN fputs("asin: DOMAIN error\n",stderr)
326 #define WRITEF_ASIN fputs("asinf: DOMAIN error\n",stderr)
327 #define WRITEL_ACOSH fputs("acoshl: DOMAIN error\n",stderr)
328 #define WRITED_ACOSH fputs("acosh: DOMAIN error\n",stderr)
329 #define WRITEF_ACOSH fputs("acoshf: DOMAIN error\n",stderr)
330 #define WRITEL_ATANH_GT_ONE fputs("atanhl: DOMAIN error\n",stderr)
331 #define WRITED_ATANH_GT_ONE fputs("atanh: DOMAIN error\n",stderr)
332 #define WRITEF_ATANH_GT_ONE fputs("atanhf: DOMAIN error\n",stderr)
333 #define WRITEL_ATANH_EQ_ONE fputs("atanhl: SING error\n",stderr)
334 #define WRITED_ATANH_EQ_ONE fputs("atanh: SING error\n",stderr)
335 #define WRITEF_ATANH_EQ_ONE fputs("atanhf: SING error\n",stderr)
336 #define WRITEL_LGAMMA_NEGATIVE fputs("lgammal: SING error\n",stderr)
337 #define WRITED_LGAMMA_NEGATIVE fputs("lgamma: SING error\n",stderr)
338 #define WRITEF_LGAMMA_NEGATIVE fputs("lgammaf: SING error\n",stderr)
339 #define WRITEL_GAMMA_NEGATIVE fputs("gammal: SING error\n",stderr)
340 #define WRITED_GAMMA_NEGATIVE fputs("gamma: SING error\n",stderr)
341 #define WRITEF_GAMMA_NEGATIVE fputs("gammaf: SING error\n",stderr)
342 #define WRITEL_TGAMMA_NEGATIVE fputs("tgammal: DOMAIN error\n",stderr)
343 #define WRITED_TGAMMA_NEGATIVE fputs("tgamma: DOMAIN error\n",stderr)
344 #define WRITEF_TGAMMA_NEGATIVE fputs("tgammaf: DOMAIN error\n",stderr)
345 #define WRITEL_J0_TLOSS fputs("j0l: TLOSS error\n",stderr)
346 #define WRITEL_Y0_TLOSS fputs("y0l: TLOSS error\n",stderr)
347 #define WRITEL_J1_TLOSS fputs("j1l: TLOSS error\n",stderr)
348 #define WRITEL_Y1_TLOSS fputs("y1l: TLOSS error\n",stderr)
349 #define WRITEL_JN_TLOSS fputs("jnl: TLOSS error\n",stderr)
350 #define WRITEL_YN_TLOSS fputs("ynl: TLOSS error\n",stderr)
351 #define WRITED_J0_TLOSS fputs("j0: TLOSS error\n",stderr)
352 #define WRITED_Y0_TLOSS fputs("y0: TLOSS error\n",stderr)
353 #define WRITED_J1_TLOSS fputs("j1: TLOSS error\n",stderr)
354 #define WRITED_Y1_TLOSS fputs("y1: TLOSS error\n",stderr)
355 #define WRITED_JN_TLOSS fputs("jn: TLOSS error\n",stderr)
356 #define WRITED_YN_TLOSS fputs("yn: TLOSS error\n",stderr)
357 #define WRITEF_J0_TLOSS fputs("j0f: TLOSS error\n",stderr)
358 #define WRITEF_Y0_TLOSS fputs("y0f: TLOSS error\n",stderr)
359 #define WRITEF_J1_TLOSS fputs("j1f: TLOSS error\n",stderr)
360 #define WRITEF_Y1_TLOSS fputs("y1f: TLOSS error\n",stderr)
361 #define WRITEF_JN_TLOSS fputs("jnf: TLOSS error\n",stderr)
362 #define WRITEF_YN_TLOSS fputs("ynf: TLOSS error\n",stderr)
363 #define WRITEL_ACOSD fputs("acosdl: DOMAIN error\n",stderr)
364 #define WRITED_ACOSD fputs("acosd: DOMAIN error\n",stderr)
365 #define WRITEF_ACOSD fputs("acosdf: DOMAIN error\n",stderr)
366 #define WRITEL_ASIND fputs("asindl: DOMAIN error\n",stderr)
367 #define WRITED_ASIND fputs("asind: DOMAIN error\n",stderr)
368 #define WRITEF_ASIND fputs("asindf: DOMAIN error\n",stderr)
369 #define WRITEL_ATAN2D_ZERO_BY_ZERO fputs("atan2dl: DOMAIN error\n",stderr)
370 #define WRITED_ATAN2D_ZERO_BY_ZERO fputs("atan2d: DOMAIN error\n",stderr)
371 #define WRITEF_ATAN2D_ZERO_BY_ZERO fputs("atan2df: DOMAIN error\n",stderr)
374 /***********************/
376 /***********************/
377 if(_LIB_VERSIONIMF
==_IEEE_
) return;
379 /***********************/
381 /***********************/
382 else if(_LIB_VERSIONIMF
==_ISOC_
)
407 case exp10l_overflow
:
409 case exp10f_overflow
:
410 case expm1l_overflow
:
412 case expm1f_overflow
:
413 case hypotl_overflow
:
415 case hypotf_overflow
:
422 case scalbl_overflow
:
424 case scalbf_overflow
:
428 case nextafterl_overflow
:
429 case nextafter_overflow
:
430 case nextafterf_overflow
:
431 case nexttowardl_overflow
:
432 case nexttoward_overflow
:
433 case nexttowardf_overflow
:
434 case scalbnl_overflow
:
435 case scalbn_overflow
:
436 case scalbnf_overflow
:
437 case scalblnl_overflow
:
438 case scalbln_overflow
:
439 case scalblnf_overflow
:
440 case ldexpl_overflow
:
442 case ldexpf_overflow
:
443 case lgammal_overflow
:
444 case lgamma_overflow
:
445 case lgammaf_overflow
:
446 case gammal_overflow
:
448 case gammaf_overflow
:
449 case lgammal_negative
:
450 case lgamma_negative
:
451 case lgammaf_negative
:
452 case gammal_negative
:
454 case gammaf_negative
:
482 case sinhcoshl_overflow
:
483 case sinhcosh_overflow
:
484 case sinhcoshf_overflow
:
485 case annuityl_overflow
:
486 case annuity_overflow
:
487 case annuityf_overflow
:
488 case compoundl_overflow
:
489 case compound_overflow
:
490 case compoundf_overflow
:
491 case tgammal_overflow
:
492 case tgamma_overflow
:
493 case tgammaf_overflow
:
499 case exp2l_underflow
:
500 case scalbl_underflow
:
501 case scalbnl_underflow
:
502 case scalblnl_underflow
:
503 case ldexpl_underflow
:
504 case erfcl_underflow
:
505 case annuityl_underflow
:
506 case compoundl_underflow
:
508 if ( *(__INT_64__
*)retval
== 0 ) ERRNO_RANGE
;
514 case scalb_underflow
:
515 case scalbn_underflow
:
516 case scalbln_underflow
:
517 case ldexp_underflow
:
519 case annuity_underflow
:
520 case compound_underflow
:
522 if ( ((*(__INT_64__
*)retval
)<<1) == 0 ) ERRNO_RANGE
;
527 case exp2f_underflow
:
528 case scalbf_underflow
:
529 case scalbnf_underflow
:
530 case scalblnf_underflow
:
531 case ldexpf_underflow
:
532 case erfcf_underflow
:
533 case annuityf_underflow
:
534 case compoundf_underflow
:
536 if ( ((*(__INT_64__
*)retval
)<<33) == 0 ) ERRNO_RANGE
;
542 case log10l_negative
:
544 case log10f_negative
:
548 case log1pl_negative
:
550 case log1pf_negative
:
557 case powl_zero_to_negative
:
558 case powl_neg_to_non_integer
:
559 case pow_zero_to_negative
:
560 case pow_neg_to_non_integer
:
561 case powf_zero_to_negative
:
562 case powf_neg_to_non_integer
:
608 case annuityl_by_zero
:
609 case annuity_by_zero
:
610 case annuityf_by_zero
:
611 case annuityl_less_m1
:
612 case annuity_less_m1
:
613 case annuityf_less_m1
:
614 case compoundl_by_zero
:
615 case compound_by_zero
:
616 case compoundf_by_zero
:
617 case compoundl_less_m1
:
618 case compound_less_m1
:
619 case compoundf_less_m1
:
620 case tgammal_negative
:
621 case tgamma_negative
:
622 case tgammaf_negative
:
632 /***********************/
634 /***********************/
636 else if(_LIB_VERSIONIMF
==_POSIX_
)
640 case gammal_overflow
:
641 case lgammal_overflow
:
642 case tgammal_overflow
:
644 RETVAL_HUGE_VALL
; ERRNO_RANGE
; break;
647 case lgamma_overflow
:
648 case tgamma_overflow
:
650 RETVAL_HUGE_VALD
; ERRNO_RANGE
; break;
652 case gammaf_overflow
:
653 case lgammaf_overflow
:
654 case tgammaf_overflow
:
656 RETVAL_HUGE_VALF
; ERRNO_RANGE
; break;
658 case gammal_negative
:
659 case lgammal_negative
:
661 case lgamma_negative
:
662 case gammaf_negative
:
663 case lgammaf_negative
:
664 case tgammal_negative
:
665 case tgamma_negative
:
666 case tgammaf_negative
:
670 case ldexpl_overflow
:
671 case ldexpl_underflow
:
673 case ldexp_underflow
:
674 case ldexpf_overflow
:
675 case ldexpf_underflow
:
676 case scalbnl_overflow
:
677 case scalbnl_underflow
:
678 case scalbn_overflow
:
679 case scalbn_underflow
:
680 case scalbnf_overflow
:
681 case scalbnf_underflow
:
682 case scalblnl_overflow
:
683 case scalblnl_underflow
:
684 case scalbln_overflow
:
685 case scalbln_underflow
:
686 case scalblnf_overflow
:
687 case scalblnf_underflow
:
697 case sinhcoshl_overflow
:
698 case sinhcosh_overflow
:
699 case sinhcoshf_overflow
:
705 /* atanhl(|x| >= 1) */
711 /* atanh(|x| >= 1) */
717 /* atanhf(|x| >= 1) */
743 RETVAL_NEG_HUGE_VALL
; ERRNO_DOMAIN
; break;
752 RETVAL_NEG_HUGE_VALD
; ERRNO_DOMAIN
; break;
761 RETVAL_NEG_HUGE_VALF
; ERRNO_DOMAIN
; break;
770 RETVAL_NEG_HUGE_VALL
; ERRNO_DOMAIN
; break;
779 RETVAL_NEG_HUGE_VALD
; ERRNO_DOMAIN
; break;
788 RETVAL_NEG_HUGE_VALF
; ERRNO_DOMAIN
; break;
798 RETVAL_NEG_HUGE_VALL
; ERRNO_RANGE
; break;
808 RETVAL_NEG_HUGE_VALD
; ERRNO_RANGE
; break;
818 RETVAL_NEG_HUGE_VALF
; ERRNO_RANGE
; break;
821 case log1pl_negative
:
822 case log10l_negative
:
829 RETVAL_NEG_HUGE_VALL
;
842 RETVAL_NEG_HUGE_VALD
;
847 case log1pf_negative
:
848 case log10f_negative
:
855 RETVAL_NEG_HUGE_VALF
;
861 case exp10l_overflow
:
864 RETVAL_HUGE_VALL
; ERRNO_RANGE
; break;
871 RETVAL_HUGE_VALD
; ERRNO_RANGE
; break;
875 case exp10f_overflow
:
878 RETVAL_HUGE_VALF
; ERRNO_RANGE
; break;
881 case exp2l_underflow
:
884 RETVAL_ZEROL
; ERRNO_RANGE
; break;
890 RETVAL_ZEROD
; ERRNO_RANGE
; break;
893 case exp2f_underflow
:
896 RETVAL_ZEROF
; ERRNO_RANGE
; break;
904 /* jn and yn doubl-extended> XLOSS */
906 RETVAL_ZEROL
; ERRNO_RANGE
; break;
914 /* jn and yn double > XLOSS */
916 RETVAL_ZEROD
; ERRNO_RANGE
; break;
924 /* j0n and y0n > XLOSS */
926 RETVAL_ZEROF
; ERRNO_RANGE
; break;
928 case powl_zero_to_zero
:
933 case pow_zero_to_zero
:
938 case powf_zero_to_zero
:
944 case annuityl_overflow
:
945 case compoundl_overflow
:
946 /* powl(x,y) overflow */
948 if (INPUT_RESL
< 0) RETVAL_NEG_HUGE_VALL
;
949 else RETVAL_HUGE_VALL
;
953 case annuity_overflow
:
954 case compound_overflow
:
955 /* pow(x,y) overflow */
957 if (INPUT_RESD
< 0) RETVAL_NEG_HUGE_VALD
;
958 else RETVAL_HUGE_VALD
;
962 case annuityf_overflow
:
963 case compoundf_overflow
:
964 /* powf(x,y) overflow */
966 if (INPUT_RESF
< 0) RETVAL_NEG_HUGE_VALF
;
967 else RETVAL_HUGE_VALF
;
971 case annuityl_underflow
:
972 case compoundl_underflow
:
973 /* powl(x,y) underflow */
975 RETVAL_ZEROL
; ERRNO_RANGE
; break;
978 case annuity_underflow
:
979 case compound_underflow
:
980 /* pow(x,y) underflow */
982 RETVAL_ZEROD
; ERRNO_RANGE
; break;
985 case annuityf_underflow
:
986 case compoundf_underflow
:
987 /* powf(x,y) underflow */
989 RETVAL_ZEROF
; ERRNO_RANGE
; break;
991 case annuityl_by_zero
:
992 case annuityl_less_m1
:
993 case compoundl_by_zero
:
994 case compoundl_less_m1
:
995 case annuity_by_zero
:
996 case annuity_less_m1
:
997 case compound_by_zero
:
998 case compound_less_m1
:
999 case annuityf_by_zero
:
1000 case annuityf_less_m1
:
1001 case compoundf_by_zero
:
1002 case compoundf_less_m1
:
1004 ERRNO_DOMAIN
; break;
1006 case powl_zero_to_negative
:
1009 ERRNO_DOMAIN
; break;
1011 case pow_zero_to_negative
:
1014 ERRNO_DOMAIN
; break;
1016 case powf_zero_to_negative
:
1019 ERRNO_DOMAIN
; break;
1021 case powl_neg_to_non_integer
:
1022 /* neg**non_integral */
1024 ERRNO_DOMAIN
; break;
1026 case pow_neg_to_non_integer
:
1027 /* neg**non_integral */
1029 ERRNO_DOMAIN
; break;
1031 case powf_neg_to_non_integer
:
1032 /* neg**non-integral */
1034 ERRNO_DOMAIN
; break;
1036 case powl_nan_to_zero
:
1042 case pow_nan_to_zero
:
1047 case powf_nan_to_zero
:
1059 /* XXX arg1 and arg2 are switched!!!! */
1060 if (signbit (*(long double *) arg1
))
1062 *(long double *) retval
= __libm_copysignl (M_PIl
, *(long double *) arg2
);
1064 *(long double *) retval
= *(long double *) arg2
;
1066 ERRNO_DOMAIN
; break;
1075 /* XXX arg1 and arg2 are switched!!!! */
1076 if (signbit (*(double *) arg1
))
1078 *(double *) retval
= __libm_copysign (M_PI
, *(double *) arg2
);
1080 *(double *) retval
= *(double *) arg2
;
1082 ERRNO_DOMAIN
; break;
1092 if (signbit (*(float *) arg2
))
1094 *(float *) retval
= __libm_copysignf (M_PI
, *(float *) arg1
);
1096 *(float *) retval
= *(float *) arg1
;
1098 ERRNO_DOMAIN
; break;
1100 case expm1l_overflow
:
1101 /* expm1 overflow */
1105 case expm1_overflow
:
1106 /* expm1 overflow */
1110 case expm1f_overflow
:
1111 /* expm1f overflow */
1115 case expm1l_underflow
:
1116 /* expm1 underflow */
1120 case expm1_underflow
:
1121 /* expm1 underflow */
1125 case expm1f_underflow
:
1126 /* expm1f underflow */
1130 case hypotl_overflow
:
1131 /* hypotl overflow */
1133 RETVAL_HUGE_VALL
; ERRNO_RANGE
; break;
1135 case hypot_overflow
:
1136 /* hypot overflow */
1138 RETVAL_HUGE_VALD
; ERRNO_RANGE
; break;
1140 case hypotf_overflow
:
1141 /* hypotf overflow */
1143 RETVAL_HUGE_VALF
; ERRNO_RANGE
; break;
1145 case scalbl_underflow
:
1146 /* scalbl underflow */
1148 if (INPUT_XL
< 0) RETVAL_NEG_ZEROL
;
1152 case scalb_underflow
:
1153 /* scalb underflow */
1155 if (INPUT_XD
< 0) RETVAL_NEG_ZEROD
;
1159 case scalbf_underflow
:
1160 /* scalbf underflow */
1162 if (INPUT_XF
< 0) RETVAL_NEG_ZEROF
;
1166 case scalbl_overflow
:
1167 /* scalbl overflow */
1169 if (INPUT_XL
< 0) RETVAL_NEG_HUGE_VALL
;
1170 else RETVAL_HUGE_VALL
;
1173 case scalb_overflow
:
1174 /* scalb overflow */
1176 if (INPUT_XD
< 0) RETVAL_NEG_HUGE_VALD
;
1177 else RETVAL_HUGE_VALD
;
1180 case scalbf_overflow
:
1181 /* scalbf overflow */
1183 if (INPUT_XF
< 0) RETVAL_NEG_HUGE_VALF
;
1184 else RETVAL_HUGE_VALF
;
1190 ERRNO_DOMAIN
; break;
1195 ERRNO_DOMAIN
; break;
1200 ERRNO_DOMAIN
; break;
1210 ERRNO_DOMAIN
; break;
1220 ERRNO_DOMAIN
; break;
1230 ERRNO_DOMAIN
; break;
1240 ERRNO_DOMAIN
; break;
1250 ERRNO_DOMAIN
; break;
1259 ERRNO_DOMAIN
; break;
1261 case remainderl_by_zero
:
1265 ERRNO_DOMAIN
; break;
1267 case remainder_by_zero
:
1271 ERRNO_DOMAIN
; break;
1273 case remainderf_by_zero
:
1277 ERRNO_DOMAIN
; break;
1279 case coshl_overflow
:
1280 /* coshl overflows */
1282 RETVAL_HUGE_VALL
; ERRNO_RANGE
; break;
1285 /* cosh overflows */
1287 RETVAL_HUGE_VALD
; ERRNO_RANGE
; break;
1289 case coshf_overflow
:
1290 /* coshf overflows */
1292 RETVAL_HUGE_VALF
; ERRNO_RANGE
; break;
1294 case nextafterl_overflow
:
1295 case nextafter_overflow
:
1296 case nextafterf_overflow
:
1297 case nexttowardl_overflow
:
1298 case nexttoward_overflow
:
1299 case nexttowardf_overflow
:
1303 case sinhl_overflow
:
1304 /* sinhl overflows */
1306 if (INPUT_XL
> 0) RETVAL_HUGE_VALL
;
1307 else RETVAL_NEG_HUGE_VALL
;
1311 /* sinh overflows */
1313 if (INPUT_XD
> 0) RETVAL_HUGE_VALD
;
1314 else RETVAL_NEG_HUGE_VALD
;
1317 case sinhf_overflow
:
1318 /* sinhf overflows */
1320 if (INPUT_XF
> 0) RETVAL_HUGE_VALF
;
1321 else RETVAL_NEG_HUGE_VALF
;
1327 ERRNO_DOMAIN
; break;
1332 ERRNO_DOMAIN
; break;
1337 ERRNO_DOMAIN
; break;
1361 /*******************************/
1362 /* __SVID__ and __XOPEN__ Path */
1363 /*******************************/
1368 case ldexpl_overflow
:
1369 case ldexpl_underflow
:
1370 case ldexp_overflow
:
1371 case ldexp_underflow
:
1372 case ldexpf_overflow
:
1373 case ldexpf_underflow
:
1374 case scalbnl_overflow
:
1375 case scalbnl_underflow
:
1376 case scalbn_overflow
:
1377 case scalbn_underflow
:
1378 case scalbnf_overflow
:
1379 case scalbnf_underflow
:
1380 case scalblnl_overflow
:
1381 case scalblnl_underflow
:
1382 case scalbln_overflow
:
1383 case scalbln_underflow
:
1384 case scalblnf_overflow
:
1385 case scalblnf_underflow
:
1386 case tandl_overflow
:
1388 case tandf_overflow
:
1389 case cotdl_overflow
:
1391 case cotdf_overflow
:
1395 case annuityl_overflow
:
1396 case annuityl_underflow
:
1397 case annuity_overflow
:
1398 case annuity_underflow
:
1399 case annuityf_overflow
:
1400 case annuityf_underflow
:
1401 case compoundl_overflow
:
1402 case compoundl_underflow
:
1403 case compound_overflow
:
1404 case compound_underflow
:
1405 case compoundf_overflow
:
1406 case compoundf_underflow
:
1410 case annuityl_by_zero
:
1411 case annuityl_less_m1
:
1412 case annuity_by_zero
:
1413 case annuity_less_m1
:
1414 case annuityf_by_zero
:
1415 case annuityf_less_m1
:
1416 case compoundl_by_zero
:
1417 case compoundl_less_m1
:
1418 case compound_by_zero
:
1419 case compound_less_m1
:
1420 case compoundf_by_zero
:
1421 case compoundf_less_m1
:
1423 ERRNO_DOMAIN
; break;
1425 case sqrtl_negative
:
1428 DOMAINL
; NAMEL
= (char *) "sqrtl";
1439 { /* NaN already computed */
1440 NOT_MATHERRL
{ERRNO_DOMAIN
;}
1442 *(long double *)retval
= excl
.retval
;
1448 DOMAIND
; NAMED
= (char *) "sqrt";
1460 { /* NaN already computed */
1461 NOT_MATHERRD
{ERRNO_DOMAIN
;}
1463 *(double *)retval
= exc
.retval
;
1466 case sqrtf_negative
:
1469 DOMAINF
; NAMEF
= (char *) "sqrtf";
1481 NOT_MATHERRF
{ERRNO_DOMAIN
;}
1483 *(float *)retval
= excf
.retval
;
1489 SINGL
; NAMEL
= (char *) "logl";
1501 RETVAL_NEG_HUGE_VALL
;
1502 NOT_MATHERRL
{ERRNO_DOMAIN
;}
1504 *(long double *)retval
= excl
.retval
;
1510 SINGD
; NAMED
= (char *) "log";
1522 RETVAL_NEG_HUGE_VALD
;
1523 NOT_MATHERRD
{ERRNO_DOMAIN
;}
1525 *(double *)retval
= exc
.retval
;
1531 SINGF
; NAMEF
= (char *) "logf";
1543 RETVAL_NEG_HUGE_VALF
;
1544 NOT_MATHERRF
{ERRNO_DOMAIN
;}
1546 *(float *)retval
= excf
.retval
;
1553 DOMAINL
; NAMEL
= (char *) "logl";
1559 WRITEL_LOG_NEGATIVE
;
1565 RETVAL_NEG_HUGE_VALL
;
1566 NOT_MATHERRL
{ERRNO_DOMAIN
;}
1568 *(long double *)retval
= excl
.retval
;
1574 DOMAIND
; NAMED
= (char *) "log";
1580 WRITED_LOG_NEGATIVE
;
1586 RETVAL_NEG_HUGE_VALD
;
1587 NOT_MATHERRD
{ERRNO_DOMAIN
;}
1589 *(double *)retval
= exc
.retval
;
1595 DOMAINF
; NAMEF
= (char *) "logf";
1601 WRITEF_LOG_NEGATIVE
;
1607 RETVAL_NEG_HUGE_VALF
;
1608 NOT_MATHERRF
{ERRNO_DOMAIN
;}
1610 *(float *)retval
= excf
.retval
;
1616 SINGL
; NAMEL
= (char *) "log1pl";
1628 RETVAL_NEG_HUGE_VALL
;
1629 NOT_MATHERRL
{ERRNO_DOMAIN
;}
1631 *(long double *)retval
= excl
.retval
;
1637 SINGD
; NAMED
= (char *) "log1p";
1649 RETVAL_NEG_HUGE_VALD
;
1650 NOT_MATHERRD
{ERRNO_DOMAIN
;}
1652 *(double *)retval
= exc
.retval
;
1658 SINGF
; NAMEF
= (char *) "log1pf";
1670 RETVAL_NEG_HUGE_VALF
;
1671 NOT_MATHERRF
{ERRNO_DOMAIN
;}
1673 *(float *)retval
= excf
.retval
;
1676 case log1pl_negative
:
1677 /* log1pl(x < -1) */
1679 DOMAINL
; NAMEL
= (char *) "log1pl";
1685 WRITEL_LOG1P_NEGATIVE
;
1691 RETVAL_NEG_HUGE_VALL
;
1692 NOT_MATHERRL
{ERRNO_DOMAIN
;}
1694 *(long double *)retval
= excl
.retval
;
1697 case log1p_negative
:
1700 DOMAIND
; NAMED
= (char *) "log1p";
1706 WRITED_LOG1P_NEGATIVE
;
1712 RETVAL_NEG_HUGE_VALD
;
1713 NOT_MATHERRD
{ERRNO_DOMAIN
;}
1715 *(double *)retval
= exc
.retval
;
1718 case log1pf_negative
:
1719 /* log1pf(x < -1) */
1721 DOMAINF
; NAMEF
= (char *) "log1pf";
1727 WRITEF_LOG1P_NEGATIVE
;
1733 RETVAL_NEG_HUGE_VALF
;
1734 NOT_MATHERRF
{ERRNO_DOMAIN
;}
1736 *(float *)retval
= excf
.retval
;
1742 SINGL
; NAMEL
= (char *) "log10l";
1754 RETVAL_NEG_HUGE_VALL
;
1755 NOT_MATHERRL
{ERRNO_DOMAIN
;}
1757 *(long double *)retval
= excl
.retval
;
1763 SINGD
; NAMED
= (char *) "log10";
1775 RETVAL_NEG_HUGE_VALD
;
1776 NOT_MATHERRD
{ERRNO_DOMAIN
;}
1778 *(double *)retval
= exc
.retval
;
1784 SINGF
; NAMEF
= (char *) "log10f";
1796 RETVAL_NEG_HUGE_VALF
;
1797 NOT_MATHERRF
{ERRNO_DOMAIN
;}
1799 *(float *)retval
= excf
.retval
;
1802 case log10l_negative
:
1805 DOMAINL
; NAMEL
= (char *) "log10l";
1811 WRITEL_LOG10_NEGATIVE
;
1817 RETVAL_NEG_HUGE_VALL
;
1818 NOT_MATHERRL
{ERRNO_DOMAIN
;}
1820 *(long double *)retval
= excl
.retval
;
1823 case log10_negative
:
1826 DOMAIND
; NAMED
= (char *) "log10";
1832 WRITED_LOG10_NEGATIVE
;
1838 RETVAL_NEG_HUGE_VALD
;
1839 NOT_MATHERRD
{ERRNO_DOMAIN
;}
1841 *(double *)retval
= exc
.retval
;
1844 case log10f_negative
:
1847 DOMAINF
; NAMEF
= (char *) "log10f";
1853 WRITEF_LOG10_NEGATIVE
;
1859 RETVAL_NEG_HUGE_VALF
;
1860 NOT_MATHERRF
{ERRNO_DOMAIN
;}
1862 *(float *)retval
= excf
.retval
;
1868 SINGD
; NAMED
= (char *) "log2";
1880 RETVAL_NEG_HUGE_VALD
;
1881 NOT_MATHERRD
{ERRNO_DOMAIN
;}
1883 *(double *)retval
= exc
.retval
;
1889 SINGF
; NAMEF
= (char *) "log2f";
1901 RETVAL_NEG_HUGE_VALF
;
1902 NOT_MATHERRF
{ERRNO_DOMAIN
;}
1904 *(float *)retval
= excf
.retval
;
1907 case log2l_negative
:
1910 DOMAINL
; NAMEL
= (char *) "log2l";
1916 WRITEL_LOG2_NEGATIVE
;
1922 RETVAL_NEG_HUGE_VALL
;
1923 NOT_MATHERRL
{ERRNO_DOMAIN
;}
1925 *(long double *)retval
= excl
.retval
;
1931 DOMAIND
; NAMED
= (char *) "log2";
1937 WRITED_LOG2_NEGATIVE
;
1943 RETVAL_NEG_HUGE_VALD
;
1944 NOT_MATHERRD
{ERRNO_DOMAIN
;}
1946 *(double *)retval
= exc
.retval
;
1949 case log2f_negative
:
1952 DOMAINF
; NAMEF
= (char *) "log2f";
1958 WRITEF_LOG2_NEGATIVE
;
1964 RETVAL_NEG_HUGE_VALF
;
1965 NOT_MATHERRF
{ERRNO_DOMAIN
;}
1967 *(float *)retval
= excf
.retval
;
1973 OVERFLOWL
; NAMEL
= (char *) "expl";
1982 NOT_MATHERRL
{ERRNO_RANGE
;}
1983 *(long double *)retval
= excl
.retval
;
1989 OVERFLOWD
; NAMED
= (char *) "exp";
1998 NOT_MATHERRD
{ERRNO_RANGE
;}
1999 *(double *)retval
= exc
.retval
;
2005 OVERFLOWF
; NAMEF
= (char *) "expf";
2014 NOT_MATHERRF
{ERRNO_RANGE
;}
2015 *(float *)retval
= excf
.retval
;
2018 case expl_underflow
:
2019 /* expl underflow */
2021 UNDERFLOWL
; NAMEL
= (char *) "expl"; RETVAL_ZEROL
;
2022 NOT_MATHERRL
{ERRNO_RANGE
;}
2023 *(long double *)retval
= excl
.retval
;
2029 UNDERFLOWD
; NAMED
= (char *) "exp"; RETVAL_ZEROD
;
2030 NOT_MATHERRD
{ERRNO_RANGE
;}
2031 *(double *)retval
= exc
.retval
;
2034 case expf_underflow
:
2035 /* expf underflow */
2037 UNDERFLOWF
; NAMEF
= (char *) "expf"; RETVAL_ZEROF
;
2038 NOT_MATHERRF
{ERRNO_RANGE
;}
2039 *(float *)retval
= excf
.retval
;
2042 case powl_zero_to_zero
:
2045 DOMAINL
; NAMEL
= (char *) "powl";
2051 WRITEL_POW_ZERO_TO_ZERO
;
2054 *(long double *)retval
= excl
.retval
;
2059 case pow_zero_to_zero
:
2062 DOMAIND
; NAMED
= (char *) "pow";
2068 WRITED_POW_ZERO_TO_ZERO
;
2071 *(double *)retval
= exc
.retval
;
2076 case powf_zero_to_zero
:
2079 DOMAINF
; NAMEF
= (char *) "powf";
2085 WRITEF_POW_ZERO_TO_ZERO
;
2088 *(float *)retval
= excf
.retval
;
2094 /* powl(x,y) overflow */
2096 OVERFLOWL
; NAMEL
= (char *) "powl";
2099 if (INPUT_XL
< 0) RETVAL_NEG_HUGEL
;
2104 if (INPUT_XL
< 0) RETVAL_NEG_HUGE_VALL
;
2105 else RETVAL_HUGE_VALL
;
2107 NOT_MATHERRL
{ERRNO_RANGE
;}
2108 *(long double *)retval
= excl
.retval
;
2112 /* pow(x,y) overflow */
2114 OVERFLOWD
; NAMED
= (char *) "pow";
2117 if (INPUT_XD
< 0) RETVAL_NEG_HUGED
;
2122 if (INPUT_XD
< 0) RETVAL_NEG_HUGE_VALD
;
2123 else RETVAL_HUGE_VALD
;
2125 NOT_MATHERRD
{ERRNO_RANGE
;}
2126 *(double *)retval
= exc
.retval
;
2130 /* powf(x,y) overflow */
2132 OVERFLOWF
; NAMEF
= (char *) "powf";
2135 if (INPUT_XF
< 0) RETVAL_NEG_HUGEF
;
2140 if (INPUT_XF
< 0) RETVAL_NEG_HUGE_VALF
;
2141 else RETVAL_HUGE_VALF
;
2143 NOT_MATHERRF
{ERRNO_RANGE
;}
2144 *(float *)retval
= excf
.retval
;
2147 case powl_underflow
:
2148 /* powl(x,y) underflow */
2150 UNDERFLOWL
; NAMEL
= (char *) "powl"; RETVAL_ZEROL
;
2151 NOT_MATHERRL
{ERRNO_RANGE
;}
2152 *(long double *)retval
= excl
.retval
;
2156 /* pow(x,y) underflow */
2158 UNDERFLOWD
; NAMED
= (char *) "pow"; RETVAL_ZEROD
;
2159 NOT_MATHERRD
{ERRNO_RANGE
;}
2160 *(double *)retval
= exc
.retval
;
2163 case powf_underflow
:
2164 /* powf(x,y) underflow */
2166 UNDERFLOWF
; NAMEF
= (char *) "powf"; RETVAL_ZEROF
;
2167 NOT_MATHERRF
{ERRNO_RANGE
;}
2168 *(float *)retval
= excf
.retval
;
2171 case powl_zero_to_negative
:
2174 DOMAINL
; NAMEL
= (char *) "powl";
2180 WRITEL_POW_ZERO_TO_NEGATIVE
;
2186 RETVAL_NEG_HUGE_VALL
;
2187 NOT_MATHERRL
{ERRNO_DOMAIN
;}
2189 *(long double *)retval
= excl
.retval
;
2192 case pow_zero_to_negative
:
2195 DOMAIND
; NAMED
= (char *) "pow";
2201 WRITED_POW_ZERO_TO_NEGATIVE
;
2207 RETVAL_NEG_HUGE_VALD
;
2208 NOT_MATHERRD
{ERRNO_DOMAIN
;}
2210 *(double *)retval
= exc
.retval
;
2213 case powf_zero_to_negative
:
2216 DOMAINF
; NAMEF
= (char *) "powf";
2217 RETVAL_NEG_HUGE_VALF
;
2223 WRITEF_POW_ZERO_TO_NEGATIVE
;
2229 RETVAL_NEG_HUGE_VALF
;
2230 NOT_MATHERRF
{ERRNO_DOMAIN
;}
2232 *(float *)retval
= excf
.retval
;
2235 case powl_neg_to_non_integer
:
2236 /* neg**non_integral */
2238 DOMAINL
; NAMEL
= (char *) "powl";
2244 WRITEL_POW_NEG_TO_NON_INTEGER
;
2250 NOT_MATHERRL
{ERRNO_DOMAIN
;}
2252 *(long double *)retval
= excl
.retval
;
2255 case pow_neg_to_non_integer
:
2256 /* neg**non_integral */
2258 DOMAIND
; NAMED
= (char *) "pow";
2264 WRITED_POW_NEG_TO_NON_INTEGER
;
2270 NOT_MATHERRD
{ERRNO_DOMAIN
;}
2272 *(double *)retval
= exc
.retval
;
2275 case powf_neg_to_non_integer
:
2276 /* neg**non-integral */
2278 DOMAINF
; NAMEF
= (char *) "powf";
2284 WRITEF_POW_NEG_TO_NON_INTEGER
;
2290 NOT_MATHERRF
{ERRNO_DOMAIN
;}
2292 *(float *)retval
= excf
.retval
;
2295 case powl_nan_to_zero
:
2299 DOMAINL
; NAMEL
= (char *) "powl";
2300 *(long double *)retval
= *(long double *)arg1
;
2301 NOT_MATHERRL
{ERRNO_DOMAIN
;}
2302 *(long double *)retval
= excl
.retval
;
2305 case pow_nan_to_zero
:
2309 DOMAIND
; NAMED
= (char *) "pow";
2310 *(double *)retval
= *(double *)arg1
;
2311 NOT_MATHERRD
{ERRNO_DOMAIN
;}
2312 *(double *)retval
= exc
.retval
;
2315 case powf_nan_to_zero
:
2319 DOMAINF
; NAMEF
= (char *) "powf";
2320 *(float *)retval
= *(float *)arg1
;
2321 NOT_MATHERRF
{ERRNO_DOMAIN
;}
2322 *(float *)retval
= excf
.retval
;
2326 /* atan2l(0.0,0.0) */
2328 DOMAINL
; NAMEL
= (char *) "atan2l";
2334 WRITEL_ATAN2_ZERO_BY_ZERO
;
2338 *(long double *)retval
= excl
.retval
;
2342 /* atan2(0.0,0.0) */
2344 DOMAIND
; NAMED
= (char *) "atan2";
2350 WRITED_ATAN2_ZERO_BY_ZERO
;
2354 *(double *)retval
= exc
.retval
;
2358 /* atan2f(0.0,0.0) */
2360 DOMAINF
; NAMEF
= (char *) "atan2f";
2365 WRITEF_ATAN2_ZERO_BY_ZERO
;
2368 *(float *)retval
= excf
.retval
;
2372 /* atan2dl(0.0,0.0) */
2374 DOMAINL
; NAMEL
= (char *) "atan2dl";
2380 WRITEL_ATAN2D_ZERO_BY_ZERO
;
2384 *(long double *)retval
= excl
.retval
;
2388 /* atan2d(0.0,0.0) */
2390 DOMAIND
; NAMED
= (char *) "atan2d";
2396 WRITED_ATAN2D_ZERO_BY_ZERO
;
2400 *(double *)retval
= exc
.retval
;
2404 /* atan2df(0.0,0.0) */
2406 DOMAINF
; NAMEF
= (char *) "atan2df";
2411 WRITEF_ATAN2D_ZERO_BY_ZERO
;
2414 *(float *)retval
= excf
.retval
;
2417 case expm1_overflow
:
2418 /* expm1(finite) overflow */
2419 /* Overflow is the only documented */
2420 /* special value. */
2425 case expm1f_overflow
:
2426 /* expm1f(finite) overflow */
2431 case expm1_underflow
:
2432 /* expm1(finite) underflow */
2433 /* Underflow is not documented */
2434 /* special value. */
2439 case expm1f_underflow
:
2440 /* expm1f(finite) underflow */
2445 case scalbl_underflow
:
2446 /* scalbl underflow */
2448 UNDERFLOWL
; NAMEL
= (char *) "scalbl";
2449 if (INPUT_XL
< 0.0L) RETVAL_NEG_ZEROL
;
2451 NOT_MATHERRL
{ERRNO_RANGE
;}
2452 *(long double *)retval
= excl
.retval
;
2455 case scalb_underflow
:
2456 /* scalb underflow */
2458 UNDERFLOWD
; NAMED
= (char *) "scalb";
2459 if (INPUT_XD
< 0.0) RETVAL_NEG_ZEROD
;
2461 NOT_MATHERRD
{ERRNO_RANGE
;}
2462 *(double *)retval
= exc
.retval
;
2465 case scalbf_underflow
:
2466 /* scalbf underflow */
2468 UNDERFLOWF
; NAMEF
= (char *) "scalbf";
2469 if (INPUT_XF
< 0.0) RETVAL_NEG_ZEROF
;
2471 NOT_MATHERRF
{ERRNO_RANGE
;}
2472 *(float *)retval
= excf
.retval
;
2475 case scalbl_overflow
:
2476 /* scalbl overflow */
2478 OVERFLOWL
; NAMEL
= (char *) "scalbl";
2479 if (INPUT_XL
< 0) RETVAL_NEG_HUGE_VALL
;
2480 else RETVAL_HUGE_VALL
;
2481 NOT_MATHERRL
{ERRNO_RANGE
;}
2482 *(long double *)retval
= excl
.retval
;
2485 case scalb_overflow
:
2486 /* scalb overflow */
2488 OVERFLOWD
; NAMED
= (char *) "scalb";
2489 if (INPUT_XD
< 0) RETVAL_NEG_HUGE_VALD
;
2490 else RETVAL_HUGE_VALD
;
2491 NOT_MATHERRD
{ERRNO_RANGE
;}
2492 *(double *)retval
= exc
.retval
;
2495 case scalbf_overflow
:
2496 /* scalbf overflow */
2498 OVERFLOWF
; NAMEF
= (char *) "scalbf";
2499 if (INPUT_XF
< 0) RETVAL_NEG_HUGE_VALF
;
2500 else RETVAL_HUGE_VALF
;
2501 NOT_MATHERRF
{ERRNO_RANGE
;}
2502 *(float *)retval
= excf
.retval
;
2505 case hypotl_overflow
:
2506 /* hypotl overflow */
2508 OVERFLOWL
; NAMEL
= (char *) "hypotl";
2517 NOT_MATHERRL
{ERRNO_RANGE
;}
2518 *(long double *)retval
= excl
.retval
;
2521 case hypot_overflow
:
2522 /* hypot overflow */
2524 OVERFLOWD
; NAMED
= (char *) "hypot";
2533 NOT_MATHERRD
{ERRNO_RANGE
;}
2534 *(double *)retval
= exc
.retval
;
2537 case hypotf_overflow
:
2538 /* hypotf overflow */
2540 OVERFLOWF
; NAMEF
= (char *) "hypotf";
2549 NOT_MATHERRF
{ERRNO_RANGE
;}
2550 *(float *)retval
= excf
.retval
;
2556 DOMAINL
; NAMEL
= (char *) "acosl";
2568 NOT_MATHERRL
{ERRNO_DOMAIN
;}
2570 *(long double *)retval
= excl
.retval
;
2576 DOMAIND
; NAMED
= (char *) "acos";
2588 NOT_MATHERRD
{ERRNO_DOMAIN
;}
2590 *(double *)retval
= exc
.retval
;
2596 DOMAINF
; NAMEF
= (char *) "acosf";
2608 NOT_MATHERRF
{ERRNO_DOMAIN
;}
2610 *(float *)retval
= excf
.retval
;
2616 DOMAINL
; NAMEL
= (char *) "asinl";
2628 NOT_MATHERRL
{ERRNO_DOMAIN
;}
2630 *(long double *)retval
= excl
.retval
;
2636 DOMAIND
; NAMED
= (char *) "asin";
2648 NOT_MATHERRD
{ERRNO_DOMAIN
;}
2650 *(double *)retval
= exc
.retval
;
2656 DOMAINF
; NAMEF
= (char *) "asinf";
2668 NOT_MATHERRF
{ERRNO_DOMAIN
;}
2670 *(float *)retval
= excf
.retval
;
2676 DOMAINL
; NAMEL
= (char *) "acosdl";
2688 NOT_MATHERRL
{ERRNO_DOMAIN
;}
2690 *(long double *)retval
= excl
.retval
;
2696 DOMAIND
; NAMED
= (char *) "acosd";
2708 NOT_MATHERRD
{ERRNO_DOMAIN
;}
2710 *(double *)retval
= exc
.retval
;
2716 DOMAINF
; NAMEF
= (char *) "acosdf";
2728 NOT_MATHERRF
{ERRNO_DOMAIN
;}
2730 *(float *)retval
= excf
.retval
;
2736 DOMAINL
; NAMEL
= (char *) "asindl";
2748 NOT_MATHERRL
{ERRNO_DOMAIN
;}
2750 *(long double *)retval
= excl
.retval
;
2756 DOMAIND
; NAMED
= (char *) "asind";
2768 NOT_MATHERRD
{ERRNO_DOMAIN
;}
2770 *(double *)retval
= exc
.retval
;
2776 DOMAINF
; NAMEF
= (char *) "asindf";
2788 NOT_MATHERRF
{ERRNO_DOMAIN
;}
2790 *(float *)retval
= excf
.retval
;
2793 case coshl_overflow
:
2794 /* coshl overflow */
2796 OVERFLOWL
; NAMEL
= (char *) "coshl";
2805 NOT_MATHERRL
{ERRNO_RANGE
;}
2806 *(long double *)retval
= excl
.retval
;
2812 OVERFLOWD
; NAMED
= (char *) "cosh";
2821 NOT_MATHERRD
{ERRNO_RANGE
;}
2822 *(double *)retval
= exc
.retval
;
2825 case coshf_overflow
:
2826 /* coshf overflow */
2828 OVERFLOWF
; NAMEF
= (char *) "coshf";
2837 NOT_MATHERRF
{ERRNO_RANGE
;}
2838 *(float *)retval
= excf
.retval
;
2841 case sinhl_overflow
:
2842 /* sinhl overflow */
2844 OVERFLOWL
; NAMEL
= (char *) "sinhl";
2847 if (INPUT_XL
> 0.0) RETVAL_HUGEL
;
2848 else RETVAL_NEG_HUGEL
;
2852 if (INPUT_XL
> 0.0) RETVAL_HUGE_VALL
;
2853 else RETVAL_NEG_HUGE_VALL
;
2855 NOT_MATHERRL
{ERRNO_RANGE
;}
2856 *(long double *)retval
= excl
.retval
;
2862 OVERFLOWD
; NAMED
= (char *) "sinh";
2865 if (INPUT_XD
> 0.0) RETVAL_HUGED
;
2866 else RETVAL_NEG_HUGED
;
2870 if (INPUT_XD
> 0.0) RETVAL_HUGE_VALD
;
2871 else RETVAL_NEG_HUGE_VALD
;
2873 NOT_MATHERRD
{ERRNO_RANGE
;}
2874 *(double *)retval
= exc
.retval
;
2877 case sinhf_overflow
:
2878 /* sinhf overflow */
2880 OVERFLOWF
; NAMEF
= (char *) "sinhf";
2883 if( INPUT_XF
> 0.0) RETVAL_HUGEF
;
2884 else RETVAL_NEG_HUGEF
;
2888 if (INPUT_XF
> 0.0) RETVAL_HUGE_VALF
;
2889 else RETVAL_NEG_HUGE_VALF
;
2891 NOT_MATHERRF
{ERRNO_RANGE
;}
2892 *(float *)retval
= excf
.retval
;
2898 DOMAINL
; NAMEL
= (char *) "acoshl";
2909 NOT_MATHERRL
{ERRNO_DOMAIN
;}
2911 *(long double *)retval
= excl
.retval
;
2917 DOMAIND
; NAMED
= (char *) "acosh";
2928 NOT_MATHERRD
{ERRNO_DOMAIN
;}
2930 *(double *)retval
= exc
.retval
;
2936 DOMAINF
; NAMEF
= (char *) "acoshf";
2947 NOT_MATHERRF
{ERRNO_DOMAIN
;}
2949 *(float *)retval
= excf
.retval
;
2950 ERRNO_DOMAIN
; break;
2953 /* atanhl(|x| > 1) */
2955 DOMAINL
; NAMEL
= (char *) "atanhl";
2960 WRITEL_ATANH_GT_ONE
;
2966 NOT_MATHERRL
{ERRNO_DOMAIN
;}
2971 /* atanh(|x| > 1) */
2973 DOMAIND
; NAMED
= (char *) "atanh";
2978 WRITED_ATANH_GT_ONE
;
2984 NOT_MATHERRD
{ERRNO_DOMAIN
;}
2989 /* atanhf(|x| > 1) */
2991 DOMAINF
; NAMEF
= (char *) "atanhf";
2996 WRITEF_ATANH_GT_ONE
;
3002 NOT_MATHERRF
{ERRNO_DOMAIN
;}
3007 /* atanhl(|x| == 1) */
3009 SINGL
; NAMEL
= (char *) "atanhl";
3014 WRITEL_ATANH_EQ_ONE
;
3020 NOT_MATHERRL
{ERRNO_DOMAIN
;}
3025 /* atanh(|x| == 1) */
3027 SINGD
; NAMED
= (char *) "atanh";
3032 WRITED_ATANH_EQ_ONE
;
3038 NOT_MATHERRD
{ERRNO_DOMAIN
;}
3043 /* atanhf(|x| == 1) */
3045 SINGF
; NAMEF
= (char *) "atanhf";
3050 WRITEF_ATANH_EQ_ONE
;
3056 NOT_MATHERRF
{ERRNO_DOMAIN
;}
3060 case gammal_overflow
:
3061 /* gammal overflow */
3063 OVERFLOWL
; NAMEL
= (char *) "gammal";
3072 NOT_MATHERRL
{ERRNO_RANGE
;}
3073 *(long double*)retval
= excl
.retval
;
3076 case gamma_overflow
:
3077 /* gamma overflow */
3079 OVERFLOWD
; NAMED
= (char *) "gamma";
3088 NOT_MATHERRD
{ERRNO_RANGE
;}
3089 *(double*)retval
= exc
.retval
;
3092 case gammaf_overflow
:
3093 /* gammaf overflow */
3095 OVERFLOWF
; NAMEF
= (char *) "gammaf";
3104 NOT_MATHERRF
{ERRNO_RANGE
;}
3105 *(float*)retval
= excf
.retval
;
3108 case gammal_negative
:
3109 /* gammal -int or 0 */
3111 SINGL
; NAMEL
= (char *) "gammal";
3117 WRITEL_GAMMA_NEGATIVE
;
3124 NOT_MATHERRL
{ERRNO_DOMAIN
;}
3126 *(long double*)retval
= excl
.retval
;
3129 case gamma_negative
:
3130 /* gamma -int or 0 */
3132 SINGD
; NAMED
= (char *) "gamma";
3138 WRITED_GAMMA_NEGATIVE
;
3145 NOT_MATHERRD
{ERRNO_DOMAIN
;}
3147 *(double*)retval
= exc
.retval
;
3150 case gammaf_negative
:
3151 /* gammaf -int or 0 */
3153 SINGF
; NAMEF
= (char *) "gammaf";
3159 WRITEF_GAMMA_NEGATIVE
;
3166 NOT_MATHERRF
{ERRNO_DOMAIN
;}
3168 *(float*)retval
= excf
.retval
;
3171 case lgammal_overflow
:
3172 /* lgammal overflow */
3174 OVERFLOWL
; NAMEL
= (char *) "lgammal";
3183 NOT_MATHERRL
{ERRNO_RANGE
;}
3184 *(long double*)retval
= excl
.retval
;
3187 case lgamma_overflow
:
3188 /* lgamma overflow */
3190 OVERFLOWD
; NAMED
= (char *) "lgamma";
3199 NOT_MATHERRD
{ERRNO_RANGE
;}
3200 *(double*)retval
= exc
.retval
;
3203 case lgammaf_overflow
:
3204 /* lgammaf overflow */
3206 OVERFLOWF
; NAMEF
= (char *) "lgammaf";
3215 NOT_MATHERRF
{ERRNO_RANGE
;}
3216 *(float*)retval
= excf
.retval
;
3219 case lgammal_negative
:
3220 /* lgammal -int or 0 */
3222 SINGL
; NAMEL
= (char *) "lgammal";
3228 WRITEL_GAMMA_NEGATIVE
;
3235 NOT_MATHERRL
{ERRNO_DOMAIN
;}
3237 *(long double*)retval
= excl
.retval
;
3240 case lgamma_negative
:
3241 /* lgamma -int or 0 */
3243 SINGD
; NAMED
= (char *) "lgamma";
3249 WRITED_LGAMMA_NEGATIVE
;
3256 NOT_MATHERRD
{ERRNO_DOMAIN
;}
3258 *(double*)retval
= exc
.retval
;
3261 case lgammaf_negative
:
3262 /* lgammaf -int or 0 */
3264 SINGF
; NAMEF
= (char *) "lgammaf";
3270 WRITEF_LGAMMA_NEGATIVE
;
3277 NOT_MATHERRF
{ERRNO_DOMAIN
;}
3279 *(float*)retval
= excf
.retval
;
3282 case tgammal_overflow
:
3283 /* tgammal overflow */
3285 OVERFLOWL
; NAMEL
= (char *) "tgammal";
3294 NOT_MATHERRL
{ERRNO_RANGE
;}
3295 *(long double*)retval
= excl
.retval
;
3298 case tgamma_overflow
:
3299 /* tgamma overflow */
3301 OVERFLOWD
; NAMED
= (char *) "tgamma";
3310 NOT_MATHERRD
{ERRNO_RANGE
;}
3311 *(double*)retval
= exc
.retval
;
3314 case tgammaf_overflow
:
3315 /* tgammaf overflow */
3317 OVERFLOWF
; NAMEF
= (char *) "tgammaf";
3326 NOT_MATHERRF
{ERRNO_RANGE
;}
3327 *(float*)retval
= excf
.retval
;
3330 case tgammal_negative
:
3331 /* tgammal -int or 0 */
3333 SINGL
; NAMEL
= (char *) "tgammal";
3338 WRITEL_TGAMMA_NEGATIVE
;
3344 NOT_MATHERRL
{ERRNO_DOMAIN
;}
3346 *(long double*)retval
= excl
.retval
;
3349 case tgamma_negative
:
3350 /* tgamma -int or 0 */
3352 SINGD
; NAMED
= (char *) "tgamma";
3357 WRITED_TGAMMA_NEGATIVE
;
3363 NOT_MATHERRD
{ERRNO_DOMAIN
;}
3365 *(double*)retval
= exc
.retval
;
3368 case tgammaf_negative
:
3369 /* tgammaf -int or 0 */
3371 SINGF
; NAMEF
= (char *) "tgammaf";
3376 WRITEF_TGAMMA_NEGATIVE
;
3382 NOT_MATHERRF
{ERRNO_DOMAIN
;}
3384 *(float*)retval
= excf
.retval
;
3390 TLOSSL
; NAMEL
= (char *) "j0l";
3402 NOT_MATHERRL
{ERRNO_RANGE
;}
3404 *(long double *)retval
= excl
.retval
;
3410 TLOSSD
; NAMED
= (char *) "j0";
3422 NOT_MATHERRD
{ERRNO_RANGE
;}
3424 *(double*)retval
= exc
.retval
;
3430 TLOSSF
; NAMEF
= (char *) "j0f";
3442 NOT_MATHERRF
{ERRNO_RANGE
;}
3444 *(float*)retval
= excf
.retval
;
3450 TLOSSL
; NAMEL
= (char *) "j1l";
3462 NOT_MATHERRL
{ERRNO_RANGE
;}
3464 *(long double *)retval
= excl
.retval
;
3470 TLOSSD
; NAMED
= (char *) "j1";
3482 NOT_MATHERRD
{ERRNO_RANGE
;}
3484 *(double*)retval
= exc
.retval
;
3490 TLOSSF
; NAMEF
= (char *) "j1f";
3502 NOT_MATHERRF
{ERRNO_RANGE
;}
3504 *(float*)retval
= excf
.retval
;
3510 TLOSSL
; NAMEL
= (char *) "jnl";
3522 NOT_MATHERRL
{ERRNO_RANGE
;}
3524 *(long double *)retval
= excl
.retval
;
3530 TLOSSD
; NAMED
= (char *) "jn";
3542 NOT_MATHERRD
{ERRNO_RANGE
;}
3544 *(double*)retval
= exc
.retval
;
3550 TLOSSF
; NAMEF
= (char *) "jnf";
3562 NOT_MATHERRF
{ERRNO_RANGE
;}
3564 *(float*)retval
= excf
.retval
;
3570 TLOSSL
; NAMEL
= (char *) "y0l";
3582 NOT_MATHERRL
{ERRNO_RANGE
;}
3584 *(long double *)retval
= excl
.retval
;
3590 TLOSSD
; NAMED
= (char *) "y0";
3602 NOT_MATHERRD
{ERRNO_RANGE
;}
3604 *(double*)retval
= exc
.retval
;
3610 TLOSSF
; NAMEF
= (char *) "y0f";
3622 NOT_MATHERRF
{ERRNO_RANGE
;}
3624 *(float*)retval
= excf
.retval
;
3630 DOMAINL
; NAMEL
= (char *) "y0l";
3642 RETVAL_NEG_HUGE_VALL
;
3643 NOT_MATHERRL
{ERRNO_DOMAIN
;}
3645 *(long double *)retval
= excl
.retval
;
3651 DOMAIND
; NAMED
= (char *) "y0";
3663 RETVAL_NEG_HUGE_VALD
;
3664 NOT_MATHERRD
{ERRNO_DOMAIN
;}
3666 *(double *)retval
= exc
.retval
;
3672 DOMAINF
; NAMEF
= (char *) "y0f";
3684 RETVAL_NEG_HUGE_VALF
;
3685 NOT_MATHERRF
{ERRNO_DOMAIN
;}
3687 *(float *)retval
= excf
.retval
;
3693 TLOSSL
; NAMEL
= (char *) "y1l";
3705 NOT_MATHERRL
{ERRNO_RANGE
;}
3707 *(long double *)retval
= excl
.retval
;
3713 TLOSSD
; NAMED
= (char *) "y1";
3725 NOT_MATHERRD
{ERRNO_RANGE
;}
3727 *(double*)retval
= exc
.retval
;
3733 TLOSSF
; NAMEF
= (char *) "y1f";
3745 NOT_MATHERRF
{ERRNO_RANGE
;}
3747 *(float*)retval
= excf
.retval
;
3753 DOMAINL
; NAMEL
= (char *) "y1l";
3765 RETVAL_NEG_HUGE_VALL
;
3766 NOT_MATHERRL
{ERRNO_DOMAIN
;}
3768 *(long double *)retval
= excl
.retval
;
3774 DOMAIND
; NAMED
= (char *) "y1";
3786 RETVAL_NEG_HUGE_VALD
;
3787 NOT_MATHERRD
{ERRNO_DOMAIN
;}
3789 *(double *)retval
= exc
.retval
;
3795 DOMAINF
; NAMEF
= (char *) "y1f";
3806 RETVAL_NEG_HUGE_VALF
;
3807 NOT_MATHERRF
{ERRNO_DOMAIN
;}
3809 *(float *)retval
= excf
.retval
;
3815 TLOSSL
; NAMEL
= (char *) "ynl";
3827 NOT_MATHERRL
{ERRNO_RANGE
;}
3829 *(long double *)retval
= excl
.retval
;
3835 TLOSSD
; NAMED
= (char *) "yn";
3847 NOT_MATHERRD
{ERRNO_RANGE
;}
3849 *(double*)retval
= exc
.retval
;
3855 TLOSSF
; NAMEF
= (char *) "ynf";
3867 NOT_MATHERRF
{ERRNO_RANGE
;}
3869 *(float*)retval
= excf
.retval
;
3875 DOMAINL
; NAMEL
= (char *) "ynl";
3887 RETVAL_NEG_HUGE_VALL
;
3888 NOT_MATHERRL
{ERRNO_DOMAIN
;}
3890 *(long double *)retval
= excl
.retval
;
3896 DOMAIND
; NAMED
= (char *) "yn";
3908 RETVAL_NEG_HUGE_VALD
;
3909 NOT_MATHERRD
{ERRNO_DOMAIN
;}
3911 *(double *)retval
= exc
.retval
;
3917 DOMAINF
; NAMEF
= (char *) "ynf";
3929 RETVAL_NEG_HUGE_VALF
;
3930 NOT_MATHERRF
{ERRNO_DOMAIN
;}
3932 *(float *)retval
= excf
.retval
;
3938 DOMAINL
; NAMEL
= (char *) "y0l";
3950 RETVAL_NEG_HUGE_VALL
;
3951 NOT_MATHERRL
{ERRNO_DOMAIN
;}
3953 *(long double *)retval
= excl
.retval
;
3959 DOMAIND
; NAMED
= (char *) "y0";
3971 RETVAL_NEG_HUGE_VALD
;
3972 NOT_MATHERRD
{ERRNO_DOMAIN
;}
3974 *(double *)retval
= exc
.retval
;
3980 DOMAINF
; NAMEF
= (char *) "y0f";
3992 RETVAL_NEG_HUGE_VALF
;
3993 NOT_MATHERRF
{ERRNO_DOMAIN
;}
3995 *(float *)retval
= excf
.retval
;
4001 DOMAINL
; NAMEL
= (char *) "y1l";
4013 RETVAL_NEG_HUGE_VALL
;
4014 NOT_MATHERRL
{ERRNO_DOMAIN
;}
4016 *(long double *)retval
= excl
.retval
;
4022 DOMAIND
; NAMED
= (char *) "y1";
4034 RETVAL_NEG_HUGE_VALD
;
4035 NOT_MATHERRD
{ERRNO_DOMAIN
;}
4037 *(double *)retval
= exc
.retval
;
4043 DOMAINF
; NAMEF
= (char *) "y1f";
4055 RETVAL_NEG_HUGE_VALF
;
4056 NOT_MATHERRF
{ERRNO_DOMAIN
;}
4058 *(float *)retval
= excf
.retval
;
4064 DOMAINL
; NAMEL
= (char *) "ynl";
4076 RETVAL_NEG_HUGE_VALL
;
4077 NOT_MATHERRL
{ERRNO_DOMAIN
;}
4079 *(long double *)retval
= excl
.retval
;
4085 DOMAIND
; NAMED
= (char *) "yn";
4097 RETVAL_NEG_HUGE_VALD
;
4098 NOT_MATHERRD
{ERRNO_DOMAIN
;}
4100 *(double *)retval
= exc
.retval
;
4106 DOMAINF
; NAMEF
= (char *) "ynf";
4118 RETVAL_NEG_HUGE_VALF
;
4119 NOT_MATHERRF
{ERRNO_DOMAIN
;}
4121 *(float *)retval
= excf
.retval
;
4127 DOMAINL
; NAMEL
= (char *) "fmodl";
4130 *(long double *)retval
= *(long double *)arg1
;
4138 { /* NaN already computed */
4139 NOT_MATHERRL
{ERRNO_DOMAIN
;}
4141 *(long double *)retval
= excl
.retval
;
4147 DOMAIND
; NAMED
= (char *) "fmod";
4150 *(double *)retval
= *(double *)arg1
;
4158 { /* NaN already computed */
4159 NOT_MATHERRD
{ERRNO_DOMAIN
;}
4161 *(double *)retval
= exc
.retval
;
4167 DOMAINF
; NAMEF
= (char *) "fmodf";
4170 *(float *)retval
= *(float *)arg1
;
4179 NOT_MATHERRF
{ERRNO_DOMAIN
;}
4181 *(float *)retval
= excf
.retval
;
4184 case remainderl_by_zero
:
4185 /* remainderl(x,0) */
4187 DOMAINL
; NAMEL
= (char *) "remainderl";
4197 { /* NaN already computed */
4198 NOT_MATHERRL
{ERRNO_DOMAIN
;}
4200 *(long double *)retval
= excl
.retval
;
4203 case remainder_by_zero
:
4204 /* remainder(x,0) */
4206 DOMAIND
; NAMED
= (char *) "remainder";
4216 { /* NaN already computed */
4217 NOT_MATHERRD
{ERRNO_DOMAIN
;}
4219 *(double *)retval
= exc
.retval
;
4222 case remainderf_by_zero
:
4223 /* remainderf(x,0) */
4225 DOMAINF
; NAMEF
= (char *) "remainderf";
4236 NOT_MATHERRF
{ERRNO_DOMAIN
;}
4238 *(float *)retval
= excf
.retval
;
4242 /* We don't want to abort () since SVID doesn't cover all math
4243 library functions. */