summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/lib/bigdecimal
AgeCommit message (Collapse)Author
2024-01-18Extract bigdecimal as bundled gemsHiroshi SHIBATA
2023-11-07[ruby/bigdecimal] Update doc for bigdecimal/utilKoichi ITO
Follow up https://github.com/ruby/bigdecimal/issues/89. `BigDecimal.new` has already been removed. This PR replaces `BigDecimal.new` with `Kernel.BigDecimal` in the documentation, following the message below: > BigDecimal.new is deprecated; use Kernel.BigDecimal method instead. https://github.com/ruby/bigdecimal/commit/26d84ba766e971da8eaaf2ce41e7b89935fa68da https://github.com/ruby/bigdecimal/commit/dd52adf3b2
2022-09-28[ruby/bigdecimal] Document precision=0 and ndigits=0 for converting from FloatMaciej Rzasa
https://github.com/ruby/bigdecimal/commit/4f0894c6c0
2022-04-18[ruby/bigdecimal] Fix docsPeter Zhu
rdoc parses f[i] as a link, which results in a broken link. https://github.com/ruby/bigdecimal/commit/a18522e9ca
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
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-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-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
2016-12-21bigdecimal: version 1.3.0mrkn
Import bigdecimal version 1.3.0. The full commit log is here: https://github.com/ruby/bigdecimal/compare/v1.3.0.pre.2...v1.3.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10bigdecimal: import version 1.3.0.premrkn
Import bigdecimal version 1.3.0.pre. The full commit log of this changes can be found at: https://github.com/ruby/bigdecimal/compare/5c43a9e...v1.3.0.pre git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28bigdecimal/math.rb: error message in BigMath#PInobu
* ext/bigdecimal/lib/bigdecimal/math.rb (BigMath#PI): change error message about zero or negative precision for clarity and consistency with other methods. [GH-644] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-02* ext/bigdecimal: update class method call style from :: to .eregon
in documentation and usage. * ext/bigdecimal/lib/bigdecimal/math.rb: [DOC] fix examples values. Computations were made using ruby 2.0.0p247 to ensure no effect of the recent BigDecimal bug. * ext/bigdecimal/sample/nlsolve.rb: fix indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-23* ext/bigdecimal/lib/bigdecimal/math.rb (BigMath.E): Use BigMath.exp.mrkn
[Feature #6857] [ruby-core:47130] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-14* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example ofnagachika
Rational#to_d without argument. [Bug #8958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is requiredzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the requiredzzak
+precision+ argument for Rational#to_d [Bug #8958] -This line, and those below, will be ignored-- M ChangeLog M ext/bigdecimal/lib/bigdecimal/util.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-15* ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] document top-levelzzak
classes from BigDecimal utils native extensions git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13* ext/bigdecimal/*: improve documentation, nodoc samples with @mrknzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41287 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
2013-05-19* ext/bigdecimal/bigdecimal.c: Formatting for BigMath [Fixes GH-306]zzak
Based on a patch by @eLobato. * ext/bigdecimal/lib/bigdecimal/math.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-29code cleanup by @vipulnsward [GH fixes #267]hsbt
* lib/cgi/core.rb: change each to each_value * ext/bigdecimal/lib/bigdecimal/{jacobian,math}.rb: remove unused variables from bigdecimal lib git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-30* ext/bigdecimal/lib/bigdecimal/jacobian.rb,mrkn
ext/bigdecimal/lib/bigdecimal/newton.rb: fix documentation comments. Patch by alperakgun from github.com/shyouhei/ruby/pull/8 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-30* ext/bigdecimal/lib/bigdecimal/jacobian.rb (Jacobian#dfdxi):mrkn
fix jacobian to get stuck in an infinite loop when a solution is not found due to forget to increment nRetry counter. Patch by alperakgun from github.com/shyouhei/ruby/pull/8 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-05* ext/bigdecimal/lib/bigdecimal/math.rb: remove description aboutnaruse
BigMath#log. patched by Sho Hashimoto [ruby-dev:45307] [Bug #6112] * string.c (str_byteslice): fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34899 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
2011-06-27* ext/bigdecimal/bigdecimal.c (BigMath_s_log): move BigMath.log frommrkn
bigdecimal/math.rb. * ext/bigdecimal/lib/bigdecimal/math.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: move test for BigMath.log from test/bigdecimal/test_bigmath.rb. * test/bigdecimal/test_bigmath.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): move BigMath.exp frommrkn
bigdecimal/math.rb. * ext/bigdecimal/lib/bigdecimal/math.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: move test for BigMath.exp from test/bigdecimal/test_bigmath.rb. * test/bigdecimal/test_bigmath.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext: remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-20 * ext/bigdecimal/lib/bigdecimal/util.rb: Improve documentation. Patchdrbrain
by Pete Higgins. [Ruby 1.9 - Bug #4746] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-20 * ext/bigdecimal/lib/bigdecimal/jacobian.rb: Document isEqual. Patchdrbrain
by Kuba Fietkiewicz. [Ruby 1.9 - Bug #4744] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-16* ext/bigdecimal/lib/bigdecimal/util.rb (to_digits): avoid unusedmrkn
variables warning, reported by Aaron Patterson. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-03* ext/bigdecimal/bigdecimal.c (Init_bigdecimal): add two new constants ↵mrkn
BigDecimal::INFINITY and BigDecimal::NAN. * ext/bigdecimal/lib/bigdecimal/math.rb (BigMath.exp): modify the behaviors for infinity arguments as same as Math.exp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-12* ext/bigdecimal/lib/bigdecimal/math.rb (BigMath#log): improvednobu
precision and performance. [ruby-dev:41295] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-11* ext/bigdecimal/lib/bigdecimal/math.rb (atan), ↵mrkn
test/bigdecimal/test_bigmath.rb (test_atan): explicitly specify the precision for calculating a reciprocal number of an argument. [Bug #3267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* ext/bigdecimal/lib/bigdecimal/math.rb (atan): atan(Infinity) isnobu
PI/2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* ext/bigdecimal/lib/bigdecimal/math.rb (atan): reduce loop withnobu
the formula of the double corner. based on a patch from Masahiro Kanai (CanI) in [ruby-dev:39367]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* ext/bigdecimal/lib/bigdecimal/math.rb (atan): refined.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* ext/bigdecimal/lib/bigdecimal/{ludcmp,math}.rb: depend onnobu
bigdecimal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* ext/bigdecimal/lib/bigdecimal/newton.rb: rdoc needs to benobu
followed by the definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* ext/bigdecimal/lib/bigdecimal/*.rb: made module functions.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e