1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/bigdecimal
Kenta Murata a86c147579
Import bigdecimal 2.0.2 (#3905)
* remove duplicated include

* Make BigDecimal#round with argument < 1 return Integer

Fixes [Bug #12780]

* Use a higher default precision for BigDecimal#power and #**

When a fractional power is given, increase the precision if the
precision isn't specified via power's second argument:

Float: increase by 15 (rough number of decimal precision in float)
BigDecimal: increase by adding similar precision modifier as done to
            calculate the base precision.
Rational: double the precision, since a BigDecimal is created, but
          the created BigDecimal uses the same precision.

Increasing the precision for these power calculations has the obvious
tradeoff of making the calculations slower.

Fixes Ruby Bug #17264

* Use DBLE_FIG for a Float value

* Version 2.0.1

Co-authored-by: pavel <pavel.rosicky@easy.cz>
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
2020-12-15 15:17:15 +09:00
..
test_bigdecimal.rb Import bigdecimal 2.0.2 (#3905) 2020-12-15 15:17:15 +09:00
test_bigdecimal_util.rb bidecimal: improve tests' independence (#3297) 2020-07-12 17:30:29 +09:00
test_bigmath.rb
testbase.rb