Home | History | Annotate | Download | only in fdlibm
      1 
      2 /* @(#)w_j1.c 1.3 95/01/18 */
      3 /*
      4  * ====================================================
      5  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
      6  *
      7  * Developed at SunSoft, a Sun Microsystems, Inc. business.
      8  * Permission to use, copy, modify, and distribute this
      9  * software is freely granted, provided that this notice
     10  * is preserved.
     11  * ====================================================
     12  */
     13 
     14 /*
     15  * wrapper of j1,y1
     16  */
     17 
     18 #include "fdlibm.h"
     19 
     20 #ifdef __STDC__
     21 	double ieee_j1(double x)		/* wrapper j1 */
     22 #else
     23 	double ieee_j1(x)			/* wrapper j1 */
     24 	double x;
     25 #endif
     26 {
     27 #ifdef _IEEE_LIBM
     28 	return __ieee754_j1(x);
     29 #else
     30 	double z;
     31 	z = __ieee754_j1(x);
     32 	if(_LIB_VERSION == _IEEE_ || ieee_isnan(x) ) return z;
     33 	if(ieee_fabs(x)>X_TLOSS) {
     34 	        return __kernel_standard(x,x,36); /* ieee_j1(|x|>X_TLOSS) */
     35 	} else
     36 	    return z;
     37 #endif
     38 }
     39 
     40 #ifdef __STDC__
     41 	double ieee_y1(double x)		/* wrapper y1 */
     42 #else
     43 	double ieee_y1(x)			/* wrapper y1 */
     44 	double x;
     45 #endif
     46 {
     47 #ifdef _IEEE_LIBM
     48 	return __ieee754_y1(x);
     49 #else
     50 	double z;
     51 	z = __ieee754_y1(x);
     52 	if(_LIB_VERSION == _IEEE_ || ieee_isnan(x) ) return z;
     53         if(x <= 0.0){
     54                 if(x==0.0)
     55                     /* d= -one/(x-x); */
     56                     return __kernel_standard(x,x,10);
     57                 else
     58                     /* d = zero/(x-x); */
     59                     return __kernel_standard(x,x,11);
     60         }
     61 	if(x>X_TLOSS) {
     62 	        return __kernel_standard(x,x,37); /* ieee_y1(x>X_TLOSS) */
     63 	} else
     64 	    return z;
     65 #endif
     66 }
     67