mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-20 07:51:32 +00:00
bugfix: abs(0.0) should be +0.0
This commit is contained in:
@@ -610,7 +610,7 @@ proc unaryArith(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
|
||||
"($3)((NU$2) ~($1))", # BitnotI
|
||||
"$1", # UnaryPlusF64
|
||||
"-($1)", # UnaryMinusF64
|
||||
"($1 > 0? ($1) : -($1))", # AbsF64; BUGFIX: fabs() makes problems
|
||||
"($1 < 0? -($1) : ($1))", # AbsF64; BUGFIX: fabs() makes problems
|
||||
# for Tiny C, so we don't use it
|
||||
"(($3)(NU)(NU8)($1))", # mZe8ToI
|
||||
"(($3)(NU64)(NU8)($1))", # mZe8ToI64
|
||||
|
||||
Reference in New Issue
Block a user