Subject: Re: Is this a bug?
From: Rimantas Liubertas <rimantas gmail.com>
Date: Tue, 21 Sep 2010 06:48:14 +0900
References: 370150
In-reply-to: 370150
> note the inconsistent rounding.
>
> -1.05 rounds to -1.1
> and
> -32.50 rounds to -32.0
>
> from sprintf
For me it looks like you are rounding -32.05, not -32.50.
> irb(main):003:0> sprintf("%.1f",-32.05)
Regards, Rimantas
--
http://rimantas.com/