projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
eca1c35
)
minor fix in __tanl (get sign properly)
author
nsz
<nsz@port70.net>
Mon, 19 Mar 2012 18:14:32 +0000
(19:14 +0100)
committer
nsz
<nsz@port70.net>
Mon, 19 Mar 2012 18:14:32 +0000
(19:14 +0100)
src/math/__tanl.c
patch
|
blob
|
history
diff --git
a/src/math/__tanl.c
b/src/math/__tanl.c
index
e39e9df
..
50ba214
100644
(file)
--- a/
src/math/__tanl.c
+++ b/
src/math/__tanl.c
@@
-51,8
+51,7
@@
long double __tanl(long double x, long double y, int iy) {
int i;
iy = iy == 1 ? -1 : 1; /* XXX recover original interface */
- // FIXME: this is wrong, use copysign, signbit or union bithack
- osign = x >= 0 ? 1.0 : -1.0; /* XXX slow, probably wrong for -0 */
+ osign = copysignl(1.0, x);
if (fabsl(x) >= 0.67434) {
if (x < 0) {
x = -x;