localedata: dz_BT, bo_CN: convert to UTF-8
[glibc.git] / sysdeps / ia64 / fpu / libm_error.c
blob519c3ab493f478156c748e5cbb7a13a75bc67234
1 /* file: libm_error.c */
4 // Copyright (c) 2000 - 2005, Intel Corporation
5 // All rights reserved.
6 //
7 //
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions are
10 // met:
12 // * Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
15 // * Redistributions in binary form must reproduce the above copyright
16 // notice, this list of conditions and the following disclaimer in the
17 // documentation and/or other materials provided with the distribution.
19 // * The name of Intel Corporation may not be used to endorse or promote
20 // products derived from this software without specific prior written
21 // permission.
24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
28 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
32 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
33 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 // Intel Corporation is the author of this code, and requests that all
37 // problem reports or change requests be submitted to it directly at
38 // http://www.intel.com/software/products/opensource/libraries/num.htm.
40 // History
41 //==============================================================
42 // 2/02/00: Initial version
43 // 3/22/00: Updated to support flexible and dynamic error handling.
44 // 8/16/00: Changed all matherr function-calls to use the pmatherr
45 // function-pointers.
46 // 10/03/00: Corrected a scalb type.
47 // 11/28/00: Changed INPUT_XL to INPUT_XD for scalb_underflow case.
48 // 12/07/00: Added code to make scalbn error support equivalent to ldexp.
49 // 2/07/01: Added __declspec(align(16)) to long double constants to correct
50 // alignment problem.
51 // 4/23/01: Added code for remquo
52 // 6/07/01: Added code for fdim, lrint, lround, llrint, llround
53 // Deleted code for remquo
54 // 8/15/01: Added code for scalbln, nexttoward
55 // 12/10/01: Added code for erfc
56 // 12/27/01: Added code for degree argument functions
57 // 01/02/02: Added code for tand, cotd
58 // 01/15/02: Corrected SVID/XOPEN code for log1p, pow, and acosh
59 // 01/25/02: Corrected ISOC for lgamma and gamma to return EDOM for neg ints
60 // 01/28/02: Corrected SVID/XOPEN stderr message for log2
61 // 05/20/02: Added code for cot
62 // 07/01/02: Added code for sinhcosh
63 // 10/04/02: Underflow detection in ISOC path redefined to
64 // be zero rather than tiny and inexact
65 // 12/06/02: Added code for annuity and compound
66 // 01/30/03: Corrected test for underflow in ISOC path to not set denormal
67 // 04/10/03: Corrected ISOC branch for gamma/lgamma to return ERANGE for neg ints.
68 // Added code for tgamma
69 // 04/11/03: Corrected POSIX/SVID/XOPEN branches for gamma/lgamma
70 // to return EDOM for neg ints.
71 // 09/08/03: Corrected XOPEN/SVID result for pow overflow with neg x, pos y.
72 // 10/14/03: Added ILP32 ifdef
73 // 12/12/03: Corrected XOPEN/SVID results for powf_zero_to_negative,
74 // powl_neg_to_non_integer, atan2f_zero, atan2df_zero,
75 // acoshf_lt_one, acosh_lt_one.
76 // 12/07/04: Cast name strings as char *.
77 // 12/08/04: Corrected POSIX behavior for atan2_zero, acos_gt_one, asin_gt_one,
78 // log_negative, log10_negative, log1p_negative, and log2_negative.
79 // Added SVID and XOPEN case log2l_zero.
80 // 12/13/04: Corrected POSIX behavior for exp2_overflow, exp2_underflow,
81 // exp10_overflow, exp10_underflow. Added ISOC to set errno for
82 // exp10_underflow.
83 // 12/14/04: Corrected POSIX behavior for nextafter_overflow,
84 // nextafter_underflow, nexttoward_overflow, nexttoward_underflow.
85 // Added ISOC to set errno for nextafter and nexttoward underflow.
86 // 12/15/04: Corrected POSIX behavior for exp, exp2, and exp10 underflow.
87 // 03/31/05: Added missing ALIGNIT statement to 6 float constants.
89 #include <errno.h>
90 #include <stdio.h>
91 #include <stdlib.h>
92 #include "libm_support.h"
93 #include <math-svid-compat.h>
95 #ifdef _LIBC
96 # define pmatherr matherr
97 # define pmatherrf matherrf
98 # define pmatherrl matherrl
99 # if LIBM_SVID_COMPAT
100 compat_symbol_reference (libm, matherrf, matherrf, GLIBC_2_2_3);
101 compat_symbol_reference (libm, matherrl, matherrl, GLIBC_2_2_3);
102 # else
103 # define matherrf(EXC) ((void) (EXC), 0)
104 # define matherrl(EXC) ((void) (EXC), 0)
105 # endif
106 #else
107 _LIB_VERSION_TYPE
108 #if defined( __POSIX__ )
109 _LIB_VERSIONIMF = _POSIX_;
110 #elif defined( __XOPEN__ )
111 _LIB_VERSIONIMF = _XOPEN_;
112 #elif defined( __SVID__ )
113 _LIB_VERSIONIMF = _SVID_;
114 #elif defined( __IEEE__ )
115 _LIB_VERSIONIMF = _IEEE_;
116 #else
117 _LIB_VERSIONIMF = _ISOC_;
118 #endif
120 /************************************************************/
121 /* matherrX function pointers and setusermatherrX functions */
122 /************************************************************/
123 int (*pmatherrf)(struct exceptionf*) = MATHERR_F;
124 int (*pmatherr)(struct EXC_DECL_D*) = MATHERR_D;
125 int (*pmatherrl)(struct exceptionl*) = matherrl;
127 void __libm_setusermatherrf( int(*user_merrf)(struct exceptionf*) )
128 { pmatherrf = ( (user_merrf==NULL)? (MATHERR_F) : (user_merrf) ); }
130 void __libm_setusermatherr( int(*user_merr)(struct EXC_DECL_D*) )
131 { pmatherr = ( (user_merr==NULL)? (MATHERR_D) : (user_merr) ); }
133 void __libm_setusermatherrl( int(*user_merrl)(struct exceptionl*) )
134 { pmatherrl = ( (user_merrl==NULL)? (matherrl) : (user_merrl) ); }
136 #endif /* !_LIBC */
138 /***********************************************/
139 /* error-handling function, libm_error_support */
140 /***********************************************/
141 void __libm_error_support(void *arg1,void *arg2,void *retval,error_types input_tag)
144 # ifdef __cplusplus
145 struct __exception exc;
146 # else
147 struct exception exc;
148 # endif
150 struct exceptionf excf;
151 struct exceptionl excl;
153 # ifdef __GNUC__
154 #define ALIGNIT __attribute__ ((__aligned__ (16)))
155 # elif defined opensource
156 #define ALIGNIT
157 # else
158 #define ALIGNIT __declspec(align(16))
159 # endif
161 # ifdef SIZE_LONG_INT_64
162 #define __INT_64__ signed long
163 # else
164 # if ILP32
165 #define __INT_64__ signed long long
166 # else
167 #define __INT_64__ __int64
168 # endif
169 # endif
172 #define _DECL_NUM(type, prefix, var, bytes...) \
173 ALIGNIT static const union { \
174 const char _bytes[sizeof (type)]; \
175 const type num; \
176 } prefix ## var = { \
177 ._bytes = bytes, \
180 #define DECL_FLOAT(var, bytes...) \
181 _DECL_NUM (float, float_, var, ##bytes)
183 DECL_FLOAT(inf, {0x00,0x00,0x80,0x7F});
184 DECL_FLOAT(huge, {0xFF,0xFF,0x7F,0x7F});
185 DECL_FLOAT(zero, {0x00,0x00,0x00,0x00});
186 DECL_FLOAT(neg_inf, {0x00,0x00,0x80,0xFF});
187 DECL_FLOAT(neg_huge, {0xFF,0xFF,0x7F,0xFF});
188 DECL_FLOAT(neg_zero, {0x00,0x00,0x00,0x80});
190 #define DECL_DOUBLE(var, bytes...) \
191 _DECL_NUM (double, double_, var, ##bytes)
193 DECL_DOUBLE(inf, {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F});
194 #ifndef _LIBC
195 DECL_DOUBLE(huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0x7F});
196 #endif
197 DECL_DOUBLE(zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00});
198 DECL_DOUBLE(neg_inf, {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF});
199 #ifndef _LIBC
200 DECL_DOUBLE(neg_huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF});
201 #endif
202 DECL_DOUBLE(neg_zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80});
204 #define DECL_LONG_DOUBLE(var, bytes...) \
205 _DECL_NUM (long double, long_double_, var, ##bytes)
207 DECL_LONG_DOUBLE(inf, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00});
208 #ifndef _LIBC
209 DECL_LONG_DOUBLE(huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00});
210 #endif
211 DECL_LONG_DOUBLE(zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00});
212 DECL_LONG_DOUBLE(neg_inf, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00});
213 #ifndef _LIBC
214 DECL_LONG_DOUBLE(neg_huge, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x00,0x00,0x00,0x00,0x00,0x00});
215 #endif
216 DECL_LONG_DOUBLE(neg_zero, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00});
219 #define RETVAL_HUGE_VALL *(long double *)retval = long_double_inf.num
220 #define RETVAL_NEG_HUGE_VALL *(long double *)retval = long_double_neg_inf.num
221 #define RETVAL_HUGEL *(long double *)retval = (long double)float_huge.num
222 #define RETVAL_NEG_HUGEL *(long double *)retval = (long double)float_neg_huge.num
224 #define RETVAL_HUGE_VALD *(double *)retval = double_inf.num
225 #define RETVAL_NEG_HUGE_VALD *(double *)retval = double_neg_inf.num
226 #define RETVAL_HUGED *(double *)retval = (double)float_huge.num
227 #define RETVAL_NEG_HUGED *(double *)retval = (double)float_neg_huge.num
229 #define RETVAL_HUGE_VALF *(float *)retval = float_inf.num
230 #define RETVAL_NEG_HUGE_VALF *(float *)retval = float_neg_inf.num
231 #define RETVAL_HUGEF *(float *)retval = float_huge.num
232 #define RETVAL_NEG_HUGEF *(float *)retval = float_neg_huge.num
234 #define ZEROL_VALUE long_double_zero.num
235 #define ZEROD_VALUE double_zero.num
236 #define ZEROF_VALUE float_zero.num
238 #define RETVAL_ZEROL *(long double *)retval = long_double_zero.num
239 #define RETVAL_ZEROD *(double *)retval = double_zero.num
240 #define RETVAL_ZEROF *(float *)retval = float_zero.num
242 #define RETVAL_NEG_ZEROL *(long double *)retval = long_double_neg_zero.num
243 #define RETVAL_NEG_ZEROD *(double *)retval = double_neg_zero.num
244 #define RETVAL_NEG_ZEROF *(float *)retval = float_neg_zero.num
246 #define RETVAL_ONEL *(long double *)retval = (long double) 1.0
247 #define RETVAL_ONED *(double *)retval = 1.0
248 #define RETVAL_ONEF *(float *)retval = 1.0f
250 #define NOT_MATHERRL excl.arg1=*(long double *)arg1;excl.arg2=*(long double *)arg2;excl.retval=*(long double *)retval;if(!pmatherrl(&excl))
251 #define NOT_MATHERRD exc.arg1=*(double *)arg1;exc.arg2=*(double *)arg2;exc.retval=*(double *)retval;if(!pmatherr(&exc))
252 #define NOT_MATHERRF excf.arg1=*(float *)arg1;excf.arg2=*(float *)arg2;excf.retval=*(float *)retval;if(!pmatherrf(&excf))
254 #define ifSVID if(_LIB_VERSIONIMF==_SVID_)
256 #define NAMEL excl.name
257 #define NAMED exc.name
258 #define NAMEF excf.name
261 // These should work OK for MS because they are ints -
262 // leading underbars are not necessary.
265 #define DOMAIN 1
266 #define SING 2
267 #define OVERFLOW 3
268 #define UNDERFLOW 4
269 #define TLOSS 5
270 #define PLOSS 6
272 #define SINGL excl.type = SING
273 #define DOMAINL excl.type = DOMAIN
274 #define OVERFLOWL excl.type = OVERFLOW
275 #define UNDERFLOWL excl.type = UNDERFLOW
276 #define TLOSSL excl.type = TLOSS
277 #define SINGD exc.type = SING
278 #define DOMAIND exc.type = DOMAIN
279 #define OVERFLOWD exc.type = OVERFLOW
280 #define UNDERFLOWD exc.type = UNDERFLOW
281 #define TLOSSD exc.type = TLOSS
282 #define SINGF excf.type = SING
283 #define DOMAINF excf.type = DOMAIN
284 #define OVERFLOWF excf.type = OVERFLOW
285 #define UNDERFLOWF excf.type = UNDERFLOW
286 #define TLOSSF excf.type = TLOSS
288 #define INPUT_XL (excl.arg1=*(long double*)arg1)
289 #define INPUT_XD (exc.arg1=*(double*)arg1)
290 #define INPUT_XF (excf.arg1=*(float*)arg1)
291 #define INPUT_YL (excl.arg2=*(long double*)arg2)
292 #define INPUT_YD (exc.arg2=*(double*)arg2)
293 #define INPUT_YF (excf.arg2=*(float*)arg2)
294 #define INPUT_RESL (*(long double *)retval)
295 #define INPUT_RESD (*(double *)retval)
296 #define INPUT_RESF (*(float *)retval)
297 #define INPUT_RESI64 (*(__INT_64__ *)retval)
299 #define WRITEL_LOG_ZERO fputs("logl: SING error\n",stderr)
300 #define WRITED_LOG_ZERO fputs("log: SING error\n",stderr)
301 #define WRITEF_LOG_ZERO fputs("logf: SING error\n",stderr)
302 #define WRITEL_LOG_NEGATIVE fputs("logl: DOMAIN error\n",stderr)
303 #define WRITED_LOG_NEGATIVE fputs("log: DOMAIN error\n",stderr)
304 #define WRITEF_LOG_NEGATIVE fputs("logf: DOMAIN error\n",stderr)
305 #define WRITEL_Y0_ZERO fputs("y0l: DOMAIN error\n",stderr)
306 #define WRITED_Y0_ZERO fputs("y0: DOMAIN error\n",stderr)
307 #define WRITEF_Y0_ZERO fputs("y0f: DOMAIN error\n",stderr)
308 #define WRITEL_Y0_NEGATIVE fputs("y0l: DOMAIN error\n",stderr)
309 #define WRITED_Y0_NEGATIVE fputs("y0: DOMAIN error\n",stderr)
310 #define WRITEF_Y0_NEGATIVE fputs("y0f: DOMAIN error\n",stderr)
311 #define WRITEL_Y1_ZERO fputs("y1l: DOMAIN error\n",stderr)
312 #define WRITED_Y1_ZERO fputs("y1: DOMAIN error\n",stderr)
313 #define WRITEF_Y1_ZERO fputs("y1f: DOMAIN error\n",stderr)
314 #define WRITEL_Y1_NEGATIVE fputs("y1l: DOMAIN error\n",stderr)
315 #define WRITED_Y1_NEGATIVE fputs("y1: DOMAIN error\n",stderr)
316 #define WRITEF_Y1_NEGATIVE fputs("y1f: DOMAIN error\n",stderr)
317 #define WRITEL_YN_ZERO fputs("ynl: DOMAIN error\n",stderr)
318 #define WRITED_YN_ZERO fputs("yn: DOMAIN error\n",stderr)
319 #define WRITEF_YN_ZERO fputs("ynf: DOMAIN error\n",stderr)
320 #define WRITEL_YN_NEGATIVE fputs("ynl: DOMAIN error\n",stderr)
321 #define WRITED_YN_NEGATIVE fputs("yn: DOMAIN error\n",stderr)
322 #define WRITEF_YN_NEGATIVE fputs("ynf: DOMAIN error\n",stderr)
323 #define WRITEL_LOG1P_ZERO fputs("log1pl: SING error\n",stderr)
324 #define WRITED_LOG1P_ZERO fputs("log1p: SING error\n",stderr)
325 #define WRITEF_LOG1P_ZERO fputs("log1pf: SING error\n",stderr)
326 #define WRITEL_LOG1P_NEGATIVE fputs("log1pl: DOMAIN error\n",stderr)
327 #define WRITED_LOG1P_NEGATIVE fputs("log1p: DOMAIN error\n",stderr)
328 #define WRITEF_LOG1P_NEGATIVE fputs("log1pf: DOMAIN error\n",stderr)
329 #define WRITEL_LOG10_ZERO fputs("log10l: SING error\n",stderr)
330 #define WRITED_LOG10_ZERO fputs("log10: SING error\n",stderr)
331 #define WRITEF_LOG10_ZERO fputs("log10f: SING error\n",stderr)
332 #define WRITEL_LOG10_NEGATIVE fputs("log10l: DOMAIN error\n",stderr)
333 #define WRITED_LOG10_NEGATIVE fputs("log10: DOMAIN error\n",stderr)
334 #define WRITEF_LOG10_NEGATIVE fputs("log10f: DOMAIN error\n",stderr)
335 #define WRITEL_LOG2_ZERO fputs("log2l: SING error\n",stderr)
336 #define WRITED_LOG2_ZERO fputs("log2: SING error\n",stderr)
337 #define WRITEF_LOG2_ZERO fputs("log2f: SING error\n",stderr)
338 #define WRITEL_LOG2_NEGATIVE fputs("log2l: DOMAIN error\n",stderr)
339 #define WRITED_LOG2_NEGATIVE fputs("log2: DOMAIN error\n",stderr)
340 #define WRITEF_LOG2_NEGATIVE fputs("log2f: DOMAIN error\n",stderr)
341 #define WRITEL_POW_ZERO_TO_ZERO fputs("powl(0,0): DOMAIN error\n",stderr)
342 #define WRITED_POW_ZERO_TO_ZERO fputs("pow(0,0): DOMAIN error\n",stderr)
343 #define WRITEF_POW_ZERO_TO_ZERO fputs("powf(0,0): DOMAIN error\n",stderr)
344 #define WRITEL_POW_ZERO_TO_NEGATIVE fputs("powl(0,negative): DOMAIN error\n",stderr)
345 #define WRITED_POW_ZERO_TO_NEGATIVE fputs("pow(0,negative): DOMAIN error\n",stderr)
346 #define WRITEF_POW_ZERO_TO_NEGATIVE fputs("powf(0,negative): DOMAIN error\n",stderr)
347 #define WRITEL_POW_NEG_TO_NON_INTEGER fputs("powl(negative,non-integer): DOMAIN error\n",stderr)
348 #define WRITED_POW_NEG_TO_NON_INTEGER fputs("pow(negative,non-integer): DOMAIN error\n",stderr)
349 #define WRITEF_POW_NEG_TO_NON_INTEGER fputs("powf(negative,non-integer): DOMAIN error\n",stderr)
350 #define WRITEL_ATAN2_ZERO_BY_ZERO fputs("atan2l: DOMAIN error\n",stderr)
351 #define WRITED_ATAN2_ZERO_BY_ZERO fputs("atan2: DOMAIN error\n",stderr)
352 #define WRITEF_ATAN2_ZERO_BY_ZERO fputs("atan2f: DOMAIN error\n",stderr)
353 #define WRITEL_SQRT fputs("sqrtl: DOMAIN error\n",stderr)
354 #define WRITED_SQRT fputs("sqrt: DOMAIN error\n",stderr)
355 #define WRITEF_SQRT fputs("sqrtf: DOMAIN error\n",stderr)
356 #define WRITEL_FMOD fputs("fmodl: DOMAIN error\n",stderr)
357 #define WRITED_FMOD fputs("fmod: DOMAIN error\n",stderr)
358 #define WRITEF_FMOD fputs("fmodf: DOMAIN error\n",stderr)
359 #define WRITEL_REM fputs("remainderl: DOMAIN error\n",stderr)
360 #define WRITED_REM fputs("remainder: DOMAIN error\n",stderr)
361 #define WRITEF_REM fputs("remainderf: DOMAIN error\n",stderr)
362 #define WRITEL_ACOS fputs("acosl: DOMAIN error\n",stderr)
363 #define WRITED_ACOS fputs("acos: DOMAIN error\n",stderr)
364 #define WRITEF_ACOS fputs("acosf: DOMAIN error\n",stderr)
365 #define WRITEL_ASIN fputs("asinl: DOMAIN error\n",stderr)
366 #define WRITED_ASIN fputs("asin: DOMAIN error\n",stderr)
367 #define WRITEF_ASIN fputs("asinf: DOMAIN error\n",stderr)
368 #define WRITEL_ACOSH fputs("acoshl: DOMAIN error\n",stderr)
369 #define WRITED_ACOSH fputs("acosh: DOMAIN error\n",stderr)
370 #define WRITEF_ACOSH fputs("acoshf: DOMAIN error\n",stderr)
371 #define WRITEL_ATANH_GT_ONE fputs("atanhl: DOMAIN error\n",stderr)
372 #define WRITED_ATANH_GT_ONE fputs("atanh: DOMAIN error\n",stderr)
373 #define WRITEF_ATANH_GT_ONE fputs("atanhf: DOMAIN error\n",stderr)
374 #define WRITEL_ATANH_EQ_ONE fputs("atanhl: SING error\n",stderr)
375 #define WRITED_ATANH_EQ_ONE fputs("atanh: SING error\n",stderr)
376 #define WRITEF_ATANH_EQ_ONE fputs("atanhf: SING error\n",stderr)
377 #define WRITEL_LGAMMA_NEGATIVE fputs("lgammal: SING error\n",stderr)
378 #define WRITED_LGAMMA_NEGATIVE fputs("lgamma: SING error\n",stderr)
379 #define WRITEF_LGAMMA_NEGATIVE fputs("lgammaf: SING error\n",stderr)
380 #define WRITEL_GAMMA_NEGATIVE fputs("gammal: SING error\n",stderr)
381 #define WRITED_GAMMA_NEGATIVE fputs("gamma: SING error\n",stderr)
382 #define WRITEF_GAMMA_NEGATIVE fputs("gammaf: SING error\n",stderr)
383 #define WRITEL_TGAMMA_NEGATIVE fputs("tgammal: SING error\n",stderr)
384 #define WRITED_TGAMMA_NEGATIVE fputs("tgamma: SING error\n",stderr)
385 #define WRITEF_TGAMMA_NEGATIVE fputs("tgammaf: SING error\n",stderr)
386 #define WRITEL_J0_TLOSS fputs("j0l: TLOSS error\n",stderr)
387 #define WRITEL_Y0_TLOSS fputs("y0l: TLOSS error\n",stderr)
388 #define WRITEL_J1_TLOSS fputs("j1l: TLOSS error\n",stderr)
389 #define WRITEL_Y1_TLOSS fputs("y1l: TLOSS error\n",stderr)
390 #define WRITEL_JN_TLOSS fputs("jnl: TLOSS error\n",stderr)
391 #define WRITEL_YN_TLOSS fputs("ynl: TLOSS error\n",stderr)
392 #define WRITED_J0_TLOSS fputs("j0: TLOSS error\n",stderr)
393 #define WRITED_Y0_TLOSS fputs("y0: TLOSS error\n",stderr)
394 #define WRITED_J1_TLOSS fputs("j1: TLOSS error\n",stderr)
395 #define WRITED_Y1_TLOSS fputs("y1: TLOSS error\n",stderr)
396 #define WRITED_JN_TLOSS fputs("jn: TLOSS error\n",stderr)
397 #define WRITED_YN_TLOSS fputs("yn: TLOSS error\n",stderr)
398 #define WRITEF_J0_TLOSS fputs("j0f: TLOSS error\n",stderr)
399 #define WRITEF_Y0_TLOSS fputs("y0f: TLOSS error\n",stderr)
400 #define WRITEF_J1_TLOSS fputs("j1f: TLOSS error\n",stderr)
401 #define WRITEF_Y1_TLOSS fputs("y1f: TLOSS error\n",stderr)
402 #define WRITEF_JN_TLOSS fputs("jnf: TLOSS error\n",stderr)
403 #define WRITEF_YN_TLOSS fputs("ynf: TLOSS error\n",stderr)
404 #define WRITEL_ACOSD fputs("acosdl: DOMAIN error\n",stderr)
405 #define WRITED_ACOSD fputs("acosd: DOMAIN error\n",stderr)
406 #define WRITEF_ACOSD fputs("acosdf: DOMAIN error\n",stderr)
407 #define WRITEL_ASIND fputs("asindl: DOMAIN error\n",stderr)
408 #define WRITED_ASIND fputs("asind: DOMAIN error\n",stderr)
409 #define WRITEF_ASIND fputs("asindf: DOMAIN error\n",stderr)
410 #define WRITEL_ATAN2D_ZERO_BY_ZERO fputs("atan2dl: DOMAIN error\n",stderr)
411 #define WRITED_ATAN2D_ZERO_BY_ZERO fputs("atan2d: DOMAIN error\n",stderr)
412 #define WRITEF_ATAN2D_ZERO_BY_ZERO fputs("atan2df: DOMAIN error\n",stderr)
415 /***********************/
416 /* IEEE Path */
417 /***********************/
418 if(_LIB_VERSIONIMF==_IEEE_) return;
420 /***********************/
421 /* C9X Path */
422 /***********************/
423 else if(_LIB_VERSIONIMF==_ISOC_)
425 switch(input_tag)
427 case logl_zero:
428 case log_zero:
429 case logf_zero:
430 case log10l_zero:
431 case log10_zero:
432 case log10f_zero:
433 case log2l_zero:
434 case log2_zero:
435 case log2f_zero:
436 case log1pl_zero:
437 case log1p_zero:
438 case log1pf_zero:
439 case powl_overflow:
440 case pow_overflow:
441 case powf_overflow:
442 case expl_overflow:
443 case exp_overflow:
444 case expf_overflow:
445 case exp2l_overflow:
446 case exp2_overflow:
447 case exp2f_overflow:
448 case exp10l_overflow:
449 case exp10_overflow:
450 case exp10f_overflow:
451 case expm1l_overflow:
452 case expm1_overflow:
453 case expm1f_overflow:
454 case hypotl_overflow:
455 case hypot_overflow:
456 case hypotf_overflow:
457 case sinhl_overflow:
458 case sinh_overflow:
459 case sinhf_overflow:
460 case atanhl_eq_one:
461 case atanh_eq_one:
462 case atanhf_eq_one:
463 case scalbl_overflow:
464 case scalb_overflow:
465 case scalbf_overflow:
466 case coshl_overflow:
467 case cosh_overflow:
468 case coshf_overflow:
469 case nextafterl_overflow:
470 case nextafter_overflow:
471 case nextafterf_overflow:
472 case nextafterl_underflow:
473 case nextafter_underflow:
474 case nextafterf_underflow:
475 case nexttowardl_overflow:
476 case nexttoward_overflow:
477 case nexttowardf_overflow:
478 case nexttowardl_underflow:
479 case nexttoward_underflow:
480 case nexttowardf_underflow:
481 case scalbnl_overflow:
482 case scalbn_overflow:
483 case scalbnf_overflow:
484 case scalblnl_overflow:
485 case scalbln_overflow:
486 case scalblnf_overflow:
487 case ldexpl_overflow:
488 case ldexp_overflow:
489 case ldexpf_overflow:
490 case lgammal_overflow:
491 case lgamma_overflow:
492 case lgammaf_overflow:
493 case gammal_overflow:
494 case gamma_overflow:
495 case gammaf_overflow:
496 case lgammal_negative:
497 case lgamma_negative:
498 case lgammaf_negative:
499 case gammal_negative:
500 case gamma_negative:
501 case gammaf_negative:
502 case ilogbl_zero:
503 case ilogb_zero:
504 case ilogbf_zero:
505 case fdiml_overflow:
506 case fdim_overflow:
507 case fdimf_overflow:
508 case llrintl_large:
509 case llrint_large:
510 case llrintf_large:
511 case llroundl_large:
512 case llround_large:
513 case llroundf_large:
514 case lrintl_large:
515 case lrint_large:
516 case lrintf_large:
517 case lroundl_large:
518 case lround_large:
519 case lroundf_large:
520 case tandl_overflow:
521 case tand_overflow:
522 case tandf_overflow:
523 case cotdl_overflow:
524 case cotd_overflow:
525 case cotdf_overflow:
526 case cotl_overflow:
527 case cot_overflow:
528 case cotf_overflow:
529 case sinhcoshl_overflow:
530 case sinhcosh_overflow:
531 case sinhcoshf_overflow:
532 case annuityl_overflow:
533 case annuity_overflow:
534 case annuityf_overflow:
535 case compoundl_overflow:
536 case compound_overflow:
537 case compoundf_overflow:
538 case tgammal_overflow:
539 case tgamma_overflow:
540 case tgammaf_overflow:
542 ERRNO_RANGE; break;
544 case powl_underflow:
545 case expl_underflow:
546 case exp10l_underflow:
547 case exp2l_underflow:
548 case scalbl_underflow:
549 case scalbnl_underflow:
550 case scalblnl_underflow:
551 case ldexpl_underflow:
552 case erfcl_underflow:
553 case annuityl_underflow:
554 case compoundl_underflow:
556 /* Test for zero by testing 64 significand bits for zero. An integer
557 test is needed so denormal flag is not set by a floating-point test */
558 if ( INPUT_RESI64 == 0 ) ERRNO_RANGE;
559 break;
561 case pow_underflow:
562 case exp_underflow:
563 case exp10_underflow:
564 case exp2_underflow:
565 case scalb_underflow:
566 case scalbn_underflow:
567 case scalbln_underflow:
568 case ldexp_underflow:
569 case erfc_underflow:
570 case annuity_underflow:
571 case compound_underflow:
573 /* Test for zero by testing exp and significand bits for zero. An integer
574 test is needed so denormal flag is not set by a floating-point test */
575 if ( (INPUT_RESI64 << 1) == 0 ) ERRNO_RANGE;
576 break;
578 case powf_underflow:
579 case expf_underflow:
580 case exp10f_underflow:
581 case exp2f_underflow:
582 case scalbf_underflow:
583 case scalbnf_underflow:
584 case scalblnf_underflow:
585 case ldexpf_underflow:
586 case erfcf_underflow:
587 case annuityf_underflow:
588 case compoundf_underflow:
590 /* Test for zero by testing exp and significand bits for zero. An integer
591 test is needed so denormal flag is not set by a floating-point test */
592 if ( (INPUT_RESI64 << 33) == 0 ) ERRNO_RANGE;
593 break;
595 case logl_negative:
596 case log_negative:
597 case logf_negative:
598 case log10l_negative:
599 case log10_negative:
600 case log10f_negative:
601 case log2l_negative:
602 case log2_negative:
603 case log2f_negative:
604 case log1pl_negative:
605 case log1p_negative:
606 case log1pf_negative:
607 case sqrtl_negative:
608 case sqrt_negative:
609 case sqrtf_negative:
610 case atan2l_zero:
611 case atan2_zero:
612 case atan2f_zero:
613 case powl_zero_to_negative:
614 case powl_neg_to_non_integer:
615 case pow_zero_to_negative:
616 case pow_neg_to_non_integer:
617 case powf_zero_to_negative:
618 case powf_neg_to_non_integer:
619 case fmodl_by_zero:
620 case fmod_by_zero:
621 case fmodf_by_zero:
622 case atanhl_gt_one:
623 case atanh_gt_one:
624 case atanhf_gt_one:
625 case acosl_gt_one:
626 case acos_gt_one:
627 case acosf_gt_one:
628 case asinl_gt_one:
629 case asin_gt_one:
630 case asinf_gt_one:
631 case logbl_zero:
632 case logb_zero:
633 case logbf_zero:
634 case acoshl_lt_one:
635 case acosh_lt_one:
636 case acoshf_lt_one:
637 case y0l_zero:
638 case y0_zero:
639 case y0f_zero:
640 case y1l_zero:
641 case y1_zero:
642 case y1f_zero:
643 case ynl_zero:
644 case yn_zero:
645 case ynf_zero:
646 case y0l_negative:
647 case y0_negative:
648 case y0f_negative:
649 case y1l_negative:
650 case y1_negative:
651 case y1f_negative:
652 case ynl_negative:
653 case yn_negative:
654 case ynf_negative:
655 case acosdl_gt_one:
656 case acosd_gt_one:
657 case acosdf_gt_one:
658 case asindl_gt_one:
659 case asind_gt_one:
660 case asindf_gt_one:
661 case atan2dl_zero:
662 case atan2d_zero:
663 case atan2df_zero:
664 case annuityl_by_zero:
665 case annuity_by_zero:
666 case annuityf_by_zero:
667 case annuityl_less_m1:
668 case annuity_less_m1:
669 case annuityf_less_m1:
670 case compoundl_by_zero:
671 case compound_by_zero:
672 case compoundf_by_zero:
673 case compoundl_less_m1:
674 case compound_less_m1:
675 case compoundf_less_m1:
676 case tgammal_negative:
677 case tgamma_negative:
678 case tgammaf_negative:
680 ERRNO_DOMAIN; break;
682 default:
683 break;
685 return;
688 /***********************/
689 /* _POSIX_ Path */
690 /***********************/
692 else if(_LIB_VERSIONIMF==_POSIX_)
694 switch(input_tag)
696 case gammal_overflow:
697 case lgammal_overflow:
698 case tgammal_overflow:
700 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
702 case gamma_overflow:
703 case lgamma_overflow:
704 case tgamma_overflow:
706 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
708 case gammaf_overflow:
709 case lgammaf_overflow:
710 case tgammaf_overflow:
712 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
714 case gammal_negative:
715 case gamma_negative:
716 case gammaf_negative:
717 case lgammal_negative:
718 case lgamma_negative:
719 case lgammaf_negative:
720 case tgammal_negative:
721 case tgamma_negative:
722 case tgammaf_negative:
724 ERRNO_DOMAIN; break;
726 case ldexpl_overflow:
727 case ldexpl_underflow:
728 case ldexp_overflow:
729 case ldexp_underflow:
730 case ldexpf_overflow:
731 case ldexpf_underflow:
732 case scalbnl_overflow:
733 case scalbnl_underflow:
734 case scalbn_overflow:
735 case scalbn_underflow:
736 case scalbnf_overflow:
737 case scalbnf_underflow:
738 case scalblnl_overflow:
739 case scalblnl_underflow:
740 case scalbln_overflow:
741 case scalbln_underflow:
742 case scalblnf_overflow:
743 case scalblnf_underflow:
744 case tandl_overflow:
745 case tand_overflow:
746 case tandf_overflow:
747 case cotdl_overflow:
748 case cotd_overflow:
749 case cotdf_overflow:
750 case cotl_overflow:
751 case cot_overflow:
752 case cotf_overflow:
753 case sinhcoshl_overflow:
754 case sinhcosh_overflow:
755 case sinhcoshf_overflow:
756 case nextafterl_overflow:
757 case nextafter_overflow:
758 case nextafterf_overflow:
759 case nextafterl_underflow:
760 case nextafter_underflow:
761 case nextafterf_underflow:
762 case nexttowardl_overflow:
763 case nexttoward_overflow:
764 case nexttowardf_overflow:
765 case nexttowardl_underflow:
766 case nexttoward_underflow:
767 case nexttowardf_underflow:
769 ERRNO_RANGE; break;
771 case atanhl_gt_one:
772 case atanhl_eq_one:
773 /* atanhl(|x| >= 1) */
775 ERRNO_DOMAIN; break;
777 case atanh_gt_one:
778 case atanh_eq_one:
779 /* atanh(|x| >= 1) */
781 ERRNO_DOMAIN; break;
783 case atanhf_gt_one:
784 case atanhf_eq_one:
785 /* atanhf(|x| >= 1) */
787 ERRNO_DOMAIN; break;
789 case sqrtl_negative:
790 /* sqrtl(x < 0) */
792 ERRNO_DOMAIN; break;
794 case sqrt_negative:
795 /* sqrt(x < 0) */
797 ERRNO_DOMAIN; break;
799 case sqrtf_negative:
800 /* sqrtf(x < 0) */
802 ERRNO_DOMAIN; break;
804 case y0l_zero:
805 case y1l_zero:
806 case ynl_zero:
807 /* y0l(0) */
808 /* y1l(0) */
809 /* ynl(0) */
811 RETVAL_NEG_HUGE_VALL; ERRNO_DOMAIN; break;
813 case y0_zero:
814 case y1_zero:
815 case yn_zero:
816 /* y0(0) */
817 /* y1(0) */
818 /* yn(0) */
820 RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break;
822 case y0f_zero:
823 case y1f_zero:
824 case ynf_zero:
825 /* y0f(0) */
826 /* y1f(0) */
827 /* ynf(0) */
829 RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break;
831 case y0l_negative:
832 case y1l_negative:
833 case ynl_negative:
834 /* y0l(x < 0) */
835 /* y1l(x < 0) */
836 /* ynl(x < 0) */
838 #ifndef _LIBC
839 RETVAL_NEG_HUGE_VALL;
840 #endif
841 ERRNO_DOMAIN; break;
843 case y0_negative:
844 case y1_negative:
845 case yn_negative:
846 /* y0(x < 0) */
847 /* y1(x < 0) */
848 /* yn(x < 0) */
850 RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break;
852 case y0f_negative:
853 case y1f_negative:
854 case ynf_negative:
855 /* y0f(x < 0) */
856 /* y1f(x < 0) */
857 /* ynf(x < 0) */
859 RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break;
861 case logl_zero:
862 case log1pl_zero:
863 case log10l_zero:
864 case log2l_zero:
865 /* logl(0) */
866 /* log1pl(-1) */
867 /* log10l(0) */
868 /* log2l(0) */
870 RETVAL_NEG_HUGE_VALL; ERRNO_RANGE; break;
872 case log_zero:
873 case log1p_zero:
874 case log10_zero:
875 case log2_zero:
876 /* log(0) */
877 /* log1p(-1) */
878 /* log10(0) */
879 /* log2(0) */
881 RETVAL_NEG_HUGE_VALD; ERRNO_RANGE; break;
883 case logf_zero:
884 case log1pf_zero:
885 case log10f_zero:
886 case log2f_zero:
887 /* logf(0) */
888 /* log1pf(-1) */
889 /* log10f(0) */
890 /* log2f(0) */
892 RETVAL_NEG_HUGE_VALF; ERRNO_RANGE; break;
894 case logl_negative:
895 case log1pl_negative:
896 case log10l_negative:
897 case log2l_negative:
898 /* logl(x < 0) */
899 /* log1pl(x < -1) */
900 /* log10l(x < 0) */
901 /* log2l(x < 0) */
903 ERRNO_DOMAIN; break;
905 case log_negative:
906 case log1p_negative:
907 case log10_negative:
908 case log2_negative:
909 /* log(x < 0) */
910 /* log1p(x < -1) */
911 /* log10(x < 0) */
912 /* log2(x < 0) */
914 ERRNO_DOMAIN; break;
916 case logf_negative:
917 case log1pf_negative:
918 case log10f_negative:
919 case log2f_negative:
920 /* logf(x < 0) */
921 /* log1pf(x < -1) */
922 /* log10f(x < 0) */
923 /* log2f(x < 0) */
925 ERRNO_DOMAIN; break;
927 case expl_overflow:
928 case exp10l_overflow:
929 case exp2l_overflow:
930 /* expl overflow */
931 /* exp10l overflow */
932 /* exp2l overflow */
934 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
936 case exp_overflow:
937 case exp10_overflow:
938 case exp2_overflow:
939 /* exp overflow */
940 /* exp10 overflow */
941 /* exp2 overflow */
943 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
945 case expf_overflow:
946 case exp10f_overflow:
947 case exp2f_overflow:
948 /* expf overflow */
950 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
952 case expl_underflow:
953 case exp10l_underflow:
954 case exp2l_underflow:
955 /* expl underflow */
956 /* exp10l underflow */
957 /* exp2l underflow */
959 ERRNO_RANGE; break;
961 case exp_underflow:
962 case exp10_underflow:
963 case exp2_underflow:
964 /* exp underflow */
965 /* exp10 underflow */
966 /* exp2 underflow */
968 ERRNO_RANGE; break;
970 case expf_underflow:
971 case exp10f_underflow:
972 case exp2f_underflow:
973 /* expf underflow */
974 /* exp10f underflow */
975 /* exp2f underflow */
977 ERRNO_RANGE; break;
979 case j0l_gt_loss:
980 case y0l_gt_loss:
981 case j1l_gt_loss:
982 case y1l_gt_loss:
983 case jnl_gt_loss:
984 case ynl_gt_loss:
985 /* jn and yn doubl-extended> XLOSS */
987 RETVAL_ZEROL; ERRNO_RANGE; break;
989 case j0_gt_loss:
990 case y0_gt_loss:
991 case j1_gt_loss:
992 case y1_gt_loss:
993 case jn_gt_loss:
994 case yn_gt_loss:
995 /* jn and yn double > XLOSS */
997 RETVAL_ZEROD; ERRNO_RANGE; break;
999 case j0f_gt_loss:
1000 case y0f_gt_loss:
1001 case j1f_gt_loss:
1002 case y1f_gt_loss:
1003 case jnf_gt_loss:
1004 case ynf_gt_loss:
1005 /* j0n and y0n > XLOSS */
1007 RETVAL_ZEROF; ERRNO_RANGE; break;
1009 case powl_zero_to_zero:
1010 /* powl 0**0 */
1012 break;
1014 case pow_zero_to_zero:
1015 /* pow 0**0 */
1017 break;
1019 case powf_zero_to_zero:
1020 /* powf 0**0 */
1022 break;
1024 case powl_overflow:
1025 case annuityl_overflow:
1026 case compoundl_overflow:
1027 /* powl(x,y) overflow */
1029 if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
1030 else RETVAL_HUGE_VALL;
1031 ERRNO_RANGE; break;
1033 case pow_overflow:
1034 case annuity_overflow:
1035 case compound_overflow:
1036 /* pow(x,y) overflow */
1038 if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
1039 else RETVAL_HUGE_VALD;
1040 ERRNO_RANGE; break;
1042 case powf_overflow:
1043 case annuityf_overflow:
1044 case compoundf_overflow:
1045 /* powf(x,y) overflow */
1047 if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
1048 else RETVAL_HUGE_VALF;
1049 ERRNO_RANGE; break;
1051 case powl_underflow:
1052 case annuityl_underflow:
1053 case compoundl_underflow:
1054 /* powl(x,y) underflow */
1056 RETVAL_ZEROL; ERRNO_RANGE; break;
1058 case pow_underflow:
1059 case annuity_underflow:
1060 case compound_underflow:
1061 /* pow(x,y) underflow */
1063 RETVAL_ZEROD; ERRNO_RANGE; break;
1065 case powf_underflow:
1066 case annuityf_underflow:
1067 case compoundf_underflow:
1068 /* powf(x,y) underflow */
1070 RETVAL_ZEROF; ERRNO_RANGE; break;
1072 case annuityl_by_zero:
1073 case annuityl_less_m1:
1074 case compoundl_by_zero:
1075 case compoundl_less_m1:
1076 case annuity_by_zero:
1077 case annuity_less_m1:
1078 case compound_by_zero:
1079 case compound_less_m1:
1080 case annuityf_by_zero:
1081 case annuityf_less_m1:
1082 case compoundf_by_zero:
1083 case compoundf_less_m1:
1085 ERRNO_DOMAIN; break;
1087 case powl_zero_to_negative:
1088 /* 0**neg */
1090 ERRNO_DOMAIN; break;
1092 case pow_zero_to_negative:
1093 /* 0**neg */
1095 ERRNO_DOMAIN; break;
1097 case powf_zero_to_negative:
1098 /* 0**neg */
1100 ERRNO_DOMAIN; break;
1102 case powl_neg_to_non_integer:
1103 /* neg**non_integral */
1105 ERRNO_DOMAIN; break;
1107 case pow_neg_to_non_integer:
1108 /* neg**non_integral */
1110 ERRNO_DOMAIN; break;
1112 case powf_neg_to_non_integer:
1113 /* neg**non-integral */
1115 ERRNO_DOMAIN; break;
1117 case powl_nan_to_zero:
1118 /* powl(NaN,0.0) */
1119 /* Special Error */
1121 break;
1123 case pow_nan_to_zero:
1124 /* pow(NaN,0.0) */
1126 break;
1128 case powf_nan_to_zero:
1129 /* powf(NaN,0.0) */
1131 break;
1133 case atan2l_zero:
1134 case atan2dl_zero:
1135 /* atan2l(0,0) */
1136 /* atan2dl(0,0) */
1138 break;
1140 case atan2_zero:
1141 case atan2d_zero:
1142 /* atan2(0,0) */
1143 /* atan2d(0,0) */
1145 break;
1147 case atan2f_zero:
1148 case atan2df_zero:
1149 /* atan2f(0,0) */
1150 /* atan2df(0,0) */
1152 break;
1154 case expm1l_overflow:
1155 /* expm1 overflow */
1157 ERRNO_RANGE; break;
1159 case expm1_overflow:
1160 /* expm1 overflow */
1162 ERRNO_RANGE; break;
1164 case expm1f_overflow:
1165 /* expm1f overflow */
1167 ERRNO_RANGE; break;
1169 case expm1l_underflow:
1170 /* expm1 underflow */
1172 ERRNO_RANGE; break;
1174 case expm1_underflow:
1175 /* expm1 underflow */
1177 ERRNO_RANGE; break;
1179 case expm1f_underflow:
1180 /* expm1f underflow */
1182 ERRNO_RANGE; break;
1184 case hypotl_overflow:
1185 /* hypotl overflow */
1187 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
1189 case hypot_overflow:
1190 /* hypot overflow */
1192 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
1194 case hypotf_overflow:
1195 /* hypotf overflow */
1197 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
1199 case scalbl_underflow:
1200 /* scalbl underflow */
1202 if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_ZEROL;
1203 else RETVAL_ZEROL;
1204 ERRNO_RANGE; break;
1206 case scalb_underflow:
1207 /* scalb underflow */
1209 if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_ZEROD;
1210 else RETVAL_ZEROD;
1211 ERRNO_RANGE; break;
1213 case scalbf_underflow:
1214 /* scalbf underflow */
1216 if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_ZEROF;
1217 else RETVAL_ZEROF;
1218 ERRNO_RANGE; break;
1220 case scalbl_overflow:
1221 /* scalbl overflow */
1223 if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
1224 else RETVAL_HUGE_VALL;
1225 ERRNO_RANGE; break;
1227 case scalb_overflow:
1228 /* scalb overflow */
1230 if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
1231 else RETVAL_HUGE_VALD;
1232 ERRNO_RANGE; break;
1234 case scalbf_overflow:
1235 /* scalbf overflow */
1237 if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
1238 else RETVAL_HUGE_VALF;
1239 ERRNO_RANGE; break;
1241 case acoshl_lt_one:
1242 /* acoshl(x < 1) */
1244 ERRNO_DOMAIN; break;
1246 case acosh_lt_one:
1247 /* acosh(x < 1) */
1249 ERRNO_DOMAIN; break;
1251 case acoshf_lt_one:
1252 /* acoshf(x < 1) */
1254 ERRNO_DOMAIN; break;
1256 case acosl_gt_one:
1257 case acosdl_gt_one:
1258 /* acosl(x > 1) */
1259 /* acosdl(x > 1) */
1261 ERRNO_DOMAIN; break;
1263 case acos_gt_one:
1264 case acosd_gt_one:
1265 /* acos(x > 1) */
1266 /* acosd(x > 1) */
1268 ERRNO_DOMAIN; break;
1270 case acosf_gt_one:
1271 case acosdf_gt_one:
1272 /* acosf(x > 1) */
1273 /* acosdf(x > 1) */
1275 ERRNO_DOMAIN; break;
1277 case asinl_gt_one:
1278 case asindl_gt_one:
1279 /* asinl(x > 1) */
1280 /* asindl(x > 1) */
1282 ERRNO_DOMAIN; break;
1284 case asin_gt_one:
1285 case asind_gt_one:
1286 /* asin(x > 1) */
1287 /* asind(x > 1) */
1289 ERRNO_DOMAIN; break;
1291 case asinf_gt_one:
1292 case asindf_gt_one:
1293 /* asinf(x > 1) */
1294 /* asindf(x > 1) */
1296 ERRNO_DOMAIN; break;
1298 case remainderl_by_zero:
1299 case fmodl_by_zero:
1300 /* fmodl(x,0) */
1302 ERRNO_DOMAIN; break;
1304 case remainder_by_zero:
1305 case fmod_by_zero:
1306 /* fmod(x,0) */
1308 ERRNO_DOMAIN; break;
1310 case remainderf_by_zero:
1311 case fmodf_by_zero:
1312 /* fmodf(x,0) */
1314 ERRNO_DOMAIN; break;
1316 case coshl_overflow:
1317 /* coshl overflows */
1319 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
1321 case cosh_overflow:
1322 /* cosh overflows */
1324 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
1326 case coshf_overflow:
1327 /* coshf overflows */
1329 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
1331 case sinhl_overflow:
1332 /* sinhl overflows */
1334 if (INPUT_XL > ZEROL_VALUE /*0*/) RETVAL_HUGE_VALL;
1335 else RETVAL_NEG_HUGE_VALL;
1336 ERRNO_RANGE; break;
1338 case sinh_overflow:
1339 /* sinh overflows */
1341 if (INPUT_XD > ZEROD_VALUE /*0*/) RETVAL_HUGE_VALD;
1342 else RETVAL_NEG_HUGE_VALD;
1343 ERRNO_RANGE; break;
1345 case sinhf_overflow:
1346 /* sinhf overflows */
1348 if (INPUT_XF > ZEROF_VALUE /*0*/) RETVAL_HUGE_VALF;
1349 else RETVAL_NEG_HUGE_VALF;
1350 ERRNO_RANGE; break;
1352 case logbl_zero:
1353 /* logbl(0) */
1355 ERRNO_DOMAIN; break;
1357 case logb_zero:
1358 /* logb(0) */
1360 ERRNO_DOMAIN; break;
1362 case logbf_zero:
1363 /* logbf(0) */
1365 ERRNO_DOMAIN; break;
1367 case ilogbl_zero:
1368 /* ilogbl(0) */
1370 ERRNO_RANGE; break;
1372 case ilogb_zero:
1373 /* ilogb(0) */
1375 ERRNO_RANGE; break;
1377 case ilogbf_zero:
1378 /* ilogbf(0) */
1380 ERRNO_RANGE; break;
1382 default:
1383 break;
1385 return;
1386 /* _POSIX_ */
1389 /*******************************/
1390 /* __SVID__ and __XOPEN__ Path */
1391 /*******************************/
1392 else
1394 switch(input_tag)
1396 case ldexpl_overflow:
1397 case ldexpl_underflow:
1398 case ldexp_overflow:
1399 case ldexp_underflow:
1400 case ldexpf_overflow:
1401 case ldexpf_underflow:
1402 case scalbnl_overflow:
1403 case scalbnl_underflow:
1404 case scalbn_overflow:
1405 case scalbn_underflow:
1406 case scalbnf_overflow:
1407 case scalbnf_underflow:
1408 case scalblnl_overflow:
1409 case scalblnl_underflow:
1410 case scalbln_overflow:
1411 case scalbln_underflow:
1412 case scalblnf_overflow:
1413 case scalblnf_underflow:
1414 case tandl_overflow:
1415 case tand_overflow:
1416 case tandf_overflow:
1417 case cotdl_overflow:
1418 case cotd_overflow:
1419 case cotdf_overflow:
1420 case cotl_overflow:
1421 case cot_overflow:
1422 case cotf_overflow:
1423 case annuityl_overflow:
1424 case annuityl_underflow:
1425 case annuity_overflow:
1426 case annuity_underflow:
1427 case annuityf_overflow:
1428 case annuityf_underflow:
1429 case compoundl_overflow:
1430 case compoundl_underflow:
1431 case compound_overflow:
1432 case compound_underflow:
1433 case compoundf_overflow:
1434 case compoundf_underflow:
1436 ERRNO_RANGE; break;
1438 case annuityl_by_zero:
1439 case annuityl_less_m1:
1440 case annuity_by_zero:
1441 case annuity_less_m1:
1442 case annuityf_by_zero:
1443 case annuityf_less_m1:
1444 case compoundl_by_zero:
1445 case compoundl_less_m1:
1446 case compound_by_zero:
1447 case compound_less_m1:
1448 case compoundf_by_zero:
1449 case compoundf_less_m1:
1451 ERRNO_DOMAIN; break;
1453 case sqrtl_negative:
1454 /* sqrtl(x < 0) */
1456 DOMAINL; NAMEL = (char *) "sqrtl";
1457 ifSVID
1459 RETVAL_ZEROL;
1460 NOT_MATHERRL
1462 WRITEL_SQRT;
1463 ERRNO_DOMAIN;
1466 else
1467 { /* NaN already computed */
1468 NOT_MATHERRL {ERRNO_DOMAIN;}
1470 *(long double *)retval = excl.retval;
1471 break;
1473 case sqrt_negative:
1474 /* sqrt(x < 0) */
1476 DOMAIND; NAMED = (char *) "sqrt";
1477 ifSVID
1480 RETVAL_ZEROD;
1481 NOT_MATHERRD
1483 WRITED_SQRT;
1484 ERRNO_DOMAIN;
1487 else
1488 { /* NaN already computed */
1489 NOT_MATHERRD {ERRNO_DOMAIN;}
1491 *(double *)retval = exc.retval;
1492 break;
1494 case sqrtf_negative:
1495 /* sqrtf(x < 0) */
1497 DOMAINF; NAMEF = (char *) "sqrtf";
1498 ifSVID
1500 RETVAL_ZEROF;
1501 NOT_MATHERRF
1503 WRITEF_SQRT;
1504 ERRNO_DOMAIN;
1507 else
1509 NOT_MATHERRF {ERRNO_DOMAIN;}
1511 *(float *)retval = excf.retval;
1512 break;
1514 case logl_zero:
1515 /* logl(0) */
1517 SINGL; NAMEL = (char *) "logl";
1518 ifSVID
1520 RETVAL_NEG_HUGEL;
1521 NOT_MATHERRL
1523 WRITEL_LOG_ZERO;
1524 ERRNO_DOMAIN;
1527 else
1529 RETVAL_NEG_HUGE_VALL;
1530 NOT_MATHERRL {ERRNO_DOMAIN;}
1532 *(long double *)retval = excl.retval;
1533 break;
1535 case log_zero:
1536 /* log(0) */
1538 SINGD; NAMED = (char *) "log";
1539 ifSVID
1541 RETVAL_NEG_HUGED;
1542 NOT_MATHERRD
1544 WRITED_LOG_ZERO;
1545 ERRNO_DOMAIN;
1548 else
1550 RETVAL_NEG_HUGE_VALD;
1551 NOT_MATHERRD {ERRNO_DOMAIN;}
1553 *(double *)retval = exc.retval;
1554 break;
1556 case logf_zero:
1557 /* logf(0) */
1559 SINGF; NAMEF = (char *) "logf";
1560 ifSVID
1562 RETVAL_NEG_HUGEF;
1563 NOT_MATHERRF
1565 WRITEF_LOG_ZERO;
1566 ERRNO_DOMAIN;
1569 else
1571 RETVAL_NEG_HUGE_VALF;
1572 NOT_MATHERRF {ERRNO_DOMAIN;}
1574 *(float *)retval = excf.retval;
1575 break;
1578 case logl_negative:
1579 /* logl(x < 0) */
1581 DOMAINL; NAMEL = (char *) "logl";
1582 ifSVID
1584 RETVAL_NEG_HUGEL;
1585 NOT_MATHERRL
1587 WRITEL_LOG_NEGATIVE;
1588 ERRNO_DOMAIN;
1591 else
1593 RETVAL_NEG_HUGE_VALL;
1594 NOT_MATHERRL {ERRNO_DOMAIN;}
1596 *(long double *)retval = excl.retval;
1597 break;
1599 case log_negative:
1600 /* log(x < 0) */
1602 DOMAIND; NAMED = (char *) "log";
1603 ifSVID
1605 RETVAL_NEG_HUGED;
1606 NOT_MATHERRD
1608 WRITED_LOG_NEGATIVE;
1609 ERRNO_DOMAIN;
1612 else
1614 RETVAL_NEG_HUGE_VALD;
1615 NOT_MATHERRD {ERRNO_DOMAIN;}
1617 *(double *)retval = exc.retval;
1618 break;
1620 case logf_negative:
1621 /* logf(x < 0) */
1623 DOMAINF; NAMEF = (char *) "logf";
1624 ifSVID
1626 RETVAL_NEG_HUGEF;
1627 NOT_MATHERRF
1629 WRITEF_LOG_NEGATIVE;
1630 ERRNO_DOMAIN;
1633 else
1635 RETVAL_NEG_HUGE_VALF;
1636 NOT_MATHERRF{ERRNO_DOMAIN;}
1638 *(float *)retval = excf.retval;
1639 break;
1641 case log1pl_zero:
1642 /* log1pl(-1) */
1644 SINGL; NAMEL = (char *) "log1pl";
1645 ifSVID
1647 RETVAL_NEG_HUGEL;
1648 NOT_MATHERRL
1650 WRITEL_LOG1P_ZERO;
1651 ERRNO_DOMAIN;
1654 else
1656 RETVAL_NEG_HUGE_VALL;
1657 NOT_MATHERRL {ERRNO_DOMAIN;}
1659 *(long double *)retval = excl.retval;
1660 break;
1662 case log1p_zero:
1663 /* log1p(-1) */
1665 SINGD; NAMED = (char *) "log1p";
1666 ifSVID
1668 RETVAL_NEG_HUGED;
1669 NOT_MATHERRD
1671 WRITED_LOG1P_ZERO;
1672 ERRNO_DOMAIN;
1675 else
1677 RETVAL_NEG_HUGE_VALD;
1678 NOT_MATHERRD {ERRNO_DOMAIN;}
1680 *(double *)retval = exc.retval;
1681 break;
1683 case log1pf_zero:
1684 /* log1pf(-1) */
1686 SINGF; NAMEF = (char *) "log1pf";
1687 ifSVID
1689 RETVAL_NEG_HUGEF;
1690 NOT_MATHERRF
1692 WRITEF_LOG1P_ZERO;
1693 ERRNO_DOMAIN;
1696 else
1698 RETVAL_NEG_HUGE_VALF;
1699 NOT_MATHERRF {ERRNO_DOMAIN;}
1701 *(float *)retval = excf.retval;
1702 break;
1704 case log1pl_negative:
1705 /* log1pl(x < -1) */
1707 DOMAINL; NAMEL = (char *) "log1pl";
1708 ifSVID
1710 RETVAL_NEG_HUGEL;
1711 NOT_MATHERRL
1713 WRITEL_LOG1P_NEGATIVE;
1714 ERRNO_DOMAIN;
1717 else
1719 RETVAL_NEG_HUGE_VALL;
1720 NOT_MATHERRL {ERRNO_DOMAIN;}
1722 *(long double *)retval = excl.retval;
1723 break;
1725 case log1p_negative:
1726 /* log1p(x < -1) */
1728 DOMAIND; NAMED = (char *) "log1p";
1729 ifSVID
1731 RETVAL_NEG_HUGED;
1732 NOT_MATHERRD
1734 WRITED_LOG1P_NEGATIVE;
1735 ERRNO_DOMAIN;
1738 else
1740 RETVAL_NEG_HUGE_VALD;
1741 NOT_MATHERRD {ERRNO_DOMAIN;}
1743 *(double *)retval = exc.retval;
1744 break;
1746 case log1pf_negative:
1747 /* log1pf(x < -1) */
1749 DOMAINF; NAMEF = (char *) "log1pf";
1750 ifSVID
1752 RETVAL_NEG_HUGEF;
1753 NOT_MATHERRF
1755 WRITEF_LOG1P_NEGATIVE;
1756 ERRNO_DOMAIN;
1759 else
1761 RETVAL_NEG_HUGE_VALF;
1762 NOT_MATHERRF {ERRNO_DOMAIN;}
1764 *(float *)retval = excf.retval;
1765 break;
1767 case log10l_zero:
1768 /* log10l(0) */
1770 SINGL; NAMEL = (char *) "log10l";
1771 ifSVID
1773 RETVAL_NEG_HUGEL;
1774 NOT_MATHERRL
1776 WRITEL_LOG10_ZERO;
1777 ERRNO_DOMAIN;
1780 else
1782 RETVAL_NEG_HUGE_VALL;
1783 NOT_MATHERRL {ERRNO_DOMAIN;}
1785 *(long double *)retval = excl.retval;
1786 break;
1788 case log10_zero:
1789 /* log10(0) */
1791 SINGD; NAMED = (char *) "log10";
1792 ifSVID
1794 RETVAL_NEG_HUGED;
1795 NOT_MATHERRD
1797 WRITED_LOG10_ZERO;
1798 ERRNO_DOMAIN;
1801 else
1803 RETVAL_NEG_HUGE_VALD;
1804 NOT_MATHERRD {ERRNO_DOMAIN;}
1806 *(double *)retval = exc.retval;
1807 break;
1809 case log10f_zero:
1810 /* log10f(0) */
1812 SINGF; NAMEF = (char *) "log10f";
1813 ifSVID
1815 RETVAL_NEG_HUGEF;
1816 NOT_MATHERRF
1818 WRITEF_LOG10_ZERO;
1819 ERRNO_DOMAIN;
1822 else
1824 RETVAL_NEG_HUGE_VALF;
1825 NOT_MATHERRF {ERRNO_DOMAIN;}
1827 *(float *)retval = excf.retval;
1828 break;
1830 case log10l_negative:
1831 /* log10l(x < 0) */
1833 DOMAINL; NAMEL = (char *) "log10l";
1834 ifSVID
1836 RETVAL_NEG_HUGEL;
1837 NOT_MATHERRL
1839 WRITEL_LOG10_NEGATIVE;
1840 ERRNO_DOMAIN;
1843 else
1845 RETVAL_NEG_HUGE_VALL;
1846 NOT_MATHERRL {ERRNO_DOMAIN;}
1848 *(long double *)retval = excl.retval;
1849 break;
1851 case log10_negative:
1852 /* log10(x < 0) */
1854 DOMAIND; NAMED = (char *) "log10";
1855 ifSVID
1857 RETVAL_NEG_HUGED;
1858 NOT_MATHERRD
1860 WRITED_LOG10_NEGATIVE;
1861 ERRNO_DOMAIN;
1864 else
1866 RETVAL_NEG_HUGE_VALD;
1867 NOT_MATHERRD {ERRNO_DOMAIN;}
1869 *(double *)retval = exc.retval;
1870 break;
1872 case log10f_negative:
1873 /* log10f(x < 0) */
1875 DOMAINF; NAMEF = (char *) "log10f";
1876 ifSVID
1878 RETVAL_NEG_HUGEF;
1879 NOT_MATHERRF
1881 WRITEF_LOG10_NEGATIVE;
1882 ERRNO_DOMAIN;
1885 else
1887 RETVAL_NEG_HUGE_VALF;
1888 NOT_MATHERRF {ERRNO_DOMAIN;}
1890 *(float *)retval = excf.retval;
1891 break;
1893 case log2l_zero:
1894 /* log2l(0) */
1896 SINGL; NAMEL = (char *) "log2l";
1897 ifSVID
1899 RETVAL_NEG_HUGEL;
1900 NOT_MATHERRL
1902 WRITEL_LOG2_ZERO;
1903 ERRNO_DOMAIN;
1906 else
1908 RETVAL_NEG_HUGE_VALL;
1909 NOT_MATHERRL {ERRNO_DOMAIN;}
1911 *(long double *)retval = excl.retval;
1912 break;
1914 case log2_zero:
1915 /* log2(0) */
1917 SINGD; NAMED = (char *) "log2";
1918 ifSVID
1920 RETVAL_NEG_HUGED;
1921 NOT_MATHERRD
1923 WRITED_LOG2_ZERO;
1924 ERRNO_DOMAIN;
1927 else
1929 RETVAL_NEG_HUGE_VALD;
1930 NOT_MATHERRD {ERRNO_DOMAIN;}
1932 *(double *)retval = exc.retval;
1933 break;
1935 case log2f_zero:
1936 /* log2f(0) */
1938 SINGF; NAMEF = (char *) "log2f";
1939 ifSVID
1941 RETVAL_NEG_HUGEF;
1942 NOT_MATHERRF
1944 WRITEF_LOG2_ZERO;
1945 ERRNO_DOMAIN;
1948 else
1950 RETVAL_NEG_HUGE_VALF;
1951 NOT_MATHERRF {ERRNO_DOMAIN;}
1953 *(float *)retval = excf.retval;
1954 break;
1956 case log2l_negative:
1957 /* log2l(x < 0) */
1959 DOMAINL; NAMEL = (char *) "log2l";
1960 ifSVID
1962 RETVAL_NEG_HUGEL;
1963 NOT_MATHERRL
1965 WRITEL_LOG2_NEGATIVE;
1966 ERRNO_DOMAIN;
1969 else
1971 RETVAL_NEG_HUGE_VALL;
1972 NOT_MATHERRL {ERRNO_DOMAIN;}
1974 *(long double *)retval = excl.retval;
1975 break;
1977 case log2_negative:
1978 /* log2(x < 0) */
1980 DOMAIND; NAMED = (char *) "log2";
1981 ifSVID
1983 RETVAL_NEG_HUGED;
1984 NOT_MATHERRD
1986 WRITED_LOG2_NEGATIVE;
1987 ERRNO_DOMAIN;
1990 else
1992 RETVAL_NEG_HUGE_VALD;
1993 NOT_MATHERRD {ERRNO_DOMAIN;}
1995 *(double *)retval = exc.retval;
1996 break;
1998 case log2f_negative:
1999 /* log2f(x < 0) */
2001 DOMAINF; NAMEF = (char *) "log2f";
2002 ifSVID
2004 RETVAL_NEG_HUGEF;
2005 NOT_MATHERRF
2007 WRITEF_LOG2_NEGATIVE;
2008 ERRNO_DOMAIN;
2011 else
2013 RETVAL_NEG_HUGE_VALF;
2014 NOT_MATHERRF {ERRNO_DOMAIN;}
2016 *(float *)retval = excf.retval;
2017 break;
2019 case expl_overflow:
2020 /* expl overflow */
2022 OVERFLOWL; NAMEL = (char *) "expl";
2023 ifSVID
2025 RETVAL_HUGEL;
2027 else
2029 RETVAL_HUGE_VALL;
2031 NOT_MATHERRL {ERRNO_RANGE;}
2032 *(long double *)retval = excl.retval;
2033 break;
2035 case exp_overflow:
2036 /* exp overflow */
2038 OVERFLOWD; NAMED = (char *) "exp";
2039 ifSVID
2041 RETVAL_HUGED;
2043 else
2045 RETVAL_HUGE_VALD;
2047 NOT_MATHERRD {ERRNO_RANGE;}
2048 *(double *)retval = exc.retval;
2049 break;
2051 case expf_overflow:
2052 /* expf overflow */
2054 OVERFLOWF; NAMEF = (char *) "expf";
2055 ifSVID
2057 RETVAL_HUGEF;
2059 else
2061 RETVAL_HUGE_VALF;
2063 NOT_MATHERRF {ERRNO_RANGE;}
2064 *(float *)retval = excf.retval;
2065 break;
2067 case expl_underflow:
2068 /* expl underflow */
2070 UNDERFLOWL; NAMEL = (char *) "expl"; RETVAL_ZEROL;
2071 NOT_MATHERRL {ERRNO_RANGE;}
2072 *(long double *)retval = excl.retval;
2073 break;
2075 case exp_underflow:
2076 /* exp underflow */
2078 UNDERFLOWD; NAMED = (char *) "exp"; RETVAL_ZEROD;
2079 NOT_MATHERRD {ERRNO_RANGE;}
2080 *(double *)retval = exc.retval;
2081 break;
2083 case expf_underflow:
2084 /* expf underflow */
2086 UNDERFLOWF; NAMEF = (char *) "expf"; RETVAL_ZEROF;
2087 NOT_MATHERRF {ERRNO_RANGE;}
2088 *(float *)retval = excf.retval;
2089 break;
2091 case powl_zero_to_zero:
2092 /* powl 0**0 */
2094 DOMAINL; NAMEL = (char *) "powl";
2095 ifSVID
2097 RETVAL_ZEROL;
2098 NOT_MATHERRL
2100 WRITEL_POW_ZERO_TO_ZERO;
2101 ERRNO_DOMAIN;
2103 *(long double *)retval = excl.retval;
2105 else RETVAL_ONEL;
2106 break;
2108 case pow_zero_to_zero:
2109 /* pow 0**0 */
2111 DOMAIND; NAMED = (char *) "pow";
2112 ifSVID
2114 RETVAL_ZEROD;
2115 NOT_MATHERRD
2117 WRITED_POW_ZERO_TO_ZERO;
2118 ERRNO_DOMAIN;
2120 *(double *)retval = exc.retval;
2122 else RETVAL_ONED;
2123 break;
2125 case powf_zero_to_zero:
2126 /* powf 0**0 */
2128 DOMAINF; NAMEF = (char *) "powf";
2129 ifSVID
2131 RETVAL_ZEROF;
2132 NOT_MATHERRF
2134 WRITEF_POW_ZERO_TO_ZERO;
2135 ERRNO_DOMAIN;
2137 *(float *)retval = excf.retval;
2139 else RETVAL_ONEF;
2140 break;
2142 case powl_overflow:
2143 /* powl(x,y) overflow */
2145 OVERFLOWL; NAMEL = (char *) "powl";
2146 ifSVID
2148 if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGEL;
2149 else RETVAL_HUGEL;
2151 else
2153 if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
2154 else RETVAL_HUGE_VALL;
2156 NOT_MATHERRL {ERRNO_RANGE;}
2157 *(long double *)retval = excl.retval;
2158 break;
2160 case pow_overflow:
2161 /* pow(x,y) overflow */
2163 OVERFLOWD; NAMED = (char *) "pow";
2164 ifSVID
2166 if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGED;
2167 else RETVAL_HUGED;
2169 else
2171 if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
2172 else RETVAL_HUGE_VALD;
2174 NOT_MATHERRD {ERRNO_RANGE;}
2175 *(double *)retval = exc.retval;
2176 break;
2178 case powf_overflow:
2179 /* powf(x,y) overflow */
2181 OVERFLOWF; NAMEF = (char *) "powf";
2182 ifSVID
2184 if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGEF;
2185 else RETVAL_HUGEF;
2187 else
2189 if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
2190 else RETVAL_HUGE_VALF;
2192 NOT_MATHERRF {ERRNO_RANGE;}
2193 *(float *)retval = excf.retval;
2194 break;
2196 case powl_underflow:
2197 /* powl(x,y) underflow */
2199 UNDERFLOWL; NAMEL = (char *) "powl"; RETVAL_ZEROL;
2200 NOT_MATHERRL {ERRNO_RANGE;}
2201 *(long double *)retval = excl.retval;
2202 break;
2204 case pow_underflow:
2205 /* pow(x,y) underflow */
2207 UNDERFLOWD; NAMED = (char *) "pow"; RETVAL_ZEROD;
2208 NOT_MATHERRD {ERRNO_RANGE;}
2209 *(double *)retval = exc.retval;
2210 break;
2212 case powf_underflow:
2213 /* powf(x,y) underflow */
2215 UNDERFLOWF; NAMEF = (char *) "powf"; RETVAL_ZEROF;
2216 NOT_MATHERRF {ERRNO_RANGE;}
2217 *(float *)retval = excf.retval;
2218 break;
2220 case powl_zero_to_negative:
2221 /* 0 to neg */
2223 DOMAINL; NAMEL = (char *) "powl";
2224 ifSVID
2226 RETVAL_ZEROL;
2227 NOT_MATHERRL
2229 WRITEL_POW_ZERO_TO_NEGATIVE;
2230 ERRNO_DOMAIN;
2233 else
2235 RETVAL_NEG_HUGE_VALL;
2236 NOT_MATHERRL {ERRNO_DOMAIN;}
2238 *(long double *)retval = excl.retval;
2239 break;
2241 case pow_zero_to_negative:
2242 /* 0**neg */
2244 DOMAIND; NAMED = (char *) "pow";
2245 ifSVID
2247 RETVAL_ZEROD;
2248 NOT_MATHERRD
2250 WRITED_POW_ZERO_TO_NEGATIVE;
2251 ERRNO_DOMAIN;
2254 else
2256 RETVAL_NEG_HUGE_VALD;
2257 NOT_MATHERRD {ERRNO_DOMAIN;}
2259 *(double *)retval = exc.retval;
2260 break;
2262 case powf_zero_to_negative:
2263 /* 0**neg */
2265 DOMAINF; NAMEF = (char *) "powf";
2266 ifSVID
2268 RETVAL_ZEROF;
2269 NOT_MATHERRF
2271 WRITEF_POW_ZERO_TO_NEGATIVE;
2272 ERRNO_DOMAIN;
2275 else
2277 RETVAL_NEG_HUGE_VALF;
2278 NOT_MATHERRF {ERRNO_DOMAIN;}
2280 *(float *)retval = excf.retval;
2281 break;
2283 case powl_neg_to_non_integer:
2284 /* neg**non_integral */
2286 DOMAINL; NAMEL = (char *) "powl";
2287 ifSVID
2289 RETVAL_ZEROL;
2290 NOT_MATHERRL
2292 WRITEL_POW_NEG_TO_NON_INTEGER;
2293 ERRNO_DOMAIN;
2296 else
2298 NOT_MATHERRL {ERRNO_DOMAIN;}
2300 *(long double *)retval = excl.retval;
2301 break;
2303 case pow_neg_to_non_integer:
2304 /* neg**non_integral */
2306 DOMAIND; NAMED = (char *) "pow";
2307 ifSVID
2309 RETVAL_ZEROD;
2310 NOT_MATHERRD
2312 WRITED_POW_NEG_TO_NON_INTEGER;
2313 ERRNO_DOMAIN;
2316 else
2318 NOT_MATHERRD {ERRNO_DOMAIN;}
2320 *(double *)retval = exc.retval;
2321 break;
2323 case powf_neg_to_non_integer:
2324 /* neg**non-integral */
2326 DOMAINF; NAMEF = (char *) "powf";
2327 ifSVID
2329 RETVAL_ZEROF;
2330 NOT_MATHERRF
2332 WRITEF_POW_NEG_TO_NON_INTEGER;
2333 ERRNO_DOMAIN;
2336 else
2338 NOT_MATHERRF {ERRNO_DOMAIN;}
2340 *(float *)retval = excf.retval;
2341 break;
2343 case powl_nan_to_zero:
2344 /* pow(NaN,0.0) */
2345 /* Special Error */
2347 DOMAINL; NAMEL = (char *) "powl";
2348 *(long double *)retval = *(long double *)arg1;
2349 NOT_MATHERRL {ERRNO_DOMAIN;}
2350 *(long double *)retval = excl.retval;
2351 break;
2353 case pow_nan_to_zero:
2354 /* pow(NaN,0.0) */
2355 /* Special Error */
2357 DOMAIND; NAMED = (char *) "pow";
2358 *(double *)retval = *(double *)arg1;
2359 NOT_MATHERRD {ERRNO_DOMAIN;}
2360 *(double *)retval = exc.retval;
2361 break;
2363 case powf_nan_to_zero:
2364 /* powf(NaN,0.0) */
2365 /* Special Error */
2367 DOMAINF; NAMEF = (char *) "powf";
2368 *(float *)retval = *(float *)arg1;
2369 NOT_MATHERRF {ERRNO_DOMAIN;}
2370 *(float *)retval = excf.retval;
2371 break;
2373 case atan2l_zero:
2374 /* atan2l(0.0,0.0) */
2376 DOMAINL; NAMEL = (char *) "atan2l";
2377 RETVAL_ZEROL;
2378 NOT_MATHERRL
2380 ifSVID
2382 WRITEL_ATAN2_ZERO_BY_ZERO;
2384 ERRNO_DOMAIN;
2386 *(long double *)retval = excl.retval;
2387 break;
2389 case atan2_zero:
2390 /* atan2(0.0,0.0) */
2392 DOMAIND; NAMED = (char *) "atan2";
2393 RETVAL_ZEROD;
2394 NOT_MATHERRD
2396 ifSVID
2398 WRITED_ATAN2_ZERO_BY_ZERO;
2400 ERRNO_DOMAIN;
2402 *(double *)retval = exc.retval;
2403 break;
2405 case atan2f_zero:
2406 /* atan2f(0.0,0.0) */
2408 DOMAINF; NAMEF = (char *) "atan2f";
2409 RETVAL_ZEROF;
2410 NOT_MATHERRF
2412 ifSVID
2414 WRITEF_ATAN2_ZERO_BY_ZERO;
2416 ERRNO_DOMAIN;
2418 *(float *)retval = excf.retval;
2419 break;
2421 case atan2dl_zero:
2422 /* atan2dl(0.0,0.0) */
2424 DOMAINL; NAMEL = (char *) "atan2dl";
2425 RETVAL_ZEROL;
2426 NOT_MATHERRL
2428 ifSVID
2430 WRITEL_ATAN2D_ZERO_BY_ZERO;
2432 ERRNO_DOMAIN;
2434 *(long double *)retval = excl.retval;
2435 break;
2437 case atan2d_zero:
2438 /* atan2d(0.0,0.0) */
2440 DOMAIND; NAMED = (char *) "atan2d";
2441 RETVAL_ZEROD;
2442 NOT_MATHERRD
2444 ifSVID
2446 WRITED_ATAN2D_ZERO_BY_ZERO;
2448 ERRNO_DOMAIN;
2450 *(double *)retval = exc.retval;
2451 break;
2453 case atan2df_zero:
2454 /* atan2df(0.0,0.0) */
2456 DOMAINF; NAMEF = (char *) "atan2df";
2457 RETVAL_ZEROF;
2458 NOT_MATHERRF
2460 ifSVID
2462 WRITEF_ATAN2D_ZERO_BY_ZERO;
2464 ERRNO_DOMAIN;
2466 *(float *)retval = excf.retval;
2467 break;
2469 case expm1_overflow:
2470 /* expm1(finite) overflow */
2471 /* Overflow is the only documented */
2472 /* special value. */
2474 ERRNO_RANGE;
2475 break;
2477 case expm1f_overflow:
2478 /* expm1f(finite) overflow */
2480 ERRNO_RANGE;
2481 break;
2483 case expm1_underflow:
2484 /* expm1(finite) underflow */
2485 /* Underflow is not documented */
2486 /* special value. */
2488 ERRNO_RANGE;
2489 break;
2491 case expm1f_underflow:
2492 /* expm1f(finite) underflow */
2494 ERRNO_RANGE;
2495 break;
2497 case scalbl_underflow:
2498 /* scalbl underflow */
2500 UNDERFLOWL; NAMEL = (char *) "scalbl";
2501 if (INPUT_XL < ZEROL_VALUE /*0.0L*/) RETVAL_NEG_ZEROL;
2502 else RETVAL_ZEROL;
2503 NOT_MATHERRL {ERRNO_RANGE;}
2504 *(long double *)retval = excl.retval;
2505 break;
2507 case scalb_underflow:
2508 /* scalb underflow */
2510 UNDERFLOWD; NAMED = (char *) "scalb";
2511 if (INPUT_XD < ZEROD_VALUE /*0.0*/) RETVAL_NEG_ZEROD;
2512 else RETVAL_ZEROD;
2513 NOT_MATHERRD {ERRNO_RANGE;}
2514 *(double *)retval = exc.retval;
2515 break;
2517 case scalbf_underflow:
2518 /* scalbf underflow */
2520 UNDERFLOWF; NAMEF = (char *) "scalbf";
2521 if (INPUT_XF < ZEROF_VALUE /*0.0*/) RETVAL_NEG_ZEROF;
2522 else RETVAL_ZEROF;
2523 NOT_MATHERRF {ERRNO_RANGE;}
2524 *(float *)retval = excf.retval;
2525 break;
2527 case scalbl_overflow:
2528 /* scalbl overflow */
2530 OVERFLOWL; NAMEL = (char *) "scalbl";
2531 if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
2532 else RETVAL_HUGE_VALL;
2533 NOT_MATHERRL {ERRNO_RANGE;}
2534 *(long double *)retval = excl.retval;
2535 break;
2537 case scalb_overflow:
2538 /* scalb overflow */
2540 OVERFLOWD; NAMED = (char *) "scalb";
2541 if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
2542 else RETVAL_HUGE_VALD;
2543 NOT_MATHERRD {ERRNO_RANGE;}
2544 *(double *)retval = exc.retval;
2545 break;
2547 case scalbf_overflow:
2548 /* scalbf overflow */
2550 OVERFLOWF; NAMEF = (char *) "scalbf";
2551 if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
2552 else RETVAL_HUGE_VALF;
2553 NOT_MATHERRF {ERRNO_RANGE;}
2554 *(float *)retval = excf.retval;
2555 break;
2557 case hypotl_overflow:
2558 /* hypotl overflow */
2560 OVERFLOWL; NAMEL = (char *) "hypotl";
2561 ifSVID
2563 RETVAL_HUGEL;
2565 else
2567 RETVAL_HUGE_VALL;
2569 NOT_MATHERRL {ERRNO_RANGE;}
2570 *(long double *)retval = excl.retval;
2571 break;
2573 case hypot_overflow:
2574 /* hypot overflow */
2576 OVERFLOWD; NAMED = (char *) "hypot";
2577 ifSVID
2579 RETVAL_HUGED;
2581 else
2583 RETVAL_HUGE_VALD;
2585 NOT_MATHERRD {ERRNO_RANGE;}
2586 *(double *)retval = exc.retval;
2587 break;
2589 case hypotf_overflow:
2590 /* hypotf overflow */
2592 OVERFLOWF; NAMEF = (char *) "hypotf";
2593 ifSVID
2595 RETVAL_HUGEF;
2597 else
2599 RETVAL_HUGE_VALF;
2601 NOT_MATHERRF {ERRNO_RANGE;}
2602 *(float *)retval = excf.retval;
2603 break;
2605 case acosl_gt_one:
2606 /* acosl(x > 1) */
2608 DOMAINL; NAMEL = (char *) "acosl";
2609 RETVAL_ZEROL;
2610 ifSVID
2612 NOT_MATHERRL
2614 WRITEL_ACOS;
2615 ERRNO_DOMAIN;
2618 else
2620 NOT_MATHERRL {ERRNO_DOMAIN;}
2622 *(long double *)retval = excl.retval;
2623 break;
2625 case acos_gt_one:
2626 /* acos(x > 1) */
2628 DOMAIND; NAMED = (char *) "acos";
2629 RETVAL_ZEROD;
2630 ifSVID
2632 NOT_MATHERRD
2634 WRITED_ACOS;
2635 ERRNO_DOMAIN;
2638 else
2640 NOT_MATHERRD {ERRNO_DOMAIN;}
2642 *(double *)retval = exc.retval;
2643 break;
2645 case acosf_gt_one:
2646 /* acosf(x > 1) */
2648 DOMAINF; NAMEF = (char *) "acosf";
2649 RETVAL_ZEROF;
2650 ifSVID
2652 NOT_MATHERRF
2654 WRITEF_ACOS;
2655 ERRNO_DOMAIN;
2658 else
2660 NOT_MATHERRF {ERRNO_DOMAIN;}
2662 *(float *)retval = excf.retval;
2663 break;
2665 case asinl_gt_one:
2666 /* asinl(x > 1) */
2668 DOMAINL; NAMEL = (char *) "asinl";
2669 RETVAL_ZEROL;
2670 ifSVID
2672 NOT_MATHERRL
2674 WRITEL_ASIN;
2675 ERRNO_DOMAIN;
2678 else
2680 NOT_MATHERRL {ERRNO_DOMAIN;}
2682 *(long double *)retval = excl.retval;
2683 break;
2685 case asin_gt_one:
2686 /* asin(x > 1) */
2688 DOMAIND; NAMED = (char *) "asin";
2689 RETVAL_ZEROD;
2690 ifSVID
2692 NOT_MATHERRD
2694 WRITED_ASIN;
2695 ERRNO_DOMAIN;
2698 else
2700 NOT_MATHERRD {ERRNO_DOMAIN;}
2702 *(double *)retval = exc.retval;
2703 break;
2705 case asinf_gt_one:
2706 /* asinf(x > 1) */
2708 DOMAINF; NAMEF = (char *) "asinf";
2709 RETVAL_ZEROF;
2710 ifSVID
2712 NOT_MATHERRF
2714 WRITEF_ASIN;
2715 ERRNO_DOMAIN;
2718 else
2720 NOT_MATHERRF {ERRNO_DOMAIN;}
2722 *(float *)retval = excf.retval;
2723 break;
2725 case acosdl_gt_one:
2726 /* acosdl(x > 1) */
2728 DOMAINL; NAMEL = (char *) "acosdl";
2729 RETVAL_ZEROL;
2730 ifSVID
2732 NOT_MATHERRL
2734 WRITEL_ACOSD;
2735 ERRNO_DOMAIN;
2738 else
2740 NOT_MATHERRL {ERRNO_DOMAIN;}
2742 *(long double *)retval = excl.retval;
2743 break;
2745 case acosd_gt_one:
2746 /* acosd(x > 1) */
2748 DOMAIND; NAMED = (char *) "acosd";
2749 RETVAL_ZEROD;
2750 ifSVID
2752 NOT_MATHERRD
2754 WRITED_ACOSD;
2755 ERRNO_DOMAIN;
2758 else
2760 NOT_MATHERRD {ERRNO_DOMAIN;}
2762 *(double *)retval = exc.retval;
2763 break;
2765 case acosdf_gt_one:
2766 /* acosdf(x > 1) */
2768 DOMAINF; NAMEF = (char *) "acosdf";
2769 RETVAL_ZEROF;
2770 ifSVID
2772 NOT_MATHERRF
2774 WRITEF_ACOSD;
2775 ERRNO_DOMAIN;
2778 else
2780 NOT_MATHERRF {ERRNO_DOMAIN;}
2782 *(float *)retval = excf.retval;
2783 break;
2785 case asindl_gt_one:
2786 /* asindl(x > 1) */
2788 DOMAINL; NAMEL = (char *) "asindl";
2789 RETVAL_ZEROL;
2790 ifSVID
2792 NOT_MATHERRL
2794 WRITEL_ASIND;
2795 ERRNO_DOMAIN;
2798 else
2800 NOT_MATHERRL {ERRNO_DOMAIN;}
2802 *(long double *)retval = excl.retval;
2803 break;
2805 case asind_gt_one:
2806 /* asind(x > 1) */
2808 DOMAIND; NAMED = (char *) "asind";
2809 RETVAL_ZEROD;
2810 ifSVID
2812 NOT_MATHERRD
2814 WRITED_ASIND;
2815 ERRNO_DOMAIN;
2818 else
2820 NOT_MATHERRD {ERRNO_DOMAIN;}
2822 *(double *)retval = exc.retval;
2823 break;
2825 case asindf_gt_one:
2826 /* asindf(x > 1) */
2828 DOMAINF; NAMEF = (char *) "asindf";
2829 RETVAL_ZEROF;
2830 ifSVID
2832 NOT_MATHERRF
2834 WRITEF_ASIND;
2835 ERRNO_DOMAIN;
2838 else
2840 NOT_MATHERRF {ERRNO_DOMAIN;}
2842 *(float *)retval = excf.retval;
2843 break;
2845 case coshl_overflow:
2846 /* coshl overflow */
2848 OVERFLOWL; NAMEL = (char *) "coshl";
2849 ifSVID
2851 RETVAL_HUGEL;
2853 else
2855 RETVAL_HUGE_VALL;
2857 NOT_MATHERRL {ERRNO_RANGE;}
2858 *(long double *)retval = excl.retval;
2859 break;
2861 case cosh_overflow:
2862 /* cosh overflow */
2864 OVERFLOWD; NAMED = (char *) "cosh";
2865 ifSVID
2867 RETVAL_HUGED;
2869 else
2871 RETVAL_HUGE_VALD;
2873 NOT_MATHERRD {ERRNO_RANGE;}
2874 *(double *)retval = exc.retval;
2875 break;
2877 case coshf_overflow:
2878 /* coshf overflow */
2880 OVERFLOWF; NAMEF = (char *) "coshf";
2881 ifSVID
2883 RETVAL_HUGEF;
2885 else
2887 RETVAL_HUGE_VALF;
2889 NOT_MATHERRF {ERRNO_RANGE;}
2890 *(float *)retval = excf.retval;
2891 break;
2893 case sinhl_overflow:
2894 /* sinhl overflow */
2896 OVERFLOWL; NAMEL = (char *) "sinhl";
2897 ifSVID
2899 if (INPUT_XL > ZEROL_VALUE /*0.0*/) RETVAL_HUGEL;
2900 else RETVAL_NEG_HUGEL;
2902 else
2904 if (INPUT_XL > ZEROL_VALUE /*0.0*/) RETVAL_HUGE_VALL;
2905 else RETVAL_NEG_HUGE_VALL;
2907 NOT_MATHERRL {ERRNO_RANGE;}
2908 *(long double *)retval = excl.retval;
2909 break;
2911 case sinh_overflow:
2912 /* sinh overflow */
2914 OVERFLOWD; NAMED = (char *) "sinh";
2915 ifSVID
2917 if (INPUT_XD > ZEROD_VALUE /*0.0*/) RETVAL_HUGED;
2918 else RETVAL_NEG_HUGED;
2920 else
2922 if (INPUT_XD > ZEROD_VALUE /*0.0*/) RETVAL_HUGE_VALD;
2923 else RETVAL_NEG_HUGE_VALD;
2925 NOT_MATHERRD {ERRNO_RANGE;}
2926 *(double *)retval = exc.retval;
2927 break;
2929 case sinhf_overflow:
2930 /* sinhf overflow */
2932 OVERFLOWF; NAMEF = (char *) "sinhf";
2933 ifSVID
2935 if (INPUT_XF > ZEROF_VALUE /*0.0*/) RETVAL_HUGEF;
2936 else RETVAL_NEG_HUGEF;
2938 else
2940 if (INPUT_XF > ZEROF_VALUE /*0.0*/) RETVAL_HUGE_VALF;
2941 else RETVAL_NEG_HUGE_VALF;
2943 NOT_MATHERRF {ERRNO_RANGE;}
2944 *(float *)retval = excf.retval;
2945 break;
2947 case acoshl_lt_one:
2948 /* acoshl(x < 1) */
2950 DOMAINL; NAMEL = (char *) "acoshl";
2951 ifSVID
2953 NOT_MATHERRL
2955 WRITEL_ACOSH;
2956 ERRNO_DOMAIN;
2959 else
2961 NOT_MATHERRL {ERRNO_DOMAIN;}
2963 *(long double *)retval = excl.retval;
2964 break;
2966 case acosh_lt_one:
2967 /* acosh(x < 1) */
2969 DOMAIND; NAMED = (char *) "acosh";
2970 ifSVID
2972 NOT_MATHERRD
2974 WRITED_ACOSH;
2975 ERRNO_DOMAIN;
2978 else
2980 NOT_MATHERRD {ERRNO_DOMAIN;}
2982 *(double *)retval = exc.retval;
2983 break;
2985 case acoshf_lt_one:
2986 /* acoshf(x < 1) */
2988 DOMAINF; NAMEF = (char *) "acoshf";
2989 ifSVID
2991 NOT_MATHERRF
2993 WRITEF_ACOSH;
2994 ERRNO_DOMAIN;
2997 else
2999 NOT_MATHERRF {ERRNO_DOMAIN;}
3001 *(float *)retval = excf.retval;
3002 break;
3004 case atanhl_gt_one:
3005 /* atanhl(|x| > 1) */
3007 DOMAINL; NAMEL = (char *) "atanhl";
3008 ifSVID
3010 NOT_MATHERRL
3012 WRITEL_ATANH_GT_ONE;
3013 ERRNO_DOMAIN;
3016 else
3018 NOT_MATHERRL {ERRNO_DOMAIN;}
3020 break;
3022 case atanh_gt_one:
3023 /* atanh(|x| > 1) */
3025 DOMAIND; NAMED = (char *) "atanh";
3026 ifSVID
3028 NOT_MATHERRD
3030 WRITED_ATANH_GT_ONE;
3031 ERRNO_DOMAIN;
3034 else
3036 NOT_MATHERRD {ERRNO_DOMAIN;}
3038 break;
3040 case atanhf_gt_one:
3041 /* atanhf(|x| > 1) */
3043 DOMAINF; NAMEF = (char *) "atanhf";
3044 ifSVID
3046 NOT_MATHERRF
3048 WRITEF_ATANH_GT_ONE;
3049 ERRNO_DOMAIN;
3052 else
3054 NOT_MATHERRF {ERRNO_DOMAIN;}
3056 break;
3058 case atanhl_eq_one:
3059 /* atanhl(|x| == 1) */
3061 SINGL; NAMEL = (char *) "atanhl";
3062 ifSVID
3064 NOT_MATHERRL
3066 WRITEL_ATANH_EQ_ONE;
3067 ERRNO_DOMAIN;
3070 else
3072 NOT_MATHERRL {ERRNO_DOMAIN;}
3074 break;
3076 case atanh_eq_one:
3077 /* atanh(|x| == 1) */
3079 SINGD; NAMED = (char *) "atanh";
3080 ifSVID
3082 NOT_MATHERRD
3084 WRITED_ATANH_EQ_ONE;
3085 ERRNO_DOMAIN;
3088 else
3090 NOT_MATHERRD {ERRNO_DOMAIN;}
3092 break;
3094 case atanhf_eq_one:
3095 /* atanhf(|x| == 1) */
3097 SINGF; NAMEF = (char *) "atanhf";
3098 ifSVID
3100 NOT_MATHERRF
3102 WRITEF_ATANH_EQ_ONE;
3103 ERRNO_DOMAIN;
3106 else
3108 NOT_MATHERRF {ERRNO_DOMAIN;}
3110 break;
3112 case gammal_overflow:
3113 /* gammal overflow */
3115 OVERFLOWL; NAMEL = (char *) "gammal";
3116 ifSVID
3118 RETVAL_HUGEL;
3120 else
3122 RETVAL_HUGE_VALL;
3124 NOT_MATHERRL {ERRNO_RANGE;}
3125 *(long double *)retval = excl.retval;
3126 break;
3128 case gamma_overflow:
3129 /* gamma overflow */
3131 OVERFLOWD; NAMED = (char *) "gamma";
3132 ifSVID
3134 RETVAL_HUGED;
3136 else
3138 RETVAL_HUGE_VALD;
3140 NOT_MATHERRD {ERRNO_RANGE;}
3141 *(double *)retval = exc.retval;
3142 break;
3144 case gammaf_overflow:
3145 /* gammaf overflow */
3147 OVERFLOWF; NAMEF = (char *) "gammaf";
3148 ifSVID
3150 RETVAL_HUGEF;
3152 else
3154 RETVAL_HUGE_VALF;
3156 NOT_MATHERRF {ERRNO_RANGE;}
3157 *(float *)retval = excf.retval;
3158 break;
3160 case gammal_negative:
3161 /* gammal -int or 0 */
3163 SINGL; NAMEL = (char *) "gammal";
3164 ifSVID
3166 RETVAL_HUGEL;
3167 NOT_MATHERRL
3169 WRITEL_GAMMA_NEGATIVE;
3170 ERRNO_DOMAIN;
3173 else
3175 RETVAL_HUGE_VALL;
3176 NOT_MATHERRL {ERRNO_DOMAIN;}
3178 *(long double *)retval = excl.retval;
3179 break;
3181 case gamma_negative:
3182 /* gamma -int or 0 */
3184 SINGD; NAMED = (char *) "gamma";
3185 ifSVID
3187 RETVAL_HUGED;
3188 NOT_MATHERRD
3190 WRITED_GAMMA_NEGATIVE;
3191 ERRNO_DOMAIN;
3194 else
3196 RETVAL_HUGE_VALD;
3197 NOT_MATHERRD {ERRNO_DOMAIN;}
3199 *(double *)retval = exc.retval;
3200 break;
3202 case gammaf_negative:
3203 /* gammaf -int or 0 */
3205 SINGF; NAMEF = (char *) "gammaf";
3206 ifSVID
3208 RETVAL_HUGEF;
3209 NOT_MATHERRF
3211 WRITEF_GAMMA_NEGATIVE;
3212 ERRNO_DOMAIN;
3215 else
3217 RETVAL_HUGE_VALF;
3218 NOT_MATHERRF {ERRNO_DOMAIN;}
3220 *(float *)retval = excf.retval;
3221 break;
3223 case lgammal_overflow:
3224 /* lgammal overflow */
3226 OVERFLOWL; NAMEL = (char *) "lgammal";
3227 ifSVID
3229 RETVAL_HUGEL;
3231 else
3233 RETVAL_HUGE_VALL;
3235 NOT_MATHERRL {ERRNO_RANGE;}
3236 *(long double *)retval = excl.retval;
3237 break;
3239 case lgamma_overflow:
3240 /* lgamma overflow */
3242 OVERFLOWD; NAMED = (char *) "lgamma";
3243 ifSVID
3245 RETVAL_HUGED;
3247 else
3249 RETVAL_HUGE_VALD;
3251 NOT_MATHERRD {ERRNO_RANGE;}
3252 *(double *)retval = exc.retval;
3253 break;
3255 case lgammaf_overflow:
3256 /* lgammaf overflow */
3258 OVERFLOWF; NAMEF = (char *) "lgammaf";
3259 ifSVID
3261 RETVAL_HUGEF;
3263 else
3265 RETVAL_HUGE_VALF;
3267 NOT_MATHERRF {ERRNO_RANGE;}
3268 *(float *)retval = excf.retval;
3269 break;
3271 case lgammal_negative:
3272 /* lgammal -int or 0 */
3274 SINGL; NAMEL = (char *) "lgammal";
3275 ifSVID
3277 RETVAL_HUGEL;
3278 NOT_MATHERRL
3280 WRITEL_LGAMMA_NEGATIVE;
3281 ERRNO_DOMAIN;
3284 else
3286 RETVAL_HUGE_VALL;
3287 NOT_MATHERRL {ERRNO_DOMAIN;}
3289 *(long double *)retval = excl.retval;
3290 break;
3292 case lgamma_negative:
3293 /* lgamma -int or 0 */
3295 SINGD; NAMED = (char *) "lgamma";
3296 ifSVID
3298 RETVAL_HUGED;
3299 NOT_MATHERRD
3301 WRITED_LGAMMA_NEGATIVE;
3302 ERRNO_DOMAIN;
3305 else
3307 RETVAL_HUGE_VALD;
3308 NOT_MATHERRD {ERRNO_DOMAIN;}
3310 *(double *)retval = exc.retval;
3311 break;
3313 case lgammaf_negative:
3314 /* lgammaf -int or 0 */
3316 SINGF; NAMEF = (char *) "lgammaf";
3317 ifSVID
3319 RETVAL_HUGEF;
3320 NOT_MATHERRF
3322 WRITEF_LGAMMA_NEGATIVE;
3323 ERRNO_DOMAIN;
3326 else
3328 RETVAL_HUGE_VALF;
3329 NOT_MATHERRF {ERRNO_DOMAIN;}
3331 *(float *)retval = excf.retval;
3332 break;
3334 case tgammal_overflow:
3335 /* tgammal overflow */
3337 OVERFLOWL; NAMEL = (char *) "tgammal";
3338 ifSVID
3340 RETVAL_HUGEL;
3342 else
3344 RETVAL_HUGE_VALL;
3346 NOT_MATHERRL {ERRNO_RANGE;}
3347 *(long double *)retval = excl.retval;
3348 break;
3350 case tgamma_overflow:
3351 /* tgamma overflow */
3353 OVERFLOWD; NAMED = (char *) "tgamma";
3354 ifSVID
3356 RETVAL_HUGED;
3358 else
3360 RETVAL_HUGE_VALD;
3362 NOT_MATHERRD {ERRNO_RANGE;}
3363 *(double *)retval = exc.retval;
3364 break;
3366 case tgammaf_overflow:
3367 /* tgammaf overflow */
3369 OVERFLOWF; NAMEF = (char *) "tgammaf";
3370 ifSVID
3372 RETVAL_HUGEF;
3374 else
3376 RETVAL_HUGE_VALF;
3378 NOT_MATHERRF {ERRNO_RANGE;}
3379 *(float *)retval = excf.retval;
3380 break;
3382 case tgammal_negative:
3383 /* tgammal -int or 0 */
3385 SINGL; NAMEL = (char *) "tgammal";
3386 ifSVID
3388 NOT_MATHERRL
3390 WRITEL_TGAMMA_NEGATIVE;
3391 ERRNO_DOMAIN;
3394 else
3396 NOT_MATHERRL {ERRNO_DOMAIN;}
3398 *(long double *)retval = excl.retval;
3399 break;
3401 case tgamma_negative:
3402 /* tgamma -int or 0 */
3404 SINGD; NAMED = (char *) "tgamma";
3405 ifSVID
3407 NOT_MATHERRD
3409 WRITED_TGAMMA_NEGATIVE;
3410 ERRNO_DOMAIN;
3413 else
3415 NOT_MATHERRD {ERRNO_DOMAIN;}
3417 *(double *)retval = exc.retval;
3418 break;
3420 case tgammaf_negative:
3421 /* tgammaf -int or 0 */
3423 SINGF; NAMEF = (char *) "tgammaf";
3424 ifSVID
3426 NOT_MATHERRF
3428 WRITEF_TGAMMA_NEGATIVE;
3429 ERRNO_DOMAIN;
3432 else
3434 NOT_MATHERRF {ERRNO_DOMAIN;}
3436 *(float *)retval = excf.retval;
3437 break;
3439 case j0l_gt_loss:
3440 /* j0l > loss */
3442 TLOSSL; NAMEL = (char *) "j0l";
3443 RETVAL_ZEROL;
3444 ifSVID
3446 NOT_MATHERRL
3448 WRITEL_J0_TLOSS;
3449 ERRNO_RANGE;
3452 else
3454 NOT_MATHERRL {ERRNO_RANGE;}
3456 *(long double *)retval = excl.retval;
3457 break;
3459 case j0_gt_loss:
3460 /* j0 > loss */
3462 TLOSSD; NAMED = (char *) "j0";
3463 RETVAL_ZEROD;
3464 ifSVID
3466 NOT_MATHERRD
3468 WRITED_J0_TLOSS;
3469 ERRNO_RANGE;
3472 else
3474 NOT_MATHERRD {ERRNO_RANGE;}
3476 *(double*)retval = exc.retval;
3477 break;
3479 case j0f_gt_loss:
3480 /* j0f > loss */
3482 TLOSSF; NAMEF = (char *) "j0f";
3483 RETVAL_ZEROF;
3484 ifSVID
3486 NOT_MATHERRF
3488 WRITEF_J0_TLOSS;
3489 ERRNO_RANGE;
3492 else
3494 NOT_MATHERRF {ERRNO_RANGE;}
3496 *(float*)retval = excf.retval;
3497 break;
3499 case j1l_gt_loss:
3500 /* j1l > loss */
3502 TLOSSL; NAMEL = (char *) "j1l";
3503 RETVAL_ZEROL;
3504 ifSVID
3506 NOT_MATHERRL
3508 WRITEL_J1_TLOSS;
3509 ERRNO_RANGE;
3512 else
3514 NOT_MATHERRL {ERRNO_RANGE;}
3516 *(long double *)retval = excl.retval;
3517 break;
3519 case j1_gt_loss:
3520 /* j1 > loss */
3522 TLOSSD; NAMED = (char *) "j1";
3523 RETVAL_ZEROD;
3524 ifSVID
3526 NOT_MATHERRD
3528 WRITED_J1_TLOSS;
3529 ERRNO_RANGE;
3532 else
3534 NOT_MATHERRD {ERRNO_RANGE;}
3536 *(double*)retval = exc.retval;
3537 break;
3539 case j1f_gt_loss:
3540 /* j1f > loss */
3542 TLOSSF; NAMEF = (char *) "j1f";
3543 RETVAL_ZEROF;
3544 ifSVID
3546 NOT_MATHERRF
3548 WRITEF_J1_TLOSS;
3549 ERRNO_RANGE;
3552 else
3554 NOT_MATHERRF {ERRNO_RANGE;}
3556 *(float*)retval = excf.retval;
3557 break;
3559 case jnl_gt_loss:
3560 /* jnl > loss */
3562 TLOSSL; NAMEL = (char *) "jnl";
3563 RETVAL_ZEROL;
3564 ifSVID
3566 NOT_MATHERRL
3568 WRITEL_JN_TLOSS;
3569 ERRNO_RANGE;
3572 else
3574 NOT_MATHERRL {ERRNO_RANGE;}
3576 *(long double *)retval = excl.retval;
3577 break;
3579 case jn_gt_loss:
3580 /* jn > loss */
3582 TLOSSD; NAMED = (char *) "jn";
3583 RETVAL_ZEROD;
3584 ifSVID
3586 NOT_MATHERRD
3588 WRITED_JN_TLOSS;
3589 ERRNO_RANGE;
3592 else
3594 NOT_MATHERRD {ERRNO_RANGE;}
3596 *(double*)retval = exc.retval;
3597 break;
3599 case jnf_gt_loss:
3600 /* jnf > loss */
3602 TLOSSF; NAMEF = (char *) "jnf";
3603 RETVAL_ZEROF;
3604 ifSVID
3606 NOT_MATHERRF
3608 WRITEF_JN_TLOSS;
3609 ERRNO_RANGE;
3612 else
3614 NOT_MATHERRF {ERRNO_RANGE;}
3616 *(float*)retval = excf.retval;
3617 break;
3619 case y0l_gt_loss:
3620 /* y0l > loss */
3622 TLOSSL; NAMEL = (char *) "y0l";
3623 RETVAL_ZEROL;
3624 ifSVID
3626 NOT_MATHERRL
3628 WRITEL_Y0_TLOSS;
3629 ERRNO_RANGE;
3632 else
3634 NOT_MATHERRL {ERRNO_RANGE;}
3636 *(long double *)retval = excl.retval;
3637 break;
3639 case y0_gt_loss:
3640 /* y0 > loss */
3642 TLOSSD; NAMED = (char *) "y0";
3643 RETVAL_ZEROD;
3644 ifSVID
3646 NOT_MATHERRD
3648 WRITED_Y0_TLOSS;
3649 ERRNO_RANGE;
3652 else
3654 NOT_MATHERRD {ERRNO_RANGE;}
3656 *(double*)retval = exc.retval;
3657 break;
3659 case y0f_gt_loss:
3660 /* y0f > loss */
3662 TLOSSF; NAMEF = (char *) "y0f";
3663 RETVAL_ZEROF;
3664 ifSVID
3666 NOT_MATHERRF
3668 WRITEF_Y0_TLOSS;
3669 ERRNO_RANGE;
3672 else
3674 NOT_MATHERRF {ERRNO_RANGE;}
3676 *(float*)retval = excf.retval;
3677 break;
3679 case y0l_zero:
3680 /* y0l(0) */
3682 DOMAINL; NAMEL = (char *) "y0l";
3683 ifSVID
3685 RETVAL_NEG_HUGEL;
3686 NOT_MATHERRL
3688 WRITEL_Y0_ZERO;
3689 ERRNO_DOMAIN;
3692 else
3694 RETVAL_NEG_HUGE_VALL;
3695 NOT_MATHERRL {ERRNO_DOMAIN;}
3697 *(long double *)retval = excl.retval;
3698 break;
3700 case y0_zero:
3701 /* y0(0) */
3703 DOMAIND; NAMED = (char *) "y0";
3704 ifSVID
3706 RETVAL_NEG_HUGED;
3707 NOT_MATHERRD
3709 WRITED_Y0_ZERO;
3710 ERRNO_DOMAIN;
3713 else
3715 RETVAL_NEG_HUGE_VALD;
3716 NOT_MATHERRD {ERRNO_DOMAIN;}
3718 *(double *)retval = exc.retval;
3719 break;
3721 case y0f_zero:
3722 /* y0f(0) */
3724 DOMAINF; NAMEF = (char *) "y0f";
3725 ifSVID
3727 RETVAL_NEG_HUGEF;
3728 NOT_MATHERRF
3730 WRITEF_Y0_ZERO;
3731 ERRNO_DOMAIN;
3734 else
3736 RETVAL_NEG_HUGE_VALF;
3737 NOT_MATHERRF {ERRNO_DOMAIN;}
3739 *(float *)retval = excf.retval;
3740 break;
3742 case y1l_gt_loss:
3743 /* y1l > loss */
3745 TLOSSL; NAMEL = (char *) "y1l";
3746 RETVAL_ZEROL;
3747 ifSVID
3749 NOT_MATHERRL
3751 WRITEL_Y1_TLOSS;
3752 ERRNO_RANGE;
3755 else
3757 NOT_MATHERRL {ERRNO_RANGE;}
3759 *(long double *)retval = excl.retval;
3760 break;
3762 case y1_gt_loss:
3763 /* y1 > loss */
3765 TLOSSD; NAMED = (char *) "y1";
3766 RETVAL_ZEROD;
3767 ifSVID
3769 NOT_MATHERRD
3771 WRITED_Y1_TLOSS;
3772 ERRNO_RANGE;
3775 else
3777 NOT_MATHERRD {ERRNO_RANGE;}
3779 *(double*)retval = exc.retval;
3780 break;
3782 case y1f_gt_loss:
3783 /* y1f > loss */
3785 TLOSSF; NAMEF = (char *) "y1f";
3786 RETVAL_ZEROF;
3787 ifSVID
3789 NOT_MATHERRF
3791 WRITEF_Y1_TLOSS;
3792 ERRNO_RANGE;
3795 else
3797 NOT_MATHERRF {ERRNO_RANGE;}
3799 *(float*)retval = excf.retval;
3800 break;
3802 case y1l_zero:
3803 /* y1l(0) */
3805 DOMAINL; NAMEL = (char *) "y1l";
3806 ifSVID
3808 RETVAL_NEG_HUGEL;
3809 NOT_MATHERRL
3811 WRITEL_Y1_ZERO;
3812 ERRNO_DOMAIN;
3815 else
3817 RETVAL_NEG_HUGE_VALL;
3818 NOT_MATHERRL {ERRNO_DOMAIN;}
3820 *(long double *)retval = excl.retval;
3821 break;
3823 case y1_zero:
3824 /* y1(0) */
3826 DOMAIND; NAMED = (char *) "y1";
3827 ifSVID
3829 RETVAL_NEG_HUGED;
3830 NOT_MATHERRD
3832 WRITED_Y1_ZERO;
3833 ERRNO_DOMAIN;
3836 else
3838 RETVAL_NEG_HUGE_VALD;
3839 NOT_MATHERRD {ERRNO_DOMAIN;}
3841 *(double *)retval = exc.retval;
3842 break;
3844 case y1f_zero:
3845 /* y1f(0) */
3847 DOMAINF; NAMEF = (char *) "y1f";
3848 ifSVID
3850 RETVAL_NEG_HUGEF;
3851 NOT_MATHERRF
3853 WRITEF_Y1_ZERO;
3854 ERRNO_DOMAIN;
3857 else
3859 RETVAL_NEG_HUGE_VALF;
3860 NOT_MATHERRF {ERRNO_DOMAIN;}
3862 *(float *)retval = excf.retval;
3863 break;
3865 case ynl_gt_loss:
3866 /* ynl > loss */
3868 TLOSSL; NAMEL = (char *) "ynl";
3869 RETVAL_ZEROL;
3870 ifSVID
3872 NOT_MATHERRL
3874 WRITEL_YN_TLOSS;
3875 ERRNO_RANGE;
3878 else
3880 NOT_MATHERRL {ERRNO_RANGE;}
3882 *(long double *)retval = excl.retval;
3883 break;
3885 case yn_gt_loss:
3886 /* yn > loss */
3888 TLOSSD; NAMED = (char *) "yn";
3889 RETVAL_ZEROD;
3890 ifSVID
3892 NOT_MATHERRD
3894 WRITED_YN_TLOSS;
3895 ERRNO_RANGE;
3898 else
3900 NOT_MATHERRD {ERRNO_RANGE;}
3902 *(double*)retval = exc.retval;
3903 break;
3905 case ynf_gt_loss:
3906 /* ynf > loss */
3908 TLOSSF; NAMEF = (char *) "ynf";
3909 RETVAL_ZEROF;
3910 ifSVID
3912 NOT_MATHERRF
3914 WRITEF_YN_TLOSS;
3915 ERRNO_RANGE;
3918 else
3920 NOT_MATHERRF {ERRNO_RANGE;}
3922 *(float*)retval = excf.retval;
3923 break;
3925 case ynl_zero:
3926 /* ynl(0) */
3928 DOMAINL; NAMEL = (char *) "ynl";
3929 ifSVID
3931 RETVAL_NEG_HUGEL;
3932 NOT_MATHERRL
3934 WRITEL_YN_ZERO;
3935 ERRNO_DOMAIN;
3938 else
3940 RETVAL_NEG_HUGE_VALL;
3941 NOT_MATHERRL {ERRNO_DOMAIN;}
3943 *(long double *)retval = excl.retval;
3944 break;
3946 case yn_zero:
3947 /* yn(0) */
3949 DOMAIND; NAMED = (char *) "yn";
3950 ifSVID
3952 RETVAL_NEG_HUGED;
3953 NOT_MATHERRD
3955 WRITED_YN_ZERO;
3956 ERRNO_DOMAIN;
3959 else
3961 RETVAL_NEG_HUGE_VALD;
3962 NOT_MATHERRD {ERRNO_DOMAIN;}
3964 *(double *)retval = exc.retval;
3965 break;
3967 case ynf_zero:
3968 /* ynf(0) */
3970 DOMAINF; NAMEF = (char *) "ynf";
3971 ifSVID
3973 RETVAL_NEG_HUGEF;
3974 NOT_MATHERRF
3976 WRITEF_YN_ZERO;
3977 ERRNO_DOMAIN;
3980 else
3982 RETVAL_NEG_HUGE_VALF;
3983 NOT_MATHERRF {ERRNO_DOMAIN;}
3985 *(float *)retval = excf.retval;
3986 break;
3988 case y0l_negative:
3989 /* y0l(x<0) */
3991 DOMAINL; NAMEL = (char *) "y0l";
3992 ifSVID
3994 RETVAL_NEG_HUGEL;
3995 NOT_MATHERRL
3997 WRITEL_Y0_NEGATIVE;
3998 ERRNO_DOMAIN;
4001 else
4003 RETVAL_NEG_HUGE_VALL;
4004 NOT_MATHERRL {ERRNO_DOMAIN;}
4006 *(long double *)retval = excl.retval;
4007 break;
4009 case y0_negative:
4010 /* y0(x<0) */
4012 DOMAIND; NAMED = (char *) "y0";
4013 ifSVID
4015 RETVAL_NEG_HUGED;
4016 NOT_MATHERRD
4018 WRITED_Y0_NEGATIVE;
4019 ERRNO_DOMAIN;
4022 else
4024 RETVAL_NEG_HUGE_VALD;
4025 NOT_MATHERRD {ERRNO_DOMAIN;}
4027 *(double *)retval = exc.retval;
4028 break;
4030 case y0f_negative:
4031 /* y0f(x<0) */
4033 DOMAINF; NAMEF = (char *) "y0f";
4034 ifSVID
4036 RETVAL_NEG_HUGEF;
4037 NOT_MATHERRF
4039 WRITEF_Y0_NEGATIVE;
4040 ERRNO_DOMAIN;
4043 else
4045 RETVAL_NEG_HUGE_VALF;
4046 NOT_MATHERRF {ERRNO_DOMAIN;}
4048 *(float *)retval = excf.retval;
4049 break;
4051 case y1l_negative:
4052 /* y1l(x<0) */
4054 DOMAINL; NAMEL = (char *) "y1l";
4055 ifSVID
4057 RETVAL_NEG_HUGEL;
4058 NOT_MATHERRL
4060 WRITEL_Y1_NEGATIVE;
4061 ERRNO_DOMAIN;
4064 else
4066 RETVAL_NEG_HUGE_VALL;
4067 NOT_MATHERRL {ERRNO_DOMAIN;}
4069 *(long double *)retval = excl.retval;
4070 break;
4072 case y1_negative:
4073 /* y1(x<0) */
4075 DOMAIND; NAMED = (char *) "y1";
4076 ifSVID
4078 RETVAL_NEG_HUGED;
4079 NOT_MATHERRD
4081 WRITED_Y1_NEGATIVE;
4082 ERRNO_DOMAIN;
4085 else
4087 RETVAL_NEG_HUGE_VALD;
4088 NOT_MATHERRD {ERRNO_DOMAIN;}
4090 *(double *)retval = exc.retval;
4091 break;
4093 case y1f_negative:
4094 /* y1f(x<0) */
4096 DOMAINF; NAMEF = (char *) "y1f";
4097 ifSVID
4099 RETVAL_NEG_HUGEF;
4100 NOT_MATHERRF
4102 WRITEF_Y1_NEGATIVE;
4103 ERRNO_DOMAIN;
4106 else
4108 RETVAL_NEG_HUGE_VALF;
4109 NOT_MATHERRF {ERRNO_DOMAIN;}
4111 *(float *)retval = excf.retval;
4112 break;
4114 case ynl_negative:
4115 /* ynl(x<0) */
4117 DOMAINL; NAMEL = (char *) "ynl";
4118 ifSVID
4120 RETVAL_NEG_HUGEL;
4121 NOT_MATHERRL
4123 WRITEL_YN_NEGATIVE;
4124 ERRNO_DOMAIN;
4127 else
4129 RETVAL_NEG_HUGE_VALL;
4130 NOT_MATHERRL {ERRNO_DOMAIN;}
4132 *(long double *)retval = excl.retval;
4133 break;
4135 case yn_negative:
4136 /* yn(x<0) */
4138 DOMAIND; NAMED = (char *) "yn";
4139 ifSVID
4141 RETVAL_NEG_HUGED;
4142 NOT_MATHERRD
4144 WRITED_YN_NEGATIVE;
4145 ERRNO_DOMAIN;
4148 else
4150 RETVAL_NEG_HUGE_VALD;
4151 NOT_MATHERRD {ERRNO_DOMAIN;}
4153 *(double *)retval = exc.retval;
4154 break;
4156 case ynf_negative:
4157 /* ynf(x<0) */
4159 DOMAINF; NAMEF = (char *) "ynf";
4160 ifSVID
4162 RETVAL_NEG_HUGEF;
4163 NOT_MATHERRF
4165 WRITEF_YN_NEGATIVE;
4166 ERRNO_DOMAIN;
4169 else
4171 RETVAL_NEG_HUGE_VALF;
4172 NOT_MATHERRF {ERRNO_DOMAIN;}
4174 *(float *)retval = excf.retval;
4175 break;
4177 case fmodl_by_zero:
4178 /* fmodl(x,0) */
4180 DOMAINL; NAMEL = (char *) "fmodl";
4181 ifSVID
4183 *(long double *)retval = *(long double *)arg1;
4184 NOT_MATHERRL
4186 WRITEL_FMOD;
4187 ERRNO_DOMAIN;
4190 else
4191 { /* NaN already computed */
4192 NOT_MATHERRL {ERRNO_DOMAIN;}
4194 *(long double *)retval = excl.retval;
4195 break;
4197 case fmod_by_zero:
4198 /* fmod(x,0) */
4200 DOMAIND; NAMED = (char *) "fmod";
4201 ifSVID
4203 *(double *)retval = *(double *)arg1;
4204 NOT_MATHERRD
4206 WRITED_FMOD;
4207 ERRNO_DOMAIN;
4210 else
4211 { /* NaN already computed */
4212 NOT_MATHERRD {ERRNO_DOMAIN;}
4214 *(double *)retval = exc.retval;
4215 break;
4217 case fmodf_by_zero:
4218 /* fmodf(x,0) */
4220 DOMAINF; NAMEF = (char *) "fmodf";
4221 ifSVID
4223 *(float *)retval = *(float *)arg1;
4224 NOT_MATHERRF
4226 WRITEF_FMOD;
4227 ERRNO_DOMAIN;
4230 else
4232 NOT_MATHERRF {ERRNO_DOMAIN;}
4234 *(float *)retval = excf.retval;
4235 break;
4237 case remainderl_by_zero:
4238 /* remainderl(x,0) */
4240 DOMAINL; NAMEL = (char *) "remainderl";
4241 ifSVID
4243 NOT_MATHERRL
4245 WRITEL_REM;
4246 ERRNO_DOMAIN;
4249 else
4250 { /* NaN already computed */
4251 NOT_MATHERRL {ERRNO_DOMAIN;}
4253 *(long double *)retval = excl.retval;
4254 break;
4256 case remainder_by_zero:
4257 /* remainder(x,0) */
4259 DOMAIND; NAMED = (char *) "remainder";
4260 ifSVID
4262 NOT_MATHERRD
4264 WRITED_REM;
4265 ERRNO_DOMAIN;
4268 else
4269 { /* NaN already computed */
4270 NOT_MATHERRD {ERRNO_DOMAIN;}
4272 *(double *)retval = exc.retval;
4273 break;
4275 case remainderf_by_zero:
4276 /* remainderf(x,0) */
4278 DOMAINF; NAMEF = (char *) "remainderf";
4279 ifSVID
4281 NOT_MATHERRF
4283 WRITEF_REM;
4284 ERRNO_DOMAIN;
4287 else
4289 NOT_MATHERRF {ERRNO_DOMAIN;}
4291 *(float *)retval = excf.retval;
4292 break;
4294 default:
4295 /* We don't want to abort () since SVID doesn't cover all math
4296 library functions. */
4297 break;
4299 return;