diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
| commit | d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad (patch) | |
| tree | 5e35d5b41aae961b37cf6632f60c42f51c7aa775 /ext/bigdecimal/lib | |
| parent | 101e79d7b434c01c0e6f4bcc480003858ab8e1a4 (diff) | |
| download | ruby-d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad.tar.gz ruby-d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad.tar.xz ruby-d17d1b111341f2c8979cf8fbd63ec7ec9db7c3ad.zip | |
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal/lib')
| -rw-r--r-- | ext/bigdecimal/lib/bigdecimal/ludcmp.rb | 2 | ||||
| -rw-r--r-- | ext/bigdecimal/lib/bigdecimal/math.rb | 8 | ||||
| -rw-r--r-- | ext/bigdecimal/lib/bigdecimal/newton.rb | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/ext/bigdecimal/lib/bigdecimal/ludcmp.rb b/ext/bigdecimal/lib/bigdecimal/ludcmp.rb index 8f4888725..176ed84ca 100644 --- a/ext/bigdecimal/lib/bigdecimal/ludcmp.rb +++ b/ext/bigdecimal/lib/bigdecimal/ludcmp.rb @@ -17,7 +17,7 @@ module LUSolve end if nrmrow>zero then scales <<= one.div(nrmrow,prec) - else + else raise "Singular matrix" end end diff --git a/ext/bigdecimal/lib/bigdecimal/math.rb b/ext/bigdecimal/lib/bigdecimal/math.rb index f3248a3c5..24e928b90 100644 --- a/ext/bigdecimal/lib/bigdecimal/math.rb +++ b/ext/bigdecimal/lib/bigdecimal/math.rb @@ -30,10 +30,10 @@ # module BigMath - # Computes the square root of x to the specified number of digits of + # Computes the square root of x to the specified number of digits of # precision. # - # BigDecimal.new('2').sqrt(16).to_s + # BigDecimal.new('2').sqrt(16).to_s # -> "0.14142135623730950488016887242096975E1" # def sqrt(x,prec) @@ -120,7 +120,7 @@ module BigMath y end - # Computes the value of e (the base of natural logarithms) raised to the + # Computes the value of e (the base of natural logarithms) raised to the # power of x, to the specified number of digits of precision. # # If x is infinite or NaN, returns NaN. @@ -148,7 +148,7 @@ module BigMath y end - # Computes the natural logarithm of x to the specified number of digits + # Computes the natural logarithm of x to the specified number of digits # of precision. # # Returns x if x is infinite or NaN. diff --git a/ext/bigdecimal/lib/bigdecimal/newton.rb b/ext/bigdecimal/lib/bigdecimal/newton.rb index 59ac0f7f0..d78c3d764 100644 --- a/ext/bigdecimal/lib/bigdecimal/newton.rb +++ b/ext/bigdecimal/lib/bigdecimal/newton.rb @@ -1,5 +1,5 @@ # -# newton.rb +# newton.rb # # Solves the nonlinear algebraic equation system f = 0 by Newton's method. # This program is not dependent on BigDecimal. @@ -28,7 +28,7 @@ require "bigdecimal/jacobian" module Newton include LUSolve include Jacobian - + def norm(fv,zero=0.0) s = zero n = fv.size |
