Project

General

Profile

Bug #206

BigDecimal precision in divmod

Added by Anonymous about 12 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
[ruby-core:17472]

Description

=begin
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
=end

Also available in: Atom PDF