projects
/
libm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various minor style fixes
[libm]
/
src
/
math
/
nextafter.c
diff --git
a/src/math/nextafter.c
b/src/math/nextafter.c
index
00209d2
..
5e53654
100644
(file)
--- a/
src/math/nextafter.c
+++ b/
src/math/nextafter.c
@@
-45,22
+45,22
@@
double nextafter(double x, double y)
if (hx >= 0) { /* x > 0 */
if (hx > hy || (hx == hy && lx > ly)) { /* x > y, x -= ulp */
if (lx == 0)
if (hx >= 0) { /* x > 0 */
if (hx > hy || (hx == hy && lx > ly)) { /* x > y, x -= ulp */
if (lx == 0)
- hx
-= 1
;
- lx
-= 1
;
+ hx
--
;
+ lx
--
;
} else { /* x < y, x += ulp */
} else { /* x < y, x += ulp */
- lx
+= 1
;
+ lx
++
;
if (lx == 0)
if (lx == 0)
- hx
+= 1
;
+ hx
++
;
}
} else { /* x < 0 */
if (hy >= 0 || hx > hy || (hx == hy && lx > ly)) { /* x < y, x -= ulp */
if (lx == 0)
}
} else { /* x < 0 */
if (hy >= 0 || hx > hy || (hx == hy && lx > ly)) { /* x < y, x -= ulp */
if (lx == 0)
- hx
-= 1
;
- lx
-= 1
;
+ hx
--
;
+ lx
--
;
} else { /* x > y, x += ulp */
} else { /* x > y, x += ulp */
- lx
+= 1
;
+ lx
++
;
if (lx == 0)
if (lx == 0)
- hx
+= 1
;
+ hx
++
;
}
}
hy = hx & 0x7ff00000;
}
}
hy = hx & 0x7ff00000;