diff options
Diffstat (limited to 'misc/efgcvt_r.c')
-rw-r--r-- | misc/efgcvt_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c index 099b349..2da5e55 100644 --- a/misc/efgcvt_r.c +++ b/misc/efgcvt_r.c @@ -66,7 +66,7 @@ ecvt_r (value, ndigit, decpt, sign, buf, len) char *buf; size_t len; { - ndigit -= (int) floor (log10 (value)); + ndigit -= (int) floor (log10 (value < 0.0 ? -value : value)); if (ndigit < 0) ndigit = 0; return fcvt_r (value, ndigit, decpt, sign, buf, len); |