Skip to content
  • Ben Gamari's avatar
    base: Fix handling of showEFloat (Just 0) · 9039f847
    Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
    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
    9039f847