projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b963b3d
)
Use integer bit tests in FLONUM-IS-NEGATIVE?.
author
Taylor R Campbell
<campbell@mumble.net>
Fri, 14 Dec 2018 15:18:04 +0000
(15:18 +0000)
committer
Taylor R Campbell
<campbell@mumble.net>
Sat, 15 Dec 2018 22:33:21 +0000
(22:33 +0000)
Otherwise this raises an exception for sNaN on i387.
src/microcode/flonum.c
patch
|
blob
|
history
diff --git
a/src/microcode/flonum.c
b/src/microcode/flonum.c
index 14bcb943e2560cc81da4ecd0dd69836e8575909c..b79ea6349ebcfbcd62c827faa542568b2d7f8bb3 100644
(file)
--- a/
src/microcode/flonum.c
+++ b/
src/microcode/flonum.c
@@
-525,7
+525,9
@@
DEFINE_PRIMITIVE ("FLONUM-IS-NORMAL?", Prim_flonum_is_normal_p, 1, 1, 0)
DEFINE_PRIMITIVE ("FLONUM-IS-NEGATIVE?", Prim_flonum_is_negative_p, 1, 1, 0)
{
PRIMITIVE_HEADER (1);
- PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (signbit (arg_flonum (1))));
+ PRIMITIVE_RETURN
+ (BOOLEAN_TO_OBJECT
+ ((UINT64_C (0x8000000000000000)) & (arg_flonum_binary64 (1))));
}
DEFINE_PRIMITIVE ("FLONUM-IS-GREATER?", Prim_flonum_is_greater_p, 2, 2, 0)