Skip to content

Commit 158e590

Browse files
authored
log of 0 :( (#4)
1 parent 9c33ec0 commit 158e590

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Data/Formatter/Number.purs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ import Text.Parsing.Parser as P
3333
import Text.Parsing.Parser.Combinators as PC
3434
import Text.Parsing.Parser.String as PS
3535

36-
37-
3836
type Formatter =
3937
{ comma Boolean
4038
, before Int
@@ -80,7 +78,7 @@ format ∷ Formatter → Number → String
8078
format f num =
8179
let
8280
absed = Math.abs num
83-
tens = Int.floor $ Math.log absed / Math.ln10
81+
tens = if absed > 0.0 then Int.floor $ Math.log absed / Math.ln10 else 0
8482
in if f.abbreviations
8583
then
8684
let

0 commit comments

Comments
 (0)