projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove TCP_COOKIE_TRANSACTIONS from tcp.h
[musl]
/
src
/
math
/
modfl.c
diff --git
a/src/math/modfl.c
b/src/math/modfl.c
index
2ca67b1
..
bbfcdb8
100644
(file)
--- a/
src/math/modfl.c
+++ b/
src/math/modfl.c
@@
-40,7
+40,7
@@
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double modfl(long double x, long double *iptr)
{
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double modfl(long double x, long double *iptr)
{
- return modf(x, iptr);
+ return modf(x,
(double *)
iptr);
}
#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
}
#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
@@
-54,7
+54,7
@@
long double modfl(long double x, long double *iptr)
/* The number of fraction bits in manh, not counting the integer bit */
#define HIBITS (LDBL_MANT_DIG - LDBL_MANL_SIZE)
/* The number of fraction bits in manh, not counting the integer bit */
#define HIBITS (LDBL_MANT_DIG - LDBL_MANL_SIZE)
-static const long double zero[] = { 0.0
L, -0.0L
};
+static const long double zero[] = { 0.0
, -0.0
};
long double modfl(long double x, long double *iptr)
{
long double modfl(long double x, long double *iptr)
{
@@
-81,7
+81,7
@@
long double modfl(long double x, long double *iptr)
return x - ux.e;
} else if (e >= LDBL_MANT_DIG - 1) { /* x has no fraction part. */
*iptr = x;
return x - ux.e;
} else if (e >= LDBL_MANT_DIG - 1) { /* x has no fraction part. */
*iptr = x;
- if (
x != x) /* Handle NaNs.
*/
+ if (
e == LDBL_MAX_EXP && ((ux.bits.manh&~LDBL_NBIT)|ux.bits.manl)) /* nan
*/
return x;
return zero[ux.bits.sign];
} else { /* Fraction part is in manl. */
return x;
return zero[ux.bits.sign];
} else { /* Fraction part is in manl. */