diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-19 21:00:43 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-19 21:00:43 +0000 |
commit | 2439bc9e69e57244ec7af77cc3bc899d78c3a0b4 (patch) | |
tree | 7293981cbe0c74c8a3bc0312f83a0b45b9cc848b /ext/bigdecimal/bigdecimal.c | |
parent | dbefdb434d43f99dfc4b8b558591ef63377ea43e (diff) |
* ext/bigdecimal/bigdecimal.c: Formatting for BigMath [Fixes GH-306]
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
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index d6046f3744..06b3886eb5 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -2630,14 +2630,14 @@ BigDecimal_save_limit(VALUE self) } /* call-seq: - * BigMath.exp(x, prec) + * BigMath.exp(decimal, numeric) -> BigDecimal * * Computes the value of e (the base of natural logarithms) raised to the - * power of x, to the specified number of digits of precision. + * power of +decimal+, to the specified number of digits of precision. * - * If x is infinity, returns Infinity. + * If +decimal+ is infinity, returns Infinity. * - * If x is NaN, returns NaN. + * If +decimal+ is NaN, returns NaN. */ static VALUE BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec) @@ -2760,16 +2760,16 @@ BigMath_s_exp(VALUE klass, VALUE x, VALUE vprec) } /* call-seq: - * BigMath.log(x, prec) + * BigMath.log(decimal, numeric) -> BigDecimal * - * Computes the natural logarithm of x to the specified number of digits of - * precision. + * Computes the natural logarithm of +decimal+ to the specified number of + * digits of precision, +numeric+. * - * If x is zero or negative, raises Math::DomainError. + * If +decimal+ is zero or negative, raises Math::DomainError. * - * If x is positive infinity, returns Infinity. + * If +decimal+ is positive infinity, returns Infinity. * - * If x is NaN, returns NaN. + * If +decimal+ is NaN, returns NaN. */ static VALUE BigMath_s_log(VALUE klass, VALUE x, VALUE vprec) @@ -3228,7 +3228,6 @@ Init_bigdecimal(void) rb_define_method(rb_cBigDecimal, "truncate", BigDecimal_truncate, -1); rb_define_method(rb_cBigDecimal, "_dump", BigDecimal_dump, -1); - /* mathematical functions */ rb_mBigMath = rb_define_module("BigMath"); rb_define_singleton_method(rb_mBigMath, "exp", BigMath_s_exp, 2); rb_define_singleton_method(rb_mBigMath, "log", BigMath_s_log, 2); |