Bug #206

BigDecimal precision in divmod

Added by Anonymous almost 4 years ago. Updated about 1 year ago.

[ruby-core:17472]
Status:Closed Start date:07/01/2008
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
ruby -v:

Description

In some cases the precision of BigDecimal#divmod is not high enough, for
example:

  BigDecimal('1').divmod(BigDecimal('3E-9'))[0] #=> 0.3E9,
  # but really should be 0.333333333E9

More examples on these can be found in Rubyspec:
  spec/ruby/1.8/library/bigdecimal/divmod_spec.rb:101

This is behavior is present in 1.8.6 and 1.8.7

History

Updated by naruse (Yui NARUSE) over 3 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF