From: Evan Shaw Date: Tue, 1 Jun 2010 21:08:15 +0000 (-0700) Subject: runtime: Fix printing -Inf X-Git-Tag: weekly.2010-06-09~50 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=69879f04147ca80f231e6ce6e6c50bbdd3f1cd85;p=gostls13.git runtime: Fix printing -Inf R=rsc CC=golang-dev https://golang.org/cl/1258044 --- diff --git a/src/pkg/runtime/print.c b/src/pkg/runtime/print.c index 12484329eb..aa207e3124 100644 --- a/src/pkg/runtime/print.c +++ b/src/pkg/runtime/print.c @@ -200,12 +200,12 @@ void write(fd, "NaN", 3); return; } - if(isInf(v, 0)) { + if(isInf(v, 1)) { write(fd, "+Inf", 4); return; } if(isInf(v, -1)) { - write(fd, "+Inf", 4); + write(fd, "-Inf", 4); return; }