projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9b6899f
)
make lrint and llrint functions work without fenv support
author
nsz
<nsz@port70.net>
Sun, 18 Mar 2012 19:40:43 +0000
(20:40 +0100)
committer
nsz
<nsz@port70.net>
Sun, 18 Mar 2012 19:40:43 +0000
(20:40 +0100)
src/math/llrint.c
patch
|
blob
|
history
src/math/llrintf.c
patch
|
blob
|
history
src/math/llrintl.c
patch
|
blob
|
history
src/math/lrint.c
patch
|
blob
|
history
src/math/lrintf.c
patch
|
blob
|
history
src/math/lrintl.c
patch
|
blob
|
history
diff --git
a/src/math/llrint.c
b/src/math/llrint.c
index
ee783b8
..
4f583ae
100644
(file)
--- a/
src/math/llrint.c
+++ b/
src/math/llrint.c
@@
-1,6
+1,6
@@
#include <math.h>
#include <math.h>
-/*
assum
es LLONG_MAX > 2^53, see comments in lrint.c */
+/*
us
es LLONG_MAX > 2^53, see comments in lrint.c */
long long llrint(double x)
{
long long llrint(double x)
{
diff --git
a/src/math/llrintf.c
b/src/math/llrintf.c
index
e41b6d4
..
96949a0
100644
(file)
--- a/
src/math/llrintf.c
+++ b/
src/math/llrintf.c
@@
-1,6
+1,6
@@
#include <math.h>
#include <math.h>
-/*
assum
es LLONG_MAX > 2^24, see comments in lrint.c */
+/*
us
es LLONG_MAX > 2^24, see comments in lrint.c */
long long llrintf(float x)
{
long long llrintf(float x)
{
diff --git
a/src/math/llrintl.c
b/src/math/llrintl.c
index
f1cc47e
..
32bb8b0
100644
(file)
--- a/
src/math/llrintl.c
+++ b/
src/math/llrintl.c
@@
-8,7
+8,7
@@
long long llrintl(long double x)
{
return llrint(x);
}
{
return llrint(x);
}
-#el
se
+#el
if defined(FE_INEXACT)
/*
see comments in lrint.c
/*
see comments in lrint.c
@@
-27,4
+27,9
@@
long long llrintl(long double x)
/* conversion */
return x;
}
/* conversion */
return x;
}
+#else
+long long llrintl(long double x)
+{
+ return rintl(x);
+}
#endif
#endif
diff --git
a/src/math/lrint.c
b/src/math/lrint.c
index
feba28d
..
6709183
100644
(file)
--- a/
src/math/lrint.c
+++ b/
src/math/lrint.c
@@
-25,7
+25,7
@@
otherwise LONG_MAX and LONG_MIN can be represented exactly
as a double.
*/
as a double.
*/
-#if LONG_MAX < 1U<<53
+#if LONG_MAX < 1U<<53
&& defined(FE_INEXACT)
long lrint(double x)
{
int e;
long lrint(double x)
{
int e;
diff --git
a/src/math/lrintf.c
b/src/math/lrintf.c
index
34d1081
..
ca0b6a4
100644
(file)
--- a/
src/math/lrintf.c
+++ b/
src/math/lrintf.c
@@
-1,6
+1,6
@@
#include <math.h>
#include <math.h>
-/*
assum
es LONG_MAX > 2^24, see comments in lrint.c */
+/*
us
es LONG_MAX > 2^24, see comments in lrint.c */
long lrintf(float x)
{
long lrintf(float x)
{
diff --git
a/src/math/lrintl.c
b/src/math/lrintl.c
index
0e579bc
..
5eb1ba7
100644
(file)
--- a/
src/math/lrintl.c
+++ b/
src/math/lrintl.c
@@
-8,7
+8,7
@@
long lrintl(long double x)
{
return lrint(x);
}
{
return lrint(x);
}
-#el
se
+#el
if defined(FE_INEXACT)
/*
see comments in lrint.c
/*
see comments in lrint.c
@@
-27,4
+27,9
@@
long lrintl(long double x)
/* conversion */
return x;
}
/* conversion */
return x;
}
+#else
+long lrintl(long double x)
+{
+ return rintl(x);
+}
#endif
#endif