Bionic: Aliasing problems with frexpf
This patch fixes a known bug in bionic libm due to aliasing issues in gcc 4.2 and 4.4; more specifically in frexpf. The function frexpf is used to extract the mantissa and exponent from a double precision number. The bug has already been reported here: https://code.google.com/p/android/issues/detail?id=6697 Change-Id: I2e1f2e0a45906642d2225b9d150ed391d2bf331c Signed-off-by: Rodrigo Obregon <robregon@ti.com>
This commit is contained in:
parent
96c03c7dcc
commit
fddaafceda
@ -39,6 +39,6 @@ frexpf(float x, int *eptr)
|
|||||||
}
|
}
|
||||||
*eptr += (ix>>23)-126;
|
*eptr += (ix>>23)-126;
|
||||||
hx = (hx&0x807fffff)|0x3f000000;
|
hx = (hx&0x807fffff)|0x3f000000;
|
||||||
*(int*)&x = hx;
|
SET_FLOAT_WORD(x,hx);
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user