1 /* file: libm_error.c */
2
3
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:
11 //
12 // * Redistributions of source code must retain the above copyright
13 // notice, this list of conditions and the following disclaimer.
14 //
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.
18 //
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.
22
23 //
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.
35 //
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.
39 //
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.
88
89 #include <errno.h>
90 #include <stdio.h>
91 #include <stdlib.h>
92 #include "libm_support.h"
93 #include <math-svid-compat.h>
94
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
119
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;
126
__libm_setusermatherrf(int (* user_merrf)(struct exceptionf *))127 void __libm_setusermatherrf( int(*user_merrf)(struct exceptionf*) )
128 { pmatherrf = ( (user_merrf==NULL)? (MATHERR_F) : (user_merrf) ); }
129
__libm_setusermatherr(int (* user_merr)(struct EXC_DECL_D *))130 void __libm_setusermatherr( int(*user_merr)(struct EXC_DECL_D*) )
131 { pmatherr = ( (user_merr==NULL)? (MATHERR_D) : (user_merr) ); }
132
__libm_setusermatherrl(int (* user_merrl)(struct exceptionl *))133 void __libm_setusermatherrl( int(*user_merrl)(struct exceptionl*) )
134 { pmatherrl = ( (user_merrl==NULL)? (matherrl) : (user_merrl) ); }
135
136 #endif /* !_LIBC */
137
138 /***********************************************/
139 /* error-handling function, libm_error_support */
140 /***********************************************/
__libm_error_support(void * arg1,void * arg2,void * retval,error_types input_tag)141 void __libm_error_support(void *arg1,void *arg2,void *retval,error_types input_tag)
142 {
143
144 # ifdef __cplusplus
145 struct __exception exc;
146 # else
147 struct exception exc;
148 # endif
149
150 struct exceptionf excf;
151 struct exceptionl excl;
152
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
160
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
170
171
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, \
178 }
179
180 #define DECL_FLOAT(var, bytes...) \
181 _DECL_NUM (float, float_, var, ##bytes)
182
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});
189
190 #define DECL_DOUBLE(var, bytes...) \
191 _DECL_NUM (double, double_, var, ##bytes)
192
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});
203
204 #define DECL_LONG_DOUBLE(var, bytes...) \
205 _DECL_NUM (long double, long_double_, var, ##bytes)
206
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});
217
218
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
223
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
228
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
233
234 #define ZEROL_VALUE long_double_zero.num
235 #define ZEROD_VALUE double_zero.num
236 #define ZEROF_VALUE float_zero.num
237
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
241
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
245
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
249
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))
253
254 #define ifSVID if(_LIB_VERSIONIMF==_SVID_)
255
256 #define NAMEL excl.name
257 #define NAMED exc.name
258 #define NAMEF excf.name
259
260 //
261 // These should work OK for MS because they are ints -
262 // leading underbars are not necessary.
263 //
264
265 #define DOMAIN 1
266 #define SING 2
267 #define OVERFLOW 3
268 #define UNDERFLOW 4
269 #define TLOSS 5
270 #define PLOSS 6
271
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
287
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)
298
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)
413
414
415 /***********************/
416 /* IEEE Path */
417 /***********************/
418 if(_LIB_VERSIONIMF==_IEEE_) return;
419
420 /***********************/
421 /* C9X Path */
422 /***********************/
423 else if(_LIB_VERSIONIMF==_ISOC_)
424 {
425 switch(input_tag)
426 {
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:
541 {
542 ERRNO_RANGE; break;
543 }
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:
555 {
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;
560 }
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:
572 {
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;
577 }
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:
589 {
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;
594 }
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:
679 {
680 ERRNO_DOMAIN; break;
681 }
682 default:
683 break;
684 }
685 return;
686 }
687
688 /***********************/
689 /* _POSIX_ Path */
690 /***********************/
691
692 else if(_LIB_VERSIONIMF==_POSIX_)
693 {
694 switch(input_tag)
695 {
696 case gammal_overflow:
697 case lgammal_overflow:
698 case tgammal_overflow:
699 {
700 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
701 }
702 case gamma_overflow:
703 case lgamma_overflow:
704 case tgamma_overflow:
705 {
706 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
707 }
708 case gammaf_overflow:
709 case lgammaf_overflow:
710 case tgammaf_overflow:
711 {
712 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
713 }
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:
723 {
724 ERRNO_DOMAIN; break;
725 }
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:
768 {
769 ERRNO_RANGE; break;
770 }
771 case atanhl_gt_one:
772 case atanhl_eq_one:
773 /* atanhl(|x| >= 1) */
774 {
775 ERRNO_DOMAIN; break;
776 }
777 case atanh_gt_one:
778 case atanh_eq_one:
779 /* atanh(|x| >= 1) */
780 {
781 ERRNO_DOMAIN; break;
782 }
783 case atanhf_gt_one:
784 case atanhf_eq_one:
785 /* atanhf(|x| >= 1) */
786 {
787 ERRNO_DOMAIN; break;
788 }
789 case sqrtl_negative:
790 /* sqrtl(x < 0) */
791 {
792 ERRNO_DOMAIN; break;
793 }
794 case sqrt_negative:
795 /* sqrt(x < 0) */
796 {
797 ERRNO_DOMAIN; break;
798 }
799 case sqrtf_negative:
800 /* sqrtf(x < 0) */
801 {
802 ERRNO_DOMAIN; break;
803 }
804 case y0l_zero:
805 case y1l_zero:
806 case ynl_zero:
807 /* y0l(0) */
808 /* y1l(0) */
809 /* ynl(0) */
810 {
811 RETVAL_NEG_HUGE_VALL; ERRNO_DOMAIN; break;
812 }
813 case y0_zero:
814 case y1_zero:
815 case yn_zero:
816 /* y0(0) */
817 /* y1(0) */
818 /* yn(0) */
819 {
820 RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break;
821 }
822 case y0f_zero:
823 case y1f_zero:
824 case ynf_zero:
825 /* y0f(0) */
826 /* y1f(0) */
827 /* ynf(0) */
828 {
829 RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break;
830 }
831 case y0l_negative:
832 case y1l_negative:
833 case ynl_negative:
834 /* y0l(x < 0) */
835 /* y1l(x < 0) */
836 /* ynl(x < 0) */
837 {
838 #ifndef _LIBC
839 RETVAL_NEG_HUGE_VALL;
840 #endif
841 ERRNO_DOMAIN; break;
842 }
843 case y0_negative:
844 case y1_negative:
845 case yn_negative:
846 /* y0(x < 0) */
847 /* y1(x < 0) */
848 /* yn(x < 0) */
849 {
850 RETVAL_NEG_HUGE_VALD; ERRNO_DOMAIN; break;
851 }
852 case y0f_negative:
853 case y1f_negative:
854 case ynf_negative:
855 /* y0f(x < 0) */
856 /* y1f(x < 0) */
857 /* ynf(x < 0) */
858 {
859 RETVAL_NEG_HUGE_VALF; ERRNO_DOMAIN; break;
860 }
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) */
869 {
870 RETVAL_NEG_HUGE_VALL; ERRNO_RANGE; break;
871 }
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) */
880 {
881 RETVAL_NEG_HUGE_VALD; ERRNO_RANGE; break;
882 }
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) */
891 {
892 RETVAL_NEG_HUGE_VALF; ERRNO_RANGE; break;
893 }
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) */
902 {
903 ERRNO_DOMAIN; break;
904 }
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) */
913 {
914 ERRNO_DOMAIN; break;
915 }
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) */
924 {
925 ERRNO_DOMAIN; break;
926 }
927 case expl_overflow:
928 case exp10l_overflow:
929 case exp2l_overflow:
930 /* expl overflow */
931 /* exp10l overflow */
932 /* exp2l overflow */
933 {
934 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
935 }
936 case exp_overflow:
937 case exp10_overflow:
938 case exp2_overflow:
939 /* exp overflow */
940 /* exp10 overflow */
941 /* exp2 overflow */
942 {
943 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
944 }
945 case expf_overflow:
946 case exp10f_overflow:
947 case exp2f_overflow:
948 /* expf overflow */
949 {
950 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
951 }
952 case expl_underflow:
953 case exp10l_underflow:
954 case exp2l_underflow:
955 /* expl underflow */
956 /* exp10l underflow */
957 /* exp2l underflow */
958 {
959 ERRNO_RANGE; break;
960 }
961 case exp_underflow:
962 case exp10_underflow:
963 case exp2_underflow:
964 /* exp underflow */
965 /* exp10 underflow */
966 /* exp2 underflow */
967 {
968 ERRNO_RANGE; break;
969 }
970 case expf_underflow:
971 case exp10f_underflow:
972 case exp2f_underflow:
973 /* expf underflow */
974 /* exp10f underflow */
975 /* exp2f underflow */
976 {
977 ERRNO_RANGE; break;
978 }
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 */
986 {
987 RETVAL_ZEROL; ERRNO_RANGE; break;
988 }
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 */
996 {
997 RETVAL_ZEROD; ERRNO_RANGE; break;
998 }
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 */
1006 {
1007 RETVAL_ZEROF; ERRNO_RANGE; break;
1008 }
1009 case powl_zero_to_zero:
1010 /* powl 0**0 */
1011 {
1012 break;
1013 }
1014 case pow_zero_to_zero:
1015 /* pow 0**0 */
1016 {
1017 break;
1018 }
1019 case powf_zero_to_zero:
1020 /* powf 0**0 */
1021 {
1022 break;
1023 }
1024 case powl_overflow:
1025 case annuityl_overflow:
1026 case compoundl_overflow:
1027 /* powl(x,y) overflow */
1028 {
1029 if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
1030 else RETVAL_HUGE_VALL;
1031 ERRNO_RANGE; break;
1032 }
1033 case pow_overflow:
1034 case annuity_overflow:
1035 case compound_overflow:
1036 /* pow(x,y) overflow */
1037 {
1038 if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
1039 else RETVAL_HUGE_VALD;
1040 ERRNO_RANGE; break;
1041 }
1042 case powf_overflow:
1043 case annuityf_overflow:
1044 case compoundf_overflow:
1045 /* powf(x,y) overflow */
1046 {
1047 if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
1048 else RETVAL_HUGE_VALF;
1049 ERRNO_RANGE; break;
1050 }
1051 case powl_underflow:
1052 case annuityl_underflow:
1053 case compoundl_underflow:
1054 /* powl(x,y) underflow */
1055 {
1056 RETVAL_ZEROL; ERRNO_RANGE; break;
1057 }
1058 case pow_underflow:
1059 case annuity_underflow:
1060 case compound_underflow:
1061 /* pow(x,y) underflow */
1062 {
1063 RETVAL_ZEROD; ERRNO_RANGE; break;
1064 }
1065 case powf_underflow:
1066 case annuityf_underflow:
1067 case compoundf_underflow:
1068 /* powf(x,y) underflow */
1069 {
1070 RETVAL_ZEROF; ERRNO_RANGE; break;
1071 }
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:
1084 {
1085 ERRNO_DOMAIN; break;
1086 }
1087 case powl_zero_to_negative:
1088 /* 0**neg */
1089 {
1090 ERRNO_DOMAIN; break;
1091 }
1092 case pow_zero_to_negative:
1093 /* 0**neg */
1094 {
1095 ERRNO_DOMAIN; break;
1096 }
1097 case powf_zero_to_negative:
1098 /* 0**neg */
1099 {
1100 ERRNO_DOMAIN; break;
1101 }
1102 case powl_neg_to_non_integer:
1103 /* neg**non_integral */
1104 {
1105 ERRNO_DOMAIN; break;
1106 }
1107 case pow_neg_to_non_integer:
1108 /* neg**non_integral */
1109 {
1110 ERRNO_DOMAIN; break;
1111 }
1112 case powf_neg_to_non_integer:
1113 /* neg**non-integral */
1114 {
1115 ERRNO_DOMAIN; break;
1116 }
1117 case powl_nan_to_zero:
1118 /* powl(NaN,0.0) */
1119 /* Special Error */
1120 {
1121 break;
1122 }
1123 case pow_nan_to_zero:
1124 /* pow(NaN,0.0) */
1125 {
1126 break;
1127 }
1128 case powf_nan_to_zero:
1129 /* powf(NaN,0.0) */
1130 {
1131 break;
1132 }
1133 case atan2l_zero:
1134 case atan2dl_zero:
1135 /* atan2l(0,0) */
1136 /* atan2dl(0,0) */
1137 {
1138 break;
1139 }
1140 case atan2_zero:
1141 case atan2d_zero:
1142 /* atan2(0,0) */
1143 /* atan2d(0,0) */
1144 {
1145 break;
1146 }
1147 case atan2f_zero:
1148 case atan2df_zero:
1149 /* atan2f(0,0) */
1150 /* atan2df(0,0) */
1151 {
1152 break;
1153 }
1154 case expm1l_overflow:
1155 /* expm1 overflow */
1156 {
1157 ERRNO_RANGE; break;
1158 }
1159 case expm1_overflow:
1160 /* expm1 overflow */
1161 {
1162 ERRNO_RANGE; break;
1163 }
1164 case expm1f_overflow:
1165 /* expm1f overflow */
1166 {
1167 ERRNO_RANGE; break;
1168 }
1169 case expm1l_underflow:
1170 /* expm1 underflow */
1171 {
1172 ERRNO_RANGE; break;
1173 }
1174 case expm1_underflow:
1175 /* expm1 underflow */
1176 {
1177 ERRNO_RANGE; break;
1178 }
1179 case expm1f_underflow:
1180 /* expm1f underflow */
1181 {
1182 ERRNO_RANGE; break;
1183 }
1184 case hypotl_overflow:
1185 /* hypotl overflow */
1186 {
1187 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
1188 }
1189 case hypot_overflow:
1190 /* hypot overflow */
1191 {
1192 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
1193 }
1194 case hypotf_overflow:
1195 /* hypotf overflow */
1196 {
1197 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
1198 }
1199 case scalbl_underflow:
1200 /* scalbl underflow */
1201 {
1202 if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_ZEROL;
1203 else RETVAL_ZEROL;
1204 ERRNO_RANGE; break;
1205 }
1206 case scalb_underflow:
1207 /* scalb underflow */
1208 {
1209 if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_ZEROD;
1210 else RETVAL_ZEROD;
1211 ERRNO_RANGE; break;
1212 }
1213 case scalbf_underflow:
1214 /* scalbf underflow */
1215 {
1216 if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_ZEROF;
1217 else RETVAL_ZEROF;
1218 ERRNO_RANGE; break;
1219 }
1220 case scalbl_overflow:
1221 /* scalbl overflow */
1222 {
1223 if (INPUT_XL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
1224 else RETVAL_HUGE_VALL;
1225 ERRNO_RANGE; break;
1226 }
1227 case scalb_overflow:
1228 /* scalb overflow */
1229 {
1230 if (INPUT_XD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
1231 else RETVAL_HUGE_VALD;
1232 ERRNO_RANGE; break;
1233 }
1234 case scalbf_overflow:
1235 /* scalbf overflow */
1236 {
1237 if (INPUT_XF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
1238 else RETVAL_HUGE_VALF;
1239 ERRNO_RANGE; break;
1240 }
1241 case acoshl_lt_one:
1242 /* acoshl(x < 1) */
1243 {
1244 ERRNO_DOMAIN; break;
1245 }
1246 case acosh_lt_one:
1247 /* acosh(x < 1) */
1248 {
1249 ERRNO_DOMAIN; break;
1250 }
1251 case acoshf_lt_one:
1252 /* acoshf(x < 1) */
1253 {
1254 ERRNO_DOMAIN; break;
1255 }
1256 case acosl_gt_one:
1257 case acosdl_gt_one:
1258 /* acosl(x > 1) */
1259 /* acosdl(x > 1) */
1260 {
1261 ERRNO_DOMAIN; break;
1262 }
1263 case acos_gt_one:
1264 case acosd_gt_one:
1265 /* acos(x > 1) */
1266 /* acosd(x > 1) */
1267 {
1268 ERRNO_DOMAIN; break;
1269 }
1270 case acosf_gt_one:
1271 case acosdf_gt_one:
1272 /* acosf(x > 1) */
1273 /* acosdf(x > 1) */
1274 {
1275 ERRNO_DOMAIN; break;
1276 }
1277 case asinl_gt_one:
1278 case asindl_gt_one:
1279 /* asinl(x > 1) */
1280 /* asindl(x > 1) */
1281 {
1282 ERRNO_DOMAIN; break;
1283 }
1284 case asin_gt_one:
1285 case asind_gt_one:
1286 /* asin(x > 1) */
1287 /* asind(x > 1) */
1288 {
1289 ERRNO_DOMAIN; break;
1290 }
1291 case asinf_gt_one:
1292 case asindf_gt_one:
1293 /* asinf(x > 1) */
1294 /* asindf(x > 1) */
1295 {
1296 ERRNO_DOMAIN; break;
1297 }
1298 case remainderl_by_zero:
1299 case fmodl_by_zero:
1300 /* fmodl(x,0) */
1301 {
1302 ERRNO_DOMAIN; break;
1303 }
1304 case remainder_by_zero:
1305 case fmod_by_zero:
1306 /* fmod(x,0) */
1307 {
1308 ERRNO_DOMAIN; break;
1309 }
1310 case remainderf_by_zero:
1311 case fmodf_by_zero:
1312 /* fmodf(x,0) */
1313 {
1314 ERRNO_DOMAIN; break;
1315 }
1316 case coshl_overflow:
1317 /* coshl overflows */
1318 {
1319 RETVAL_HUGE_VALL; ERRNO_RANGE; break;
1320 }
1321 case cosh_overflow:
1322 /* cosh overflows */
1323 {
1324 RETVAL_HUGE_VALD; ERRNO_RANGE; break;
1325 }
1326 case coshf_overflow:
1327 /* coshf overflows */
1328 {
1329 RETVAL_HUGE_VALF; ERRNO_RANGE; break;
1330 }
1331 case sinhl_overflow:
1332 /* sinhl overflows */
1333 {
1334 if (INPUT_XL > ZEROL_VALUE /*0*/) RETVAL_HUGE_VALL;
1335 else RETVAL_NEG_HUGE_VALL;
1336 ERRNO_RANGE; break;
1337 }
1338 case sinh_overflow:
1339 /* sinh overflows */
1340 {
1341 if (INPUT_XD > ZEROD_VALUE /*0*/) RETVAL_HUGE_VALD;
1342 else RETVAL_NEG_HUGE_VALD;
1343 ERRNO_RANGE; break;
1344 }
1345 case sinhf_overflow:
1346 /* sinhf overflows */
1347 {
1348 if (INPUT_XF > ZEROF_VALUE /*0*/) RETVAL_HUGE_VALF;
1349 else RETVAL_NEG_HUGE_VALF;
1350 ERRNO_RANGE; break;
1351 }
1352 case logbl_zero:
1353 /* logbl(0) */
1354 {
1355 ERRNO_DOMAIN; break;
1356 }
1357 case logb_zero:
1358 /* logb(0) */
1359 {
1360 ERRNO_DOMAIN; break;
1361 }
1362 case logbf_zero:
1363 /* logbf(0) */
1364 {
1365 ERRNO_DOMAIN; break;
1366 }
1367 case ilogbl_zero:
1368 /* ilogbl(0) */
1369 {
1370 ERRNO_RANGE; break;
1371 }
1372 case ilogb_zero:
1373 /* ilogb(0) */
1374 {
1375 ERRNO_RANGE; break;
1376 }
1377 case ilogbf_zero:
1378 /* ilogbf(0) */
1379 {
1380 ERRNO_RANGE; break;
1381 }
1382 default:
1383 break;
1384 }
1385 return;
1386 /* _POSIX_ */
1387 }
1388
1389 /*******************************/
1390 /* __SVID__ and __XOPEN__ Path */
1391 /*******************************/
1392 else
1393 {
1394 switch(input_tag)
1395 {
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:
1435 {
1436 ERRNO_RANGE; break;
1437 }
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:
1450 {
1451 ERRNO_DOMAIN; break;
1452 }
1453 case sqrtl_negative:
1454 /* sqrtl(x < 0) */
1455 {
1456 DOMAINL; NAMEL = (char *) "sqrtl";
1457 ifSVID
1458 {
1459 RETVAL_ZEROL;
1460 NOT_MATHERRL
1461 {
1462 WRITEL_SQRT;
1463 ERRNO_DOMAIN;
1464 }
1465 }
1466 else
1467 { /* NaN already computed */
1468 NOT_MATHERRL {ERRNO_DOMAIN;}
1469 }
1470 *(long double *)retval = excl.retval;
1471 break;
1472 }
1473 case sqrt_negative:
1474 /* sqrt(x < 0) */
1475 {
1476 DOMAIND; NAMED = (char *) "sqrt";
1477 ifSVID
1478 {
1479
1480 RETVAL_ZEROD;
1481 NOT_MATHERRD
1482 {
1483 WRITED_SQRT;
1484 ERRNO_DOMAIN;
1485 }
1486 }
1487 else
1488 { /* NaN already computed */
1489 NOT_MATHERRD {ERRNO_DOMAIN;}
1490 }
1491 *(double *)retval = exc.retval;
1492 break;
1493 }
1494 case sqrtf_negative:
1495 /* sqrtf(x < 0) */
1496 {
1497 DOMAINF; NAMEF = (char *) "sqrtf";
1498 ifSVID
1499 {
1500 RETVAL_ZEROF;
1501 NOT_MATHERRF
1502 {
1503 WRITEF_SQRT;
1504 ERRNO_DOMAIN;
1505 }
1506 }
1507 else
1508 {
1509 NOT_MATHERRF {ERRNO_DOMAIN;}
1510 }
1511 *(float *)retval = excf.retval;
1512 break;
1513 }
1514 case logl_zero:
1515 /* logl(0) */
1516 {
1517 SINGL; NAMEL = (char *) "logl";
1518 ifSVID
1519 {
1520 RETVAL_NEG_HUGEL;
1521 NOT_MATHERRL
1522 {
1523 WRITEL_LOG_ZERO;
1524 ERRNO_DOMAIN;
1525 }
1526 }
1527 else
1528 {
1529 RETVAL_NEG_HUGE_VALL;
1530 NOT_MATHERRL {ERRNO_DOMAIN;}
1531 }
1532 *(long double *)retval = excl.retval;
1533 break;
1534 }
1535 case log_zero:
1536 /* log(0) */
1537 {
1538 SINGD; NAMED = (char *) "log";
1539 ifSVID
1540 {
1541 RETVAL_NEG_HUGED;
1542 NOT_MATHERRD
1543 {
1544 WRITED_LOG_ZERO;
1545 ERRNO_DOMAIN;
1546 }
1547 }
1548 else
1549 {
1550 RETVAL_NEG_HUGE_VALD;
1551 NOT_MATHERRD {ERRNO_DOMAIN;}
1552 }
1553 *(double *)retval = exc.retval;
1554 break;
1555 }
1556 case logf_zero:
1557 /* logf(0) */
1558 {
1559 SINGF; NAMEF = (char *) "logf";
1560 ifSVID
1561 {
1562 RETVAL_NEG_HUGEF;
1563 NOT_MATHERRF
1564 {
1565 WRITEF_LOG_ZERO;
1566 ERRNO_DOMAIN;
1567 }
1568 }
1569 else
1570 {
1571 RETVAL_NEG_HUGE_VALF;
1572 NOT_MATHERRF {ERRNO_DOMAIN;}
1573 }
1574 *(float *)retval = excf.retval;
1575 break;
1576 }
1577
1578 case logl_negative:
1579 /* logl(x < 0) */
1580 {
1581 DOMAINL; NAMEL = (char *) "logl";
1582 ifSVID
1583 {
1584 RETVAL_NEG_HUGEL;
1585 NOT_MATHERRL
1586 {
1587 WRITEL_LOG_NEGATIVE;
1588 ERRNO_DOMAIN;
1589 }
1590 }
1591 else
1592 {
1593 RETVAL_NEG_HUGE_VALL;
1594 NOT_MATHERRL {ERRNO_DOMAIN;}
1595 }
1596 *(long double *)retval = excl.retval;
1597 break;
1598 }
1599 case log_negative:
1600 /* log(x < 0) */
1601 {
1602 DOMAIND; NAMED = (char *) "log";
1603 ifSVID
1604 {
1605 RETVAL_NEG_HUGED;
1606 NOT_MATHERRD
1607 {
1608 WRITED_LOG_NEGATIVE;
1609 ERRNO_DOMAIN;
1610 }
1611 }
1612 else
1613 {
1614 RETVAL_NEG_HUGE_VALD;
1615 NOT_MATHERRD {ERRNO_DOMAIN;}
1616 }
1617 *(double *)retval = exc.retval;
1618 break;
1619 }
1620 case logf_negative:
1621 /* logf(x < 0) */
1622 {
1623 DOMAINF; NAMEF = (char *) "logf";
1624 ifSVID
1625 {
1626 RETVAL_NEG_HUGEF;
1627 NOT_MATHERRF
1628 {
1629 WRITEF_LOG_NEGATIVE;
1630 ERRNO_DOMAIN;
1631 }
1632 }
1633 else
1634 {
1635 RETVAL_NEG_HUGE_VALF;
1636 NOT_MATHERRF{ERRNO_DOMAIN;}
1637 }
1638 *(float *)retval = excf.retval;
1639 break;
1640 }
1641 case log1pl_zero:
1642 /* log1pl(-1) */
1643 {
1644 SINGL; NAMEL = (char *) "log1pl";
1645 ifSVID
1646 {
1647 RETVAL_NEG_HUGEL;
1648 NOT_MATHERRL
1649 {
1650 WRITEL_LOG1P_ZERO;
1651 ERRNO_DOMAIN;
1652 }
1653 }
1654 else
1655 {
1656 RETVAL_NEG_HUGE_VALL;
1657 NOT_MATHERRL {ERRNO_DOMAIN;}
1658 }
1659 *(long double *)retval = excl.retval;
1660 break;
1661 }
1662 case log1p_zero:
1663 /* log1p(-1) */
1664 {
1665 SINGD; NAMED = (char *) "log1p";
1666 ifSVID
1667 {
1668 RETVAL_NEG_HUGED;
1669 NOT_MATHERRD
1670 {
1671 WRITED_LOG1P_ZERO;
1672 ERRNO_DOMAIN;
1673 }
1674 }
1675 else
1676 {
1677 RETVAL_NEG_HUGE_VALD;
1678 NOT_MATHERRD {ERRNO_DOMAIN;}
1679 }
1680 *(double *)retval = exc.retval;
1681 break;
1682 }
1683 case log1pf_zero:
1684 /* log1pf(-1) */
1685 {
1686 SINGF; NAMEF = (char *) "log1pf";
1687 ifSVID
1688 {
1689 RETVAL_NEG_HUGEF;
1690 NOT_MATHERRF
1691 {
1692 WRITEF_LOG1P_ZERO;
1693 ERRNO_DOMAIN;
1694 }
1695 }
1696 else
1697 {
1698 RETVAL_NEG_HUGE_VALF;
1699 NOT_MATHERRF {ERRNO_DOMAIN;}
1700 }
1701 *(float *)retval = excf.retval;
1702 break;
1703 }
1704 case log1pl_negative:
1705 /* log1pl(x < -1) */
1706 {
1707 DOMAINL; NAMEL = (char *) "log1pl";
1708 ifSVID
1709 {
1710 RETVAL_NEG_HUGEL;
1711 NOT_MATHERRL
1712 {
1713 WRITEL_LOG1P_NEGATIVE;
1714 ERRNO_DOMAIN;
1715 }
1716 }
1717 else
1718 {
1719 RETVAL_NEG_HUGE_VALL;
1720 NOT_MATHERRL {ERRNO_DOMAIN;}
1721 }
1722 *(long double *)retval = excl.retval;
1723 break;
1724 }
1725 case log1p_negative:
1726 /* log1p(x < -1) */
1727 {
1728 DOMAIND; NAMED = (char *) "log1p";
1729 ifSVID
1730 {
1731 RETVAL_NEG_HUGED;
1732 NOT_MATHERRD
1733 {
1734 WRITED_LOG1P_NEGATIVE;
1735 ERRNO_DOMAIN;
1736 }
1737 }
1738 else
1739 {
1740 RETVAL_NEG_HUGE_VALD;
1741 NOT_MATHERRD {ERRNO_DOMAIN;}
1742 }
1743 *(double *)retval = exc.retval;
1744 break;
1745 }
1746 case log1pf_negative:
1747 /* log1pf(x < -1) */
1748 {
1749 DOMAINF; NAMEF = (char *) "log1pf";
1750 ifSVID
1751 {
1752 RETVAL_NEG_HUGEF;
1753 NOT_MATHERRF
1754 {
1755 WRITEF_LOG1P_NEGATIVE;
1756 ERRNO_DOMAIN;
1757 }
1758 }
1759 else
1760 {
1761 RETVAL_NEG_HUGE_VALF;
1762 NOT_MATHERRF {ERRNO_DOMAIN;}
1763 }
1764 *(float *)retval = excf.retval;
1765 break;
1766 }
1767 case log10l_zero:
1768 /* log10l(0) */
1769 {
1770 SINGL; NAMEL = (char *) "log10l";
1771 ifSVID
1772 {
1773 RETVAL_NEG_HUGEL;
1774 NOT_MATHERRL
1775 {
1776 WRITEL_LOG10_ZERO;
1777 ERRNO_DOMAIN;
1778 }
1779 }
1780 else
1781 {
1782 RETVAL_NEG_HUGE_VALL;
1783 NOT_MATHERRL {ERRNO_DOMAIN;}
1784 }
1785 *(long double *)retval = excl.retval;
1786 break;
1787 }
1788 case log10_zero:
1789 /* log10(0) */
1790 {
1791 SINGD; NAMED = (char *) "log10";
1792 ifSVID
1793 {
1794 RETVAL_NEG_HUGED;
1795 NOT_MATHERRD
1796 {
1797 WRITED_LOG10_ZERO;
1798 ERRNO_DOMAIN;
1799 }
1800 }
1801 else
1802 {
1803 RETVAL_NEG_HUGE_VALD;
1804 NOT_MATHERRD {ERRNO_DOMAIN;}
1805 }
1806 *(double *)retval = exc.retval;
1807 break;
1808 }
1809 case log10f_zero:
1810 /* log10f(0) */
1811 {
1812 SINGF; NAMEF = (char *) "log10f";
1813 ifSVID
1814 {
1815 RETVAL_NEG_HUGEF;
1816 NOT_MATHERRF
1817 {
1818 WRITEF_LOG10_ZERO;
1819 ERRNO_DOMAIN;
1820 }
1821 }
1822 else
1823 {
1824 RETVAL_NEG_HUGE_VALF;
1825 NOT_MATHERRF {ERRNO_DOMAIN;}
1826 }
1827 *(float *)retval = excf.retval;
1828 break;
1829 }
1830 case log10l_negative:
1831 /* log10l(x < 0) */
1832 {
1833 DOMAINL; NAMEL = (char *) "log10l";
1834 ifSVID
1835 {
1836 RETVAL_NEG_HUGEL;
1837 NOT_MATHERRL
1838 {
1839 WRITEL_LOG10_NEGATIVE;
1840 ERRNO_DOMAIN;
1841 }
1842 }
1843 else
1844 {
1845 RETVAL_NEG_HUGE_VALL;
1846 NOT_MATHERRL {ERRNO_DOMAIN;}
1847 }
1848 *(long double *)retval = excl.retval;
1849 break;
1850 }
1851 case log10_negative:
1852 /* log10(x < 0) */
1853 {
1854 DOMAIND; NAMED = (char *) "log10";
1855 ifSVID
1856 {
1857 RETVAL_NEG_HUGED;
1858 NOT_MATHERRD
1859 {
1860 WRITED_LOG10_NEGATIVE;
1861 ERRNO_DOMAIN;
1862 }
1863 }
1864 else
1865 {
1866 RETVAL_NEG_HUGE_VALD;
1867 NOT_MATHERRD {ERRNO_DOMAIN;}
1868 }
1869 *(double *)retval = exc.retval;
1870 break;
1871 }
1872 case log10f_negative:
1873 /* log10f(x < 0) */
1874 {
1875 DOMAINF; NAMEF = (char *) "log10f";
1876 ifSVID
1877 {
1878 RETVAL_NEG_HUGEF;
1879 NOT_MATHERRF
1880 {
1881 WRITEF_LOG10_NEGATIVE;
1882 ERRNO_DOMAIN;
1883 }
1884 }
1885 else
1886 {
1887 RETVAL_NEG_HUGE_VALF;
1888 NOT_MATHERRF {ERRNO_DOMAIN;}
1889 }
1890 *(float *)retval = excf.retval;
1891 break;
1892 }
1893 case log2l_zero:
1894 /* log2l(0) */
1895 {
1896 SINGL; NAMEL = (char *) "log2l";
1897 ifSVID
1898 {
1899 RETVAL_NEG_HUGEL;
1900 NOT_MATHERRL
1901 {
1902 WRITEL_LOG2_ZERO;
1903 ERRNO_DOMAIN;
1904 }
1905 }
1906 else
1907 {
1908 RETVAL_NEG_HUGE_VALL;
1909 NOT_MATHERRL {ERRNO_DOMAIN;}
1910 }
1911 *(long double *)retval = excl.retval;
1912 break;
1913 }
1914 case log2_zero:
1915 /* log2(0) */
1916 {
1917 SINGD; NAMED = (char *) "log2";
1918 ifSVID
1919 {
1920 RETVAL_NEG_HUGED;
1921 NOT_MATHERRD
1922 {
1923 WRITED_LOG2_ZERO;
1924 ERRNO_DOMAIN;
1925 }
1926 }
1927 else
1928 {
1929 RETVAL_NEG_HUGE_VALD;
1930 NOT_MATHERRD {ERRNO_DOMAIN;}
1931 }
1932 *(double *)retval = exc.retval;
1933 break;
1934 }
1935 case log2f_zero:
1936 /* log2f(0) */
1937 {
1938 SINGF; NAMEF = (char *) "log2f";
1939 ifSVID
1940 {
1941 RETVAL_NEG_HUGEF;
1942 NOT_MATHERRF
1943 {
1944 WRITEF_LOG2_ZERO;
1945 ERRNO_DOMAIN;
1946 }
1947 }
1948 else
1949 {
1950 RETVAL_NEG_HUGE_VALF;
1951 NOT_MATHERRF {ERRNO_DOMAIN;}
1952 }
1953 *(float *)retval = excf.retval;
1954 break;
1955 }
1956 case log2l_negative:
1957 /* log2l(x < 0) */
1958 {
1959 DOMAINL; NAMEL = (char *) "log2l";
1960 ifSVID
1961 {
1962 RETVAL_NEG_HUGEL;
1963 NOT_MATHERRL
1964 {
1965 WRITEL_LOG2_NEGATIVE;
1966 ERRNO_DOMAIN;
1967 }
1968 }
1969 else
1970 {
1971 RETVAL_NEG_HUGE_VALL;
1972 NOT_MATHERRL {ERRNO_DOMAIN;}
1973 }
1974 *(long double *)retval = excl.retval;
1975 break;
1976 }
1977 case log2_negative:
1978 /* log2(x < 0) */
1979 {
1980 DOMAIND; NAMED = (char *) "log2";
1981 ifSVID
1982 {
1983 RETVAL_NEG_HUGED;
1984 NOT_MATHERRD
1985 {
1986 WRITED_LOG2_NEGATIVE;
1987 ERRNO_DOMAIN;
1988 }
1989 }
1990 else
1991 {
1992 RETVAL_NEG_HUGE_VALD;
1993 NOT_MATHERRD {ERRNO_DOMAIN;}
1994 }
1995 *(double *)retval = exc.retval;
1996 break;
1997 }
1998 case log2f_negative:
1999 /* log2f(x < 0) */
2000 {
2001 DOMAINF; NAMEF = (char *) "log2f";
2002 ifSVID
2003 {
2004 RETVAL_NEG_HUGEF;
2005 NOT_MATHERRF
2006 {
2007 WRITEF_LOG2_NEGATIVE;
2008 ERRNO_DOMAIN;
2009 }
2010 }
2011 else
2012 {
2013 RETVAL_NEG_HUGE_VALF;
2014 NOT_MATHERRF {ERRNO_DOMAIN;}
2015 }
2016 *(float *)retval = excf.retval;
2017 break;
2018 }
2019 case expl_overflow:
2020 /* expl overflow */
2021 {
2022 OVERFLOWL; NAMEL = (char *) "expl";
2023 ifSVID
2024 {
2025 RETVAL_HUGEL;
2026 }
2027 else
2028 {
2029 RETVAL_HUGE_VALL;
2030 }
2031 NOT_MATHERRL {ERRNO_RANGE;}
2032 *(long double *)retval = excl.retval;
2033 break;
2034 }
2035 case exp_overflow:
2036 /* exp overflow */
2037 {
2038 OVERFLOWD; NAMED = (char *) "exp";
2039 ifSVID
2040 {
2041 RETVAL_HUGED;
2042 }
2043 else
2044 {
2045 RETVAL_HUGE_VALD;
2046 }
2047 NOT_MATHERRD {ERRNO_RANGE;}
2048 *(double *)retval = exc.retval;
2049 break;
2050 }
2051 case expf_overflow:
2052 /* expf overflow */
2053 {
2054 OVERFLOWF; NAMEF = (char *) "expf";
2055 ifSVID
2056 {
2057 RETVAL_HUGEF;
2058 }
2059 else
2060 {
2061 RETVAL_HUGE_VALF;
2062 }
2063 NOT_MATHERRF {ERRNO_RANGE;}
2064 *(float *)retval = excf.retval;
2065 break;
2066 }
2067 case expl_underflow:
2068 /* expl underflow */
2069 {
2070 UNDERFLOWL; NAMEL = (char *) "expl"; RETVAL_ZEROL;
2071 NOT_MATHERRL {ERRNO_RANGE;}
2072 *(long double *)retval = excl.retval;
2073 break;
2074 }
2075 case exp_underflow:
2076 /* exp underflow */
2077 {
2078 UNDERFLOWD; NAMED = (char *) "exp"; RETVAL_ZEROD;
2079 NOT_MATHERRD {ERRNO_RANGE;}
2080 *(double *)retval = exc.retval;
2081 break;
2082 }
2083 case expf_underflow:
2084 /* expf underflow */
2085 {
2086 UNDERFLOWF; NAMEF = (char *) "expf"; RETVAL_ZEROF;
2087 NOT_MATHERRF {ERRNO_RANGE;}
2088 *(float *)retval = excf.retval;
2089 break;
2090 }
2091 case powl_zero_to_zero:
2092 /* powl 0**0 */
2093 {
2094 DOMAINL; NAMEL = (char *) "powl";
2095 ifSVID
2096 {
2097 RETVAL_ZEROL;
2098 NOT_MATHERRL
2099 {
2100 WRITEL_POW_ZERO_TO_ZERO;
2101 ERRNO_DOMAIN;
2102 }
2103 *(long double *)retval = excl.retval;
2104 }
2105 else RETVAL_ONEL;
2106 break;
2107 }
2108 case pow_zero_to_zero:
2109 /* pow 0**0 */
2110 {
2111 DOMAIND; NAMED = (char *) "pow";
2112 ifSVID
2113 {
2114 RETVAL_ZEROD;
2115 NOT_MATHERRD
2116 {
2117 WRITED_POW_ZERO_TO_ZERO;
2118 ERRNO_DOMAIN;
2119 }
2120 *(double *)retval = exc.retval;
2121 }
2122 else RETVAL_ONED;
2123 break;
2124 }
2125 case powf_zero_to_zero:
2126 /* powf 0**0 */
2127 {
2128 DOMAINF; NAMEF = (char *) "powf";
2129 ifSVID
2130 {
2131 RETVAL_ZEROF;
2132 NOT_MATHERRF
2133 {
2134 WRITEF_POW_ZERO_TO_ZERO;
2135 ERRNO_DOMAIN;
2136 }
2137 *(float *)retval = excf.retval;
2138 }
2139 else RETVAL_ONEF;
2140 break;
2141 }
2142 case powl_overflow:
2143 /* powl(x,y) overflow */
2144 {
2145 OVERFLOWL; NAMEL = (char *) "powl";
2146 ifSVID
2147 {
2148 if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGEL;
2149 else RETVAL_HUGEL;
2150 }
2151 else
2152 {
2153 if (INPUT_RESL < ZEROL_VALUE /*0*/) RETVAL_NEG_HUGE_VALL;
2154 else RETVAL_HUGE_VALL;
2155 }
2156 NOT_MATHERRL {ERRNO_RANGE;}
2157 *(long double *)retval = excl.retval;
2158 break;
2159 }
2160 case pow_overflow:
2161 /* pow(x,y) overflow */
2162 {
2163 OVERFLOWD; NAMED = (char *) "pow";
2164 ifSVID
2165 {
2166 if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGED;
2167 else RETVAL_HUGED;
2168 }
2169 else
2170 {
2171 if (INPUT_RESD < ZEROD_VALUE /*0*/) RETVAL_NEG_HUGE_VALD;
2172 else RETVAL_HUGE_VALD;
2173 }
2174 NOT_MATHERRD {ERRNO_RANGE;}
2175 *(double *)retval = exc.retval;
2176 break;
2177 }
2178 case powf_overflow:
2179 /* powf(x,y) overflow */
2180 {
2181 OVERFLOWF; NAMEF = (char *) "powf";
2182 ifSVID
2183 {
2184 if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGEF;
2185 else RETVAL_HUGEF;
2186 }
2187 else
2188 {
2189 if (INPUT_RESF < ZEROF_VALUE /*0*/) RETVAL_NEG_HUGE_VALF;
2190 else RETVAL_HUGE_VALF;
2191 }
2192 NOT_MATHERRF {ERRNO_RANGE;}
2193 *(float *)retval = excf.retval;
2194 break;
2195 }
2196 case powl_underflow:
2197 /* powl(x,y) underflow */
2198 {
2199 UNDERFLOWL; NAMEL = (char *) "powl"; RETVAL_ZEROL;
2200 NOT_MATHERRL {ERRNO_RANGE;}
2201 *(long double *)retval = excl.retval;
2202 break;
2203 }
2204 case pow_underflow:
2205 /* pow(x,y) underflow */
2206 {
2207 UNDERFLOWD; NAMED = (char *) "pow"; RETVAL_ZEROD;
2208 NOT_MATHERRD {ERRNO_RANGE;}
2209 *(double *)retval = exc.retval;
2210 break;
2211 }
2212 case powf_underflow:
2213 /* powf(x,y) underflow */
2214 {
2215 UNDERFLOWF; NAMEF = (char *) "powf"; RETVAL_ZEROF;
2216 NOT_MATHERRF {ERRNO_RANGE;}
2217 *(float *)retval = excf.retval;
2218 break;
2219 }
2220 case powl_zero_to_negative:
2221 /* 0 to neg */
2222 {
2223 DOMAINL; NAMEL = (char *) "powl";
2224 ifSVID
2225 {
2226 RETVAL_ZEROL;
2227 NOT_MATHERRL
2228 {
2229 WRITEL_POW_ZERO_TO_NEGATIVE;
2230 ERRNO_DOMAIN;
2231 }
2232 }
2233 else
2234 {
2235 RETVAL_NEG_HUGE_VALL;
2236 NOT_MATHERRL {ERRNO_DOMAIN;}
2237 }
2238 *(long double *)retval = excl.retval;
2239 break;
2240 }
2241 case pow_zero_to_negative:
2242 /* 0**neg */
2243 {
2244 DOMAIND; NAMED = (char *) "pow";
2245 ifSVID
2246 {
2247 RETVAL_ZEROD;
2248 NOT_MATHERRD
2249 {
2250 WRITED_POW_ZERO_TO_NEGATIVE;
2251 ERRNO_DOMAIN;
2252 }
2253 }
2254 else
2255 {
2256 RETVAL_NEG_HUGE_VALD;
2257 NOT_MATHERRD {ERRNO_DOMAIN;}
2258 }
2259 *(double *)retval = exc.retval;
2260 break;
2261 }
2262 case powf_zero_to_negative:
2263 /* 0**neg */
2264 {
2265 DOMAINF; NAMEF = (char *) "powf";
2266 ifSVID
2267 {
2268 RETVAL_ZEROF;
2269 NOT_MATHERRF
2270 {
2271 WRITEF_POW_ZERO_TO_NEGATIVE;
2272 ERRNO_DOMAIN;
2273 }
2274 }
2275 else
2276 {
2277 RETVAL_NEG_HUGE_VALF;
2278 NOT_MATHERRF {ERRNO_DOMAIN;}
2279 }
2280 *(float *)retval = excf.retval;
2281 break;
2282 }
2283 case powl_neg_to_non_integer:
2284 /* neg**non_integral */
2285 {
2286 DOMAINL; NAMEL = (char *) "powl";
2287 ifSVID
2288 {
2289 RETVAL_ZEROL;
2290 NOT_MATHERRL
2291 {
2292 WRITEL_POW_NEG_TO_NON_INTEGER;
2293 ERRNO_DOMAIN;
2294 }
2295 }
2296 else
2297 {
2298 NOT_MATHERRL {ERRNO_DOMAIN;}
2299 }
2300 *(long double *)retval = excl.retval;
2301 break;
2302 }
2303 case pow_neg_to_non_integer:
2304 /* neg**non_integral */
2305 {
2306 DOMAIND; NAMED = (char *) "pow";
2307 ifSVID
2308 {
2309 RETVAL_ZEROD;
2310 NOT_MATHERRD
2311 {
2312 WRITED_POW_NEG_TO_NON_INTEGER;
2313 ERRNO_DOMAIN;
2314 }
2315 }
2316 else
2317 {
2318 NOT_MATHERRD {ERRNO_DOMAIN;}
2319 }
2320 *(double *)retval = exc.retval;
2321 break;
2322 }
2323 case powf_neg_to_non_integer:
2324 /* neg**non-integral */
2325 {
2326 DOMAINF; NAMEF = (char *) "powf";
2327 ifSVID
2328 {
2329 RETVAL_ZEROF;
2330 NOT_MATHERRF
2331 {
2332 WRITEF_POW_NEG_TO_NON_INTEGER;
2333 ERRNO_DOMAIN;
2334 }
2335 }
2336 else
2337 {
2338 NOT_MATHERRF {ERRNO_DOMAIN;}
2339 }
2340 *(float *)retval = excf.retval;
2341 break;
2342 }
2343 case powl_nan_to_zero:
2344 /* pow(NaN,0.0) */
2345 /* Special Error */
2346 {
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;
2352 }
2353 case pow_nan_to_zero:
2354 /* pow(NaN,0.0) */
2355 /* Special Error */
2356 {
2357 DOMAIND; NAMED = (char *) "pow";
2358 *(double *)retval = *(double *)arg1;
2359 NOT_MATHERRD {ERRNO_DOMAIN;}
2360 *(double *)retval = exc.retval;
2361 break;
2362 }
2363 case powf_nan_to_zero:
2364 /* powf(NaN,0.0) */
2365 /* Special Error */
2366 {
2367 DOMAINF; NAMEF = (char *) "powf";
2368 *(float *)retval = *(float *)arg1;
2369 NOT_MATHERRF {ERRNO_DOMAIN;}
2370 *(float *)retval = excf.retval;
2371 break;
2372 }
2373 case atan2l_zero:
2374 /* atan2l(0.0,0.0) */
2375 {
2376 DOMAINL; NAMEL = (char *) "atan2l";
2377 RETVAL_ZEROL;
2378 NOT_MATHERRL
2379 {
2380 ifSVID
2381 {
2382 WRITEL_ATAN2_ZERO_BY_ZERO;
2383 }
2384 ERRNO_DOMAIN;
2385 }
2386 *(long double *)retval = excl.retval;
2387 break;
2388 }
2389 case atan2_zero:
2390 /* atan2(0.0,0.0) */
2391 {
2392 DOMAIND; NAMED = (char *) "atan2";
2393 RETVAL_ZEROD;
2394 NOT_MATHERRD
2395 {
2396 ifSVID
2397 {
2398 WRITED_ATAN2_ZERO_BY_ZERO;
2399 }
2400 ERRNO_DOMAIN;
2401 }
2402 *(double *)retval = exc.retval;
2403 break;
2404 }
2405 case atan2f_zero:
2406 /* atan2f(0.0,0.0) */
2407 {
2408 DOMAINF; NAMEF = (char *) "atan2f";
2409 RETVAL_ZEROF;
2410 NOT_MATHERRF
2411 {
2412 ifSVID
2413 {
2414 WRITEF_ATAN2_ZERO_BY_ZERO;
2415 }
2416 ERRNO_DOMAIN;
2417 }
2418 *(float *)retval = excf.retval;
2419 break;
2420 }
2421 case atan2dl_zero:
2422 /* atan2dl(0.0,0.0) */
2423 {
2424 DOMAINL; NAMEL = (char *) "atan2dl";
2425 RETVAL_ZEROL;
2426 NOT_MATHERRL
2427 {
2428 ifSVID
2429 {
2430 WRITEL_ATAN2D_ZERO_BY_ZERO;
2431 }
2432 ERRNO_DOMAIN;
2433 }
2434 *(long double *)retval = excl.retval;
2435 break;
2436 }
2437 case atan2d_zero:
2438 /* atan2d(0.0,0.0) */
2439 {
2440 DOMAIND; NAMED = (char *) "atan2d";
2441 RETVAL_ZEROD;
2442 NOT_MATHERRD
2443 {
2444 ifSVID
2445 {
2446 WRITED_ATAN2D_ZERO_BY_ZERO;
2447 }
2448 ERRNO_DOMAIN;
2449 }
2450 *(double *)retval = exc.retval;
2451 break;
2452 }
2453 case atan2df_zero:
2454 /* atan2df(0.0,0.0) */
2455 {
2456 DOMAINF; NAMEF = (char *) "atan2df";
2457 RETVAL_ZEROF;
2458 NOT_MATHERRF
2459 {
2460 ifSVID
2461 {
2462 WRITEF_ATAN2D_ZERO_BY_ZERO;
2463 }
2464 ERRNO_DOMAIN;
2465 }
2466 *(float *)retval = excf.retval;
2467 break;
2468 }
2469 case expm1_overflow:
2470 /* expm1(finite) overflow */
2471 /* Overflow is the only documented */
2472 /* special value. */
2473 {
2474 ERRNO_RANGE;
2475 break;
2476 }
2477 case expm1f_overflow:
2478 /* expm1f(finite) overflow */
2479 {
2480 ERRNO_RANGE;
2481 break;
2482 }
2483 case expm1_underflow:
2484 /* expm1(finite) underflow */
2485 /* Underflow is not documented */
2486 /* special value. */
2487 {
2488 ERRNO_RANGE;
2489 break;
2490 }
2491 case expm1f_underflow:
2492 /* expm1f(finite) underflow */
2493 {
2494 ERRNO_RANGE;
2495 break;
2496 }
2497 case scalbl_underflow:
2498 /* scalbl underflow */
2499 {
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;
2506 }
2507 case scalb_underflow:
2508 /* scalb underflow */
2509 {
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;
2516 }
2517 case scalbf_underflow:
2518 /* scalbf underflow */
2519 {
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;
2526 }
2527 case scalbl_overflow:
2528 /* scalbl overflow */
2529 {
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;
2536 }
2537 case scalb_overflow:
2538 /* scalb overflow */
2539 {
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;
2546 }
2547 case scalbf_overflow:
2548 /* scalbf overflow */
2549 {
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;
2556 }
2557 case hypotl_overflow:
2558 /* hypotl overflow */
2559 {
2560 OVERFLOWL; NAMEL = (char *) "hypotl";
2561 ifSVID
2562 {
2563 RETVAL_HUGEL;
2564 }
2565 else
2566 {
2567 RETVAL_HUGE_VALL;
2568 }
2569 NOT_MATHERRL {ERRNO_RANGE;}
2570 *(long double *)retval = excl.retval;
2571 break;
2572 }
2573 case hypot_overflow:
2574 /* hypot overflow */
2575 {
2576 OVERFLOWD; NAMED = (char *) "hypot";
2577 ifSVID
2578 {
2579 RETVAL_HUGED;
2580 }
2581 else
2582 {
2583 RETVAL_HUGE_VALD;
2584 }
2585 NOT_MATHERRD {ERRNO_RANGE;}
2586 *(double *)retval = exc.retval;
2587 break;
2588 }
2589 case hypotf_overflow:
2590 /* hypotf overflow */
2591 {
2592 OVERFLOWF; NAMEF = (char *) "hypotf";
2593 ifSVID
2594 {
2595 RETVAL_HUGEF;
2596 }
2597 else
2598 {
2599 RETVAL_HUGE_VALF;
2600 }
2601 NOT_MATHERRF {ERRNO_RANGE;}
2602 *(float *)retval = excf.retval;
2603 break;
2604 }
2605 case acosl_gt_one:
2606 /* acosl(x > 1) */
2607 {
2608 DOMAINL; NAMEL = (char *) "acosl";
2609 RETVAL_ZEROL;
2610 ifSVID
2611 {
2612 NOT_MATHERRL
2613 {
2614 WRITEL_ACOS;
2615 ERRNO_DOMAIN;
2616 }
2617 }
2618 else
2619 {
2620 NOT_MATHERRL {ERRNO_DOMAIN;}
2621 }
2622 *(long double *)retval = excl.retval;
2623 break;
2624 }
2625 case acos_gt_one:
2626 /* acos(x > 1) */
2627 {
2628 DOMAIND; NAMED = (char *) "acos";
2629 RETVAL_ZEROD;
2630 ifSVID
2631 {
2632 NOT_MATHERRD
2633 {
2634 WRITED_ACOS;
2635 ERRNO_DOMAIN;
2636 }
2637 }
2638 else
2639 {
2640 NOT_MATHERRD {ERRNO_DOMAIN;}
2641 }
2642 *(double *)retval = exc.retval;
2643 break;
2644 }
2645 case acosf_gt_one:
2646 /* acosf(x > 1) */
2647 {
2648 DOMAINF; NAMEF = (char *) "acosf";
2649 RETVAL_ZEROF;
2650 ifSVID
2651 {
2652 NOT_MATHERRF
2653 {
2654 WRITEF_ACOS;
2655 ERRNO_DOMAIN;
2656 }
2657 }
2658 else
2659 {
2660 NOT_MATHERRF {ERRNO_DOMAIN;}
2661 }
2662 *(float *)retval = excf.retval;
2663 break;
2664 }
2665 case asinl_gt_one:
2666 /* asinl(x > 1) */
2667 {
2668 DOMAINL; NAMEL = (char *) "asinl";
2669 RETVAL_ZEROL;
2670 ifSVID
2671 {
2672 NOT_MATHERRL
2673 {
2674 WRITEL_ASIN;
2675 ERRNO_DOMAIN;
2676 }
2677 }
2678 else
2679 {
2680 NOT_MATHERRL {ERRNO_DOMAIN;}
2681 }
2682 *(long double *)retval = excl.retval;
2683 break;
2684 }
2685 case asin_gt_one:
2686 /* asin(x > 1) */
2687 {
2688 DOMAIND; NAMED = (char *) "asin";
2689 RETVAL_ZEROD;
2690 ifSVID
2691 {
2692 NOT_MATHERRD
2693 {
2694 WRITED_ASIN;
2695 ERRNO_DOMAIN;
2696 }
2697 }
2698 else
2699 {
2700 NOT_MATHERRD {ERRNO_DOMAIN;}
2701 }
2702 *(double *)retval = exc.retval;
2703 break;
2704 }
2705 case asinf_gt_one:
2706 /* asinf(x > 1) */
2707 {
2708 DOMAINF; NAMEF = (char *) "asinf";
2709 RETVAL_ZEROF;
2710 ifSVID
2711 {
2712 NOT_MATHERRF
2713 {
2714 WRITEF_ASIN;
2715 ERRNO_DOMAIN;
2716 }
2717 }
2718 else
2719 {
2720 NOT_MATHERRF {ERRNO_DOMAIN;}
2721 }
2722 *(float *)retval = excf.retval;
2723 break;
2724 }
2725 case acosdl_gt_one:
2726 /* acosdl(x > 1) */
2727 {
2728 DOMAINL; NAMEL = (char *) "acosdl";
2729 RETVAL_ZEROL;
2730 ifSVID
2731 {
2732 NOT_MATHERRL
2733 {
2734 WRITEL_ACOSD;
2735 ERRNO_DOMAIN;
2736 }
2737 }
2738 else
2739 {
2740 NOT_MATHERRL {ERRNO_DOMAIN;}
2741 }
2742 *(long double *)retval = excl.retval;
2743 break;
2744 }
2745 case acosd_gt_one:
2746 /* acosd(x > 1) */
2747 {
2748 DOMAIND; NAMED = (char *) "acosd";
2749 RETVAL_ZEROD;
2750 ifSVID
2751 {
2752 NOT_MATHERRD
2753 {
2754 WRITED_ACOSD;
2755 ERRNO_DOMAIN;
2756 }
2757 }
2758 else
2759 {
2760 NOT_MATHERRD {ERRNO_DOMAIN;}
2761 }
2762 *(double *)retval = exc.retval;
2763 break;
2764 }
2765 case acosdf_gt_one:
2766 /* acosdf(x > 1) */
2767 {
2768 DOMAINF; NAMEF = (char *) "acosdf";
2769 RETVAL_ZEROF;
2770 ifSVID
2771 {
2772 NOT_MATHERRF
2773 {
2774 WRITEF_ACOSD;
2775 ERRNO_DOMAIN;
2776 }
2777 }
2778 else
2779 {
2780 NOT_MATHERRF {ERRNO_DOMAIN;}
2781 }
2782 *(float *)retval = excf.retval;
2783 break;
2784 }
2785 case asindl_gt_one:
2786 /* asindl(x > 1) */
2787 {
2788 DOMAINL; NAMEL = (char *) "asindl";
2789 RETVAL_ZEROL;
2790 ifSVID
2791 {
2792 NOT_MATHERRL
2793 {
2794 WRITEL_ASIND;
2795 ERRNO_DOMAIN;
2796 }
2797 }
2798 else
2799 {
2800 NOT_MATHERRL {ERRNO_DOMAIN;}
2801 }
2802 *(long double *)retval = excl.retval;
2803 break;
2804 }
2805 case asind_gt_one:
2806 /* asind(x > 1) */
2807 {
2808 DOMAIND; NAMED = (char *) "asind";
2809 RETVAL_ZEROD;
2810 ifSVID
2811 {
2812 NOT_MATHERRD
2813 {
2814 WRITED_ASIND;
2815 ERRNO_DOMAIN;
2816 }
2817 }
2818 else
2819 {
2820 NOT_MATHERRD {ERRNO_DOMAIN;}
2821 }
2822 *(double *)retval = exc.retval;
2823 break;
2824 }
2825 case asindf_gt_one:
2826 /* asindf(x > 1) */
2827 {
2828 DOMAINF; NAMEF = (char *) "asindf";
2829 RETVAL_ZEROF;
2830 ifSVID
2831 {
2832 NOT_MATHERRF
2833 {
2834 WRITEF_ASIND;
2835 ERRNO_DOMAIN;
2836 }
2837 }
2838 else
2839 {
2840 NOT_MATHERRF {ERRNO_DOMAIN;}
2841 }
2842 *(float *)retval = excf.retval;
2843 break;
2844 }
2845 case coshl_overflow:
2846 /* coshl overflow */
2847 {
2848 OVERFLOWL; NAMEL = (char *) "coshl";
2849 ifSVID
2850 {
2851 RETVAL_HUGEL;
2852 }
2853 else
2854 {
2855 RETVAL_HUGE_VALL;
2856 }
2857 NOT_MATHERRL {ERRNO_RANGE;}
2858 *(long double *)retval = excl.retval;
2859 break;
2860 }
2861 case cosh_overflow:
2862 /* cosh overflow */
2863 {
2864 OVERFLOWD; NAMED = (char *) "cosh";
2865 ifSVID
2866 {
2867 RETVAL_HUGED;
2868 }
2869 else
2870 {
2871 RETVAL_HUGE_VALD;
2872 }
2873 NOT_MATHERRD {ERRNO_RANGE;}
2874 *(double *)retval = exc.retval;
2875 break;
2876 }
2877 case coshf_overflow:
2878 /* coshf overflow */
2879 {
2880 OVERFLOWF; NAMEF = (char *) "coshf";
2881 ifSVID
2882 {
2883 RETVAL_HUGEF;
2884 }
2885 else
2886 {
2887 RETVAL_HUGE_VALF;
2888 }
2889 NOT_MATHERRF {ERRNO_RANGE;}
2890 *(float *)retval = excf.retval;
2891 break;
2892 }
2893 case sinhl_overflow:
2894 /* sinhl overflow */
2895 {
2896 OVERFLOWL; NAMEL = (char *) "sinhl";
2897 ifSVID
2898 {
2899 if (INPUT_XL > ZEROL_VALUE /*0.0*/) RETVAL_HUGEL;
2900 else RETVAL_NEG_HUGEL;
2901 }
2902 else
2903 {
2904 if (INPUT_XL > ZEROL_VALUE /*0.0*/) RETVAL_HUGE_VALL;
2905 else RETVAL_NEG_HUGE_VALL;
2906 }
2907 NOT_MATHERRL {ERRNO_RANGE;}
2908 *(long double *)retval = excl.retval;
2909 break;
2910 }
2911 case sinh_overflow:
2912 /* sinh overflow */
2913 {
2914 OVERFLOWD; NAMED = (char *) "sinh";
2915 ifSVID
2916 {
2917 if (INPUT_XD > ZEROD_VALUE /*0.0*/) RETVAL_HUGED;
2918 else RETVAL_NEG_HUGED;
2919 }
2920 else
2921 {
2922 if (INPUT_XD > ZEROD_VALUE /*0.0*/) RETVAL_HUGE_VALD;
2923 else RETVAL_NEG_HUGE_VALD;
2924 }
2925 NOT_MATHERRD {ERRNO_RANGE;}
2926 *(double *)retval = exc.retval;
2927 break;
2928 }
2929 case sinhf_overflow:
2930 /* sinhf overflow */
2931 {
2932 OVERFLOWF; NAMEF = (char *) "sinhf";
2933 ifSVID
2934 {
2935 if (INPUT_XF > ZEROF_VALUE /*0.0*/) RETVAL_HUGEF;
2936 else RETVAL_NEG_HUGEF;
2937 }
2938 else
2939 {
2940 if (INPUT_XF > ZEROF_VALUE /*0.0*/) RETVAL_HUGE_VALF;
2941 else RETVAL_NEG_HUGE_VALF;
2942 }
2943 NOT_MATHERRF {ERRNO_RANGE;}
2944 *(float *)retval = excf.retval;
2945 break;
2946 }
2947 case acoshl_lt_one:
2948 /* acoshl(x < 1) */
2949 {
2950 DOMAINL; NAMEL = (char *) "acoshl";
2951 ifSVID
2952 {
2953 NOT_MATHERRL
2954 {
2955 WRITEL_ACOSH;
2956 ERRNO_DOMAIN;
2957 }
2958 }
2959 else
2960 {
2961 NOT_MATHERRL {ERRNO_DOMAIN;}
2962 }
2963 *(long double *)retval = excl.retval;
2964 break;
2965 }
2966 case acosh_lt_one:
2967 /* acosh(x < 1) */
2968 {
2969 DOMAIND; NAMED = (char *) "acosh";
2970 ifSVID
2971 {
2972 NOT_MATHERRD
2973 {
2974 WRITED_ACOSH;
2975 ERRNO_DOMAIN;
2976 }
2977 }
2978 else
2979 {
2980 NOT_MATHERRD {ERRNO_DOMAIN;}
2981 }
2982 *(double *)retval = exc.retval;
2983 break;
2984 }
2985 case acoshf_lt_one:
2986 /* acoshf(x < 1) */
2987 {
2988 DOMAINF; NAMEF = (char *) "acoshf";
2989 ifSVID
2990 {
2991 NOT_MATHERRF
2992 {
2993 WRITEF_ACOSH;
2994 ERRNO_DOMAIN;
2995 }
2996 }
2997 else
2998 {
2999 NOT_MATHERRF {ERRNO_DOMAIN;}
3000 }
3001 *(float *)retval = excf.retval;
3002 break;
3003 }
3004 case atanhl_gt_one:
3005 /* atanhl(|x| > 1) */
3006 {
3007 DOMAINL; NAMEL = (char *) "atanhl";
3008 ifSVID
3009 {
3010 NOT_MATHERRL
3011 {
3012 WRITEL_ATANH_GT_ONE;
3013 ERRNO_DOMAIN;
3014 }
3015 }
3016 else
3017 {
3018 NOT_MATHERRL {ERRNO_DOMAIN;}
3019 }
3020 break;
3021 }
3022 case atanh_gt_one:
3023 /* atanh(|x| > 1) */
3024 {
3025 DOMAIND; NAMED = (char *) "atanh";
3026 ifSVID
3027 {
3028 NOT_MATHERRD
3029 {
3030 WRITED_ATANH_GT_ONE;
3031 ERRNO_DOMAIN;
3032 }
3033 }
3034 else
3035 {
3036 NOT_MATHERRD {ERRNO_DOMAIN;}
3037 }
3038 break;
3039 }
3040 case atanhf_gt_one:
3041 /* atanhf(|x| > 1) */
3042 {
3043 DOMAINF; NAMEF = (char *) "atanhf";
3044 ifSVID
3045 {
3046 NOT_MATHERRF
3047 {
3048 WRITEF_ATANH_GT_ONE;
3049 ERRNO_DOMAIN;
3050 }
3051 }
3052 else
3053 {
3054 NOT_MATHERRF {ERRNO_DOMAIN;}
3055 }
3056 break;
3057 }
3058 case atanhl_eq_one:
3059 /* atanhl(|x| == 1) */
3060 {
3061 SINGL; NAMEL = (char *) "atanhl";
3062 ifSVID
3063 {
3064 NOT_MATHERRL
3065 {
3066 WRITEL_ATANH_EQ_ONE;
3067 ERRNO_DOMAIN;
3068 }
3069 }
3070 else
3071 {
3072 NOT_MATHERRL {ERRNO_DOMAIN;}
3073 }
3074 break;
3075 }
3076 case atanh_eq_one:
3077 /* atanh(|x| == 1) */
3078 {
3079 SINGD; NAMED = (char *) "atanh";
3080 ifSVID
3081 {
3082 NOT_MATHERRD
3083 {
3084 WRITED_ATANH_EQ_ONE;
3085 ERRNO_DOMAIN;
3086 }
3087 }
3088 else
3089 {
3090 NOT_MATHERRD {ERRNO_DOMAIN;}
3091 }
3092 break;
3093 }
3094 case atanhf_eq_one:
3095 /* atanhf(|x| == 1) */
3096 {
3097 SINGF; NAMEF = (char *) "atanhf";
3098 ifSVID
3099 {
3100 NOT_MATHERRF
3101 {
3102 WRITEF_ATANH_EQ_ONE;
3103 ERRNO_DOMAIN;
3104 }
3105 }
3106 else
3107 {
3108 NOT_MATHERRF {ERRNO_DOMAIN;}
3109 }
3110 break;
3111 }
3112 case gammal_overflow:
3113 /* gammal overflow */
3114 {
3115 OVERFLOWL; NAMEL = (char *) "gammal";
3116 ifSVID
3117 {
3118 RETVAL_HUGEL;
3119 }
3120 else
3121 {
3122 RETVAL_HUGE_VALL;
3123 }
3124 NOT_MATHERRL {ERRNO_RANGE;}
3125 *(long double *)retval = excl.retval;
3126 break;
3127 }
3128 case gamma_overflow:
3129 /* gamma overflow */
3130 {
3131 OVERFLOWD; NAMED = (char *) "gamma";
3132 ifSVID
3133 {
3134 RETVAL_HUGED;
3135 }
3136 else
3137 {
3138 RETVAL_HUGE_VALD;
3139 }
3140 NOT_MATHERRD {ERRNO_RANGE;}
3141 *(double *)retval = exc.retval;
3142 break;
3143 }
3144 case gammaf_overflow:
3145 /* gammaf overflow */
3146 {
3147 OVERFLOWF; NAMEF = (char *) "gammaf";
3148 ifSVID
3149 {
3150 RETVAL_HUGEF;
3151 }
3152 else
3153 {
3154 RETVAL_HUGE_VALF;
3155 }
3156 NOT_MATHERRF {ERRNO_RANGE;}
3157 *(float *)retval = excf.retval;
3158 break;
3159 }
3160 case gammal_negative:
3161 /* gammal -int or 0 */
3162 {
3163 SINGL; NAMEL = (char *) "gammal";
3164 ifSVID
3165 {
3166 RETVAL_HUGEL;
3167 NOT_MATHERRL
3168 {
3169 WRITEL_GAMMA_NEGATIVE;
3170 ERRNO_DOMAIN;
3171 }
3172 }
3173 else
3174 {
3175 RETVAL_HUGE_VALL;
3176 NOT_MATHERRL {ERRNO_DOMAIN;}
3177 }
3178 *(long double *)retval = excl.retval;
3179 break;
3180 }
3181 case gamma_negative:
3182 /* gamma -int or 0 */
3183 {
3184 SINGD; NAMED = (char *) "gamma";
3185 ifSVID
3186 {
3187 RETVAL_HUGED;
3188 NOT_MATHERRD
3189 {
3190 WRITED_GAMMA_NEGATIVE;
3191 ERRNO_DOMAIN;
3192 }
3193 }
3194 else
3195 {
3196 RETVAL_HUGE_VALD;
3197 NOT_MATHERRD {ERRNO_DOMAIN;}
3198 }
3199 *(double *)retval = exc.retval;
3200 break;
3201 }
3202 case gammaf_negative:
3203 /* gammaf -int or 0 */
3204 {
3205 SINGF; NAMEF = (char *) "gammaf";
3206 ifSVID
3207 {
3208 RETVAL_HUGEF;
3209 NOT_MATHERRF
3210 {
3211 WRITEF_GAMMA_NEGATIVE;
3212 ERRNO_DOMAIN;
3213 }
3214 }
3215 else
3216 {
3217 RETVAL_HUGE_VALF;
3218 NOT_MATHERRF {ERRNO_DOMAIN;}
3219 }
3220 *(float *)retval = excf.retval;
3221 break;
3222 }
3223 case lgammal_overflow:
3224 /* lgammal overflow */
3225 {
3226 OVERFLOWL; NAMEL = (char *) "lgammal";
3227 ifSVID
3228 {
3229 RETVAL_HUGEL;
3230 }
3231 else
3232 {
3233 RETVAL_HUGE_VALL;
3234 }
3235 NOT_MATHERRL {ERRNO_RANGE;}
3236 *(long double *)retval = excl.retval;
3237 break;
3238 }
3239 case lgamma_overflow:
3240 /* lgamma overflow */
3241 {
3242 OVERFLOWD; NAMED = (char *) "lgamma";
3243 ifSVID
3244 {
3245 RETVAL_HUGED;
3246 }
3247 else
3248 {
3249 RETVAL_HUGE_VALD;
3250 }
3251 NOT_MATHERRD {ERRNO_RANGE;}
3252 *(double *)retval = exc.retval;
3253 break;
3254 }
3255 case lgammaf_overflow:
3256 /* lgammaf overflow */
3257 {
3258 OVERFLOWF; NAMEF = (char *) "lgammaf";
3259 ifSVID
3260 {
3261 RETVAL_HUGEF;
3262 }
3263 else
3264 {
3265 RETVAL_HUGE_VALF;
3266 }
3267 NOT_MATHERRF {ERRNO_RANGE;}
3268 *(float *)retval = excf.retval;
3269 break;
3270 }
3271 case lgammal_negative:
3272 /* lgammal -int or 0 */
3273 {
3274 SINGL; NAMEL = (char *) "lgammal";
3275 ifSVID
3276 {
3277 RETVAL_HUGEL;
3278 NOT_MATHERRL
3279 {
3280 WRITEL_LGAMMA_NEGATIVE;
3281 ERRNO_DOMAIN;
3282 }
3283 }
3284 else
3285 {
3286 RETVAL_HUGE_VALL;
3287 NOT_MATHERRL {ERRNO_DOMAIN;}
3288 }
3289 *(long double *)retval = excl.retval;
3290 break;
3291 }
3292 case lgamma_negative:
3293 /* lgamma -int or 0 */
3294 {
3295 SINGD; NAMED = (char *) "lgamma";
3296 ifSVID
3297 {
3298 RETVAL_HUGED;
3299 NOT_MATHERRD
3300 {
3301 WRITED_LGAMMA_NEGATIVE;
3302 ERRNO_DOMAIN;
3303 }
3304 }
3305 else
3306 {
3307 RETVAL_HUGE_VALD;
3308 NOT_MATHERRD {ERRNO_DOMAIN;}
3309 }
3310 *(double *)retval = exc.retval;
3311 break;
3312 }
3313 case lgammaf_negative:
3314 /* lgammaf -int or 0 */
3315 {
3316 SINGF; NAMEF = (char *) "lgammaf";
3317 ifSVID
3318 {
3319 RETVAL_HUGEF;
3320 NOT_MATHERRF
3321 {
3322 WRITEF_LGAMMA_NEGATIVE;
3323 ERRNO_DOMAIN;
3324 }
3325 }
3326 else
3327 {
3328 RETVAL_HUGE_VALF;
3329 NOT_MATHERRF {ERRNO_DOMAIN;}
3330 }
3331 *(float *)retval = excf.retval;
3332 break;
3333 }
3334 case tgammal_overflow:
3335 /* tgammal overflow */
3336 {
3337 OVERFLOWL; NAMEL = (char *) "tgammal";
3338 ifSVID
3339 {
3340 RETVAL_HUGEL;
3341 }
3342 else
3343 {
3344 RETVAL_HUGE_VALL;
3345 }
3346 NOT_MATHERRL {ERRNO_RANGE;}
3347 *(long double *)retval = excl.retval;
3348 break;
3349 }
3350 case tgamma_overflow:
3351 /* tgamma overflow */
3352 {
3353 OVERFLOWD; NAMED = (char *) "tgamma";
3354 ifSVID
3355 {
3356 RETVAL_HUGED;
3357 }
3358 else
3359 {
3360 RETVAL_HUGE_VALD;
3361 }
3362 NOT_MATHERRD {ERRNO_RANGE;}
3363 *(double *)retval = exc.retval;
3364 break;
3365 }
3366 case tgammaf_overflow:
3367 /* tgammaf overflow */
3368 {
3369 OVERFLOWF; NAMEF = (char *) "tgammaf";
3370 ifSVID
3371 {
3372 RETVAL_HUGEF;
3373 }
3374 else
3375 {
3376 RETVAL_HUGE_VALF;
3377 }
3378 NOT_MATHERRF {ERRNO_RANGE;}
3379 *(float *)retval = excf.retval;
3380 break;
3381 }
3382 case tgammal_negative:
3383 /* tgammal -int or 0 */
3384 {
3385 SINGL; NAMEL = (char *) "tgammal";
3386 ifSVID
3387 {
3388 NOT_MATHERRL
3389 {
3390 WRITEL_TGAMMA_NEGATIVE;
3391 ERRNO_DOMAIN;
3392 }
3393 }
3394 else
3395 {
3396 NOT_MATHERRL {ERRNO_DOMAIN;}
3397 }
3398 *(long double *)retval = excl.retval;
3399 break;
3400 }
3401 case tgamma_negative:
3402 /* tgamma -int or 0 */
3403 {
3404 SINGD; NAMED = (char *) "tgamma";
3405 ifSVID
3406 {
3407 NOT_MATHERRD
3408 {
3409 WRITED_TGAMMA_NEGATIVE;
3410 ERRNO_DOMAIN;
3411 }
3412 }
3413 else
3414 {
3415 NOT_MATHERRD {ERRNO_DOMAIN;}
3416 }
3417 *(double *)retval = exc.retval;
3418 break;
3419 }
3420 case tgammaf_negative:
3421 /* tgammaf -int or 0 */
3422 {
3423 SINGF; NAMEF = (char *) "tgammaf";
3424 ifSVID
3425 {
3426 NOT_MATHERRF
3427 {
3428 WRITEF_TGAMMA_NEGATIVE;
3429 ERRNO_DOMAIN;
3430 }
3431 }
3432 else
3433 {
3434 NOT_MATHERRF {ERRNO_DOMAIN;}
3435 }
3436 *(float *)retval = excf.retval;
3437 break;
3438 }
3439 case j0l_gt_loss:
3440 /* j0l > loss */
3441 {
3442 TLOSSL; NAMEL = (char *) "j0l";
3443 RETVAL_ZEROL;
3444 ifSVID
3445 {
3446 NOT_MATHERRL
3447 {
3448 WRITEL_J0_TLOSS;
3449 ERRNO_RANGE;
3450 }
3451 }
3452 else
3453 {
3454 NOT_MATHERRL {ERRNO_RANGE;}
3455 }
3456 *(long double *)retval = excl.retval;
3457 break;
3458 }
3459 case j0_gt_loss:
3460 /* j0 > loss */
3461 {
3462 TLOSSD; NAMED = (char *) "j0";
3463 RETVAL_ZEROD;
3464 ifSVID
3465 {
3466 NOT_MATHERRD
3467 {
3468 WRITED_J0_TLOSS;
3469 ERRNO_RANGE;
3470 }
3471 }
3472 else
3473 {
3474 NOT_MATHERRD {ERRNO_RANGE;}
3475 }
3476 *(double*)retval = exc.retval;
3477 break;
3478 }
3479 case j0f_gt_loss:
3480 /* j0f > loss */
3481 {
3482 TLOSSF; NAMEF = (char *) "j0f";
3483 RETVAL_ZEROF;
3484 ifSVID
3485 {
3486 NOT_MATHERRF
3487 {
3488 WRITEF_J0_TLOSS;
3489 ERRNO_RANGE;
3490 }
3491 }
3492 else
3493 {
3494 NOT_MATHERRF {ERRNO_RANGE;}
3495 }
3496 *(float*)retval = excf.retval;
3497 break;
3498 }
3499 case j1l_gt_loss:
3500 /* j1l > loss */
3501 {
3502 TLOSSL; NAMEL = (char *) "j1l";
3503 RETVAL_ZEROL;
3504 ifSVID
3505 {
3506 NOT_MATHERRL
3507 {
3508 WRITEL_J1_TLOSS;
3509 ERRNO_RANGE;
3510 }
3511 }
3512 else
3513 {
3514 NOT_MATHERRL {ERRNO_RANGE;}
3515 }
3516 *(long double *)retval = excl.retval;
3517 break;
3518 }
3519 case j1_gt_loss:
3520 /* j1 > loss */
3521 {
3522 TLOSSD; NAMED = (char *) "j1";
3523 RETVAL_ZEROD;
3524 ifSVID
3525 {
3526 NOT_MATHERRD
3527 {
3528 WRITED_J1_TLOSS;
3529 ERRNO_RANGE;
3530 }
3531 }
3532 else
3533 {
3534 NOT_MATHERRD {ERRNO_RANGE;}
3535 }
3536 *(double*)retval = exc.retval;
3537 break;
3538 }
3539 case j1f_gt_loss:
3540 /* j1f > loss */
3541 {
3542 TLOSSF; NAMEF = (char *) "j1f";
3543 RETVAL_ZEROF;
3544 ifSVID
3545 {
3546 NOT_MATHERRF
3547 {
3548 WRITEF_J1_TLOSS;
3549 ERRNO_RANGE;
3550 }
3551 }
3552 else
3553 {
3554 NOT_MATHERRF {ERRNO_RANGE;}
3555 }
3556 *(float*)retval = excf.retval;
3557 break;
3558 }
3559 case jnl_gt_loss:
3560 /* jnl > loss */
3561 {
3562 TLOSSL; NAMEL = (char *) "jnl";
3563 RETVAL_ZEROL;
3564 ifSVID
3565 {
3566 NOT_MATHERRL
3567 {
3568 WRITEL_JN_TLOSS;
3569 ERRNO_RANGE;
3570 }
3571 }
3572 else
3573 {
3574 NOT_MATHERRL {ERRNO_RANGE;}
3575 }
3576 *(long double *)retval = excl.retval;
3577 break;
3578 }
3579 case jn_gt_loss:
3580 /* jn > loss */
3581 {
3582 TLOSSD; NAMED = (char *) "jn";
3583 RETVAL_ZEROD;
3584 ifSVID
3585 {
3586 NOT_MATHERRD
3587 {
3588 WRITED_JN_TLOSS;
3589 ERRNO_RANGE;
3590 }
3591 }
3592 else
3593 {
3594 NOT_MATHERRD {ERRNO_RANGE;}
3595 }
3596 *(double*)retval = exc.retval;
3597 break;
3598 }
3599 case jnf_gt_loss:
3600 /* jnf > loss */
3601 {
3602 TLOSSF; NAMEF = (char *) "jnf";
3603 RETVAL_ZEROF;
3604 ifSVID
3605 {
3606 NOT_MATHERRF
3607 {
3608 WRITEF_JN_TLOSS;
3609 ERRNO_RANGE;
3610 }
3611 }
3612 else
3613 {
3614 NOT_MATHERRF {ERRNO_RANGE;}
3615 }
3616 *(float*)retval = excf.retval;
3617 break;
3618 }
3619 case y0l_gt_loss:
3620 /* y0l > loss */
3621 {
3622 TLOSSL; NAMEL = (char *) "y0l";
3623 RETVAL_ZEROL;
3624 ifSVID
3625 {
3626 NOT_MATHERRL
3627 {
3628 WRITEL_Y0_TLOSS;
3629 ERRNO_RANGE;
3630 }
3631 }
3632 else
3633 {
3634 NOT_MATHERRL {ERRNO_RANGE;}
3635 }
3636 *(long double *)retval = excl.retval;
3637 break;
3638 }
3639 case y0_gt_loss:
3640 /* y0 > loss */
3641 {
3642 TLOSSD; NAMED = (char *) "y0";
3643 RETVAL_ZEROD;
3644 ifSVID
3645 {
3646 NOT_MATHERRD
3647 {
3648 WRITED_Y0_TLOSS;
3649 ERRNO_RANGE;
3650 }
3651 }
3652 else
3653 {
3654 NOT_MATHERRD {ERRNO_RANGE;}
3655 }
3656 *(double*)retval = exc.retval;
3657 break;
3658 }
3659 case y0f_gt_loss:
3660 /* y0f > loss */
3661 {
3662 TLOSSF; NAMEF = (char *) "y0f";
3663 RETVAL_ZEROF;
3664 ifSVID
3665 {
3666 NOT_MATHERRF
3667 {
3668 WRITEF_Y0_TLOSS;
3669 ERRNO_RANGE;
3670 }
3671 }
3672 else
3673 {
3674 NOT_MATHERRF {ERRNO_RANGE;}
3675 }
3676 *(float*)retval = excf.retval;
3677 break;
3678 }
3679 case y0l_zero:
3680 /* y0l(0) */
3681 {
3682 DOMAINL; NAMEL = (char *) "y0l";
3683 ifSVID
3684 {
3685 RETVAL_NEG_HUGEL;
3686 NOT_MATHERRL
3687 {
3688 WRITEL_Y0_ZERO;
3689 ERRNO_DOMAIN;
3690 }
3691 }
3692 else
3693 {
3694 RETVAL_NEG_HUGE_VALL;
3695 NOT_MATHERRL {ERRNO_DOMAIN;}
3696 }
3697 *(long double *)retval = excl.retval;
3698 break;
3699 }
3700 case y0_zero:
3701 /* y0(0) */
3702 {
3703 DOMAIND; NAMED = (char *) "y0";
3704 ifSVID
3705 {
3706 RETVAL_NEG_HUGED;
3707 NOT_MATHERRD
3708 {
3709 WRITED_Y0_ZERO;
3710 ERRNO_DOMAIN;
3711 }
3712 }
3713 else
3714 {
3715 RETVAL_NEG_HUGE_VALD;
3716 NOT_MATHERRD {ERRNO_DOMAIN;}
3717 }
3718 *(double *)retval = exc.retval;
3719 break;
3720 }
3721 case y0f_zero:
3722 /* y0f(0) */
3723 {
3724 DOMAINF; NAMEF = (char *) "y0f";
3725 ifSVID
3726 {
3727 RETVAL_NEG_HUGEF;
3728 NOT_MATHERRF
3729 {
3730 WRITEF_Y0_ZERO;
3731 ERRNO_DOMAIN;
3732 }
3733 }
3734 else
3735 {
3736 RETVAL_NEG_HUGE_VALF;
3737 NOT_MATHERRF {ERRNO_DOMAIN;}
3738 }
3739 *(float *)retval = excf.retval;
3740 break;
3741 }
3742 case y1l_gt_loss:
3743 /* y1l > loss */
3744 {
3745 TLOSSL; NAMEL = (char *) "y1l";
3746 RETVAL_ZEROL;
3747 ifSVID
3748 {
3749 NOT_MATHERRL
3750 {
3751 WRITEL_Y1_TLOSS;
3752 ERRNO_RANGE;
3753 }
3754 }
3755 else
3756 {
3757 NOT_MATHERRL {ERRNO_RANGE;}
3758 }
3759 *(long double *)retval = excl.retval;
3760 break;
3761 }
3762 case y1_gt_loss:
3763 /* y1 > loss */
3764 {
3765 TLOSSD; NAMED = (char *) "y1";
3766 RETVAL_ZEROD;
3767 ifSVID
3768 {
3769 NOT_MATHERRD
3770 {
3771 WRITED_Y1_TLOSS;
3772 ERRNO_RANGE;
3773 }
3774 }
3775 else
3776 {
3777 NOT_MATHERRD {ERRNO_RANGE;}
3778 }
3779 *(double*)retval = exc.retval;
3780 break;
3781 }
3782 case y1f_gt_loss:
3783 /* y1f > loss */
3784 {
3785 TLOSSF; NAMEF = (char *) "y1f";
3786 RETVAL_ZEROF;
3787 ifSVID
3788 {
3789 NOT_MATHERRF
3790 {
3791 WRITEF_Y1_TLOSS;
3792 ERRNO_RANGE;
3793 }
3794 }
3795 else
3796 {
3797 NOT_MATHERRF {ERRNO_RANGE;}
3798 }
3799 *(float*)retval = excf.retval;
3800 break;
3801 }
3802 case y1l_zero:
3803 /* y1l(0) */
3804 {
3805 DOMAINL; NAMEL = (char *) "y1l";
3806 ifSVID
3807 {
3808 RETVAL_NEG_HUGEL;
3809 NOT_MATHERRL
3810 {
3811 WRITEL_Y1_ZERO;
3812 ERRNO_DOMAIN;
3813 }
3814 }
3815 else
3816 {
3817 RETVAL_NEG_HUGE_VALL;
3818 NOT_MATHERRL {ERRNO_DOMAIN;}
3819 }
3820 *(long double *)retval = excl.retval;
3821 break;
3822 }
3823 case y1_zero:
3824 /* y1(0) */
3825 {
3826 DOMAIND; NAMED = (char *) "y1";
3827 ifSVID
3828 {
3829 RETVAL_NEG_HUGED;
3830 NOT_MATHERRD
3831 {
3832 WRITED_Y1_ZERO;
3833 ERRNO_DOMAIN;
3834 }
3835 }
3836 else
3837 {
3838 RETVAL_NEG_HUGE_VALD;
3839 NOT_MATHERRD {ERRNO_DOMAIN;}
3840 }
3841 *(double *)retval = exc.retval;
3842 break;
3843 }
3844 case y1f_zero:
3845 /* y1f(0) */
3846 {
3847 DOMAINF; NAMEF = (char *) "y1f";
3848 ifSVID
3849 {
3850 RETVAL_NEG_HUGEF;
3851 NOT_MATHERRF
3852 {
3853 WRITEF_Y1_ZERO;
3854 ERRNO_DOMAIN;
3855 }
3856 }
3857 else
3858 {
3859 RETVAL_NEG_HUGE_VALF;
3860 NOT_MATHERRF {ERRNO_DOMAIN;}
3861 }
3862 *(float *)retval = excf.retval;
3863 break;
3864 }
3865 case ynl_gt_loss:
3866 /* ynl > loss */
3867 {
3868 TLOSSL; NAMEL = (char *) "ynl";
3869 RETVAL_ZEROL;
3870 ifSVID
3871 {
3872 NOT_MATHERRL
3873 {
3874 WRITEL_YN_TLOSS;
3875 ERRNO_RANGE;
3876 }
3877 }
3878 else
3879 {
3880 NOT_MATHERRL {ERRNO_RANGE;}
3881 }
3882 *(long double *)retval = excl.retval;
3883 break;
3884 }
3885 case yn_gt_loss:
3886 /* yn > loss */
3887 {
3888 TLOSSD; NAMED = (char *) "yn";
3889 RETVAL_ZEROD;
3890 ifSVID
3891 {
3892 NOT_MATHERRD
3893 {
3894 WRITED_YN_TLOSS;
3895 ERRNO_RANGE;
3896 }
3897 }
3898 else
3899 {
3900 NOT_MATHERRD {ERRNO_RANGE;}
3901 }
3902 *(double*)retval = exc.retval;
3903 break;
3904 }
3905 case ynf_gt_loss:
3906 /* ynf > loss */
3907 {
3908 TLOSSF; NAMEF = (char *) "ynf";
3909 RETVAL_ZEROF;
3910 ifSVID
3911 {
3912 NOT_MATHERRF
3913 {
3914 WRITEF_YN_TLOSS;
3915 ERRNO_RANGE;
3916 }
3917 }
3918 else
3919 {
3920 NOT_MATHERRF {ERRNO_RANGE;}
3921 }
3922 *(float*)retval = excf.retval;
3923 break;
3924 }
3925 case ynl_zero:
3926 /* ynl(0) */
3927 {
3928 DOMAINL; NAMEL = (char *) "ynl";
3929 ifSVID
3930 {
3931 RETVAL_NEG_HUGEL;
3932 NOT_MATHERRL
3933 {
3934 WRITEL_YN_ZERO;
3935 ERRNO_DOMAIN;
3936 }
3937 }
3938 else
3939 {
3940 RETVAL_NEG_HUGE_VALL;
3941 NOT_MATHERRL {ERRNO_DOMAIN;}
3942 }
3943 *(long double *)retval = excl.retval;
3944 break;
3945 }
3946 case yn_zero:
3947 /* yn(0) */
3948 {
3949 DOMAIND; NAMED = (char *) "yn";
3950 ifSVID
3951 {
3952 RETVAL_NEG_HUGED;
3953 NOT_MATHERRD
3954 {
3955 WRITED_YN_ZERO;
3956 ERRNO_DOMAIN;
3957 }
3958 }
3959 else
3960 {
3961 RETVAL_NEG_HUGE_VALD;
3962 NOT_MATHERRD {ERRNO_DOMAIN;}
3963 }
3964 *(double *)retval = exc.retval;
3965 break;
3966 }
3967 case ynf_zero:
3968 /* ynf(0) */
3969 {
3970 DOMAINF; NAMEF = (char *) "ynf";
3971 ifSVID
3972 {
3973 RETVAL_NEG_HUGEF;
3974 NOT_MATHERRF
3975 {
3976 WRITEF_YN_ZERO;
3977 ERRNO_DOMAIN;
3978 }
3979 }
3980 else
3981 {
3982 RETVAL_NEG_HUGE_VALF;
3983 NOT_MATHERRF {ERRNO_DOMAIN;}
3984 }
3985 *(float *)retval = excf.retval;
3986 break;
3987 }
3988 case y0l_negative:
3989 /* y0l(x<0) */
3990 {
3991 DOMAINL; NAMEL = (char *) "y0l";
3992 ifSVID
3993 {
3994 RETVAL_NEG_HUGEL;
3995 NOT_MATHERRL
3996 {
3997 WRITEL_Y0_NEGATIVE;
3998 ERRNO_DOMAIN;
3999 }
4000 }
4001 else
4002 {
4003 RETVAL_NEG_HUGE_VALL;
4004 NOT_MATHERRL {ERRNO_DOMAIN;}
4005 }
4006 *(long double *)retval = excl.retval;
4007 break;
4008 }
4009 case y0_negative:
4010 /* y0(x<0) */
4011 {
4012 DOMAIND; NAMED = (char *) "y0";
4013 ifSVID
4014 {
4015 RETVAL_NEG_HUGED;
4016 NOT_MATHERRD
4017 {
4018 WRITED_Y0_NEGATIVE;
4019 ERRNO_DOMAIN;
4020 }
4021 }
4022 else
4023 {
4024 RETVAL_NEG_HUGE_VALD;
4025 NOT_MATHERRD {ERRNO_DOMAIN;}
4026 }
4027 *(double *)retval = exc.retval;
4028 break;
4029 }
4030 case y0f_negative:
4031 /* y0f(x<0) */
4032 {
4033 DOMAINF; NAMEF = (char *) "y0f";
4034 ifSVID
4035 {
4036 RETVAL_NEG_HUGEF;
4037 NOT_MATHERRF
4038 {
4039 WRITEF_Y0_NEGATIVE;
4040 ERRNO_DOMAIN;
4041 }
4042 }
4043 else
4044 {
4045 RETVAL_NEG_HUGE_VALF;
4046 NOT_MATHERRF {ERRNO_DOMAIN;}
4047 }
4048 *(float *)retval = excf.retval;
4049 break;
4050 }
4051 case y1l_negative:
4052 /* y1l(x<0) */
4053 {
4054 DOMAINL; NAMEL = (char *) "y1l";
4055 ifSVID
4056 {
4057 RETVAL_NEG_HUGEL;
4058 NOT_MATHERRL
4059 {
4060 WRITEL_Y1_NEGATIVE;
4061 ERRNO_DOMAIN;
4062 }
4063 }
4064 else
4065 {
4066 RETVAL_NEG_HUGE_VALL;
4067 NOT_MATHERRL {ERRNO_DOMAIN;}
4068 }
4069 *(long double *)retval = excl.retval;
4070 break;
4071 }
4072 case y1_negative:
4073 /* y1(x<0) */
4074 {
4075 DOMAIND; NAMED = (char *) "y1";
4076 ifSVID
4077 {
4078 RETVAL_NEG_HUGED;
4079 NOT_MATHERRD
4080 {
4081 WRITED_Y1_NEGATIVE;
4082 ERRNO_DOMAIN;
4083 }
4084 }
4085 else
4086 {
4087 RETVAL_NEG_HUGE_VALD;
4088 NOT_MATHERRD {ERRNO_DOMAIN;}
4089 }
4090 *(double *)retval = exc.retval;
4091 break;
4092 }
4093 case y1f_negative:
4094 /* y1f(x<0) */
4095 {
4096 DOMAINF; NAMEF = (char *) "y1f";
4097 ifSVID
4098 {
4099 RETVAL_NEG_HUGEF;
4100 NOT_MATHERRF
4101 {
4102 WRITEF_Y1_NEGATIVE;
4103 ERRNO_DOMAIN;
4104 }
4105 }
4106 else
4107 {
4108 RETVAL_NEG_HUGE_VALF;
4109 NOT_MATHERRF {ERRNO_DOMAIN;}
4110 }
4111 *(float *)retval = excf.retval;
4112 break;
4113 }
4114 case ynl_negative:
4115 /* ynl(x<0) */
4116 {
4117 DOMAINL; NAMEL = (char *) "ynl";
4118 ifSVID
4119 {
4120 RETVAL_NEG_HUGEL;
4121 NOT_MATHERRL
4122 {
4123 WRITEL_YN_NEGATIVE;
4124 ERRNO_DOMAIN;
4125 }
4126 }
4127 else
4128 {
4129 RETVAL_NEG_HUGE_VALL;
4130 NOT_MATHERRL {ERRNO_DOMAIN;}
4131 }
4132 *(long double *)retval = excl.retval;
4133 break;
4134 }
4135 case yn_negative:
4136 /* yn(x<0) */
4137 {
4138 DOMAIND; NAMED = (char *) "yn";
4139 ifSVID
4140 {
4141 RETVAL_NEG_HUGED;
4142 NOT_MATHERRD
4143 {
4144 WRITED_YN_NEGATIVE;
4145 ERRNO_DOMAIN;
4146 }
4147 }
4148 else
4149 {
4150 RETVAL_NEG_HUGE_VALD;
4151 NOT_MATHERRD {ERRNO_DOMAIN;}
4152 }
4153 *(double *)retval = exc.retval;
4154 break;
4155 }
4156 case ynf_negative:
4157 /* ynf(x<0) */
4158 {
4159 DOMAINF; NAMEF = (char *) "ynf";
4160 ifSVID
4161 {
4162 RETVAL_NEG_HUGEF;
4163 NOT_MATHERRF
4164 {
4165 WRITEF_YN_NEGATIVE;
4166 ERRNO_DOMAIN;
4167 }
4168 }
4169 else
4170 {
4171 RETVAL_NEG_HUGE_VALF;
4172 NOT_MATHERRF {ERRNO_DOMAIN;}
4173 }
4174 *(float *)retval = excf.retval;
4175 break;
4176 }
4177 case fmodl_by_zero:
4178 /* fmodl(x,0) */
4179 {
4180 DOMAINL; NAMEL = (char *) "fmodl";
4181 ifSVID
4182 {
4183 *(long double *)retval = *(long double *)arg1;
4184 NOT_MATHERRL
4185 {
4186 WRITEL_FMOD;
4187 ERRNO_DOMAIN;
4188 }
4189 }
4190 else
4191 { /* NaN already computed */
4192 NOT_MATHERRL {ERRNO_DOMAIN;}
4193 }
4194 *(long double *)retval = excl.retval;
4195 break;
4196 }
4197 case fmod_by_zero:
4198 /* fmod(x,0) */
4199 {
4200 DOMAIND; NAMED = (char *) "fmod";
4201 ifSVID
4202 {
4203 *(double *)retval = *(double *)arg1;
4204 NOT_MATHERRD
4205 {
4206 WRITED_FMOD;
4207 ERRNO_DOMAIN;
4208 }
4209 }
4210 else
4211 { /* NaN already computed */
4212 NOT_MATHERRD {ERRNO_DOMAIN;}
4213 }
4214 *(double *)retval = exc.retval;
4215 break;
4216 }
4217 case fmodf_by_zero:
4218 /* fmodf(x,0) */
4219 {
4220 DOMAINF; NAMEF = (char *) "fmodf";
4221 ifSVID
4222 {
4223 *(float *)retval = *(float *)arg1;
4224 NOT_MATHERRF
4225 {
4226 WRITEF_FMOD;
4227 ERRNO_DOMAIN;
4228 }
4229 }
4230 else
4231 {
4232 NOT_MATHERRF {ERRNO_DOMAIN;}
4233 }
4234 *(float *)retval = excf.retval;
4235 break;
4236 }
4237 case remainderl_by_zero:
4238 /* remainderl(x,0) */
4239 {
4240 DOMAINL; NAMEL = (char *) "remainderl";
4241 ifSVID
4242 {
4243 NOT_MATHERRL
4244 {
4245 WRITEL_REM;
4246 ERRNO_DOMAIN;
4247 }
4248 }
4249 else
4250 { /* NaN already computed */
4251 NOT_MATHERRL {ERRNO_DOMAIN;}
4252 }
4253 *(long double *)retval = excl.retval;
4254 break;
4255 }
4256 case remainder_by_zero:
4257 /* remainder(x,0) */
4258 {
4259 DOMAIND; NAMED = (char *) "remainder";
4260 ifSVID
4261 {
4262 NOT_MATHERRD
4263 {
4264 WRITED_REM;
4265 ERRNO_DOMAIN;
4266 }
4267 }
4268 else
4269 { /* NaN already computed */
4270 NOT_MATHERRD {ERRNO_DOMAIN;}
4271 }
4272 *(double *)retval = exc.retval;
4273 break;
4274 }
4275 case remainderf_by_zero:
4276 /* remainderf(x,0) */
4277 {
4278 DOMAINF; NAMEF = (char *) "remainderf";
4279 ifSVID
4280 {
4281 NOT_MATHERRF
4282 {
4283 WRITEF_REM;
4284 ERRNO_DOMAIN;
4285 }
4286 }
4287 else
4288 {
4289 NOT_MATHERRF {ERRNO_DOMAIN;}
4290 }
4291 *(float *)retval = excf.retval;
4292 break;
4293 }
4294 default:
4295 /* We don't want to abort () since SVID doesn't cover all math
4296 library functions. */
4297 break;
4298 }
4299 return;
4300 }
4301 }
4302