Commit 6fe14d87
6fe14d87f99fMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 4 files · +2 added · ~2 modified
Description
analyze,codegen: Float#next_float and #prev_float via libm nextafter
Adjacent IEEE 754 representable floats. `nextafter(x, +INFINITY)` / `nextafter(x, -INFINITY)` from libm; analyze claims float return.
Fixes #986
Co-Authored-By: Claude Opus 4.7 [email protected]
Details
- Commit
- 6fe14d87f99f
- Parent
- 1933b33c4fd2
spinel_analyze.rbmodifiedView file
@@ -5032,6 +5032,9 @@
50325032
if mname == "fdiv"50335033
return "float"50345034
end5035+
if mname == "next_float" || mname == "prev_float"5036+
return "float"5037+
end50355038
if mname == "nan?" || mname == "finite?"50365039
return "bool"50375040
endspinel_codegen.rbmodifiedView file
Loading diff…
test/float_next_prev.rbaddedView file
Loading diff…
test/float_next_prev.rb.expectedaddedView file
Loading diff…