Skip to content

Incorrect formatting of real number #194

@JohnReppy

Description

@JohnReppy

Version

110.85

Operating System

  • All
  • Linux
  • macOS
  • Windows
  • Other Unix

OS Version

No response

Processor

No response

Component

Basis Library

Severity

Cosmetic

Description of the problem

Formatting of a large integer represented as a real
number adds a fractional part. This bug turns up in
the Basis regression tests.
Additional comments:
This bug may be a problem with the handling of real literals,
since I've observed the following:

  • Real.fmt (StringCvt.FIX NONE) (91827364509182.0 * 10.0);
    val it = "918273645091821.000000" : string

Transcript

- Real.fmt (StringCvt.FIX NONE) 91827364509182.0;
val it = "91827364509182.100000" : string

Expected Behavior

No response

Steps to Reproduce

Real.fmt (StringCvt.FIX NONE) 91827364509182.0;

Additional Information

No response

Email address

jhr@cs.uchicago.edu

Comments from smlnj-gforge

Original smlnj-gforge bug number 221

Submitted via web form by John Reppy jhr@cs.uchicago.edu on 2019-05-03 at 16:36:00

Keywords: basis, reals

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions