1 --- ipmitool-1.8.9/lib/ipmi_sdr.c.orig 2007-07-16 13:09:13.000000000 +0200
2 +++ ipmitool-1.8.9/lib/ipmi_sdr.c 2007-07-16 13:09:20.000000000 +0200
3 @@ -4264,3 +4264,144 @@
16 + * double x, y, cbrt();
24 + * Returns the cube root of the argument, which may be negative.
26 + * Range reduction involves determining the power of 2 of
27 + * the argument. A polynomial of degree 2 applied to the
28 + * mantissa, and multiplication by the cube root of 1, 2, or 4
29 + * approximates the root to within about 0.1%. Then Newton's
30 + * iteration is used three times to converge to an accurate
38 + * arithmetic domain # trials peak rms
39 + * DEC -10,10 200000 1.8e-17 6.2e-18
40 + * IEEE 0,1e308 30000 1.5e-16 5.0e-17
46 +Cephes Math Library Release 2.8: June, 2000
47 +Copyright 1984, 1991, 2000 by Stephen L. Moshier
51 +static double CBRT2 = 1.2599210498948731647672;
52 +static double CBRT4 = 1.5874010519681994747517;
53 +static double CBRT2I = 0.79370052598409973737585;
54 +static double CBRT4I = 0.62996052494743658238361;
57 +extern double frexp ( double, int * );
58 +extern double ldexp ( double, int );
59 +extern int isnan ( double );
60 +extern int isfinite ( double );
62 +double frexp(), ldexp();
63 +int isnan(), isfinite();
91 +/* extract power of 2, leaving
92 + * mantissa between 0.5 and 1
96 +/* Approximate cube root of number between .5 and 1,
97 + * peak relative error = 9.2e-6
99 +x = (((-1.3466110473359520655053e-1 * x
100 + + 5.4664601366395524503440e-1) * x
101 + - 9.5438224771509446525043e-1) * x
102 + + 1.1399983354717293273738e0 ) * x
103 + + 4.0238979564544752126924e-1;
105 +/* exponent divided by 3 */
113 + else if( rem == 2 )
118 +/* argument less than 1 */
128 + else if( rem == 2 )
133 +/* multiply by power of 2 */
136 +/* Newton iteration */
137 +x -= ( x - (z/(x*x)) )*0.33333333333333333333;
139 +x -= ( x - (z/(x*x)) )/3.0;
141 +x -= ( x - (z/(x*x)) )*0.33333333333333333333;