Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IEEEReal.float_class does not match the Basis Library #71

Closed
1 of 5 tasks
JohnReppy opened this issue Jul 15, 2022 · 0 comments
Closed
1 of 5 tasks

IEEEReal.float_class does not match the Basis Library #71

JohnReppy opened this issue Jul 15, 2022 · 0 comments
Assignees
Labels
basis-lib problem with Standard ML Basis library bug Something isn't working fixed-in-110.99.3 issues that will be fixed in the 110.99.3 version gforge bug (or feature request) ported from smlnj-gforge repository

Comments

@JohnReppy
Copy link
Contributor

JohnReppy commented Jul 15, 2022

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.

@JohnReppy JohnReppy added basis-lib problem with Standard ML Basis library bug Something isn't working gforge bug (or feature request) ported from smlnj-gforge repository labels Jul 15, 2022
@JohnReppy JohnReppy self-assigned this Jul 15, 2022
@JohnReppy JohnReppy added the fixed-in-110.99.3 issues that will be fixed in the 110.99.3 version label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basis-lib problem with Standard ML Basis library bug Something isn't working fixed-in-110.99.3 issues that will be fixed in the 110.99.3 version gforge bug (or feature request) ported from smlnj-gforge repository
Projects
None yet
Development

No branches or pull requests

1 participant