Back to index

glibc  2.9
w_j1.c
Go to the documentation of this file.
00001 /* @(#)w_j1.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_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $";
00015 #endif
00016 
00017 /*
00018  * wrapper of j1,y1
00019  */
00020 
00021 #include <math.h>
00022 #include "math_private.h"
00023 
00024 #ifdef __STDC__
00025        double j1(double x)         /* wrapper j1 */
00026 #else
00027        double j1(x)                /* wrapper j1 */
00028        double x;
00029 #endif
00030 {
00031 #ifdef _IEEE_LIBM
00032        return __ieee754_j1(x);
00033 #else
00034        double z;
00035        z = __ieee754_j1(x);
00036        if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
00037        if(fabs(x)>X_TLOSS) {
00038                return __kernel_standard(x,x,36); /* j1(|x|>X_TLOSS) */
00039        } else
00040            return z;
00041 #endif
00042 }
00043 #ifdef NO_LONG_DOUBLE
00044 strong_alias (j1, j1l)
00045 #endif
00046 
00047 
00048 #ifdef __STDC__
00049        double y1(double x)         /* wrapper y1 */
00050 #else
00051        double y1(x)                /* wrapper y1 */
00052        double x;
00053 #endif
00054 {
00055 #ifdef _IEEE_LIBM
00056        return __ieee754_y1(x);
00057 #else
00058        double z;
00059        z = __ieee754_y1(x);
00060        if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
00061         if(x <= 0.0){
00062                 if(x==0.0)
00063                     /* d= -one/(x-x); */
00064                     return __kernel_standard(x,x,10);
00065                 else
00066                     /* d = zero/(x-x); */
00067                     return __kernel_standard(x,x,11);
00068         }
00069        if(x>X_TLOSS) {
00070                return __kernel_standard(x,x,37); /* y1(x>X_TLOSS) */
00071        } else
00072            return z;
00073 #endif
00074 }
00075 #ifdef NO_LONG_DOUBLE
00076 strong_alias (y1, y1l)
00077 #endif