[MacRuby] #1042: BigMath::log and BigMath:exp are broken

MacRuby ruby-noreply at macosforge.org
Tue Dec 14 19:56:24 PST 2010


#1042: BigMath::log and BigMath:exp are broken
-------------------------------------+--------------------------------------
 Reporter:  hghoehne@…               |       Owner:  lsansonetti@…        
     Type:  defect                   |      Status:  new                  
 Priority:  blocker                  |   Milestone:                       
Component:  MacRuby                  |    Keywords:                       
-------------------------------------+--------------------------------------
Changes (by lsansonetti@…):

  * milestone:  MacRuby 0.9 =>


Old description:

> {{{
> macruby -ve 'require "bigdecimal/math"; include BigMath; p
> exp(log(BigDecimal("20.0"), 200), 200).to_f'
> MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64]
> 16.6822127651354
> }}}
>

> {{{
> ruby -ve 'require "bigdecimal/math"; include BigMath; p
> exp(log(BigDecimal("20.0"), 200), 200).to_f'
> ruby 1.9.3dev (2010-12-15 trunk 30211) [x86_64-darwin10.3.0]
> 20.0
> }}}

New description:

 {{{
 macruby -ve 'require "bigdecimal/math"; include BigMath; p
 exp(log(BigDecimal("20.0"), 200), 200).to_f'
 MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64]
 16.6822127651354
 }}}


 {{{
 ruby -ve 'require "bigdecimal/math"; include BigMath; p
 exp(log(BigDecimal("20.0"), 200), 200).to_f'
 ruby 1.9.3dev (2010-12-15 trunk 30211) [x86_64-darwin10.3.0]
 20.0
 }}}

--

Comment:

 We need to investigate if it's a float precision issue or another bug.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1042#comment:1>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list