Fixed some especially horrible style bugs (indentation that is neither
KNF nor fdlibmNF combined with multiple statements per line).
This commit is contained in:
parent
b09cdadf21
commit
809376d69d
@ -63,12 +63,13 @@ cbrt(double x)
|
||||
* subtraction virtually to keep e >= 0 so that ordinary integer
|
||||
* division rounds towards minus infinity; this is also efficient.
|
||||
*/
|
||||
if(hx<0x00100000) /* subnormal number */
|
||||
{SET_HIGH_WORD(t,0x43500000); /* set t= 2**54 */
|
||||
t*=x; GET_HIGH_WORD(high,t); SET_HIGH_WORD(t,high/3+B2);
|
||||
}
|
||||
else
|
||||
SET_HIGH_WORD(t,hx/3+B1);
|
||||
if(hx<0x00100000) { /* subnormal number */
|
||||
SET_HIGH_WORD(t,0x43500000); /* set t= 2**54 */
|
||||
t*=x;
|
||||
GET_HIGH_WORD(high,t);
|
||||
SET_HIGH_WORD(t,high/3+B2);
|
||||
} else
|
||||
SET_HIGH_WORD(t,hx/3+B1);
|
||||
|
||||
/* new cbrt to 23 bits; may be implemented in single precision */
|
||||
r=t*t/x;
|
||||
|
@ -52,12 +52,13 @@ cbrtf(float x)
|
||||
|
||||
SET_FLOAT_WORD(x,hx); /* x <- |x| */
|
||||
/* rough cbrt to 5 bits */
|
||||
if(hx<0x00800000) /* subnormal number */
|
||||
{SET_FLOAT_WORD(t,0x4b800000); /* set t= 2**24 */
|
||||
t*=x; GET_FLOAT_WORD(high,t); SET_FLOAT_WORD(t,high/3+B2);
|
||||
}
|
||||
else
|
||||
SET_FLOAT_WORD(t,hx/3+B1);
|
||||
if(hx<0x00800000) { /* subnormal number */
|
||||
SET_FLOAT_WORD(t,0x4b800000); /* set t= 2**24 */
|
||||
t*=x;
|
||||
GET_FLOAT_WORD(high,t);
|
||||
SET_FLOAT_WORD(t,high/3+B2);
|
||||
} else
|
||||
SET_FLOAT_WORD(t,hx/3+B1);
|
||||
|
||||
/* new cbrt to 23 bits */
|
||||
r=t*t/x;
|
||||
|
Loading…
x
Reference in New Issue
Block a user