Back to index

glibc  2.9
w_j1l.c
Go to the documentation of this file.
00001 /* w_j1l.c -- long double version of w_j1.c.
00002  * Conversion to long double by Ulrich Drepper,
00003  * Cygnus Support, drepper@cygnus.com.
00004  */
00005 
00006 /*
00007  * ====================================================
00008  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
00009  *
00010  * Developed at SunPro, a Sun Microsystems, Inc. business.
00011  * Permission to use, copy, modify, and distribute this
00012  * software is freely granted, provided that this notice
00013  * is preserved.
00014  * ====================================================
00015  */
00016 
00017 #if defined(LIBM_SCCS) && !defined(lint)
00018 static char rcsid[] = "$NetBSD: $";
00019 #endif
00020 
00021 /*
00022  * wrapper of j1l,y1l
00023  */
00024 
00025 #include <math.h>
00026 #include "math_private.h"
00027 
00028 #ifdef __STDC__
00029        long double __j1l(long double x)   /* wrapper j1l */
00030 #else
00031        long double __j1l(x)               /* wrapper j1l */
00032        long double x;
00033 #endif
00034 {
00035 #ifdef _IEEE_LIBM
00036        return __ieee754_j1l(x);
00037 #else
00038        long double z;
00039        z = __ieee754_j1l(x);
00040        if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
00041        if(fabsl(x)>X_TLOSS) {
00042                return __kernel_standard(x,x,236); /* j1(|x|>X_TLOSS) */
00043        } else
00044            return z;
00045 #endif
00046 }
00047 weak_alias (__j1l, j1l)
00048 
00049 #ifdef __STDC__
00050        long double __y1l(long double x)   /* wrapper y1l */
00051 #else
00052        long double __y1l(x)               /* wrapper y1l */
00053        long double x;
00054 #endif
00055 {
00056 #ifdef _IEEE_LIBM
00057        return __ieee754_y1l(x);
00058 #else
00059        long double z;
00060        z = __ieee754_y1l(x);
00061        if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
00062         if(x <= 0.0){
00063                 if(x==0.0)
00064                     /* d= -one/(x-x); */
00065                     return __kernel_standard(x,x,210);
00066                 else
00067                     /* d = zero/(x-x); */
00068                     return __kernel_standard(x,x,211);
00069         }
00070        if(x>X_TLOSS) {
00071                return __kernel_standard(x,x,237); /* y1(x>X_TLOSS) */
00072        } else
00073            return z;
00074 #endif
00075 }
00076 weak_alias (__y1l, y1l)