Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
2ab51a53
Commit
2ab51a53
authored
Nov 01, 1999
by
sof
Browse files
[project @ 1999-11-01 10:16:03 by sof]
formatRealFloat: Fixed some e==0 confusion in the default case for FFExponent
parent
477c02bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/lib/std/PrelNumExtra.lhs
View file @
2ab51a53
...
...
@@ -751,10 +751,11 @@ formatRealFloat fmt decs x
FFExponent ->
case decs of
Nothing ->
let e' = if e==0 then 0 else e-1 in
(case ds of
[d] -> d : ".0e"
(d:ds') -> d : '.' : ds' ++ "e") ++ show e'
let show_e' = show (e-1) in
case ds of
"0" -> "0.0e0"
[d] -> d : ".0e" ++ show_e'
(d:ds') -> d : '.' : ds' ++ "e" ++ show_e'
Just dec ->
let dec' = max dec 1 in
case is of
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment