From 6ee487b0eb88a21e6457b1750e0f8d829b971d17 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 10 Jan 2017 18:29:26 +0100 Subject: [PATCH] bugfix: abs(0.0) should be +0.0 --- compiler/ccgexprs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index ba4c6f485f..58c0d745c3 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -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