1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/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
..
lib [ruby/bigdecimal] Add Complex#to_d 2020-07-06 01:15:46 +09:00
sample Import bigdecimal 1.4.0.pre.20181205a 2018-12-05 11:30:24 +00:00
bigdecimal.c Import bigdecimal 2.0.2 (#3905) 2020-12-15 15:17:15 +09:00
bigdecimal.gemspec Import bigdecimal 2.0.2 (#3905) 2020-12-15 15:17:15 +09:00
bigdecimal.h Import bigdecimal 1.4.0.pre.20181205a 2018-12-05 11:30:24 +00:00
depend sed -i '/rmodule.h/d' 2020-08-27 16:42:06 +09:00
extconf.rb [ruby/bigdecimal] Support Ruby < 2.6 2020-07-06 01:15:46 +09:00