Version
110.99.7.1 (Latest)
Operating System
OS Version
No response
Processor
System Component
Core system
Severity
Minor
Description
The constant folding of word equality produces incorrect results when one of the arguments is a negative integer wrapped by the Word.fromInt function. Note that constant folding other comparison operators works correctly.
This issue was extracted from the Issue #340 report.
Transcript
Standard ML of New Jersey [Version 110.99.7.1; 64-bit; January 17, 2025]
- Word.fromInt ~1 = 0wx7fffffffffffffff;
val it = false : bool
- Word.fromInt ~1;
val it = 0wx7FFFFFFFFFFFFFFF : word
- it = 0wx7fffffffffffffff;
val it = true : bool
Expected Behavior
Since Word.fromInt ~1 is 0wx7FFFFFFFFFFFFFFF, a result of true is expected.
Steps to Reproduce
See above.
Additional Information
No response
Email address
jhr@cs.uchicago.edu
Version
110.99.7.1 (Latest)
Operating System
OS Version
No response
Processor
System Component
Core system
Severity
Minor
Description
The constant folding of word equality produces incorrect results when one of the arguments is a negative integer wrapped by the
Word.fromIntfunction. Note that constant folding other comparison operators works correctly.This issue was extracted from the Issue #340 report.
Transcript
Expected Behavior
Since
Word.fromInt ~1is0wx7FFFFFFFFFFFFFFF, a result oftrueis expected.Steps to Reproduce
See above.
Additional Information
No response
Email address
jhr@cs.uchicago.edu