e_log.c (7dbbb6dde39391c17de03d7901dad76de99a14ff) | e_log.c (25a4d6bfda29119996f6bd93c02914ba646634fa) |
---|---|
1 2/* @(#)e_log.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 --- 51 unchanged lines hidden (view full) --- 60 * 61 * Constants: 62 * The hexadecimal values are the intended ones for the following 63 * constants. The decimal values may be used, provided that the 64 * compiler will convert from decimal to binary accurately enough 65 * to produce the hexadecimal values shown. 66 */ 67 | 1 2/* @(#)e_log.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 --- 51 unchanged lines hidden (view full) --- 60 * 61 * Constants: 62 * The hexadecimal values are the intended ones for the following 63 * constants. The decimal values may be used, provided that the 64 * compiler will convert from decimal to binary accurately enough 65 * to produce the hexadecimal values shown. 66 */ 67 |
68#include <float.h> 69 |
|
68#include "math.h" 69#include "math_private.h" 70 71static const double 72ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */ 73ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */ 74two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */ 75Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */ --- 58 unchanged lines hidden (view full) --- 134 hfsq=0.5*f*f; 135 if(k==0) return f-(hfsq-s*(hfsq+R)); else 136 return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f); 137 } else { 138 if(k==0) return f-s*(f-R); else 139 return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f); 140 } 141} | 70#include "math.h" 71#include "math_private.h" 72 73static const double 74ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */ 75ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */ 76two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */ 77Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */ --- 58 unchanged lines hidden (view full) --- 136 hfsq=0.5*f*f; 137 if(k==0) return f-(hfsq-s*(hfsq+R)); else 138 return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f); 139 } else { 140 if(k==0) return f-s*(f-R); else 141 return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f); 142 } 143} |
144 145#if (LDBL_MANT_DIG == 53) 146__weak_reference(log, logl); 147#endif |
|