Skip to content

Floats print with incorrect rounding in compact context #36234

@rdeits

Description

@rdeits

Similar to #33185 but present in 1.4.2 and 1.5-beta1.

Originally from: https://discourse.julialang.org/t/incorrect-display-of-array-float64-2-numbers/41200/3

MWE:

julia> sprint(show, -498796.2749933266, context=:compact=>true)
"-498796.0"

The .0 is wrong--it ought to be .3.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviordisplay and printingAesthetics and correctness of printed representations of objects.regressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions