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 a5b4b806de
[ruby/bigdecimal] Allow digits=0 in BigDecimal(flt) and Float#to_d
Using dtoa of mode=0, we can determine the number of digits in decimal that is
necessary to represent the given Float number without errors.

This change permits digits=0 in BigDecimal(flt) and Float#to_d, and these
methods use dtoa of mode=0 when the given digits is 0.

Internal implicit conversion from Float also uses digits=0.

[Fix GH-70]

https://github.com/ruby/bigdecimal/commit/2dbe170e35
2021-01-13 11:49:18 +09:00
..
lib [ruby/bigdecimal] Allow digits=0 in BigDecimal(flt) and Float#to_d 2021-01-13 11:49:18 +09:00
missing [ruby/bigdecimal] Optimize rb_float_convert_to_BigDecimal by using dtoa 2021-01-13 02:11:18 +09:00
sample
bigdecimal.c [ruby/bigdecimal] Allow digits=0 in BigDecimal(flt) and Float#to_d 2021-01-13 11:49:18 +09:00
bigdecimal.gemspec [ruby/bigdecimal] Optimize rb_float_convert_to_BigDecimal by using dtoa 2021-01-13 02:11:18 +09:00
bigdecimal.h [ruby/bigdecimal] Optimize rb_float_convert_to_BigDecimal by using dtoa 2021-01-13 02:11:18 +09:00
bits.h [ruby/bigdecimal] Check the function availabilities separately 2021-01-06 09:25:13 +09:00
depend Update ext/bigdecimal/depend 2021-01-13 09:36:17 +09:00
extconf.rb [ruby/bigdecimal] Optimize rb_float_convert_to_BigDecimal by using dtoa 2021-01-13 02:11:18 +09:00
feature.h [ruby/bigdecimal] Implement special conversions for 64-bit integers 2021-01-02 00:54:09 +09:00
missing.c [ruby/bigdecimal] Optimize rb_float_convert_to_BigDecimal by using dtoa 2021-01-13 02:11:18 +09:00
missing.h [ruby/bigdecimal] Optimize rb_float_convert_to_BigDecimal by using dtoa 2021-01-13 02:11:18 +09:00
static_assert.h [ruby/bigdecimal] Implement special conversions for 64-bit integers 2021-01-02 00:54:09 +09:00