[BACK]Return to e_lgammaf_r.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libm / src

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libm/src/e_lgammaf_r.c between version 1.4 and 1.5

version 1.4, 1997/10/09 11:29:25 version 1.5, 1999/07/02 15:37:40
Line 8 
Line 8 
  *   *
  * Developed at SunPro, a Sun Microsystems, Inc. business.   * Developed at SunPro, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this   * Permission to use, copy, modify, and distribute this
  * software is freely granted, provided that this notice   * software is freely granted, provided that this notice
  * is preserved.   * is preserved.
  * ====================================================   * ====================================================
  */   */
Line 22  __RCSID("$NetBSD$");
Line 22  __RCSID("$NetBSD$");
 #include "math_private.h"  #include "math_private.h"
   
 #ifdef __STDC__  #ifdef __STDC__
 static const float  static const float
 #else  #else
 static float  static float
 #endif  #endif
 two23=  8.3886080000e+06, /* 0x4b000000 */  two23=  8.3886080000e+06, /* 0x4b000000 */
 half=  5.0000000000e-01, /* 0x3f000000 */  half=  5.0000000000e-01, /* 0x3f000000 */
Line 137  static float zero=  0.0000000000e+00;
Line 137  static float zero=  0.0000000000e+00;
         }          }
         switch (n) {          switch (n) {
             case 0:   y =  __kernel_sinf(pi*y,zero,0); break;              case 0:   y =  __kernel_sinf(pi*y,zero,0); break;
             case 1:              case 1:
             case 2:   y =  __kernel_cosf(pi*((float)0.5-y),zero); break;              case 2:   y =  __kernel_cosf(pi*((float)0.5-y),zero); break;
             case 3:              case 3:
             case 4:   y =  __kernel_sinf(pi*(one-y),zero,0); break;              case 4:   y =  __kernel_sinf(pi*(one-y),zero,0); break;
             case 5:              case 5:
             case 6:   y = -__kernel_cosf(pi*(y-(float)1.5),zero); break;              case 6:   y = -__kernel_cosf(pi*(y-(float)1.5),zero); break;
Line 213  static float zero=  0.0000000000e+00;
Line 213  static float zero=  0.0000000000e+00;
                 p3 = t2+w*(t5+w*(t8+w*(t11+w*t14)));                  p3 = t2+w*(t5+w*(t8+w*(t11+w*t14)));
                 p  = z*p1-(tt-w*(p2+y*p3));                  p  = z*p1-(tt-w*(p2+y*p3));
                 r += (tf + p); break;                  r += (tf + p); break;
               case 2:                case 2:
                 p1 = y*(u0+y*(u1+y*(u2+y*(u3+y*(u4+y*u5)))));                  p1 = y*(u0+y*(u1+y*(u2+y*(u3+y*(u4+y*u5)))));
                 p2 = one+y*(v1+y*(v2+y*(v3+y*(v4+y*v5))));                  p2 = one+y*(v1+y*(v2+y*(v3+y*(v4+y*v5))));
                 r += (-(float)0.5*y + p1/p2);                  r += (-(float)0.5*y + p1/p2);
Line 242  static float zero=  0.0000000000e+00;
Line 242  static float zero=  0.0000000000e+00;
             y = z*z;              y = z*z;
             w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6)))));              w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6)))));
             r = (x-half)*(t-one)+w;              r = (x-half)*(t-one)+w;
         } else          } else
     /* 2**58 <= x <= inf */      /* 2**58 <= x <= inf */
             r =  x*(__ieee754_logf(x)-one);              r =  x*(__ieee754_logf(x)-one);
         if(hx<0) r = nadj - r;          if(hx<0) r = nadj - r;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

CVSweb <webmaster@jp.NetBSD.org>