Back to index

glibc  2.9
w_j0.c
Go to the documentation of this file.
00001 /* @(#)w_j0.c 5.1 93/09/24 */
00002 /*
00003  * ====================================================
00004  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
00005  *
00006  * Developed at SunPro, a Sun Microsystems, Inc. business.
00007  * Permission to use, copy, modify, and distribute this
00008  * software is freely granted, provided that this notice
00009  * is preserved.
00010  * ====================================================
00011  */
00012 
00013 #if defined(LIBM_SCCS) && !defined(lint)
00014 static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $";
00015 #endif
00016 
00017 /*
00018  * wrapper j0(double x), y0(double x)
00019  */
00020 
00021 #include <math.h>
00022 #include "math_private.h"
00023 
00024 #ifdef __STDC__
00025        double j0(double x)         /* wrapper j0 */
00026 #else
00027        double j0(x)                /* wrapper j0 */
00028        double x;
00029 #endif
00030 {
00031 #ifdef _IEEE_LIBM
00032        return __ieee754_j0(x);
00033 #else
00034        double z = __ieee754_j0(x);
00035        if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
00036        if(fabs(x)>X_TLOSS) {
00037                return __kernel_standard(x,x,34); /* j0(|x|>X_TLOSS) */
00038        } else
00039            return z;
00040 #endif
00041 }
00042 #ifdef NO_LONG_DOUBLE
00043 strong_alias (j0, j0l)
00044 #endif
00045 
00046 
00047 #ifdef __STDC__
00048        double y0(double x)         /* wrapper y0 */
00049 #else
00050        double y0(x)                /* wrapper y0 */
00051        double x;
00052 #endif
00053 {
00054 #ifdef _IEEE_LIBM
00055        return __ieee754_y0(x);
00056 #else
00057        double z;
00058        z = __ieee754_y0(x);
00059        if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
00060         if(x <= 0.0){
00061                 if(x==0.0)
00062                     /* d= -one/(x-x); */
00063                     return __kernel_standard(x,x,8);
00064                 else
00065                     /* d = zero/(x-x); */
00066                     return __kernel_standard(x,x,9);
00067         }
00068        if(x>X_TLOSS) {
00069                return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */
00070        } else
00071            return z;
00072 #endif
00073 }
00074 #ifdef NO_LONG_DOUBLE
00075 strong_alias (y0, y0l)
00076 #endif