[GHC] #15115: `Numeric.showEFloat` does not honor precision with 0 digits
GHC
ghc-devs at haskell.org
Sun May 13 22:31:09 UTC 2018
#15115: `Numeric.showEFloat` does not honor precision with 0 digits
-------------------------------------+-------------------------------------
Reporter: guibou | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.6.1
Component: libraries/base | Version: 8.4.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| libraries/base/tests/Numeric/num008
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4665
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"9039f847a568ac69436d449b9fe090ecd03b9e06/ghc"
9039f847/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="9039f847a568ac69436d449b9fe090ecd03b9e06"
base: Fix handling of showEFloat (Just 0)
Previously `showEFloat (Just 0) pi ""` would produce `3.0e0`. Of
course, this
blatantly disrespects the user's request to print with zero digits of
precision.
Fix this.
This is tested by base's `num008` testcase.
Test Plan: Validate
Reviewers: hvr
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15115
Differential Revision: https://phabricator.haskell.org/D4665
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15115#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list