fix incorrect long double parameters on arm (and other future ports)
this was the cause of crashes in printf when attempting to print floating point values.
This commit is contained in:
parent
53431b091b
commit
089aeb08a0
2 changed files with 22 additions and 10 deletions
|
|
@ -1,5 +1,8 @@
|
|||
#include <math.h>
|
||||
#include <inttypes.h>
|
||||
#include <float.h>
|
||||
|
||||
#if LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
|
||||
|
||||
/* This version is for 80-bit little endian long double */
|
||||
|
||||
|
|
@ -23,3 +26,12 @@ long double frexpl(long double x, int *e)
|
|||
y.hw[4] |= 0x3ffe;
|
||||
return y.ld;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
long double frexpl(long double x, int *e)
|
||||
{
|
||||
return frexp(x, e);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue