aboutsummaryrefslogtreecommitdiffstats
path: root/ext/bigdecimal/lib
Commit message (Collapse)AuthorAgeFilesLines
* bigdecimal/math.rb: error message in BigMath#PInobu2014-06-281-1/+1
| | | | | | | | * 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
* * ext/bigdecimal: update class method call style from :: to .eregon2014-01-022-8/+8
| | | | | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/math.rb (BigMath.E): Use BigMath.exp.mrkn2013-11-231-14/+1
| | | | | | [Feature #6857] [ruby-core:47130] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example ofnagachika2013-11-141-2/+0
| | | | | | Rational#to_d without argument. [Bug #8958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is requiredzzak2013-11-131-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the requiredzzak2013-11-131-3/+7
| | | | | | | | | | | +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
* * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] document top-levelzzak2013-07-151-0/+21
| | | | | | | classes from BigDecimal utils native extensions git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/*: improve documentation, nodoc samples with @mrknzzak2013-06-131-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): fix the numbermrkn2013-06-041-1/+1
| | | | | | | | | 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
* * ext/bigdecimal/bigdecimal.c: Formatting for BigMath [Fixes GH-306]zzak2013-05-191-15/+56
| | | | | | | | 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
* code cleanup by @vipulnsward [GH fixes #267]hsbt2013-03-292-3/+0
| | | | | | | | | | * 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
* * ext/bigdecimal/lib/bigdecimal/jacobian.rb,mrkn2012-05-302-2/+2
| | | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/jacobian.rb (Jacobian#dfdxi):mrkn2012-05-301-1/+2
| | | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/math.rb: remove description aboutnaruse2012-03-051-1/+0
| | | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):mrkn2011-07-261-5/+5
| | | | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified formrkn2011-07-261-2/+2
| | | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): addedmrkn2011-07-261-0/+17
| | | | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): addedmrkn2011-07-261-0/+8
| | | | | | | 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
* * ext/bigdecimal/bigdecimal.c (BigMath_s_log): move BigMath.log frommrkn2011-06-271-35/+0
| | | | | | | | | | 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
* * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): move BigMath.exp frommrkn2011-06-171-42/+0
| | | | | | | | | | 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
* * ext: remove trailing spaces.nobu2011-05-222-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/util.rb: Improve documentation. Patchdrbrain2011-05-201-18/+45
| | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/jacobian.rb: Document isEqual. Patchdrbrain2011-05-201-2/+2
| | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/util.rb (to_digits): avoid unusedmrkn2010-11-161-1/+1
| | | | | | variables warning, reported by Aaron Patterson. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): add two new constants ↵mrkn2010-07-031-1/+9
| | | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/math.rb (BigMath#log): improvednobu2010-05-121-2/+4
| | | | | | | precision and performance. [ruby-dev:41295] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/math.rb (atan), ↵mrkn2010-05-111-1/+1
| | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/math.rb (atan): atan(Infinity) isnobu2009-09-231-13/+7
| | | | | | | PI/2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/math.rb (atan): reduce loop withnobu2009-09-231-1/+5
| | | | | | | | 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
* * ext/bigdecimal/lib/bigdecimal/math.rb (atan): refined.nobu2009-09-231-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/{ludcmp,math}.rb: depend onnobu2009-09-212-0/+4
| | | | | | | bigdecimal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/newton.rb: rdoc needs to benobu2009-09-211-3/+3
| | | | | | | followed by the definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/*.rb: made module functions.nobu2009-09-214-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/*.rb: fixed indent.nobu2009-09-213-42/+42
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/math.rb (sin, cos, atan, exp, log):nobu2009-09-201-5/+31
| | | | | | | | improved precision and performance. based on a patch from Makoto Yamashita in [ruby-core:25600] and [ruby-core:25602]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-063-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (BigDecimal_to_r): moved frommatz2008-11-111-12/+0
| | | | | | bigdecimal/util, converted into C. [ruby-dev:36805] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/jacobian.rb (Jacobian::dfdxi):matz2008-06-201-1/+1
| | | | | | typo fixed (raize -> raise). [ruby-list:45101] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bignorm): sizeof(long) may be smaller thanmatz2006-07-111-3/+2
| | | | | | | | | | | sizeof(VALUE). [ruby-dev:29013] * ruby.h (FIXNUM_MAX): fixnum may be bigger than long. * ruby.h (SIGNED_VALUE): signed integer of size of VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c: add RDoc document. a patch frommatz2006-06-295-34/+102
| | | | | | | mathew <meta at pobox.com>. [ruby-core:07050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/lib/bigdecimal/newton.rb (Newton::nlsolve): typomatz2006-06-101-1/+1
| | | | | | | | | | | | fixed: raize -> raise. [ruby-talk:196608] * string.c (rb_str_ord): new method. * parse.y (rbracket): allow optional newline before closing brackets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/sample/linear.rb: resolve LoadError.ocean2005-02-181-38/+0
| | | | | | | | | | * ext/bigdecimal/sample/nlsolve.rb: ditto. * ext/bigdecimal/lib/bigdecimal/nlsolve.rb: removed because this file is sample script and same file exists in ext/bigdecimal/sample. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bigdecimal/newton.rb: resolve LoadError.ocean2005-02-182-3/+3
| | | | | | | * bigdecimal/nlsolve.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mult & div instead of * & /.shigek2003-08-291-7/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* E added. Typo corrected.shigek2003-08-191-3/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Refinement for speedup.shigek2003-08-171-24/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Typo 'selt' corrected to 'self'.shigek2003-08-161-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sqrt() & atan() added.shigek2003-08-151-5/+39
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Newly added.shigek2003-08-141-0/+147
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Comment changed.shigek2003-08-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e