Skip to content

Conversion from string to real does not accept non-finite values #73

@JohnReppy

Description

@JohnReppy

Version

110.99

Operating System

  • All
  • Linux
  • macOS
  • Windows
  • Other Unix

OS Version

No response

Processor

No response

Component

Basis Library

Severity

Minor

Description of the problem

In the Basis Library, in signature REAL, the description of the functions scan and fromString states:

It also accepts the following string representations of non-finite values:
[+~-]?(inf | infinity | nan)
where the alphabetic characters are case-insensitive.

However these functions both return NONE for such non-finite values.
Additional comments:
Copied from polyml/polyml#181

Transcript

No response

Expected Behavior

No response

Steps to Reproduce

The following expressions should match SOME _:

  StringCvt.scanString Real.scan "nan";
  Real.fromString "-inf";

Additional Information

No response

Email address

phil.clayton@veonix.com

Comments from smlnj-gforge

Original smlnj-gforge bug number 317

Submitted via web form by Phil Clayton phil.clayton@veonix.com on 2022-07-05 at 13:17:00

Keywords: reals

comment by @JohnReppy on 2022-07-05 14:37:00 +000 UTC

Fixed for 110.99.3 and 2022.1

Metadata

Metadata

Assignees

Labels

basis-libproblem with Standard ML Basis librarybugSomething isn't workingfixed-in-110.99.3issues that will be fixed in the 110.99.3 versionfloating-pointproblem related to floating-point operationsgforgebug (or feature request) ported from smlnj-gforge repository

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions