-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
bugSomething isn't workingSomething isn't workingfixed-in-110.99.6issues that will be fixed in the 110.99.6 versionissues that will be fixed in the 110.99.6 versionsmlnj-libGeneral issue with the SML/NJ Library or the Util componentGeneral issue with the SML/NJ Library or the Util component
Description
Version
110.99.4
Operating System
- Any
- Linux
- macOS
- Windows
- Other Unix
OS Version
Catalina
Processor
- Any
- Arm (using Rosetta)
- PowerPC
- Sparc
- x86 (32-bit)
- x86-64 (64-bit)
- Other
System Component
SML/NJ Library
Severity
Minor
Description
I think the behavior of Random.randRange has changed in the past year (since I last used a homework that suddenly had a bug), and is inconsistent with the documentation. The documentation says "val randRange : (int * int) -> rand -> int
randRange (lo, hi) rand generates a random number in the [lo..hi]. This function will raise the Fail exception if hi < lo." This suggests one should be able to call it with low = hi (and necessarily get low=hi as the output). However,
Random.randRange (1,1) (Random.rand(1,2));
raises Div.
Transcript
No response
Expected Behavior
No response
Steps to Reproduce
Random.randRange (1,1) (Random.rand(1,2));
Additional Information
No response
Email address
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixed-in-110.99.6issues that will be fixed in the 110.99.6 versionissues that will be fixed in the 110.99.6 versionsmlnj-libGeneral issue with the SML/NJ Library or the Util componentGeneral issue with the SML/NJ Library or the Util component