We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c33ec0 commit 158e590Copy full SHA for 158e590
src/Data/Formatter/Number.purs
@@ -33,8 +33,6 @@ import Text.Parsing.Parser as P
33
import Text.Parsing.Parser.Combinators as PC
34
import Text.Parsing.Parser.String as PS
35
36
-
37
38
type Formatter =
39
{ comma ∷ Boolean
40
, before ∷ Int
@@ -80,7 +78,7 @@ format ∷ Formatter → Number → String
80
78
format f num =
81
79
let
82
absed = Math.abs num
83
- tens = Int.floor $ Math.log absed / Math.ln10
+ tens = if absed > 0.0 then Int.floor $ Math.log absed / Math.ln10 else 0
84
in if f.abbreviations
85
then
86
0 commit comments