sprintf rounds 5 down instead of up
-----------------------------------

                 Key: JRUBY-4802
                 URL: http://jira.codehaus.org/browse/JRUBY-4802
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.4
         Environment: $ ruby -v
jruby 1.6.0.dev (ruby 1.8.7 patchlevel 249) (2010-05-19 a0aea87) (Java 
HotSpot(TM) Server VM 1.6.0_17)
            Reporter: David Chelimsky
            Assignee: Thomas E Enebo


ruby-1.8.7-p249 > sprintf("%.5f", 0.000004)
 => "0.00000" 
ruby-1.8.7-p249 > sprintf("%.5f", 0.000005)
 => "0.00001" 
ruby-1.8.7-p249 > sprintf("%.5f", 0.000006)
 => "0.00001"


jruby-head > sprintf("%.5f", 0.000004)
 => "0.00000" 
jruby-head > sprintf("%.5f", 0.000005)
 => "0.00000" 
jruby-head > sprintf("%.5f", 0.000006)
 => "0.00001" 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to