Update.
[glibc.git] / sysdeps / libm-ieee754 / w_j0.c
blobc327e1c98f668ab6612933573f58282f57974f44
1 /* @(#)w_j0.c 5.1 93/09/24 */
2 /*
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
6 * Developed at SunPro, a Sun Microsystems, Inc. business.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
9 * is preserved.
10 * ====================================================
13 #if defined(LIBM_SCCS) && !defined(lint)
14 static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $";
15 #endif
18 * wrapper j0(double x), y0(double x)
21 #include "math.h"
22 #include "math_private.h"
24 #ifdef __STDC__
25 double __j0(double x) /* wrapper j0 */
26 #else
27 double __j0(x) /* wrapper j0 */
28 double x;
29 #endif
31 #ifdef _IEEE_LIBM
32 return __ieee754_j0(x);
33 #else
34 double z = __ieee754_j0(x);
35 if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
36 if(fabs(x)>X_TLOSS) {
37 return __kernel_standard(x,x,34); /* j0(|x|>X_TLOSS) */
38 } else
39 return z;
40 #endif
42 weak_alias (__j0, j0)
43 #ifdef NO_LONG_DOUBLE
44 strong_alias (__j0, __j0l)
45 weak_alias (__j0, j0l)
46 #endif
49 #ifdef __STDC__
50 double __y0(double x) /* wrapper y0 */
51 #else
52 double __y0(x) /* wrapper y0 */
53 double x;
54 #endif
56 #ifdef _IEEE_LIBM
57 return __ieee754_y0(x);
58 #else
59 double z;
60 z = __ieee754_y0(x);
61 if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
62 if(x <= 0.0){
63 if(x==0.0)
64 /* d= -one/(x-x); */
65 return __kernel_standard(x,x,8);
66 else
67 /* d = zero/(x-x); */
68 return __kernel_standard(x,x,9);
70 if(x>X_TLOSS) {
71 return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */
72 } else
73 return z;
74 #endif
76 weak_alias (__y0, y0)
77 #ifdef NO_LONG_DOUBLE
78 strong_alias (__y0, __y0l)
79 weak_alias (__y0, y0l)
80 #endif