BigDecimal.sqrt is broken
-------------------------

                 Key: JRUBY-4772
                 URL: http://jira.codehaus.org/browse/JRUBY-4772
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.5.0.RC2
         Environment: Mac OS X 10.6.3
            Reporter: Hans-Georg Höhne


jruby-1.5.0.rc2 > require 'bigdecimal'
 => true 
jruby-1.5.0.rc2 > require 'bigdecimal/math'
 => true
jruby-1.5.0.rc2 > include BigMath          
 => Object 

// ok
jruby-1.5.0.rc2 > two = BigDecimal("2")
 => #<BigDecimal:3f3a0212,'0.2E1',1(4)> 
jruby-1.5.0.rc2 > sqrt(two, 4).to_s
 => "0.14142136E1"

// bugs 
jruby-1.5.0.rc2 > twopoint = BigDecimal("2.0")
 => #<BigDecimal:5140709,'0.2E1',1(4)> 
jruby-1.5.0.rc2 > sqrt(twopoint, 4).to_s      
 => "0.14142136E2" 
jruby-1.5.0.rc2 > sqrt(twopoint, 30).to_s
 => "0.4551558846033635285558452470029167E1" 
jruby-1.5.0.rc2 > sqrt(twopoint, 60).to_s
 => "0.3048976695642557844097648087475601554101012066739306965391668523E1" 


-- 
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