Fix POWER7 Implies
[glibc.git] / sysdeps / ia64 / fpu / libm_error.c
blob8ef4bb5a737a7d00eff3252ded980353cf3d5c55
1 /* file: libm_error.c */
4 // Copyright (c) 2000 - 2005, Intel Corporation
5 // All rights reserved.
6 //
7 // Contributed 2000 by the Intel Numerics Group, Intel Corporation
8 //
9 // Redistribution and use in source and binary forms, with or without
10 // modification, are permitted provided that the following conditions are
11 // met:
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
22 // permission.
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.
41 // History
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
46 // function-pointers.
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
51 // alignment problem.
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.
72 // 09/08/03: Corrected XOPEN/SVID result for pow overflow with neg x, pos y.
73 // 10/14/03: Added ILP32 ifdef
74 // 12/12/03: Corrected XOPEN/SVID results for powf_zero_to_negative,
75 // powl_neg_to_non_integer, atan2f_zero, atan2df_zero,
76 // acoshf_lt_one, acosh_lt_one.
77 // 12/07/04: Cast name strings as char *.
78 // 12/08/04: Corrected POSIX behavior for atan2_zero, acos_gt_one, asin_gt_one,
79 // log_negative, log10_negative, log1p_negative, and log2_negative.
80 // Added SVID and XOPEN case log2l_zero.
81 // 12/13/04: Corrected POSIX behavior for exp2_overflow, exp2_underflow,
82 // exp10_overflow, exp10_underflow. Added ISOC to set errno for
83 // exp10_underflow.
84 // 12/14/04: Corrected POSIX behavior for nextafter_overflow,
85 // nextafter_underflow, nexttoward_overflow, nexttoward_underflow.
86 // Added ISOC to set errno for nextafter and nexttoward underflow.
87 // 12/15/04: Corrected POSIX behavior for exp, exp2, and exp10 underflow.
88 // 03/31/05: Added missing ALIGNIT statement to 6 float constants.
90 #include <errno.h>
91 #include <stdio.h>
92 #include <stdlib.h>
93 #include "libm_support.h"
95 #ifdef _LIBC
96 # define pmatherr matherr
97 # define pmatherrf matherrf
98 # define pmatherrl matherrl
99 #else
100 _LIB_VERSION_TYPE
101 #if defined( __POSIX__ )
102 _LIB_VERSIONIMF = _POSIX_;
103 #elif defined( __XOPEN__ )
104 _LIB_VERSIONIMF = _XOPEN_;
105 #elif defined( __SVID__ )
106 _LIB_VERSIONIMF = _SVID_;
107 #elif defined( __IEEE__ )
108 _LIB_VERSIONIMF = _IEEE_;
109 #else
110 _LIB_VERSIONIMF = _ISOC_;
111 #endif
113 /************************************************************/
114 /* matherrX function pointers and setusermatherrX functions */
115 /************************************************************/
116 int (*pmatherrf)(struct exceptionf*) = MATHERR_F;
117 int (*pmatherr)(struct EXC_DECL_D*) = MATHERR_D;
118 int (*pmatherrl)(struct exceptionl*) = matherrl;
120 void __libm_setusermatherrf( int(*user_merrf)(struct exceptionf*) )
121 { pmatherrf = ( (user_merrf==NULL)? (MATHERR_F) : (user_merrf) ); }
123 void __libm_setusermatherr( int(*user_merr)(struct EXC_DECL_D*) )
124 { pmatherr = ( (user_merr==NULL)? (MATHERR_D) : (user_merr) ); }
126 void __libm_setusermatherrl( int(*user_merrl)(struct exceptionl*) )
127 { pmatherrl = ( (user_merrl==NULL)? (matherrl) : (user_merrl) ); }
129 #endif /* !_LIBC */
131 /***********************************************/
132 /* error-handling function, libm_error_support */
133 /***********************************************/
134 void __libm_error_support(void *arg1,void *arg2,void *retval,error_types input_tag)
137 # ifdef __cplusplus
138 struct __exception exc;
139 # else
140 struct exception exc;
141 # endif
143 struct exceptionf excf;
144 struct exceptionl excl;
146 # ifdef __GNUC__
147 #define ALIGNIT __attribute__ ((__aligned__ (16)))
148 # elif defined opensource
149 #define ALIGNIT
150 # else
151 #define ALIGNIT __declspec(align(16))
152 # endif
154 # ifdef SIZE_LONG_INT_64
155 #define __INT_64__ signed long
156 # else
157 # if ILP32
158 #define __INT_64__ signed long long
159 # else
160 #define __INT_64__ __int64
161 # endif
162 # endif
165 #define STATIC static
167 ALIGNIT
168 STATIC const char float_inf[4] = {0x00,0x00,0x80,0x7F};
169 ALIGNIT
170 STATIC const char float_huge[4] = {0xFF,0xFF,0x7F,0x7F};
171 ALIGNIT
172 STATIC const char float_zero[4] = {0x00,0x00,0x00,0x00};
173 ALIGNIT
174 STATIC const char float_neg_inf[4] = {0x00,0x00,0x80,0xFF};
175 ALIGNIT
176 STATIC const char float_neg_huge[4] = {0xFF,0xFF,0x7F,0xFF};
177 ALIGNIT
178 STATIC const char float_neg_zero[4] = {0x00,0x00,0x00,0x80};
179 ALIGNIT
180 STATIC const char double_inf[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x7F};
181 #ifndef _LIBC
182 ALIGNIT
183 STATIC const char double_huge[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0x7F};
184 #endif
185 ALIGNIT
186 STATIC const char double_zero[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
187 ALIGNIT
188 STATIC const char double_neg_inf[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF};
189 #ifndef _LIBC
190 ALIGNIT
191 STATIC const char double_neg_huge[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEF,0xFF};
192 #endif
193 ALIGNIT
194 STATIC const char double_neg_zero[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80};
195 ALIGNIT
196 STATIC const char long_double_inf[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00};
197 ALIGNIT
198 #ifndef _LIBC
199 STATIC const char long_double_huge[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00};
200 #endif
201 ALIGNIT
202 STATIC const char long_double_zero[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
203 ALIGNIT
204 STATIC const char long_double_neg_inf[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00};
205 ALIGNIT
206 #ifndef _LIBC
207 STATIC const char long_double_neg_huge[16] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0x00,0x00,0x00,0x00,0x00,0x00};
208 #endif
209 ALIGNIT
210 STATIC const char long_double_neg_zero[16] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00};
213 #define RETVAL_HUGE_VALL *(long double *)retval = *(long double *)long_double_inf
214 #define RETVAL_NEG_HUGE_VALL *(long double *)retval = *(long double *)long_double_neg_inf
215 #define RETVAL_HUGEL *(long double *)retval = (long double)*(float *)float_huge
216 #define RETVAL_NEG_HUGEL *(long double *)retval =(long double)*(float*)float_neg_huge
218 #define RETVAL_HUGE_VALD *(double *)retval = *(double *) double_inf
219 #define RETVAL_NEG_HUGE_VALD *(double *)retval = *(double *) double_neg_inf
220 #define RETVAL_HUGED *(double *)retval = (double) *(float *)float_huge
221 #define RETVAL_NEG_HUGED *(double *)retval = (double) *(float *) float_neg_huge
223 #define RETVAL_HUGE_VALF *(float *)retval = *(float *) float_inf
224 #define RETVAL_NEG_HUGE_VALF *(float *)retval = *(float *) float_neg_inf
225 #define RETVAL_HUGEF *(float *)retval = *(float *) float_huge
226 #define RETVAL_NEG_HUGEF *(float *)retval = *(float *) float_neg_huge
228 #define ZEROL_VALUE *(long double *)long_double_zero
229 #define ZEROD_VALUE *(double *)double_zero
230 #define ZEROF_VALUE *(float *)float_zero
232 #define RETVAL_ZEROL *(long double *)retval = *(long double *)long_double_zero
233 #define RETVAL_ZEROD *(double *)retval = *(double *)double_zero
234 #define RETVAL_ZEROF *(float *)retval = *(float *)float_zero
236 #define RETVAL_NEG_ZEROL *(long double *)retval = *(long double *)long_double_neg_zero
237 #define RETVAL_NEG_ZEROD *(double *)retval = *(double *)double_neg_zero
238 #define RETVAL_NEG_ZEROF *(float *)retval = *(float *)float_neg_zero
240 #define RETVAL_ONEL *(long double *)retval = (long double) 1.0
241 #define RETVAL_ONED *(double *)retval = 1.0
242 #define RETVAL_ONEF *(float *)retval = 1.0f
244 #define NOT_MATHERRL excl.arg1=*(long double *)arg1;excl.arg2=*(long double *)arg2;excl.retval=*(long double *)retval;if(!pmatherrl(&excl))
245 #define NOT_MATHERRD exc.arg1=*(double *)arg1;exc.arg2=*(double *)arg2;exc.retval=*(double *)retval;if(!pmatherr(&exc))
246 #define NOT_MATHERRF excf.arg1=*(float *)arg1;excf.arg2=*(float *)arg2;excf.retval=*(float *)retval;if(!pmatherrf(&excf))
248 #define ifSVID if(_LIB_VERSIONIMF==_SVID_)
250 #define NAMEL excl.name
251 #define NAMED exc.name
252 #define NAMEF excf.name
255 // These should work OK for MS because they are ints -
256 // leading underbars are not necessary.
259 #define DOMAIN 1
260 #define SING 2
261 #define OVERFLOW 3
262 #define UNDERFLOW 4
263 #define TLOSS 5
264 #define PLOSS 6
266 #define SINGL excl.type = SING
267 #define DOMAINL excl.type = DOMAIN
268 #define OVERFLOWL excl.type = OVERFLOW
269 #define UNDERFLOWL excl.type = UNDERFLOW
270 #define TLOSSL excl.type = TLOSS
271 #define SINGD exc.type = SING
272 #define DOMAIND exc.type = DOMAIN
273 #define OVERFLOWD exc.type = OVERFLOW
274 #define UNDERFLOWD exc.type = UNDERFLOW
275 #define TLOSSD exc.type = TLOSS
276 #define SINGF excf.type = SING
277 #define DOMAINF excf.type = DOMAIN
278 #define OVERFLOWF excf.type = OVERFLOW
279 #define UNDERFLOWF excf.type = UNDERFLOW
280 #define TLOSSF excf.type = TLOSS
282 #define INPUT_XL (excl.arg1=*(long double*)arg1)
283 #define INPUT_XD (exc.arg1=*(double*)arg1)
284 #define INPUT_XF (excf.arg1=*(float*)arg1)
285 #define INPUT_YL (excl.arg2=*(long double*)arg2)
286 #define INPUT_YD (exc.arg2=*(double*)arg2)
287 #define INPUT_YF (excf.arg2=*(float*)arg2)
288 #define INPUT_RESL (*(long double *)retval)
289 #define INPUT_RESD (*(double *)retval)
290 #define INPUT_RESF (*(float *)retval)
291 #define INPUT_RESI64 (*(__INT_64__ *)retval)
293 #define WRITEL_LOG_ZERO fputs("logl: SING error\n",stderr)
294 #define WRITED_LOG_ZERO fputs("log: SING error\n",stderr)
295 #define WRITEF_LOG_ZERO fputs("logf: SING error\n",stderr)
296 #define WRITEL_LOG_NEGATIVE fputs("logl: DOMAIN error\n",stderr)
297 #define WRITED_LOG_NEGATIVE fputs("log: DOMAIN error\n",stderr)
298 #define WRITEF_LOG_NEGATIVE fputs("logf: DOMAIN error\n",stderr)
299 #define WRITEL_Y0_ZERO fputs("y0l: DOMAIN error\n",stderr)
300 #define WRITED_Y0_ZERO fputs("y0: DOMAIN error\n",stderr)
301 #define WRITEF_Y0_ZERO fputs("y0f: DOMAIN error\n",stderr)
302 #define WRITEL_Y0_NEGATIVE fputs("y0l: DOMAIN error\n",stderr)
303 #define WRITED_Y0_NEGATIVE fputs("y0: DOMAIN error\n",stderr)
304 #define WRITEF_Y0_NEGATIVE fputs("y0f: DOMAIN error\n",stderr)
305 #define WRITEL_Y1_ZERO fputs("y1l: DOMAIN error\n",stderr)
306 #define WRITED_Y1_ZERO fputs("y1: DOMAIN error\n",stderr)
307 #define WRITEF_Y1_ZERO fputs("y1f: DOMAIN error\n",stderr)
308 #define WRITEL_Y1_NEGATIVE fputs("y1l: DOMAIN error\n",stderr)
309 #define WRITED_Y1_NEGATIVE fputs("y1: DOMAIN error\n",stderr)
310 #define WRITEF_Y1_NEGATIVE fputs("y1f: DOMAIN error\n",stderr)
311 #define WRITEL_YN_ZERO fputs("ynl: DOMAIN error\n",stderr)
312 #define WRITED_YN_ZERO fputs("yn: DOMAIN error\n",stderr)
313 #define WRITEF_YN_ZERO fputs("ynf: DOMAIN error\n",stderr)
314 #define WRITEL_YN_NEGATIVE fputs("ynl: DOMAIN error\n",stderr)
315 #define WRITED_YN_NEGATIVE fputs("yn: DOMAIN error\n",stderr)
316 #define WRITEF_YN_NEGATIVE fputs("ynf: DOMAIN error\n",stderr)
317 #define WRITEL_LOG1P_ZERO fputs("log1pl: SING error\n",stderr)
318 #define WRITED_LOG1P_ZERO fputs("log1p: SING error\n",stderr)
319 #define WRITEF_LOG1P_ZERO fputs("log1pf: SING error\n",stderr)
320 #define WRITEL_LOG1P_NEGATIVE fputs("log1pl: DOMAIN error\n",stderr)
321 #define WRITED_LOG1P_NEGATIVE fputs("log1p: DOMAIN error\n",stderr)
322 #define WRITEF_LOG1P_NEGATIVE fputs("log1pf: DOMAIN error\n",stderr)
323 #define WRITEL_LOG10_ZERO fputs("log10l: SING error\n",stderr)
324 #define WRITED_LOG10_ZERO fputs("log10: SING error\n",stderr)
325 #define WRITEF_LOG10_ZERO fputs("log10f: SING error\n",stderr)
326 #define WRITEL_LOG10_NEGATIVE fputs("log10l: DOMAIN error\n",stderr)
327 #define WRITED_LOG10_NEGATIVE fputs("log10: DOMAIN error\n",stderr)
328 #define WRITEF_LOG10_NEGATIVE fputs("log10f: DOMAIN error\n",stderr)
329 #define WRITEL_LOG2_ZERO fputs("log2l: SING error\n",stderr)
330 #define WRITED_LOG2_ZERO fputs("log2: SING error\n",stderr)
331 #define WRITEF_LOG2_ZERO fputs("log2f: SING error\n",stderr)
332 #define WRITEL_LOG2_NEGATIVE fputs("log2l: DOMAIN error\n",stderr)
333 #define WRITED_LOG2_NEGATIVE fputs("log2: DOMAIN error\n",stderr)
334 #define WRITEF_LOG2_NEGATIVE fputs("log2f: DOMAIN error\n",stderr)
335 #define WRITEL_POW_ZERO_TO_ZERO fputs("powl(0,0): DOMAIN error\n",stderr)
336 #define WRITED_POW_ZERO_TO_ZERO fputs("pow(0,0): DOMAIN error\n",stderr)
337 #define WRITEF_POW_ZERO_TO_ZERO fputs("powf(0,0): DOMAIN error\n",stderr)
338 #define WRITEL_POW_ZERO_TO_NEGATIVE fputs("powl(0,negative): DOMAIN error\n",stderr)
339 #define WRITED_POW_ZERO_TO_NEGATIVE fputs("pow(0,negative): DOMAIN error\n",stderr)
340 #define WRITEF_POW_ZERO_TO_NEGATIVE fputs("powf(0,negative): DOMAIN error\n",stderr)
341 #define WRITEL_POW_NEG_TO_NON_INTEGER fputs("powl(negative,non-integer): DOMAIN error\n",stderr)
342 #define WRITED_POW_NEG_TO_NON_INTEGER fputs("pow(negative,non-integer): DOMAIN error\n",stderr)
343 #define WRITEF_POW_NEG_TO_NON_INTEGER fputs("powf(negative,non-integer): DOMAIN error\n",stderr)
344 #define WRITEL_ATAN2_ZERO_BY_ZERO fputs("atan2l: DOMAIN error\n",stderr)
345 #define WRITED_ATAN2_ZERO_BY_ZERO fputs("atan2: DOMAIN error\n",stderr)
346 #define WRITEF_ATAN2_ZERO_BY_ZERO fputs("atan2f: DOMAIN error\n",stderr)
347 #define WRITEL_SQRT fputs("sqrtl: DOMAIN error\n",stderr)
348 #define WRITED_SQRT fputs("sqrt: DOMAIN error\n",stderr)
349 #define WRITEF_SQRT fputs("sqrtf: DOMAIN error\n",stderr)
350 #define WRITEL_FMOD fputs("fmodl: DOMAIN error\n",stderr)
351 #define WRITED_FMOD fputs("fmod: DOMAIN error\n",stderr)
352 #define WRITEF_FMOD fputs("fmodf: DOMAIN error\n",stderr)
353 #define WRITEL_REM fputs("remainderl: DOMAIN error\n",stderr)
354 #define WRITED_REM fputs("remainder: DOMAIN error\n",stderr)
355 #define WRITEF_REM fputs("remainderf: DOMAIN error\n",stderr)
356 #define WRITEL_ACOS fputs("acosl: DOMAIN error\n",stderr)
357 #define WRITED_ACOS fputs("acos: DOMAIN error\n",stderr)
358 #define WRITEF_ACOS fputs("acosf: DOMAIN error\n",stderr)
359 #define WRITEL_ASIN fputs("asinl: DOMAIN error\n",stderr)
360 #define WRITED_ASIN fputs("asin: DOMAIN error\n",stderr)
361 #define WRITEF_ASIN fputs("asinf: DOMAIN error\n",stderr)
362 #define WRITEL_ACOSH fputs("acoshl: DOMAIN error\n",stderr)
363 #define WRITED_ACOSH fputs("acosh: DOMAIN error\n",stderr)
364 #define WRITEF_ACOSH fputs("acoshf: DOMAIN error\n",stderr)
365 #define WRITEL_ATANH_GT_ONE fputs("atanhl: DOMAIN error\n",stderr)
366 #define WRITED_ATANH_GT_ONE fputs("atanh: DOMAIN error\n",stderr)
367 #define WRITEF_ATANH_GT_ONE fputs("atanhf: DOMAIN error\n",stderr)
368 #define WRITEL_ATANH_EQ_ONE fputs("atanhl: SING error\n",stderr)
369 #define WRITED_ATANH_EQ_ONE fputs("atanh: SING error\n",stderr)
370 #define WRITEF_ATANH_EQ_ONE fputs("atanhf: SING error\n",stderr)
371 #define WRITEL_LGAMMA_NEGATIVE fputs("lgammal: SING error\n",stderr)
372 #define WRITED_LGAMMA_NEGATIVE fputs("lgamma: SING error\n",stderr)
373 #define WRITEF_LGAMMA_NEGATIVE fputs("lgammaf: SING error\n",stderr)
374 #define WRITEL_GAMMA_NEGATIVE fputs("gammal: SING error\n",stderr)
375 #define WRITED_GAMMA_NEGATIVE fputs("gamma: SING error\n",stderr)
376 #define WRITEF_GAMMA_NEGATIVE fputs("gammaf: SING error\n",stderr)
377 #define WRITEL_TGAMMA_NEGATIVE fputs("tgammal: SING error\n",stderr)
378 #define WRITED_TGAMMA_NEGATIVE fputs("tgamma: SING error\n",stderr)
379 #define WRITEF_TGAMMA_NEGATIVE fputs("tgammaf: SING error\n",stderr)
380 #define WRITEL_J0_TLOSS fputs("j0l: TLOSS error\n",stderr)
381 #define WRITEL_Y0_TLOSS fputs("y0l: TLOSS error\n",stderr)
382 #define WRITEL_J1_TLOSS fputs("j1l: TLOSS error\n",stderr)
383 #define WRITEL_Y1_TLOSS fputs("y1l: TLOSS error\n",stderr)
384 #define WRITEL_JN_TLOSS fputs("jnl: TLOSS error\n",stderr)
385 #define WRITEL_YN_TLOSS fputs("ynl: TLOSS error\n",stderr)
386 #define WRITED_J0_TLOSS fputs("j0: TLOSS error\n",stderr)
387 #define WRITED_Y0_TLOSS fputs("y0: TLOSS error\n",stderr)
388 #define WRITED_J1_TLOSS fputs("j1: TLOSS error\n",stderr)
389 #define WRITED_Y1_TLOSS fputs("y1: TLOSS error\n",stderr)
390 #define WRITED_JN_TLOSS fputs("jn: TLOSS error\n",stderr)
391 #define WRITED_YN_TLOSS fputs("yn: TLOSS error\n",stderr)
392 #define WRITEF_J0_TLOSS fputs("j0f: TLOSS error\n",stderr)
393 #define WRITEF_Y0_TLOSS fputs("y0f: TLOSS error\n",stderr)
394 #define WRITEF_J1_TLOSS fputs("j1f: TLOSS error\n",stderr)
395 #define WRITEF_Y1_TLOSS fputs("y1f: TLOSS error\n",stderr)
396 #define WRITEF_JN_TLOSS fputs("jnf: TLOSS error\n",stderr)
397 #define WRITEF_YN_TLOSS fputs("ynf: TLOSS error\n",stderr)
398 #define WRITEL_ACOSD fputs("acosdl: DOMAIN error\n",stderr)
399 #define WRITED_ACOSD fputs("acosd: DOMAIN error\n",stderr)
400 #define WRITEF_ACOSD fputs("acosdf: DOMAIN error\n",stderr)
401 #define WRITEL_ASIND fputs("asindl: DOMAIN error\n",stderr)
402 #define WRITED_ASIND fputs("asind: DOMAIN error\n",stderr)
403 #define WRITEF_ASIND fputs("asindf: DOMAIN error\n",stderr)
404 #define WRITEL_ATAN2D_ZERO_BY_ZERO fputs("atan2dl: DOMAIN error\n",stderr)
405 #define WRITED_ATAN2D_ZERO_BY_ZERO fputs("atan2d: DOMAIN error\n",stderr)
406 #define WRITEF_ATAN2D_ZERO_BY_ZERO fputs("atan2df: DOMAIN error\n",stderr)
409 /***********************/
410 /* IEEE Path */
411 /***********************/
412 if(_LIB_VERSIONIMF==_IEEE_) return;
414 /***********************/
415 /* C9X Path */
416 /***********************/
417 else if(_LIB_VERSIONIMF==_ISOC_)
419 switch(input_tag)
421 case logl_zero:
422 case log_zero:
423 case logf_zero:
424 case log10l_zero:
425 case log10_zero:
426 case log10f_zero:
427 case log2l_zero:
428 case log2_zero:
429 case log2f_zero:
430 case log1pl_zero:
431 case log1p_zero:
432 case log1pf_zero:
433 case powl_overflow:
434 case pow_overflow:
435 case powf_overflow:
436 case expl_overflow:
437 case exp_overflow:
438 case expf_overflow:
439 case exp2l_overflow:
440 case exp2_overflow:
441 case exp2f_overflow:
442 case exp10l_overflow:
443 case exp10_overflow:
444 case exp10f_overflow:
445 case expm1l_overflow:
446 case expm1_overflow:
447 case expm1f_overflow:
448 case hypotl_overflow:
449 case hypot_overflow:
450 case hypotf_overflow:
451 case sinhl_overflow:
452 case sinh_overflow:
453 case sinhf_overflow:
454 case atanhl_eq_one:
455 case atanh_eq_one:
456 case atanhf_eq_one:
457 case scalbl_overflow:
458 case scalb_overflow:
459 case scalbf_overflow:
460 case coshl_overflow:
461 case cosh_overflow:
462 case coshf_overflow:
463 case nextafterl_overflow:
464 case nextafter_overflow:
465 case nextafterf_overflow:
466 case nextafterl_underflow:
467 case nextafter_underflow:
468 case nextafterf_underflow:
469 case nexttowardl_overflow:
470 case nexttoward_overflow:
471 case nexttowardf_overflow:
472 case nexttowardl_underflow:
473 case nexttoward_underflow:
474 case nexttowardf_underflow:
475 case scalbnl_overflow:
476 case scalbn_overflow:
477 case scalbnf_overflow:
478 case scalblnl_overflow:
479 case scalbln_overflow:
480 case scalblnf_overflow:
481 case ldexpl_overflow:
482 case ldexp_overflow:
483 case ldexpf_overflow:
484 case lgammal_overflow:
485 case lgamma_overflow:
486 case lgammaf_overflow:
487 case gammal_overflow:
488 case gamma_overflow:
489 case gammaf_overflow:
490 case lgammal_negative:
491 case lgamma_negative:
492 case lgammaf_negative:
493 case gammal_negative:
494 case gamma_negative:
495 case gammaf_negative:
496 case ilogbl_zero:
497 case ilogb_zero:
498 case ilogbf_zero:
499 case fdiml_overflow:
500 case fdim_overflow:
501 case fdimf_overflow:
502 case llrintl_large:
503 case llrint_large:
504 case llrintf_large:
505 case llroundl_large:
506 case llround_large:
507 case llroundf_large:
508 case lrintl_large:
509 case lrint_large:
510 case lrintf_large:
511 case lroundl_large:
512 case lround_large:
513 case lroundf_large:
514 case tandl_overflow:
515 case tand_overflow:
516 case tandf_overflow:
517 case cotdl_overflow:
518 case cotd_overflow:
519 case cotdf_overflow:
520 case cotl_overflow:
521 case cot_overflow:
522 case cotf_overflow:
523 case sinhcoshl_overflow:
524 case sinhcosh_overflow:
525 case sinhcoshf_overflow:
526 case annuityl_overflow:
527 case annuity_overflow:
528 case annuityf_overflow:
529 case compoundl_overflow:
530 case compound_overflow:
531 case compoundf_overflow:
532 case tgammal_overflow:
533 case tgamma_overflow:
534 case tgammaf_overflow:
536 ERRNO_RANGE; break;
538 case powl_underflow:
539 case expl_underflow:
540 case exp10l_underflow:
541 case exp2l_underflow:
542 case scalbl_underflow:
543 case scalbnl_underflow:
544 case scalblnl_underflow:
545 case ldexpl_underflow:
546 case erfcl_underflow:
547 case annuityl_underflow:
548 case compoundl_underflow:
550 /* Test for zero by testing 64 significand bits for zero. An integer
551 test is needed so denormal flag is not set by a floating-point test */
552 if ( INPUT_RESI64 == 0 ) ERRNO_RANGE;
553 break;
555 case pow_underflow:
556 case exp_underflow:
557 case exp10_underflow:
558 case exp2_underflow:
559 case scalb_underflow:
560 case scalbn_underflow:
561 case scalbln_underflow:
562 case ldexp_underflow:
563 case erfc_underflow:
564 case annuity_underflow:
565 case compound_underflow:
567 /* Test for zero by testing exp and significand bits for zero. An integer
568 test is needed so denormal flag is not set by a floating-point test */
569 if ( (INPUT_RESI64 << 1) == 0 ) ERRNO_RANGE;
570 break;
572 case powf_underflow:
573 case expf_underflow:
574 case exp10f_underflow:
575 case exp2f_underflow:
576 case scalbf_underflow:
577 case scalbnf_underflow:
578 case scalblnf_underflow:
579 case ldexpf_underflow:
580 case erfcf_underflow:
581 case annuityf_underflow:
582 case compoundf_underflow:
584 /* Test for zero by testing exp and significand bits for zero. An integer
585 test is needed so denormal flag is not set by a floating-point test */
586 if ( (INPUT_RESI64 << 33) == 0 ) ERRNO_RANGE;
587 break;
589 case logl_negative:
590 case log_negative:
591 case logf_negative:
592 case log10l_negative:
593 case log10_negative:
594 case log10f_negative:
595 case log2l_negative:
596 case log2_negative:
597 case log2f_negative:
598 case log1pl_negative:
599 case log1p_negative:
600 case log1pf_negative:
601 case sqrtl_negative:
602 case sqrt_negative:
603 case sqrtf_negative:
604 case atan2l_zero:
605 case atan2_zero:
606 case atan2f_zero:
607 case powl_zero_to_negative:
608 case powl_neg_to_non_integer:
609 case pow_zero_to_negative:
610 case pow_neg_to_non_integer:
611 case powf_zero_to_negative:
612 case powf_neg_to_non_integer:
613 case fmodl_by_zero:
614 case fmod_by_zero:
615 case fmodf_by_zero:
616 case atanhl_gt_one:
617 case atanh_gt_one:
618 case atanhf_gt_one:
619 case acosl_gt_one:
620 case acos_gt_one:
621 case acosf_gt_one:
622 case asinl_gt_one:
623 case asin_gt_one:
624 case asinf_gt_one:
625 case logbl_zero:
626 case logb_zero:
627 case logbf_zero:
628 case acoshl_lt_one:
629 case acosh_lt_one:
630 case acoshf_lt_one:
631 case y0l_zero:
632 case y0_zero:
633 case y0f_zero:
634 case y1l_zero:
635 case y1_zero:
636 case y1f_zero:
637 case ynl_zero:
638 case yn_zero:
639 case ynf_zero:
640 case y0l_negative:
641 case y0_negative:
642 case y0f_negative:
643 case y1l_negative:
644 case y1_negative:
645 case y1f_negative:
646 case ynl_negative:
647 case yn_negative:
648 case ynf_negative:
649 case acosdl_gt_one:
650 case acosd_gt_one:
651 case acosdf_gt_one:
652 case asindl_gt_one:
653 case asind_gt_one:
654 case asindf_gt_one:
655 case atan2dl_zero:
656 case atan2d_zero:
657 case atan2df_zero:
658 case annuityl_by_zero:
659 case annuity_by_zero:
660 case annuityf_by_zero:
661 case annuityl_less_m1:
662 case annuity_less_m1:
663 case annuityf_less_m1:
664 case compoundl_by_zero:
665 case compound_by_zero:
666 case compoundf_by_zero:
667 case compoundl_less_m1:
668 case compound_less_m1:
669 case compoundf_less_m1:
670 case tgammal_negative:
671 case tgamma_negative:
672 case tgammaf_negative:
674 ERRNO_DOMAIN; break;
676 default:
677 break;
679 return;
682 /***********************/
683 /* _POSIX_ Path */
684 /***********************/
686 else if(_LIB_VERSIONIMF==_POSIX_)
688 switch(input_tag)
690 case gammal_overflow:
691 case lgammal_overflow:
692 case tgammal_overflow:
694 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
696 case gamma_overflow:
697 case lgamma_overflow:
698 case tgamma_overflow:
700 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
702 case gammaf_overflow:
703 case lgammaf_overflow:
704 case tgammaf_overflow:
706 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
708 case gammal_negative:
709 case gamma_negative:
710 case gammaf_negative:
711 case lgammal_negative:
712 case lgamma_negative:
713 case lgammaf_negative:
714 case tgammal_negative:
715 case tgamma_negative:
716 case tgammaf_negative:
718 ERRNO_DOMAIN; break;
720 case ldexpl_overflow:
721 case ldexpl_underflow:
722 case ldexp_overflow:
723 case ldexp_underflow:
724 case ldexpf_overflow:
725 case ldexpf_underflow:
726 case scalbnl_overflow:
727 case scalbnl_underflow:
728 case scalbn_overflow:
729 case scalbn_underflow:
730 case scalbnf_overflow:
731 case scalbnf_underflow:
732 case scalblnl_overflow:
733 case scalblnl_underflow:
734 case scalbln_overflow:
735 case scalbln_underflow:
736 case scalblnf_overflow:
737 case scalblnf_underflow:
738 case tandl_overflow:
739 case tand_overflow:
740 case tandf_overflow:
741 case cotdl_overflow:
742 case cotd_overflow:
743 case cotdf_overflow:
744 case cotl_overflow:
745 case cot_overflow:
746 case cotf_overflow:
747 case sinhcoshl_overflow:
748 case sinhcosh_overflow:
749 case sinhcoshf_overflow:
750 case nextafterl_overflow:
751 case nextafter_overflow:
752 case nextafterf_overflow:
753 case nextafterl_underflow:
754 case nextafter_underflow:
755 case nextafterf_underflow:
756 case nexttowardl_overflow:
757 case nexttoward_overflow:
758 case nexttowardf_overflow:
759 case nexttowardl_underflow:
760 case nexttoward_underflow:
761 case nexttowardf_underflow:
763 ERRNO_RANGE; break;
765 case atanhl_gt_one:
766 case atanhl_eq_one:
767 /* atanhl(|x| >= 1) */
769 ERRNO_DOMAIN; break;
771 case atanh_gt_one:
772 case atanh_eq_one:
773 /* atanh(|x| >= 1) */
775 ERRNO_DOMAIN; break;
777 case atanhf_gt_one:
778 case atanhf_eq_one:
779 /* atanhf(|x| >= 1) */
781 ERRNO_DOMAIN; break;
783 case sqrtl_negative:
784 /* sqrtl(x < 0) */
786 ERRNO_DOMAIN; break;
788 case sqrt_negative:
789 /* sqrt(x < 0) */
791 ERRNO_DOMAIN; break;
793 case sqrtf_negative:
794 /* sqrtf(x < 0) */
796 ERRNO_DOMAIN; break;
798 case y0l_zero:
799 case y1l_zero:
800 case ynl_zero:
801 /* y0l(0) */
802 /* y1l(0) */
803 /* ynl(0) */
805 RETVAL_NEG_HUGE_VALL; ERRNO_DOMAIN; break;
807 case y0_zero:
808 case y1_zero:
809 case yn_zero:
810 /* y0(0) */
811 /* y1(0) */
812 /* yn(0) */
814 RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break;
816 case y0f_zero:
817 case y1f_zero:
818 case ynf_zero:
819 /* y0f(0) */
820 /* y1f(0) */
821 /* ynf(0) */
823 RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break;
825 case y0l_negative:
826 case y1l_negative:
827 case ynl_negative:
828 /* y0l(x < 0) */
829 /* y1l(x < 0) */
830 /* ynl(x < 0) */
832 #ifndef _LIBC
833 RETVAL_NEG_HUGE_VALL;
834 #endif
835 ERRNO_DOMAIN; break;
837 case y0_negative:
838 case y1_negative:
839 case yn_negative:
840 /* y0(x < 0) */
841 /* y1(x < 0) */
842 /* yn(x < 0) */
844 RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break;
846 case y0f_negative:
847 case y1f_negative:
848 case ynf_negative:
849 /* y0f(x < 0) */
850 /* y1f(x < 0) */
851 /* ynf(x < 0) */
853 RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break;
855 case logl_zero:
856 case log1pl_zero:
857 case log10l_zero:
858 case log2l_zero:
859 /* logl(0) */
860 /* log1pl(-1) */
861 /* log10l(0) */
862 /* log2l(0) */
864 RETVAL_NEG_HUGE_VALL; ERRNO_RANGE; break;
866 case log_zero:
867 case log1p_zero:
868 case log10_zero:
869 case log2_zero:
870 /* log(0) */
871 /* log1p(-1) */
872 /* log10(0) */
873 /* log2(0) */
875 RETVAL_NEG_HUGE_VALD; ERRNO_RANGE; break;
877 case logf_zero:
878 case log1pf_zero:
879 case log10f_zero:
880 case log2f_zero:
881 /* logf(0) */
882 /* log1pf(-1) */
883 /* log10f(0) */
884 /* log2f(0) */
886 RETVAL_NEG_HUGE_VALF; ERRNO_RANGE; break;
888 case logl_negative:
889 case log1pl_negative:
890 case log10l_negative:
891 case log2l_negative:
892 /* logl(x < 0) */
893 /* log1pl(x < -1) */
894 /* log10l(x < 0) */
895 /* log2l(x < 0) */
897 ERRNO_DOMAIN; break;
899 case log_negative:
900 case log1p_negative:
901 case log10_negative:
902 case log2_negative:
903 /* log(x < 0) */
904 /* log1p(x < -1) */
905 /* log10(x < 0) */
906 /* log2(x < 0) */
908 ERRNO_DOMAIN; break;
910 case logf_negative:
911 case log1pf_negative:
912 case log10f_negative:
913 case log2f_negative:
914 /* logf(x < 0) */
915 /* log1pf(x < -1) */
916 /* log10f(x < 0) */
917 /* log2f(x < 0) */
919 ERRNO_DOMAIN; break;
921 case expl_overflow:
922 case exp10l_overflow:
923 case exp2l_overflow:
924 /* expl overflow */
925 /* exp10l overflow */
926 /* exp2l overflow */
928 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
930 case exp_overflow:
931 case exp10_overflow:
932 case exp2_overflow:
933 /* exp overflow */
934 /* exp10 overflow */
935 /* exp2 overflow */
937 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
939 case expf_overflow:
940 case exp10f_overflow:
941 case exp2f_overflow:
942 /* expf overflow */
944 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
946 case expl_underflow:
947 case exp10l_underflow:
948 case exp2l_underflow:
949 /* expl underflow */
950 /* exp10l underflow */
951 /* exp2l underflow */
953 ERRNO_RANGE; break;
955 case exp_underflow:
956 case exp10_underflow:
957 case exp2_underflow:
958 /* exp underflow */
959 /* exp10 underflow */
960 /* exp2 underflow */
962 ERRNO_RANGE; break;
964 case expf_underflow:
965 case exp10f_underflow:
966 case exp2f_underflow:
967 /* expf underflow */
968 /* exp10f underflow */
969 /* exp2f underflow */
971 ERRNO_RANGE; break;
973 case j0l_gt_loss:
974 case y0l_gt_loss:
975 case j1l_gt_loss:
976 case y1l_gt_loss:
977 case jnl_gt_loss:
978 case ynl_gt_loss:
979 /* jn and yn doubl-extended> XLOSS */
981 RETVAL_ZEROL; ERRNO_RANGE; break;
983 case j0_gt_loss:
984 case y0_gt_loss:
985 case j1_gt_loss:
986 case y1_gt_loss:
987 case jn_gt_loss:
988 case yn_gt_loss:
989 /* jn and yn double > XLOSS */
991 RETVAL_ZEROD; ERRNO_RANGE; break;
993 case j0f_gt_loss:
994 case y0f_gt_loss:
995 case j1f_gt_loss:
996 case y1f_gt_loss:
997 case jnf_gt_loss:
998 case ynf_gt_loss:
999 /* j0n and y0n > XLOSS */
1001 RETVAL_ZEROF; ERRNO_RANGE; break;
1003 case powl_zero_to_zero:
1004 /* powl 0**0 */
1006 break;
1008 case pow_zero_to_zero:
1009 /* pow 0**0 */
1011 break;
1013 case powf_zero_to_zero:
1014 /* powf 0**0 */
1016 break;
1018 case powl_overflow:
1019 case annuityl_overflow:
1020 case compoundl_overflow:
1021 /* powl(x,y) overflow */
1023 if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
1024 else RETVAL_HUGE_VALL;
1025 ERRNO_RANGE; break;
1027 case pow_overflow:
1028 case annuity_overflow:
1029 case compound_overflow:
1030 /* pow(x,y) overflow */
1032 if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
1033 else RETVAL_HUGE_VALD;
1034 ERRNO_RANGE; break;
1036 case powf_overflow:
1037 case annuityf_overflow:
1038 case compoundf_overflow:
1039 /* powf(x,y) overflow */
1041 if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
1042 else RETVAL_HUGE_VALF;
1043 ERRNO_RANGE; break;
1045 case powl_underflow:
1046 case annuityl_underflow:
1047 case compoundl_underflow:
1048 /* powl(x,y) underflow */
1050 RETVAL_ZEROL; ERRNO_RANGE; break;
1052 case pow_underflow:
1053 case annuity_underflow:
1054 case compound_underflow:
1055 /* pow(x,y) underflow */
1057 RETVAL_ZEROD; ERRNO_RANGE; break;
1059 case powf_underflow:
1060 case annuityf_underflow:
1061 case compoundf_underflow:
1062 /* powf(x,y) underflow */
1064 RETVAL_ZEROF; ERRNO_RANGE; break;
1066 case annuityl_by_zero:
1067 case annuityl_less_m1:
1068 case compoundl_by_zero:
1069 case compoundl_less_m1:
1070 case annuity_by_zero:
1071 case annuity_less_m1:
1072 case compound_by_zero:
1073 case compound_less_m1:
1074 case annuityf_by_zero:
1075 case annuityf_less_m1:
1076 case compoundf_by_zero:
1077 case compoundf_less_m1:
1079 ERRNO_DOMAIN; break;
1081 case powl_zero_to_negative:
1082 /* 0**neg */
1084 ERRNO_DOMAIN; break;
1086 case pow_zero_to_negative:
1087 /* 0**neg */
1089 ERRNO_DOMAIN; break;
1091 case powf_zero_to_negative:
1092 /* 0**neg */
1094 ERRNO_DOMAIN; break;
1096 case powl_neg_to_non_integer:
1097 /* neg**non_integral */
1099 ERRNO_DOMAIN; break;
1101 case pow_neg_to_non_integer:
1102 /* neg**non_integral */
1104 ERRNO_DOMAIN; break;
1106 case powf_neg_to_non_integer:
1107 /* neg**non-integral */
1109 ERRNO_DOMAIN; break;
1111 case powl_nan_to_zero:
1112 /* powl(NaN,0.0) */
1113 /* Special Error */
1115 break;
1117 case pow_nan_to_zero:
1118 /* pow(NaN,0.0) */
1120 break;
1122 case powf_nan_to_zero:
1123 /* powf(NaN,0.0) */
1125 break;
1127 case atan2l_zero:
1128 case atan2dl_zero:
1129 /* atan2l(0,0) */
1130 /* atan2dl(0,0) */
1132 break;
1134 case atan2_zero:
1135 case atan2d_zero:
1136 /* atan2(0,0) */
1137 /* atan2d(0,0) */
1139 break;
1141 case atan2f_zero:
1142 case atan2df_zero:
1143 /* atan2f(0,0) */
1144 /* atan2df(0,0) */
1146 break;
1148 case expm1l_overflow:
1149 /* expm1 overflow */
1151 ERRNO_RANGE; break;
1153 case expm1_overflow:
1154 /* expm1 overflow */
1156 ERRNO_RANGE; break;
1158 case expm1f_overflow:
1159 /* expm1f overflow */
1161 ERRNO_RANGE; break;
1163 case expm1l_underflow:
1164 /* expm1 underflow */
1166 ERRNO_RANGE; break;
1168 case expm1_underflow:
1169 /* expm1 underflow */
1171 ERRNO_RANGE; break;
1173 case expm1f_underflow:
1174 /* expm1f underflow */
1176 ERRNO_RANGE; break;
1178 case hypotl_overflow:
1179 /* hypotl overflow */
1181 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
1183 case hypot_overflow:
1184 /* hypot overflow */
1186 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
1188 case hypotf_overflow:
1189 /* hypotf overflow */
1191 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
1193 case scalbl_underflow:
1194 /* scalbl underflow */
1196 if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_ZEROL;
1197 else RETVAL_ZEROL;
1198 ERRNO_RANGE; break;
1200 case scalb_underflow:
1201 /* scalb underflow */
1203 if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_ZEROD;
1204 else RETVAL_ZEROD;
1205 ERRNO_RANGE; break;
1207 case scalbf_underflow:
1208 /* scalbf underflow */
1210 if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_ZEROF;
1211 else RETVAL_ZEROF;
1212 ERRNO_RANGE; break;
1214 case scalbl_overflow:
1215 /* scalbl overflow */
1217 if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
1218 else RETVAL_HUGE_VALL;
1219 ERRNO_RANGE; break;
1221 case scalb_overflow:
1222 /* scalb overflow */
1224 if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
1225 else RETVAL_HUGE_VALD;
1226 ERRNO_RANGE; break;
1228 case scalbf_overflow:
1229 /* scalbf overflow */
1231 if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
1232 else RETVAL_HUGE_VALF;
1233 ERRNO_RANGE; break;
1235 case acoshl_lt_one:
1236 /* acoshl(x < 1) */
1238 ERRNO_DOMAIN; break;
1240 case acosh_lt_one:
1241 /* acosh(x < 1) */
1243 ERRNO_DOMAIN; break;
1245 case acoshf_lt_one:
1246 /* acoshf(x < 1) */
1248 ERRNO_DOMAIN; break;
1250 case acosl_gt_one:
1251 case acosdl_gt_one:
1252 /* acosl(x > 1) */
1253 /* acosdl(x > 1) */
1255 ERRNO_DOMAIN; break;
1257 case acos_gt_one:
1258 case acosd_gt_one:
1259 /* acos(x > 1) */
1260 /* acosd(x > 1) */
1262 ERRNO_DOMAIN; break;
1264 case acosf_gt_one:
1265 case acosdf_gt_one:
1266 /* acosf(x > 1) */
1267 /* acosdf(x > 1) */
1269 ERRNO_DOMAIN; break;
1271 case asinl_gt_one:
1272 case asindl_gt_one:
1273 /* asinl(x > 1) */
1274 /* asindl(x > 1) */
1276 ERRNO_DOMAIN; break;
1278 case asin_gt_one:
1279 case asind_gt_one:
1280 /* asin(x > 1) */
1281 /* asind(x > 1) */
1283 ERRNO_DOMAIN; break;
1285 case asinf_gt_one:
1286 case asindf_gt_one:
1287 /* asinf(x > 1) */
1288 /* asindf(x > 1) */
1290 ERRNO_DOMAIN; break;
1292 case remainderl_by_zero:
1293 case fmodl_by_zero:
1294 /* fmodl(x,0) */
1296 ERRNO_DOMAIN; break;
1298 case remainder_by_zero:
1299 case fmod_by_zero:
1300 /* fmod(x,0) */
1302 ERRNO_DOMAIN; break;
1304 case remainderf_by_zero:
1305 case fmodf_by_zero:
1306 /* fmodf(x,0) */
1308 ERRNO_DOMAIN; break;
1310 case coshl_overflow:
1311 /* coshl overflows */
1313 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
1315 case cosh_overflow:
1316 /* cosh overflows */
1318 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
1320 case coshf_overflow:
1321 /* coshf overflows */
1323 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
1325 case sinhl_overflow:
1326 /* sinhl overflows */
1328 if (INPUT_XL > ZEROL_VALUE /*0*/) RETVAL_HUGE_VALL;
1329 else RETVAL_NEG_HUGE_VALL;
1330 ERRNO_RANGE; break;
1332 case sinh_overflow:
1333 /* sinh overflows */
1335 if (INPUT_XD > ZEROD_VALUE /*0*/) RETVAL_HUGE_VALD;
1336 else RETVAL_NEG_HUGE_VALD;
1337 ERRNO_RANGE; break;
1339 case sinhf_overflow:
1340 /* sinhf overflows */
1342 if (INPUT_XF > ZEROF_VALUE /*0*/) RETVAL_HUGE_VALF;
1343 else RETVAL_NEG_HUGE_VALF;
1344 ERRNO_RANGE; break;
1346 case logbl_zero:
1347 /* logbl(0) */
1349 ERRNO_DOMAIN; break;
1351 case logb_zero:
1352 /* logb(0) */
1354 ERRNO_DOMAIN; break;
1356 case logbf_zero:
1357 /* logbf(0) */
1359 ERRNO_DOMAIN; break;
1361 case ilogbl_zero:
1362 /* ilogbl(0) */
1364 ERRNO_RANGE; break;
1366 case ilogb_zero:
1367 /* ilogb(0) */
1369 ERRNO_RANGE; break;
1371 case ilogbf_zero:
1372 /* ilogbf(0) */
1374 ERRNO_RANGE; break;
1376 default:
1377 break;
1379 return;
1380 /* _POSIX_ */
1383 /*******************************/
1384 /* __SVID__ and __XOPEN__ Path */
1385 /*******************************/
1386 else
1388 switch(input_tag)
1390 case ldexpl_overflow:
1391 case ldexpl_underflow:
1392 case ldexp_overflow:
1393 case ldexp_underflow:
1394 case ldexpf_overflow:
1395 case ldexpf_underflow:
1396 case scalbnl_overflow:
1397 case scalbnl_underflow:
1398 case scalbn_overflow:
1399 case scalbn_underflow:
1400 case scalbnf_overflow:
1401 case scalbnf_underflow:
1402 case scalblnl_overflow:
1403 case scalblnl_underflow:
1404 case scalbln_overflow:
1405 case scalbln_underflow:
1406 case scalblnf_overflow:
1407 case scalblnf_underflow:
1408 case tandl_overflow:
1409 case tand_overflow:
1410 case tandf_overflow:
1411 case cotdl_overflow:
1412 case cotd_overflow:
1413 case cotdf_overflow:
1414 case cotl_overflow:
1415 case cot_overflow:
1416 case cotf_overflow:
1417 case annuityl_overflow:
1418 case annuityl_underflow:
1419 case annuity_overflow:
1420 case annuity_underflow:
1421 case annuityf_overflow:
1422 case annuityf_underflow:
1423 case compoundl_overflow:
1424 case compoundl_underflow:
1425 case compound_overflow:
1426 case compound_underflow:
1427 case compoundf_overflow:
1428 case compoundf_underflow:
1430 ERRNO_RANGE; break;
1432 case annuityl_by_zero:
1433 case annuityl_less_m1:
1434 case annuity_by_zero:
1435 case annuity_less_m1:
1436 case annuityf_by_zero:
1437 case annuityf_less_m1:
1438 case compoundl_by_zero:
1439 case compoundl_less_m1:
1440 case compound_by_zero:
1441 case compound_less_m1:
1442 case compoundf_by_zero:
1443 case compoundf_less_m1:
1445 ERRNO_DOMAIN; break;
1447 case sqrtl_negative:
1448 /* sqrtl(x < 0) */
1450 DOMAINL; NAMEL = (char *) "sqrtl";
1451 ifSVID
1453 RETVAL_ZEROL;
1454 NOT_MATHERRL
1456 WRITEL_SQRT;
1457 ERRNO_DOMAIN;
1460 else
1461 { /* NaN already computed */
1462 NOT_MATHERRL {ERRNO_DOMAIN;}
1464 *(long double *)retval = excl.retval;
1465 break;
1467 case sqrt_negative:
1468 /* sqrt(x < 0) */
1470 DOMAIND; NAMED = (char *) "sqrt";
1471 ifSVID
1474 RETVAL_ZEROD;
1475 NOT_MATHERRD
1477 WRITED_SQRT;
1478 ERRNO_DOMAIN;
1481 else
1482 { /* NaN already computed */
1483 NOT_MATHERRD {ERRNO_DOMAIN;}
1485 *(double *)retval = exc.retval;
1486 break;
1488 case sqrtf_negative:
1489 /* sqrtf(x < 0) */
1491 DOMAINF; NAMEF = (char *) "sqrtf";
1492 ifSVID
1494 RETVAL_ZEROF;
1495 NOT_MATHERRF
1497 WRITEF_SQRT;
1498 ERRNO_DOMAIN;
1501 else
1503 NOT_MATHERRF {ERRNO_DOMAIN;}
1505 *(float *)retval = excf.retval;
1506 break;
1508 case logl_zero:
1509 /* logl(0) */
1511 SINGL; NAMEL = (char *) "logl";
1512 ifSVID
1514 RETVAL_NEG_HUGEL;
1515 NOT_MATHERRL
1517 WRITEL_LOG_ZERO;
1518 ERRNO_DOMAIN;
1521 else
1523 RETVAL_NEG_HUGE_VALL;
1524 NOT_MATHERRL {ERRNO_DOMAIN;}
1526 *(long double *)retval = excl.retval;
1527 break;
1529 case log_zero:
1530 /* log(0) */
1532 SINGD; NAMED = (char *) "log";
1533 ifSVID
1535 RETVAL_NEG_HUGED;
1536 NOT_MATHERRD
1538 WRITED_LOG_ZERO;
1539 ERRNO_DOMAIN;
1542 else
1544 RETVAL_NEG_HUGE_VALD;
1545 NOT_MATHERRD {ERRNO_DOMAIN;}
1547 *(double *)retval = exc.retval;
1548 break;
1550 case logf_zero:
1551 /* logf(0) */
1553 SINGF; NAMEF = (char *) "logf";
1554 ifSVID
1556 RETVAL_NEG_HUGEF;
1557 NOT_MATHERRF
1559 WRITEF_LOG_ZERO;
1560 ERRNO_DOMAIN;
1563 else
1565 RETVAL_NEG_HUGE_VALF;
1566 NOT_MATHERRF {ERRNO_DOMAIN;}
1568 *(float *)retval = excf.retval;
1569 break;
1572 case logl_negative:
1573 /* logl(x < 0) */
1575 DOMAINL; NAMEL = (char *) "logl";
1576 ifSVID
1578 RETVAL_NEG_HUGEL;
1579 NOT_MATHERRL
1581 WRITEL_LOG_NEGATIVE;
1582 ERRNO_DOMAIN;
1585 else
1587 RETVAL_NEG_HUGE_VALL;
1588 NOT_MATHERRL {ERRNO_DOMAIN;}
1590 *(long double *)retval = excl.retval;
1591 break;
1593 case log_negative:
1594 /* log(x < 0) */
1596 DOMAIND; NAMED = (char *) "log";
1597 ifSVID
1599 RETVAL_NEG_HUGED;
1600 NOT_MATHERRD
1602 WRITED_LOG_NEGATIVE;
1603 ERRNO_DOMAIN;
1606 else
1608 RETVAL_NEG_HUGE_VALD;
1609 NOT_MATHERRD {ERRNO_DOMAIN;}
1611 *(double *)retval = exc.retval;
1612 break;
1614 case logf_negative:
1615 /* logf(x < 0) */
1617 DOMAINF; NAMEF = (char *) "logf";
1618 ifSVID
1620 RETVAL_NEG_HUGEF;
1621 NOT_MATHERRF
1623 WRITEF_LOG_NEGATIVE;
1624 ERRNO_DOMAIN;
1627 else
1629 RETVAL_NEG_HUGE_VALF;
1630 NOT_MATHERRF{ERRNO_DOMAIN;}
1632 *(float *)retval = excf.retval;
1633 break;
1635 case log1pl_zero:
1636 /* log1pl(-1) */
1638 SINGL; NAMEL = (char *) "log1pl";
1639 ifSVID
1641 RETVAL_NEG_HUGEL;
1642 NOT_MATHERRL
1644 WRITEL_LOG1P_ZERO;
1645 ERRNO_DOMAIN;
1648 else
1650 RETVAL_NEG_HUGE_VALL;
1651 NOT_MATHERRL {ERRNO_DOMAIN;}
1653 *(long double *)retval = excl.retval;
1654 break;
1656 case log1p_zero:
1657 /* log1p(-1) */
1659 SINGD; NAMED = (char *) "log1p";
1660 ifSVID
1662 RETVAL_NEG_HUGED;
1663 NOT_MATHERRD
1665 WRITED_LOG1P_ZERO;
1666 ERRNO_DOMAIN;
1669 else
1671 RETVAL_NEG_HUGE_VALD;
1672 NOT_MATHERRD {ERRNO_DOMAIN;}
1674 *(double *)retval = exc.retval;
1675 break;
1677 case log1pf_zero:
1678 /* log1pf(-1) */
1680 SINGF; NAMEF = (char *) "log1pf";
1681 ifSVID
1683 RETVAL_NEG_HUGEF;
1684 NOT_MATHERRF
1686 WRITEF_LOG1P_ZERO;
1687 ERRNO_DOMAIN;
1690 else
1692 RETVAL_NEG_HUGE_VALF;
1693 NOT_MATHERRF {ERRNO_DOMAIN;}
1695 *(float *)retval = excf.retval;
1696 break;
1698 case log1pl_negative:
1699 /* log1pl(x < -1) */
1701 DOMAINL; NAMEL = (char *) "log1pl";
1702 ifSVID
1704 RETVAL_NEG_HUGEL;
1705 NOT_MATHERRL
1707 WRITEL_LOG1P_NEGATIVE;
1708 ERRNO_DOMAIN;
1711 else
1713 RETVAL_NEG_HUGE_VALL;
1714 NOT_MATHERRL {ERRNO_DOMAIN;}
1716 *(long double *)retval = excl.retval;
1717 break;
1719 case log1p_negative:
1720 /* log1p(x < -1) */
1722 DOMAIND; NAMED = (char *) "log1p";
1723 ifSVID
1725 RETVAL_NEG_HUGED;
1726 NOT_MATHERRD
1728 WRITED_LOG1P_NEGATIVE;
1729 ERRNO_DOMAIN;
1732 else
1734 RETVAL_NEG_HUGE_VALD;
1735 NOT_MATHERRD {ERRNO_DOMAIN;}
1737 *(double *)retval = exc.retval;
1738 break;
1740 case log1pf_negative:
1741 /* log1pf(x < -1) */
1743 DOMAINF; NAMEF = (char *) "log1pf";
1744 ifSVID
1746 RETVAL_NEG_HUGEF;
1747 NOT_MATHERRF
1749 WRITEF_LOG1P_NEGATIVE;
1750 ERRNO_DOMAIN;
1753 else
1755 RETVAL_NEG_HUGE_VALF;
1756 NOT_MATHERRF {ERRNO_DOMAIN;}
1758 *(float *)retval = excf.retval;
1759 break;
1761 case log10l_zero:
1762 /* log10l(0) */
1764 SINGL; NAMEL = (char *) "log10l";
1765 ifSVID
1767 RETVAL_NEG_HUGEL;
1768 NOT_MATHERRL
1770 WRITEL_LOG10_ZERO;
1771 ERRNO_DOMAIN;
1774 else
1776 RETVAL_NEG_HUGE_VALL;
1777 NOT_MATHERRL {ERRNO_DOMAIN;}
1779 *(long double *)retval = excl.retval;
1780 break;
1782 case log10_zero:
1783 /* log10(0) */
1785 SINGD; NAMED = (char *) "log10";
1786 ifSVID
1788 RETVAL_NEG_HUGED;
1789 NOT_MATHERRD
1791 WRITED_LOG10_ZERO;
1792 ERRNO_DOMAIN;
1795 else
1797 RETVAL_NEG_HUGE_VALD;
1798 NOT_MATHERRD {ERRNO_DOMAIN;}
1800 *(double *)retval = exc.retval;
1801 break;
1803 case log10f_zero:
1804 /* log10f(0) */
1806 SINGF; NAMEF = (char *) "log10f";
1807 ifSVID
1809 RETVAL_NEG_HUGEF;
1810 NOT_MATHERRF
1812 WRITEF_LOG10_ZERO;
1813 ERRNO_DOMAIN;
1816 else
1818 RETVAL_NEG_HUGE_VALF;
1819 NOT_MATHERRF {ERRNO_DOMAIN;}
1821 *(float *)retval = excf.retval;
1822 break;
1824 case log10l_negative:
1825 /* log10l(x < 0) */
1827 DOMAINL; NAMEL = (char *) "log10l";
1828 ifSVID
1830 RETVAL_NEG_HUGEL;
1831 NOT_MATHERRL
1833 WRITEL_LOG10_NEGATIVE;
1834 ERRNO_DOMAIN;
1837 else
1839 RETVAL_NEG_HUGE_VALL;
1840 NOT_MATHERRL {ERRNO_DOMAIN;}
1842 *(long double *)retval = excl.retval;
1843 break;
1845 case log10_negative:
1846 /* log10(x < 0) */
1848 DOMAIND; NAMED = (char *) "log10";
1849 ifSVID
1851 RETVAL_NEG_HUGED;
1852 NOT_MATHERRD
1854 WRITED_LOG10_NEGATIVE;
1855 ERRNO_DOMAIN;
1858 else
1860 RETVAL_NEG_HUGE_VALD;
1861 NOT_MATHERRD {ERRNO_DOMAIN;}
1863 *(double *)retval = exc.retval;
1864 break;
1866 case log10f_negative:
1867 /* log10f(x < 0) */
1869 DOMAINF; NAMEF = (char *) "log10f";
1870 ifSVID
1872 RETVAL_NEG_HUGEF;
1873 NOT_MATHERRF
1875 WRITEF_LOG10_NEGATIVE;
1876 ERRNO_DOMAIN;
1879 else
1881 RETVAL_NEG_HUGE_VALF;
1882 NOT_MATHERRF {ERRNO_DOMAIN;}
1884 *(float *)retval = excf.retval;
1885 break;
1887 case log2l_zero:
1888 /* log2l(0) */
1890 SINGL; NAMEL = (char *) "log2l";
1891 ifSVID
1893 RETVAL_NEG_HUGEL;
1894 NOT_MATHERRL
1896 WRITEL_LOG2_ZERO;
1897 ERRNO_DOMAIN;
1900 else
1902 RETVAL_NEG_HUGE_VALL;
1903 NOT_MATHERRL {ERRNO_DOMAIN;}
1905 *(long double *)retval = excl.retval;
1906 break;
1908 case log2_zero:
1909 /* log2(0) */
1911 SINGD; NAMED = (char *) "log2";
1912 ifSVID
1914 RETVAL_NEG_HUGED;
1915 NOT_MATHERRD
1917 WRITED_LOG2_ZERO;
1918 ERRNO_DOMAIN;
1921 else
1923 RETVAL_NEG_HUGE_VALD;
1924 NOT_MATHERRD {ERRNO_DOMAIN;}
1926 *(double *)retval = exc.retval;
1927 break;
1929 case log2f_zero:
1930 /* log2f(0) */
1932 SINGF; NAMEF = (char *) "log2f";
1933 ifSVID
1935 RETVAL_NEG_HUGEF;
1936 NOT_MATHERRF
1938 WRITEF_LOG2_ZERO;
1939 ERRNO_DOMAIN;
1942 else
1944 RETVAL_NEG_HUGE_VALF;
1945 NOT_MATHERRF {ERRNO_DOMAIN;}
1947 *(float *)retval = excf.retval;
1948 break;
1950 case log2l_negative:
1951 /* log2l(x < 0) */
1953 DOMAINL; NAMEL = (char *) "log2l";
1954 ifSVID
1956 RETVAL_NEG_HUGEL;
1957 NOT_MATHERRL
1959 WRITEL_LOG2_NEGATIVE;
1960 ERRNO_DOMAIN;
1963 else
1965 RETVAL_NEG_HUGE_VALL;
1966 NOT_MATHERRL {ERRNO_DOMAIN;}
1968 *(long double *)retval = excl.retval;
1969 break;
1971 case log2_negative:
1972 /* log2(x < 0) */
1974 DOMAIND; NAMED = (char *) "log2";
1975 ifSVID
1977 RETVAL_NEG_HUGED;
1978 NOT_MATHERRD
1980 WRITED_LOG2_NEGATIVE;
1981 ERRNO_DOMAIN;
1984 else
1986 RETVAL_NEG_HUGE_VALD;
1987 NOT_MATHERRD {ERRNO_DOMAIN;}
1989 *(double *)retval = exc.retval;
1990 break;
1992 case log2f_negative:
1993 /* log2f(x < 0) */
1995 DOMAINF; NAMEF = (char *) "log2f";
1996 ifSVID
1998 RETVAL_NEG_HUGEF;
1999 NOT_MATHERRF
2001 WRITEF_LOG2_NEGATIVE;
2002 ERRNO_DOMAIN;
2005 else
2007 RETVAL_NEG_HUGE_VALF;
2008 NOT_MATHERRF {ERRNO_DOMAIN;}
2010 *(float *)retval = excf.retval;
2011 break;
2013 case expl_overflow:
2014 /* expl overflow */
2016 OVERFLOWL; NAMEL = (char *) "expl";
2017 ifSVID
2019 RETVAL_HUGEL;
2021 else
2023 RETVAL_HUGE_VALL;
2025 NOT_MATHERRL {ERRNO_RANGE;}
2026 *(long double *)retval = excl.retval;
2027 break;
2029 case exp_overflow:
2030 /* exp overflow */
2032 OVERFLOWD; NAMED = (char *) "exp";
2033 ifSVID
2035 RETVAL_HUGED;
2037 else
2039 RETVAL_HUGE_VALD;
2041 NOT_MATHERRD {ERRNO_RANGE;}
2042 *(double *)retval = exc.retval;
2043 break;
2045 case expf_overflow:
2046 /* expf overflow */
2048 OVERFLOWF; NAMEF = (char *) "expf";
2049 ifSVID
2051 RETVAL_HUGEF;
2053 else
2055 RETVAL_HUGE_VALF;
2057 NOT_MATHERRF {ERRNO_RANGE;}
2058 *(float *)retval = excf.retval;
2059 break;
2061 case expl_underflow:
2062 /* expl underflow */
2064 UNDERFLOWL; NAMEL = (char *) "expl"; RETVAL_ZEROL;
2065 NOT_MATHERRL {ERRNO_RANGE;}
2066 *(long double *)retval = excl.retval;
2067 break;
2069 case exp_underflow:
2070 /* exp underflow */
2072 UNDERFLOWD; NAMED = (char *) "exp"; RETVAL_ZEROD;
2073 NOT_MATHERRD {ERRNO_RANGE;}
2074 *(double *)retval = exc.retval;
2075 break;
2077 case expf_underflow:
2078 /* expf underflow */
2080 UNDERFLOWF; NAMEF = (char *) "expf"; RETVAL_ZEROF;
2081 NOT_MATHERRF {ERRNO_RANGE;}
2082 *(float *)retval = excf.retval;
2083 break;
2085 case powl_zero_to_zero:
2086 /* powl 0**0 */
2088 DOMAINL; NAMEL = (char *) "powl";
2089 ifSVID
2091 RETVAL_ZEROL;
2092 NOT_MATHERRL
2094 WRITEL_POW_ZERO_TO_ZERO;
2095 ERRNO_DOMAIN;
2097 *(long double *)retval = excl.retval;
2099 else RETVAL_ONEL;
2100 break;
2102 case pow_zero_to_zero:
2103 /* pow 0**0 */
2105 DOMAIND; NAMED = (char *) "pow";
2106 ifSVID
2108 RETVAL_ZEROD;
2109 NOT_MATHERRD
2111 WRITED_POW_ZERO_TO_ZERO;
2112 ERRNO_DOMAIN;
2114 *(double *)retval = exc.retval;
2116 else RETVAL_ONED;
2117 break;
2119 case powf_zero_to_zero:
2120 /* powf 0**0 */
2122 DOMAINF; NAMEF = (char *) "powf";
2123 ifSVID
2125 RETVAL_ZEROF;
2126 NOT_MATHERRF
2128 WRITEF_POW_ZERO_TO_ZERO;
2129 ERRNO_DOMAIN;
2131 *(float *)retval = excf.retval;
2133 else RETVAL_ONEF;
2134 break;
2136 case powl_overflow:
2137 /* powl(x,y) overflow */
2139 OVERFLOWL; NAMEL = (char *) "powl";
2140 ifSVID
2142 if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGEL;
2143 else RETVAL_HUGEL;
2145 else
2147 if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
2148 else RETVAL_HUGE_VALL;
2150 NOT_MATHERRL {ERRNO_RANGE;}
2151 *(long double *)retval = excl.retval;
2152 break;
2154 case pow_overflow:
2155 /* pow(x,y) overflow */
2157 OVERFLOWD; NAMED = (char *) "pow";
2158 ifSVID
2160 if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGED;
2161 else RETVAL_HUGED;
2163 else
2165 if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
2166 else RETVAL_HUGE_VALD;
2168 NOT_MATHERRD {ERRNO_RANGE;}
2169 *(double *)retval = exc.retval;
2170 break;
2172 case powf_overflow:
2173 /* powf(x,y) overflow */
2175 OVERFLOWF; NAMEF = (char *) "powf";
2176 ifSVID
2178 if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGEF;
2179 else RETVAL_HUGEF;
2181 else
2183 if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
2184 else RETVAL_HUGE_VALF;
2186 NOT_MATHERRF {ERRNO_RANGE;}
2187 *(float *)retval = excf.retval;
2188 break;
2190 case powl_underflow:
2191 /* powl(x,y) underflow */
2193 UNDERFLOWL; NAMEL = (char *) "powl"; RETVAL_ZEROL;
2194 NOT_MATHERRL {ERRNO_RANGE;}
2195 *(long double *)retval = excl.retval;
2196 break;
2198 case pow_underflow:
2199 /* pow(x,y) underflow */
2201 UNDERFLOWD; NAMED = (char *) "pow"; RETVAL_ZEROD;
2202 NOT_MATHERRD {ERRNO_RANGE;}
2203 *(double *)retval = exc.retval;
2204 break;
2206 case powf_underflow:
2207 /* powf(x,y) underflow */
2209 UNDERFLOWF; NAMEF = (char *) "powf"; RETVAL_ZEROF;
2210 NOT_MATHERRF {ERRNO_RANGE;}
2211 *(float *)retval = excf.retval;
2212 break;
2214 case powl_zero_to_negative:
2215 /* 0 to neg */
2217 DOMAINL; NAMEL = (char *) "powl";
2218 ifSVID
2220 RETVAL_ZEROL;
2221 NOT_MATHERRL
2223 WRITEL_POW_ZERO_TO_NEGATIVE;
2224 ERRNO_DOMAIN;
2227 else
2229 RETVAL_NEG_HUGE_VALL;
2230 NOT_MATHERRL {ERRNO_DOMAIN;}
2232 *(long double *)retval = excl.retval;
2233 break;
2235 case pow_zero_to_negative:
2236 /* 0**neg */
2238 DOMAIND; NAMED = (char *) "pow";
2239 ifSVID
2241 RETVAL_ZEROD;
2242 NOT_MATHERRD
2244 WRITED_POW_ZERO_TO_NEGATIVE;
2245 ERRNO_DOMAIN;
2248 else
2250 RETVAL_NEG_HUGE_VALD;
2251 NOT_MATHERRD {ERRNO_DOMAIN;}
2253 *(double *)retval = exc.retval;
2254 break;
2256 case powf_zero_to_negative:
2257 /* 0**neg */
2259 DOMAINF; NAMEF = (char *) "powf";
2260 ifSVID
2262 RETVAL_ZEROF;
2263 NOT_MATHERRF
2265 WRITEF_POW_ZERO_TO_NEGATIVE;
2266 ERRNO_DOMAIN;
2269 else
2271 RETVAL_NEG_HUGE_VALF;
2272 NOT_MATHERRF {ERRNO_DOMAIN;}
2274 *(float *)retval = excf.retval;
2275 break;
2277 case powl_neg_to_non_integer:
2278 /* neg**non_integral */
2280 DOMAINL; NAMEL = (char *) "powl";
2281 ifSVID
2283 RETVAL_ZEROL;
2284 NOT_MATHERRL
2286 WRITEL_POW_NEG_TO_NON_INTEGER;
2287 ERRNO_DOMAIN;
2290 else
2292 NOT_MATHERRL {ERRNO_DOMAIN;}
2294 *(long double *)retval = excl.retval;
2295 break;
2297 case pow_neg_to_non_integer:
2298 /* neg**non_integral */
2300 DOMAIND; NAMED = (char *) "pow";
2301 ifSVID
2303 RETVAL_ZEROD;
2304 NOT_MATHERRD
2306 WRITED_POW_NEG_TO_NON_INTEGER;
2307 ERRNO_DOMAIN;
2310 else
2312 NOT_MATHERRD {ERRNO_DOMAIN;}
2314 *(double *)retval = exc.retval;
2315 break;
2317 case powf_neg_to_non_integer:
2318 /* neg**non-integral */
2320 DOMAINF; NAMEF = (char *) "powf";
2321 ifSVID
2323 RETVAL_ZEROF;
2324 NOT_MATHERRF
2326 WRITEF_POW_NEG_TO_NON_INTEGER;
2327 ERRNO_DOMAIN;
2330 else
2332 NOT_MATHERRF {ERRNO_DOMAIN;}
2334 *(float *)retval = excf.retval;
2335 break;
2337 case powl_nan_to_zero:
2338 /* pow(NaN,0.0) */
2339 /* Special Error */
2341 DOMAINL; NAMEL = (char *) "powl";
2342 *(long double *)retval = *(long double *)arg1;
2343 NOT_MATHERRL {ERRNO_DOMAIN;}
2344 *(long double *)retval = excl.retval;
2345 break;
2347 case pow_nan_to_zero:
2348 /* pow(NaN,0.0) */
2349 /* Special Error */
2351 DOMAIND; NAMED = (char *) "pow";
2352 *(double *)retval = *(double *)arg1;
2353 NOT_MATHERRD {ERRNO_DOMAIN;}
2354 *(double *)retval = exc.retval;
2355 break;
2357 case powf_nan_to_zero:
2358 /* powf(NaN,0.0) */
2359 /* Special Error */
2361 DOMAINF; NAMEF = (char *) "powf";
2362 *(float *)retval = *(float *)arg1;
2363 NOT_MATHERRF {ERRNO_DOMAIN;}
2364 *(float *)retval = excf.retval;
2365 break;
2367 case atan2l_zero:
2368 /* atan2l(0.0,0.0) */
2370 DOMAINL; NAMEL = (char *) "atan2l";
2371 RETVAL_ZEROL;
2372 NOT_MATHERRL
2374 ifSVID
2376 WRITEL_ATAN2_ZERO_BY_ZERO;
2378 ERRNO_DOMAIN;
2380 *(long double *)retval = excl.retval;
2381 break;
2383 case atan2_zero:
2384 /* atan2(0.0,0.0) */
2386 DOMAIND; NAMED = (char *) "atan2";
2387 RETVAL_ZEROD;
2388 NOT_MATHERRD
2390 ifSVID
2392 WRITED_ATAN2_ZERO_BY_ZERO;
2394 ERRNO_DOMAIN;
2396 *(double *)retval = exc.retval;
2397 break;
2399 case atan2f_zero:
2400 /* atan2f(0.0,0.0) */
2402 DOMAINF; NAMEF = (char *) "atan2f";
2403 RETVAL_ZEROF;
2404 NOT_MATHERRF
2406 ifSVID
2408 WRITEF_ATAN2_ZERO_BY_ZERO;
2410 ERRNO_DOMAIN;
2412 *(float *)retval = excf.retval;
2413 break;
2415 case atan2dl_zero:
2416 /* atan2dl(0.0,0.0) */
2418 DOMAINL; NAMEL = (char *) "atan2dl";
2419 RETVAL_ZEROL;
2420 NOT_MATHERRL
2422 ifSVID
2424 WRITEL_ATAN2D_ZERO_BY_ZERO;
2426 ERRNO_DOMAIN;
2428 *(long double *)retval = excl.retval;
2429 break;
2431 case atan2d_zero:
2432 /* atan2d(0.0,0.0) */
2434 DOMAIND; NAMED = (char *) "atan2d";
2435 RETVAL_ZEROD;
2436 NOT_MATHERRD
2438 ifSVID
2440 WRITED_ATAN2D_ZERO_BY_ZERO;
2442 ERRNO_DOMAIN;
2444 *(double *)retval = exc.retval;
2445 break;
2447 case atan2df_zero:
2448 /* atan2df(0.0,0.0) */
2450 DOMAINF; NAMEF = (char *) "atan2df";
2451 RETVAL_ZEROF;
2452 NOT_MATHERRF
2454 ifSVID
2456 WRITEF_ATAN2D_ZERO_BY_ZERO;
2458 ERRNO_DOMAIN;
2460 *(float *)retval = excf.retval;
2461 break;
2463 case expm1_overflow:
2464 /* expm1(finite) overflow */
2465 /* Overflow is the only documented */
2466 /* special value. */
2468 ERRNO_RANGE;
2469 break;
2471 case expm1f_overflow:
2472 /* expm1f(finite) overflow */
2474 ERRNO_RANGE;
2475 break;
2477 case expm1_underflow:
2478 /* expm1(finite) underflow */
2479 /* Underflow is not documented */
2480 /* special value. */
2482 ERRNO_RANGE;
2483 break;
2485 case expm1f_underflow:
2486 /* expm1f(finite) underflow */
2488 ERRNO_RANGE;
2489 break;
2491 case scalbl_underflow:
2492 /* scalbl underflow */
2494 UNDERFLOWL; NAMEL = (char *) "scalbl";
2495 if (INPUT_XL < ZEROL_VALUE /*0.0L*/) RETVAL_NEG_ZEROL;
2496 else RETVAL_ZEROL;
2497 NOT_MATHERRL {ERRNO_RANGE;}
2498 *(long double *)retval = excl.retval;
2499 break;
2501 case scalb_underflow:
2502 /* scalb underflow */
2504 UNDERFLOWD; NAMED = (char *) "scalb";
2505 if (INPUT_XD < ZEROD_VALUE /*0.0*/) RETVAL_NEG_ZEROD;
2506 else RETVAL_ZEROD;
2507 NOT_MATHERRD {ERRNO_RANGE;}
2508 *(double *)retval = exc.retval;
2509 break;
2511 case scalbf_underflow:
2512 /* scalbf underflow */
2514 UNDERFLOWF; NAMEF = (char *) "scalbf";
2515 if (INPUT_XF < ZEROF_VALUE /*0.0*/) RETVAL_NEG_ZEROF;
2516 else RETVAL_ZEROF;
2517 NOT_MATHERRF {ERRNO_RANGE;}
2518 *(float *)retval = excf.retval;
2519 break;
2521 case scalbl_overflow:
2522 /* scalbl overflow */
2524 OVERFLOWL; NAMEL = (char *) "scalbl";
2525 if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
2526 else RETVAL_HUGE_VALL;
2527 NOT_MATHERRL {ERRNO_RANGE;}
2528 *(long double *)retval = excl.retval;
2529 break;
2531 case scalb_overflow:
2532 /* scalb overflow */
2534 OVERFLOWD; NAMED = (char *) "scalb";
2535 if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
2536 else RETVAL_HUGE_VALD;
2537 NOT_MATHERRD {ERRNO_RANGE;}
2538 *(double *)retval = exc.retval;
2539 break;
2541 case scalbf_overflow:
2542 /* scalbf overflow */
2544 OVERFLOWF; NAMEF = (char *) "scalbf";
2545 if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
2546 else RETVAL_HUGE_VALF;
2547 NOT_MATHERRF {ERRNO_RANGE;}
2548 *(float *)retval = excf.retval;
2549 break;
2551 case hypotl_overflow:
2552 /* hypotl overflow */
2554 OVERFLOWL; NAMEL = (char *) "hypotl";
2555 ifSVID
2557 RETVAL_HUGEL;
2559 else
2561 RETVAL_HUGE_VALL;
2563 NOT_MATHERRL {ERRNO_RANGE;}
2564 *(long double *)retval = excl.retval;
2565 break;
2567 case hypot_overflow:
2568 /* hypot overflow */
2570 OVERFLOWD; NAMED = (char *) "hypot";
2571 ifSVID
2573 RETVAL_HUGED;
2575 else
2577 RETVAL_HUGE_VALD;
2579 NOT_MATHERRD {ERRNO_RANGE;}
2580 *(double *)retval = exc.retval;
2581 break;
2583 case hypotf_overflow:
2584 /* hypotf overflow */
2586 OVERFLOWF; NAMEF = (char *) "hypotf";
2587 ifSVID
2589 RETVAL_HUGEF;
2591 else
2593 RETVAL_HUGE_VALF;
2595 NOT_MATHERRF {ERRNO_RANGE;}
2596 *(float *)retval = excf.retval;
2597 break;
2599 case acosl_gt_one:
2600 /* acosl(x > 1) */
2602 DOMAINL; NAMEL = (char *) "acosl";
2603 RETVAL_ZEROL;
2604 ifSVID
2606 NOT_MATHERRL
2608 WRITEL_ACOS;
2609 ERRNO_DOMAIN;
2612 else
2614 NOT_MATHERRL {ERRNO_DOMAIN;}
2616 *(long double *)retval = excl.retval;
2617 break;
2619 case acos_gt_one:
2620 /* acos(x > 1) */
2622 DOMAIND; NAMED = (char *) "acos";
2623 RETVAL_ZEROD;
2624 ifSVID
2626 NOT_MATHERRD
2628 WRITED_ACOS;
2629 ERRNO_DOMAIN;
2632 else
2634 NOT_MATHERRD {ERRNO_DOMAIN;}
2636 *(double *)retval = exc.retval;
2637 break;
2639 case acosf_gt_one:
2640 /* acosf(x > 1) */
2642 DOMAINF; NAMEF = (char *) "acosf";
2643 RETVAL_ZEROF;
2644 ifSVID
2646 NOT_MATHERRF
2648 WRITEF_ACOS;
2649 ERRNO_DOMAIN;
2652 else
2654 NOT_MATHERRF {ERRNO_DOMAIN;}
2656 *(float *)retval = excf.retval;
2657 break;
2659 case asinl_gt_one:
2660 /* asinl(x > 1) */
2662 DOMAINL; NAMEL = (char *) "asinl";
2663 RETVAL_ZEROL;
2664 ifSVID
2666 NOT_MATHERRL
2668 WRITEL_ASIN;
2669 ERRNO_DOMAIN;
2672 else
2674 NOT_MATHERRL {ERRNO_DOMAIN;}
2676 *(long double *)retval = excl.retval;
2677 break;
2679 case asin_gt_one:
2680 /* asin(x > 1) */
2682 DOMAIND; NAMED = (char *) "asin";
2683 RETVAL_ZEROD;
2684 ifSVID
2686 NOT_MATHERRD
2688 WRITED_ASIN;
2689 ERRNO_DOMAIN;
2692 else
2694 NOT_MATHERRD {ERRNO_DOMAIN;}
2696 *(double *)retval = exc.retval;
2697 break;
2699 case asinf_gt_one:
2700 /* asinf(x > 1) */
2702 DOMAINF; NAMEF = (char *) "asinf";
2703 RETVAL_ZEROF;
2704 ifSVID
2706 NOT_MATHERRF
2708 WRITEF_ASIN;
2709 ERRNO_DOMAIN;
2712 else
2714 NOT_MATHERRF {ERRNO_DOMAIN;}
2716 *(float *)retval = excf.retval;
2717 break;
2719 case acosdl_gt_one:
2720 /* acosdl(x > 1) */
2722 DOMAINL; NAMEL = (char *) "acosdl";
2723 RETVAL_ZEROL;
2724 ifSVID
2726 NOT_MATHERRL
2728 WRITEL_ACOSD;
2729 ERRNO_DOMAIN;
2732 else
2734 NOT_MATHERRL {ERRNO_DOMAIN;}
2736 *(long double *)retval = excl.retval;
2737 break;
2739 case acosd_gt_one:
2740 /* acosd(x > 1) */
2742 DOMAIND; NAMED = (char *) "acosd";
2743 RETVAL_ZEROD;
2744 ifSVID
2746 NOT_MATHERRD
2748 WRITED_ACOSD;
2749 ERRNO_DOMAIN;
2752 else
2754 NOT_MATHERRD {ERRNO_DOMAIN;}
2756 *(double *)retval = exc.retval;
2757 break;
2759 case acosdf_gt_one:
2760 /* acosdf(x > 1) */
2762 DOMAINF; NAMEF = (char *) "acosdf";
2763 RETVAL_ZEROF;
2764 ifSVID
2766 NOT_MATHERRF
2768 WRITEF_ACOSD;
2769 ERRNO_DOMAIN;
2772 else
2774 NOT_MATHERRF {ERRNO_DOMAIN;}
2776 *(float *)retval = excf.retval;
2777 break;
2779 case asindl_gt_one:
2780 /* asindl(x > 1) */
2782 DOMAINL; NAMEL = (char *) "asindl";
2783 RETVAL_ZEROL;
2784 ifSVID
2786 NOT_MATHERRL
2788 WRITEL_ASIND;
2789 ERRNO_DOMAIN;
2792 else
2794 NOT_MATHERRL {ERRNO_DOMAIN;}
2796 *(long double *)retval = excl.retval;
2797 break;
2799 case asind_gt_one:
2800 /* asind(x > 1) */
2802 DOMAIND; NAMED = (char *) "asind";
2803 RETVAL_ZEROD;
2804 ifSVID
2806 NOT_MATHERRD
2808 WRITED_ASIND;
2809 ERRNO_DOMAIN;
2812 else
2814 NOT_MATHERRD {ERRNO_DOMAIN;}
2816 *(double *)retval = exc.retval;
2817 break;
2819 case asindf_gt_one:
2820 /* asindf(x > 1) */
2822 DOMAINF; NAMEF = (char *) "asindf";
2823 RETVAL_ZEROF;
2824 ifSVID
2826 NOT_MATHERRF
2828 WRITEF_ASIND;
2829 ERRNO_DOMAIN;
2832 else
2834 NOT_MATHERRF {ERRNO_DOMAIN;}
2836 *(float *)retval = excf.retval;
2837 break;
2839 case coshl_overflow:
2840 /* coshl overflow */
2842 OVERFLOWL; NAMEL = (char *) "coshl";
2843 ifSVID
2845 RETVAL_HUGEL;
2847 else
2849 RETVAL_HUGE_VALL;
2851 NOT_MATHERRL {ERRNO_RANGE;}
2852 *(long double *)retval = excl.retval;
2853 break;
2855 case cosh_overflow:
2856 /* cosh overflow */
2858 OVERFLOWD; NAMED = (char *) "cosh";
2859 ifSVID
2861 RETVAL_HUGED;
2863 else
2865 RETVAL_HUGE_VALD;
2867 NOT_MATHERRD {ERRNO_RANGE;}
2868 *(double *)retval = exc.retval;
2869 break;
2871 case coshf_overflow:
2872 /* coshf overflow */
2874 OVERFLOWF; NAMEF = (char *) "coshf";
2875 ifSVID
2877 RETVAL_HUGEF;
2879 else
2881 RETVAL_HUGE_VALF;
2883 NOT_MATHERRF {ERRNO_RANGE;}
2884 *(float *)retval = excf.retval;
2885 break;
2887 case sinhl_overflow:
2888 /* sinhl overflow */
2890 OVERFLOWL; NAMEL = (char *) "sinhl";
2891 ifSVID
2893 if (INPUT_XL > ZEROL_VALUE /*0.0*/) RETVAL_HUGEL;
2894 else RETVAL_NEG_HUGEL;
2896 else
2898 if (INPUT_XL > ZEROL_VALUE /*0.0*/) RETVAL_HUGE_VALL;
2899 else RETVAL_NEG_HUGE_VALL;
2901 NOT_MATHERRL {ERRNO_RANGE;}
2902 *(long double *)retval = excl.retval;
2903 break;
2905 case sinh_overflow:
2906 /* sinh overflow */
2908 OVERFLOWD; NAMED = (char *) "sinh";
2909 ifSVID
2911 if (INPUT_XD > ZEROD_VALUE /*0.0*/) RETVAL_HUGED;
2912 else RETVAL_NEG_HUGED;
2914 else
2916 if (INPUT_XD > ZEROD_VALUE /*0.0*/) RETVAL_HUGE_VALD;
2917 else RETVAL_NEG_HUGE_VALD;
2919 NOT_MATHERRD {ERRNO_RANGE;}
2920 *(double *)retval = exc.retval;
2921 break;
2923 case sinhf_overflow:
2924 /* sinhf overflow */
2926 OVERFLOWF; NAMEF = (char *) "sinhf";
2927 ifSVID
2929 if (INPUT_XF > ZEROF_VALUE /*0.0*/) RETVAL_HUGEF;
2930 else RETVAL_NEG_HUGEF;
2932 else
2934 if (INPUT_XF > ZEROF_VALUE /*0.0*/) RETVAL_HUGE_VALF;
2935 else RETVAL_NEG_HUGE_VALF;
2937 NOT_MATHERRF {ERRNO_RANGE;}
2938 *(float *)retval = excf.retval;
2939 break;
2941 case acoshl_lt_one:
2942 /* acoshl(x < 1) */
2944 DOMAINL; NAMEL = (char *) "acoshl";
2945 ifSVID
2947 NOT_MATHERRL
2949 WRITEL_ACOSH;
2950 ERRNO_DOMAIN;
2953 else
2955 NOT_MATHERRL {ERRNO_DOMAIN;}
2957 *(long double *)retval = excl.retval;
2958 break;
2960 case acosh_lt_one:
2961 /* acosh(x < 1) */
2963 DOMAIND; NAMED = (char *) "acosh";
2964 ifSVID
2966 NOT_MATHERRD
2968 WRITED_ACOSH;
2969 ERRNO_DOMAIN;
2972 else
2974 NOT_MATHERRD {ERRNO_DOMAIN;}
2976 *(double *)retval = exc.retval;
2977 break;
2979 case acoshf_lt_one:
2980 /* acoshf(x < 1) */
2982 DOMAINF; NAMEF = (char *) "acoshf";
2983 ifSVID
2985 NOT_MATHERRF
2987 WRITEF_ACOSH;
2988 ERRNO_DOMAIN;
2991 else
2993 NOT_MATHERRF {ERRNO_DOMAIN;}
2995 *(float *)retval = excf.retval;
2996 break;
2998 case atanhl_gt_one:
2999 /* atanhl(|x| > 1) */
3001 DOMAINL; NAMEL = (char *) "atanhl";
3002 ifSVID
3004 NOT_MATHERRL
3006 WRITEL_ATANH_GT_ONE;
3007 ERRNO_DOMAIN;
3010 else
3012 NOT_MATHERRL {ERRNO_DOMAIN;}
3014 break;
3016 case atanh_gt_one:
3017 /* atanh(|x| > 1) */
3019 DOMAIND; NAMED = (char *) "atanh";
3020 ifSVID
3022 NOT_MATHERRD
3024 WRITED_ATANH_GT_ONE;
3025 ERRNO_DOMAIN;
3028 else
3030 NOT_MATHERRD {ERRNO_DOMAIN;}
3032 break;
3034 case atanhf_gt_one:
3035 /* atanhf(|x| > 1) */
3037 DOMAINF; NAMEF = (char *) "atanhf";
3038 ifSVID
3040 NOT_MATHERRF
3042 WRITEF_ATANH_GT_ONE;
3043 ERRNO_DOMAIN;
3046 else
3048 NOT_MATHERRF {ERRNO_DOMAIN;}
3050 break;
3052 case atanhl_eq_one:
3053 /* atanhl(|x| == 1) */
3055 SINGL; NAMEL = (char *) "atanhl";
3056 ifSVID
3058 NOT_MATHERRL
3060 WRITEL_ATANH_EQ_ONE;
3061 ERRNO_DOMAIN;
3064 else
3066 NOT_MATHERRL {ERRNO_DOMAIN;}
3068 break;
3070 case atanh_eq_one:
3071 /* atanh(|x| == 1) */
3073 SINGD; NAMED = (char *) "atanh";
3074 ifSVID
3076 NOT_MATHERRD
3078 WRITED_ATANH_EQ_ONE;
3079 ERRNO_DOMAIN;
3082 else
3084 NOT_MATHERRD {ERRNO_DOMAIN;}
3086 break;
3088 case atanhf_eq_one:
3089 /* atanhf(|x| == 1) */
3091 SINGF; NAMEF = (char *) "atanhf";
3092 ifSVID
3094 NOT_MATHERRF
3096 WRITEF_ATANH_EQ_ONE;
3097 ERRNO_DOMAIN;
3100 else
3102 NOT_MATHERRF {ERRNO_DOMAIN;}
3104 break;
3106 case gammal_overflow:
3107 /* gammal overflow */
3109 OVERFLOWL; NAMEL = (char *) "gammal";
3110 ifSVID
3112 RETVAL_HUGEL;
3114 else
3116 RETVAL_HUGE_VALL;
3118 NOT_MATHERRL {ERRNO_RANGE;}
3119 *(long double *)retval = excl.retval;
3120 break;
3122 case gamma_overflow:
3123 /* gamma overflow */
3125 OVERFLOWD; NAMED = (char *) "gamma";
3126 ifSVID
3128 RETVAL_HUGED;
3130 else
3132 RETVAL_HUGE_VALD;
3134 NOT_MATHERRD {ERRNO_RANGE;}
3135 *(double *)retval = exc.retval;
3136 break;
3138 case gammaf_overflow:
3139 /* gammaf overflow */
3141 OVERFLOWF; NAMEF = (char *) "gammaf";
3142 ifSVID
3144 RETVAL_HUGEF;
3146 else
3148 RETVAL_HUGE_VALF;
3150 NOT_MATHERRF {ERRNO_RANGE;}
3151 *(float *)retval = excf.retval;
3152 break;
3154 case gammal_negative:
3155 /* gammal -int or 0 */
3157 SINGL; NAMEL = (char *) "gammal";
3158 ifSVID
3160 RETVAL_HUGEL;
3161 NOT_MATHERRL
3163 WRITEL_GAMMA_NEGATIVE;
3164 ERRNO_DOMAIN;
3167 else
3169 RETVAL_HUGE_VALL;
3170 NOT_MATHERRL {ERRNO_DOMAIN;}
3172 *(long double *)retval = excl.retval;
3173 break;
3175 case gamma_negative:
3176 /* gamma -int or 0 */
3178 SINGD; NAMED = (char *) "gamma";
3179 ifSVID
3181 RETVAL_HUGED;
3182 NOT_MATHERRD
3184 WRITED_GAMMA_NEGATIVE;
3185 ERRNO_DOMAIN;
3188 else
3190 RETVAL_HUGE_VALD;
3191 NOT_MATHERRD {ERRNO_DOMAIN;}
3193 *(double *)retval = exc.retval;
3194 break;
3196 case gammaf_negative:
3197 /* gammaf -int or 0 */
3199 SINGF; NAMEF = (char *) "gammaf";
3200 ifSVID
3202 RETVAL_HUGEF;
3203 NOT_MATHERRF
3205 WRITEF_GAMMA_NEGATIVE;
3206 ERRNO_DOMAIN;
3209 else
3211 RETVAL_HUGE_VALF;
3212 NOT_MATHERRF {ERRNO_DOMAIN;}
3214 *(float *)retval = excf.retval;
3215 break;
3217 case lgammal_overflow:
3218 /* lgammal overflow */
3220 OVERFLOWL; NAMEL = (char *) "lgammal";
3221 ifSVID
3223 RETVAL_HUGEL;
3225 else
3227 RETVAL_HUGE_VALL;
3229 NOT_MATHERRL {ERRNO_RANGE;}
3230 *(long double *)retval = excl.retval;
3231 break;
3233 case lgamma_overflow:
3234 /* lgamma overflow */
3236 OVERFLOWD; NAMED = (char *) "lgamma";
3237 ifSVID
3239 RETVAL_HUGED;
3241 else
3243 RETVAL_HUGE_VALD;
3245 NOT_MATHERRD {ERRNO_RANGE;}
3246 *(double *)retval = exc.retval;
3247 break;
3249 case lgammaf_overflow:
3250 /* lgammaf overflow */
3252 OVERFLOWF; NAMEF = (char *) "lgammaf";
3253 ifSVID
3255 RETVAL_HUGEF;
3257 else
3259 RETVAL_HUGE_VALF;
3261 NOT_MATHERRF {ERRNO_RANGE;}
3262 *(float *)retval = excf.retval;
3263 break;
3265 case lgammal_negative:
3266 /* lgammal -int or 0 */
3268 SINGL; NAMEL = (char *) "lgammal";
3269 ifSVID
3271 RETVAL_HUGEL;
3272 NOT_MATHERRL
3274 WRITEL_LGAMMA_NEGATIVE;
3275 ERRNO_DOMAIN;
3278 else
3280 RETVAL_HUGE_VALL;
3281 NOT_MATHERRL {ERRNO_DOMAIN;}
3283 *(long double *)retval = excl.retval;
3284 break;
3286 case lgamma_negative:
3287 /* lgamma -int or 0 */
3289 SINGD; NAMED = (char *) "lgamma";
3290 ifSVID
3292 RETVAL_HUGED;
3293 NOT_MATHERRD
3295 WRITED_LGAMMA_NEGATIVE;
3296 ERRNO_DOMAIN;
3299 else
3301 RETVAL_HUGE_VALD;
3302 NOT_MATHERRD {ERRNO_DOMAIN;}
3304 *(double *)retval = exc.retval;
3305 break;
3307 case lgammaf_negative:
3308 /* lgammaf -int or 0 */
3310 SINGF; NAMEF = (char *) "lgammaf";
3311 ifSVID
3313 RETVAL_HUGEF;
3314 NOT_MATHERRF
3316 WRITEF_LGAMMA_NEGATIVE;
3317 ERRNO_DOMAIN;
3320 else
3322 RETVAL_HUGE_VALF;
3323 NOT_MATHERRF {ERRNO_DOMAIN;}
3325 *(float *)retval = excf.retval;
3326 break;
3328 case tgammal_overflow:
3329 /* tgammal overflow */
3331 OVERFLOWL; NAMEL = (char *) "tgammal";
3332 ifSVID
3334 RETVAL_HUGEL;
3336 else
3338 RETVAL_HUGE_VALL;
3340 NOT_MATHERRL {ERRNO_RANGE;}
3341 *(long double *)retval = excl.retval;
3342 break;
3344 case tgamma_overflow:
3345 /* tgamma overflow */
3347 OVERFLOWD; NAMED = (char *) "tgamma";
3348 ifSVID
3350 RETVAL_HUGED;
3352 else
3354 RETVAL_HUGE_VALD;
3356 NOT_MATHERRD {ERRNO_RANGE;}
3357 *(double *)retval = exc.retval;
3358 break;
3360 case tgammaf_overflow:
3361 /* tgammaf overflow */
3363 OVERFLOWF; NAMEF = (char *) "tgammaf";
3364 ifSVID
3366 RETVAL_HUGEF;
3368 else
3370 RETVAL_HUGE_VALF;
3372 NOT_MATHERRF {ERRNO_RANGE;}
3373 *(float *)retval = excf.retval;
3374 break;
3376 case tgammal_negative:
3377 /* tgammal -int or 0 */
3379 SINGL; NAMEL = (char *) "tgammal";
3380 ifSVID
3382 NOT_MATHERRL
3384 WRITEL_TGAMMA_NEGATIVE;
3385 ERRNO_DOMAIN;
3388 else
3390 NOT_MATHERRL {ERRNO_DOMAIN;}
3392 *(long double *)retval = excl.retval;
3393 break;
3395 case tgamma_negative:
3396 /* tgamma -int or 0 */
3398 SINGD; NAMED = (char *) "tgamma";
3399 ifSVID
3401 NOT_MATHERRD
3403 WRITED_TGAMMA_NEGATIVE;
3404 ERRNO_DOMAIN;
3407 else
3409 NOT_MATHERRD {ERRNO_DOMAIN;}
3411 *(double *)retval = exc.retval;
3412 break;
3414 case tgammaf_negative:
3415 /* tgammaf -int or 0 */
3417 SINGF; NAMEF = (char *) "tgammaf";
3418 ifSVID
3420 NOT_MATHERRF
3422 WRITEF_TGAMMA_NEGATIVE;
3423 ERRNO_DOMAIN;
3426 else
3428 NOT_MATHERRF {ERRNO_DOMAIN;}
3430 *(float *)retval = excf.retval;
3431 break;
3433 case j0l_gt_loss:
3434 /* j0l > loss */
3436 TLOSSL; NAMEL = (char *) "j0l";
3437 RETVAL_ZEROL;
3438 ifSVID
3440 NOT_MATHERRL
3442 WRITEL_J0_TLOSS;
3443 ERRNO_RANGE;
3446 else
3448 NOT_MATHERRL {ERRNO_RANGE;}
3450 *(long double *)retval = excl.retval;
3451 break;
3453 case j0_gt_loss:
3454 /* j0 > loss */
3456 TLOSSD; NAMED = (char *) "j0";
3457 RETVAL_ZEROD;
3458 ifSVID
3460 NOT_MATHERRD
3462 WRITED_J0_TLOSS;
3463 ERRNO_RANGE;
3466 else
3468 NOT_MATHERRD {ERRNO_RANGE;}
3470 *(double*)retval = exc.retval;
3471 break;
3473 case j0f_gt_loss:
3474 /* j0f > loss */
3476 TLOSSF; NAMEF = (char *) "j0f";
3477 RETVAL_ZEROF;
3478 ifSVID
3480 NOT_MATHERRF
3482 WRITEF_J0_TLOSS;
3483 ERRNO_RANGE;
3486 else
3488 NOT_MATHERRF {ERRNO_RANGE;}
3490 *(float*)retval = excf.retval;
3491 break;
3493 case j1l_gt_loss:
3494 /* j1l > loss */
3496 TLOSSL; NAMEL = (char *) "j1l";
3497 RETVAL_ZEROL;
3498 ifSVID
3500 NOT_MATHERRL
3502 WRITEL_J1_TLOSS;
3503 ERRNO_RANGE;
3506 else
3508 NOT_MATHERRL {ERRNO_RANGE;}
3510 *(long double *)retval = excl.retval;
3511 break;
3513 case j1_gt_loss:
3514 /* j1 > loss */
3516 TLOSSD; NAMED = (char *) "j1";
3517 RETVAL_ZEROD;
3518 ifSVID
3520 NOT_MATHERRD
3522 WRITED_J1_TLOSS;
3523 ERRNO_RANGE;
3526 else
3528 NOT_MATHERRD {ERRNO_RANGE;}
3530 *(double*)retval = exc.retval;
3531 break;
3533 case j1f_gt_loss:
3534 /* j1f > loss */
3536 TLOSSF; NAMEF = (char *) "j1f";
3537 RETVAL_ZEROF;
3538 ifSVID
3540 NOT_MATHERRF
3542 WRITEF_J1_TLOSS;
3543 ERRNO_RANGE;
3546 else
3548 NOT_MATHERRF {ERRNO_RANGE;}
3550 *(float*)retval = excf.retval;
3551 break;
3553 case jnl_gt_loss:
3554 /* jnl > loss */
3556 TLOSSL; NAMEL = (char *) "jnl";
3557 RETVAL_ZEROL;
3558 ifSVID
3560 NOT_MATHERRL
3562 WRITEL_JN_TLOSS;
3563 ERRNO_RANGE;
3566 else
3568 NOT_MATHERRL {ERRNO_RANGE;}
3570 *(long double *)retval = excl.retval;
3571 break;
3573 case jn_gt_loss:
3574 /* jn > loss */
3576 TLOSSD; NAMED = (char *) "jn";
3577 RETVAL_ZEROD;
3578 ifSVID
3580 NOT_MATHERRD
3582 WRITED_JN_TLOSS;
3583 ERRNO_RANGE;
3586 else
3588 NOT_MATHERRD {ERRNO_RANGE;}
3590 *(double*)retval = exc.retval;
3591 break;
3593 case jnf_gt_loss:
3594 /* jnf > loss */
3596 TLOSSF; NAMEF = (char *) "jnf";
3597 RETVAL_ZEROF;
3598 ifSVID
3600 NOT_MATHERRF
3602 WRITEF_JN_TLOSS;
3603 ERRNO_RANGE;
3606 else
3608 NOT_MATHERRF {ERRNO_RANGE;}
3610 *(float*)retval = excf.retval;
3611 break;
3613 case y0l_gt_loss:
3614 /* y0l > loss */
3616 TLOSSL; NAMEL = (char *) "y0l";
3617 RETVAL_ZEROL;
3618 ifSVID
3620 NOT_MATHERRL
3622 WRITEL_Y0_TLOSS;
3623 ERRNO_RANGE;
3626 else
3628 NOT_MATHERRL {ERRNO_RANGE;}
3630 *(long double *)retval = excl.retval;
3631 break;
3633 case y0_gt_loss:
3634 /* y0 > loss */
3636 TLOSSD; NAMED = (char *) "y0";
3637 RETVAL_ZEROD;
3638 ifSVID
3640 NOT_MATHERRD
3642 WRITED_Y0_TLOSS;
3643 ERRNO_RANGE;
3646 else
3648 NOT_MATHERRD {ERRNO_RANGE;}
3650 *(double*)retval = exc.retval;
3651 break;
3653 case y0f_gt_loss:
3654 /* y0f > loss */
3656 TLOSSF; NAMEF = (char *) "y0f";
3657 RETVAL_ZEROF;
3658 ifSVID
3660 NOT_MATHERRF
3662 WRITEF_Y0_TLOSS;
3663 ERRNO_RANGE;
3666 else
3668 NOT_MATHERRF {ERRNO_RANGE;}
3670 *(float*)retval = excf.retval;
3671 break;
3673 case y0l_zero:
3674 /* y0l(0) */
3676 DOMAINL; NAMEL = (char *) "y0l";
3677 ifSVID
3679 RETVAL_NEG_HUGEL;
3680 NOT_MATHERRL
3682 WRITEL_Y0_ZERO;
3683 ERRNO_DOMAIN;
3686 else
3688 RETVAL_NEG_HUGE_VALL;
3689 NOT_MATHERRL {ERRNO_DOMAIN;}
3691 *(long double *)retval = excl.retval;
3692 break;
3694 case y0_zero:
3695 /* y0(0) */
3697 DOMAIND; NAMED = (char *) "y0";
3698 ifSVID
3700 RETVAL_NEG_HUGED;
3701 NOT_MATHERRD
3703 WRITED_Y0_ZERO;
3704 ERRNO_DOMAIN;
3707 else
3709 RETVAL_NEG_HUGE_VALD;
3710 NOT_MATHERRD {ERRNO_DOMAIN;}
3712 *(double *)retval = exc.retval;
3713 break;
3715 case y0f_zero:
3716 /* y0f(0) */
3718 DOMAINF; NAMEF = (char *) "y0f";
3719 ifSVID
3721 RETVAL_NEG_HUGEF;
3722 NOT_MATHERRF
3724 WRITEF_Y0_ZERO;
3725 ERRNO_DOMAIN;
3728 else
3730 RETVAL_NEG_HUGE_VALF;
3731 NOT_MATHERRF {ERRNO_DOMAIN;}
3733 *(float *)retval = excf.retval;
3734 break;
3736 case y1l_gt_loss:
3737 /* y1l > loss */
3739 TLOSSL; NAMEL = (char *) "y1l";
3740 RETVAL_ZEROL;
3741 ifSVID
3743 NOT_MATHERRL
3745 WRITEL_Y1_TLOSS;
3746 ERRNO_RANGE;
3749 else
3751 NOT_MATHERRL {ERRNO_RANGE;}
3753 *(long double *)retval = excl.retval;
3754 break;
3756 case y1_gt_loss:
3757 /* y1 > loss */
3759 TLOSSD; NAMED = (char *) "y1";
3760 RETVAL_ZEROD;
3761 ifSVID
3763 NOT_MATHERRD
3765 WRITED_Y1_TLOSS;
3766 ERRNO_RANGE;
3769 else
3771 NOT_MATHERRD {ERRNO_RANGE;}
3773 *(double*)retval = exc.retval;
3774 break;
3776 case y1f_gt_loss:
3777 /* y1f > loss */
3779 TLOSSF; NAMEF = (char *) "y1f";
3780 RETVAL_ZEROF;
3781 ifSVID
3783 NOT_MATHERRF
3785 WRITEF_Y1_TLOSS;
3786 ERRNO_RANGE;
3789 else
3791 NOT_MATHERRF {ERRNO_RANGE;}
3793 *(float*)retval = excf.retval;
3794 break;
3796 case y1l_zero:
3797 /* y1l(0) */
3799 DOMAINL; NAMEL = (char *) "y1l";
3800 ifSVID
3802 RETVAL_NEG_HUGEL;
3803 NOT_MATHERRL
3805 WRITEL_Y1_ZERO;
3806 ERRNO_DOMAIN;
3809 else
3811 RETVAL_NEG_HUGE_VALL;
3812 NOT_MATHERRL {ERRNO_DOMAIN;}
3814 *(long double *)retval = excl.retval;
3815 break;
3817 case y1_zero:
3818 /* y1(0) */
3820 DOMAIND; NAMED = (char *) "y1";
3821 ifSVID
3823 RETVAL_NEG_HUGED;
3824 NOT_MATHERRD
3826 WRITED_Y1_ZERO;
3827 ERRNO_DOMAIN;
3830 else
3832 RETVAL_NEG_HUGE_VALD;
3833 NOT_MATHERRD {ERRNO_DOMAIN;}
3835 *(double *)retval = exc.retval;
3836 break;
3838 case y1f_zero:
3839 /* y1f(0) */
3841 DOMAINF; NAMEF = (char *) "y1f";
3842 ifSVID
3844 RETVAL_NEG_HUGEF;
3845 NOT_MATHERRF
3847 WRITEF_Y1_ZERO;
3848 ERRNO_DOMAIN;
3851 else
3853 RETVAL_NEG_HUGE_VALF;
3854 NOT_MATHERRF {ERRNO_DOMAIN;}
3856 *(float *)retval = excf.retval;
3857 break;
3859 case ynl_gt_loss:
3860 /* ynl > loss */
3862 TLOSSL; NAMEL = (char *) "ynl";
3863 RETVAL_ZEROL;
3864 ifSVID
3866 NOT_MATHERRL
3868 WRITEL_YN_TLOSS;
3869 ERRNO_RANGE;
3872 else
3874 NOT_MATHERRL {ERRNO_RANGE;}
3876 *(long double *)retval = excl.retval;
3877 break;
3879 case yn_gt_loss:
3880 /* yn > loss */
3882 TLOSSD; NAMED = (char *) "yn";
3883 RETVAL_ZEROD;
3884 ifSVID
3886 NOT_MATHERRD
3888 WRITED_YN_TLOSS;
3889 ERRNO_RANGE;
3892 else
3894 NOT_MATHERRD {ERRNO_RANGE;}
3896 *(double*)retval = exc.retval;
3897 break;
3899 case ynf_gt_loss:
3900 /* ynf > loss */
3902 TLOSSF; NAMEF = (char *) "ynf";
3903 RETVAL_ZEROF;
3904 ifSVID
3906 NOT_MATHERRF
3908 WRITEF_YN_TLOSS;
3909 ERRNO_RANGE;
3912 else
3914 NOT_MATHERRF {ERRNO_RANGE;}
3916 *(float*)retval = excf.retval;
3917 break;
3919 case ynl_zero:
3920 /* ynl(0) */
3922 DOMAINL; NAMEL = (char *) "ynl";
3923 ifSVID
3925 RETVAL_NEG_HUGEL;
3926 NOT_MATHERRL
3928 WRITEL_YN_ZERO;
3929 ERRNO_DOMAIN;
3932 else
3934 RETVAL_NEG_HUGE_VALL;
3935 NOT_MATHERRL {ERRNO_DOMAIN;}
3937 *(long double *)retval = excl.retval;
3938 break;
3940 case yn_zero:
3941 /* yn(0) */
3943 DOMAIND; NAMED = (char *) "yn";
3944 ifSVID
3946 RETVAL_NEG_HUGED;
3947 NOT_MATHERRD
3949 WRITED_YN_ZERO;
3950 ERRNO_DOMAIN;
3953 else
3955 RETVAL_NEG_HUGE_VALD;
3956 NOT_MATHERRD {ERRNO_DOMAIN;}
3958 *(double *)retval = exc.retval;
3959 break;
3961 case ynf_zero:
3962 /* ynf(0) */
3964 DOMAINF; NAMEF = (char *) "ynf";
3965 ifSVID
3967 RETVAL_NEG_HUGEF;
3968 NOT_MATHERRF
3970 WRITEF_YN_ZERO;
3971 ERRNO_DOMAIN;
3974 else
3976 RETVAL_NEG_HUGE_VALF;
3977 NOT_MATHERRF {ERRNO_DOMAIN;}
3979 *(float *)retval = excf.retval;
3980 break;
3982 case y0l_negative:
3983 /* y0l(x<0) */
3985 DOMAINL; NAMEL = (char *) "y0l";
3986 ifSVID
3988 RETVAL_NEG_HUGEL;
3989 NOT_MATHERRL
3991 WRITEL_Y0_NEGATIVE;
3992 ERRNO_DOMAIN;
3995 else
3997 RETVAL_NEG_HUGE_VALL;
3998 NOT_MATHERRL {ERRNO_DOMAIN;}
4000 *(long double *)retval = excl.retval;
4001 break;
4003 case y0_negative:
4004 /* y0(x<0) */
4006 DOMAIND; NAMED = (char *) "y0";
4007 ifSVID
4009 RETVAL_NEG_HUGED;
4010 NOT_MATHERRD
4012 WRITED_Y0_NEGATIVE;
4013 ERRNO_DOMAIN;
4016 else
4018 RETVAL_NEG_HUGE_VALD;
4019 NOT_MATHERRD {ERRNO_DOMAIN;}
4021 *(double *)retval = exc.retval;
4022 break;
4024 case y0f_negative:
4025 /* y0f(x<0) */
4027 DOMAINF; NAMEF = (char *) "y0f";
4028 ifSVID
4030 RETVAL_NEG_HUGEF;
4031 NOT_MATHERRF
4033 WRITEF_Y0_NEGATIVE;
4034 ERRNO_DOMAIN;
4037 else
4039 RETVAL_NEG_HUGE_VALF;
4040 NOT_MATHERRF {ERRNO_DOMAIN;}
4042 *(float *)retval = excf.retval;
4043 break;
4045 case y1l_negative:
4046 /* y1l(x<0) */
4048 DOMAINL; NAMEL = (char *) "y1l";
4049 ifSVID
4051 RETVAL_NEG_HUGEL;
4052 NOT_MATHERRL
4054 WRITEL_Y1_NEGATIVE;
4055 ERRNO_DOMAIN;
4058 else
4060 RETVAL_NEG_HUGE_VALL;
4061 NOT_MATHERRL {ERRNO_DOMAIN;}
4063 *(long double *)retval = excl.retval;
4064 break;
4066 case y1_negative:
4067 /* y1(x<0) */
4069 DOMAIND; NAMED = (char *) "y1";
4070 ifSVID
4072 RETVAL_NEG_HUGED;
4073 NOT_MATHERRD
4075 WRITED_Y1_NEGATIVE;
4076 ERRNO_DOMAIN;
4079 else
4081 RETVAL_NEG_HUGE_VALD;
4082 NOT_MATHERRD {ERRNO_DOMAIN;}
4084 *(double *)retval = exc.retval;
4085 break;
4087 case y1f_negative:
4088 /* y1f(x<0) */
4090 DOMAINF; NAMEF = (char *) "y1f";
4091 ifSVID
4093 RETVAL_NEG_HUGEF;
4094 NOT_MATHERRF
4096 WRITEF_Y1_NEGATIVE;
4097 ERRNO_DOMAIN;
4100 else
4102 RETVAL_NEG_HUGE_VALF;
4103 NOT_MATHERRF {ERRNO_DOMAIN;}
4105 *(float *)retval = excf.retval;
4106 break;
4108 case ynl_negative:
4109 /* ynl(x<0) */
4111 DOMAINL; NAMEL = (char *) "ynl";
4112 ifSVID
4114 RETVAL_NEG_HUGEL;
4115 NOT_MATHERRL
4117 WRITEL_YN_NEGATIVE;
4118 ERRNO_DOMAIN;
4121 else
4123 RETVAL_NEG_HUGE_VALL;
4124 NOT_MATHERRL {ERRNO_DOMAIN;}
4126 *(long double *)retval = excl.retval;
4127 break;
4129 case yn_negative:
4130 /* yn(x<0) */
4132 DOMAIND; NAMED = (char *) "yn";
4133 ifSVID
4135 RETVAL_NEG_HUGED;
4136 NOT_MATHERRD
4138 WRITED_YN_NEGATIVE;
4139 ERRNO_DOMAIN;
4142 else
4144 RETVAL_NEG_HUGE_VALD;
4145 NOT_MATHERRD {ERRNO_DOMAIN;}
4147 *(double *)retval = exc.retval;
4148 break;
4150 case ynf_negative:
4151 /* ynf(x<0) */
4153 DOMAINF; NAMEF = (char *) "ynf";
4154 ifSVID
4156 RETVAL_NEG_HUGEF;
4157 NOT_MATHERRF
4159 WRITEF_YN_NEGATIVE;
4160 ERRNO_DOMAIN;
4163 else
4165 RETVAL_NEG_HUGE_VALF;
4166 NOT_MATHERRF {ERRNO_DOMAIN;}
4168 *(float *)retval = excf.retval;
4169 break;
4171 case fmodl_by_zero:
4172 /* fmodl(x,0) */
4174 DOMAINL; NAMEL = (char *) "fmodl";
4175 ifSVID
4177 *(long double *)retval = *(long double *)arg1;
4178 NOT_MATHERRL
4180 WRITEL_FMOD;
4181 ERRNO_DOMAIN;
4184 else
4185 { /* NaN already computed */
4186 NOT_MATHERRL {ERRNO_DOMAIN;}
4188 *(long double *)retval = excl.retval;
4189 break;
4191 case fmod_by_zero:
4192 /* fmod(x,0) */
4194 DOMAIND; NAMED = (char *) "fmod";
4195 ifSVID
4197 *(double *)retval = *(double *)arg1;
4198 NOT_MATHERRD
4200 WRITED_FMOD;
4201 ERRNO_DOMAIN;
4204 else
4205 { /* NaN already computed */
4206 NOT_MATHERRD {ERRNO_DOMAIN;}
4208 *(double *)retval = exc.retval;
4209 break;
4211 case fmodf_by_zero:
4212 /* fmodf(x,0) */
4214 DOMAINF; NAMEF = (char *) "fmodf";
4215 ifSVID
4217 *(float *)retval = *(float *)arg1;
4218 NOT_MATHERRF
4220 WRITEF_FMOD;
4221 ERRNO_DOMAIN;
4224 else
4226 NOT_MATHERRF {ERRNO_DOMAIN;}
4228 *(float *)retval = excf.retval;
4229 break;
4231 case remainderl_by_zero:
4232 /* remainderl(x,0) */
4234 DOMAINL; NAMEL = (char *) "remainderl";
4235 ifSVID
4237 NOT_MATHERRL
4239 WRITEL_REM;
4240 ERRNO_DOMAIN;
4243 else
4244 { /* NaN already computed */
4245 NOT_MATHERRL {ERRNO_DOMAIN;}
4247 *(long double *)retval = excl.retval;
4248 break;
4250 case remainder_by_zero:
4251 /* remainder(x,0) */
4253 DOMAIND; NAMED = (char *) "remainder";
4254 ifSVID
4256 NOT_MATHERRD
4258 WRITED_REM;
4259 ERRNO_DOMAIN;
4262 else
4263 { /* NaN already computed */
4264 NOT_MATHERRD {ERRNO_DOMAIN;}
4266 *(double *)retval = exc.retval;
4267 break;
4269 case remainderf_by_zero:
4270 /* remainderf(x,0) */
4272 DOMAINF; NAMEF = (char *) "remainderf";
4273 ifSVID
4275 NOT_MATHERRF
4277 WRITEF_REM;
4278 ERRNO_DOMAIN;
4281 else
4283 NOT_MATHERRF {ERRNO_DOMAIN;}
4285 *(float *)retval = excf.retval;
4286 break;
4288 default:
4289 /* We don't want to abort () since SVID doesn't cover all math
4290 library functions. */
4291 break;
4293 return;