Skip to content

IEEEReal.float_class does not match the Basis Library #71

@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

The Basis Library defines

datatype float_class
= NAN
| INF
| ZERO
| NORMAL
| SUBNORMAL

in https://smlfamily.github.io/Basis/ieee-float.html

In SML/NJ, the constructor NAN takes an argument:

  datatype nan_mode = QUIET | SIGNALLING
  datatype float_class = INF | NAN of nan_mode | NORMAL | SUBNORMAL | ZERO

Due to the difference with the NAN constructor it is not possible to write portable SML code.
Additional comments:
When using a implementation of REAL, the function class can be avoided by using functions isFinite, isNan, isNormal and comparison with zero instead.

Transcript

No response

Expected Behavior

No response

Steps to Reproduce

No response

Additional Information

No response

Email address

phil.clayton@lineone.net

Comments from smlnj-gforge

Original smlnj-gforge bug number 315

Submitted via web form by Phil Clayton phil.clayton@lineone.net on 2022-06-29 at 15:50:00

Keywords: IEEEReal float_class NAN

comment by @JohnReppy on 2022-06-29 17:52:00 +000 UTC

This may have been a holdover from an earlier design of the Basis Library that was never updated in our implementation. I have fixed it 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 versiongforgebug (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