Skip to content

Problem with Real.fromString evaluating non-whole number strings on 32-bit systems #356

@qlbrpl

Description

@qlbrpl

Version

110.99.8 (Latest)

Operating System

  • Any
  • Linux
  • macOS
  • Windows
  • Other Unix

OS Version

Windows 11

Processor

  • Any
  • Arm (using Rosetta)
  • PowerPC
  • Sparc
  • x86 (32-bit)
  • x86-64 (64-bit)
  • Other

System Component

Basis Library

Severity

Major

Description

I have a problem with Real.fromString attempting to evaluate strings that should result in non-whole number outputs such as Real.fromString "3.1" which arose when I tried testing the bugfix to issue #354 (which is why I suspect this may be related to 32-bit systems). I'm using the windows installation of SMLNJ, which appears to be inherently 32-bit.

Transcript

  • Real.fromString "3.1";
    val it = SOME 9.31322575022E~10 : real option
  • Real.fromString "3.1E1";
    val it = SOME 31 : real option
  • Real.fromString "3.14";
    val it = SOME 5.96046447916E~8 : real option
  • Real.fromString "3.14E1";
    val it = SOME 1.4901161198E~8 : real option
  • Real.fromString "3.14E2";
    val it = SOME 314 : real option
  • Real.fromString "3.14159E4";
    val it = SOME 1.52587890666E~5 : real option
  • Real.fromString "3.14159E5";
    val it = SOME 314159 : real option
  • Real.fromString "3141.59E2";
    val it = SOME 314159 : real option
  • Real.fromString "3141.59E1";
    val it = SOME 1.52587890666E~5 : real option
  • Real.fromString "-3141.59E1";
    val it = SOME ~1.52587890666E~5 : real option

Expected Behavior

I think pretty clear what it should do

Steps to Reproduce

see above

Additional Information

No response

Email address

akleber@wesleyan.edu

Metadata

Metadata

Assignees

Labels

32-bit systemsIssues specific to legacy 32-bit systemsbugSomething isn't workingfixed-in-110.99.9issues fixed in the 110.99.9 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions