diff options
Diffstat (limited to 'libgo/runtime/print.c')
-rw-r--r-- | libgo/runtime/print.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libgo/runtime/print.c b/libgo/runtime/print.c index ba0b86a..d00b638 100644 --- a/libgo/runtime/print.c +++ b/libgo/runtime/print.c @@ -208,7 +208,10 @@ runtime_printfloat(double v) n = 7; // digits printed e = 0; // exp s = 0; // sign - if(v != 0) { + if(v == 0) { + if(isinf(1/v) && 1/v < 0) + s = 1; + } else { // sign if(v < 0) { v = -v; |