summaryrefslogtreecommitdiff
path: root/test/bigdecimal/test_bigdecimal_util.rb
AgeCommit message (Collapse)Author
2021-01-13[ruby/bigdecimal] Allow digits=0 in BigDecimal(flt) and Float#to_dKenta Murata
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-09[ruby/bigdecimal] Add test cases of conversion from FloatKenta Murata
https://github.com/ruby/bigdecimal/commit/28d3836366
2021-01-07[ruby/bigdecimal] Include TestBigDecimalBase in TestBigDecimalUtilKenta Murata
https://github.com/ruby/bigdecimal/commit/f732201df1
2020-12-19[bigdecimal] Fix the default precision of Float#to_dKenta Murata
Fix https://github.com/ruby/bigdecimal/issues/70 [Bug #13331] https://github.com/ruby/bigdecimal/commit/aa536cd4b5
2020-07-12bidecimal: improve tests' independence (#3297)Kenta Murata
Tests depending on the rounding mode must specify the appropriate rounding mode and restore to the original mode at the end. Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2020-07-06[ruby/bigdecimal] Add Complex#to_dKenta Murata
https://github.com/ruby/bigdecimal/commit/97e794ac97 Notes: Merged: https://github.com/ruby/ruby/pull/3295
2019-10-08Import changes from ruby/bigdecimal (#2531)Kenta Murata
Sync to ruby/bigdecimal@92356ba71c6bd325b0ab618c634a7aecf8cdc767 Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
2018-12-20Import bigdecimal-1.4.0.pre.20181220amrkn
* https://github.com/ruby/bigdecimal/compare/v1.4.0.pre.20181214a..v1.4.0.pre.20181220a git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-05Import bigdecimal 1.4.0.pre.20181205amrkn
* https://github.com/ruby/bigdecimal/compare/74d25ef..v1.4.0.pre.20181205a git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-05Revert bigdecimal 1.4.0 related commitsmrkn
* Revert "Remove unnecessary linker flags" This reverts commit 49efa01579272d52d28bd361c498d96ca92e986e. * Revert "Move dependency on gemspec" This reverts commit bfb64d476578eadd61a738149726da37840f068d. * Revert "Remove unnecessary directory listing" This reverts commit 86661b5c60b8da6e5641c9c772b57857a1f988f4. * Revert "* expand tabs." This reverts commit 35ada33f8386b56611f10b1a0a4e5667e9b08071. * Revert "Import bigdecimal-1.4.0.pre-20181204a" This reverts commit 8891bb3bd602bdbabd24260cf1e431475dc027c8. * Revert "ext/bigdecimal/bigdecimal.c: drop unused function" This reverts commit 5ceeea4da1179193c2c7ddcebfd67019128473e3. * Revert "* expand tabs." This reverts commit e021386e905b6d6799a84dfbc2f0592e42626366. * Revert "Import bigdecimal-1.4.0.pre-20181130a" This reverts commit a0e438cd3c28d2eaf4efa18243d5b6edafa14d88. * Revert "NEWS: write about bigdecimal updates" This reverts commit 89455ff2ba973f2a9ee7b79657e0e6f1f31501f9. * Revert "Fix rubyspec of bigdecimal for ruby <2.6" This reverts commit 4bcdeeb65e57de4da306d347652898c767162e74. * Revert "Fix rubyspec against bigdecimal updates" This reverts commit c8fb30fc9e0ee14e87be1e231869a12aaef1eedf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-02Import bigdecimal-1.4.0.pre-20181130amrkn
* https://github.com/ruby/bigdecimal/compare/74d25ef..v1.4.0.pre.20181130a git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-13bigdecimal: version 1.3.3mrkn
Import bigdecimal version 1.3.3. The full commit log is here: https://github.com/ruby/bigdecimal/compare/v1.3.2...v1.3.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13bigdecimal: version 1.3.2mrkn
Import bigdecimal version 1.3.2. The full commit log is here: https://github.com/ruby/bigdecimal/compare/v1.3.1...v1.3.2 This fixes [ruby-core:79603] [Bug #13232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10bigdecimal: version 1.3.1mrkn
Import bigdecimal version 1.3.1. The full commit log is here: https://github.com/ruby/bigdecimal/compare/v1.3.0...v1.3.1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec):mrkn
treat 0.0 and -0.0 of floating-point numbers specially for an optimization and to correctly propagate its signbit to the result. [Bug #9214] [ruby-core:58858] * test/bigdecimal/test_bigdecimal.rb: add tests case for the above change. * test/bigdecimal/test_bigdecimal_util.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-04* ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): fix the numbermrkn
of figures. Patch by Vipul A M <vipulnsward@gmail.com>. https://github.com/ruby/ruby/pull/323 fix GH-323 * test/bigdecimal/test_bigdecimal_util.rb: fix for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26* ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):mrkn
zero or negative precision is error. fixes #5098. [ruby-dev:44210] * test/bigdecimal/test_bigdecimal_util.rb: add test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26* ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified formrkn
specifying precision. fixes #5098. [ruby-dev:44210] * test/bigdecimal/test_bigdecimal_util.rb: add test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26* ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): addedmrkn
for symmetry to BigDecimal() function with an Integer. fixes #5098. [ruby-dev:44210] * test/bigdecimal/test_bigdecimal_util.rb: add test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26* ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): addedmrkn
for adapting other Numeric subclasses. [ruby-dev:44245] * test/bigdecimal/test_bigdecimal_util.rb: test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e