Skip to content

Real.fromManExp does not return expected value if man = 0.0 #72

@JohnReppy

Description

@JohnReppy

Version

110.99

Operating System

  • All
  • Linux
  • macOS
  • Windows
  • Other Unix

OS Version

No response

Processor

Any

Component

Basis Library

Severity

Minor

Description of the problem

For any integer exp the expression

Real.fromManExp {man = 0.0, exp = exp}

does not return the expected value. The Basis Library states "If man is +-0, the result is +-0."
https://smlfamily.github.io/Basis/real.html#SIG:REAL.fromManExp:VAL

With 110.85, the expression raises the exception Overflow.

With 110.99, evaluation of the expression does not terminate.

Transcript

No response

Expected Behavior

No response

Steps to Reproduce

Evaluate the expression

  Real.fromManExp {man = 0.0, exp = 0};

with versions 110.99 and 110.85.

Additional Information

No response

Email address

phil.clayton@veonix.com

Comments from smlnj-gforge

Original smlnj-gforge bug number 316

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

Keywords: reals

comment by @JohnReppy on 2022-07-05 15:12: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