diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-21 15:35:29 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-21 15:35:29 +0000 |
commit | bd288dcc8bd661b51856e95a9d649a1130580627 (patch) | |
tree | 784a027c1e25467e66113278df99ccb0faed11a5 /ext/bigdecimal/lib/bigdecimal/math.rb | |
parent | 4f618f5a0089af89069d6c547f8e4c4dc0a85410 (diff) |
bigdecimal: version 1.3.0
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
Diffstat (limited to 'ext/bigdecimal/lib/bigdecimal/math.rb')
-rw-r--r-- | ext/bigdecimal/lib/bigdecimal/math.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/bigdecimal/lib/bigdecimal/math.rb b/ext/bigdecimal/lib/bigdecimal/math.rb index 3ddde6a9a0..ef1a02b38f 100644 --- a/ext/bigdecimal/lib/bigdecimal/math.rb +++ b/ext/bigdecimal/lib/bigdecimal/math.rb @@ -26,7 +26,7 @@ require 'bigdecimal' # include BigMath # # a = BigDecimal((PI(100)/2).to_s) -# puts sin(a,100) # => 0.10000000000000000000......E1 +# puts sin(a,100) # => 0.99999999999999999999......e0 # module BigMath module_function @@ -38,7 +38,7 @@ module BigMath # precision, +numeric+. # # BigMath.sqrt(BigDecimal.new('2'), 16).to_s - # #=> "0.1414213562373095048801688724E1" + # #=> "0.1414213562373095048801688724e1" # def sqrt(x, prec) x.sqrt(prec) @@ -53,7 +53,7 @@ module BigMath # If +decimal+ is Infinity or NaN, returns NaN. # # BigMath.sin(BigMath.PI(5)/4, 5).to_s - # #=> "0.70710678118654752440082036563292800375E0" + # #=> "0.70710678118654752440082036563292800375e0" # def sin(x, prec) raise ArgumentError, "Zero or negative precision for sin" if prec <= 0 @@ -97,7 +97,7 @@ module BigMath # If +decimal+ is Infinity or NaN, returns NaN. # # BigMath.cos(BigMath.PI(4), 16).to_s - # #=> "-0.999999999999999999999999999999856613163740061349E0" + # #=> "-0.999999999999999999999999999999856613163740061349e0" # def cos(x, prec) raise ArgumentError, "Zero or negative precision for cos" if prec <= 0 @@ -141,7 +141,7 @@ module BigMath # If +decimal+ is NaN, returns NaN. # # BigMath.atan(BigDecimal.new('-1'), 16).to_s - # #=> "-0.785398163397448309615660845819878471907514682065E0" + # #=> "-0.785398163397448309615660845819878471907514682065e0" # def atan(x, prec) raise ArgumentError, "Zero or negative precision for atan" if prec <= 0 @@ -178,7 +178,7 @@ module BigMath # +numeric+. # # BigMath.PI(10).to_s - # #=> "0.3141592653589793238462643388813853786957412E1" + # #=> "0.3141592653589793238462643388813853786957412e1" # def PI(prec) raise ArgumentError, "Zero or negative precision for PI" if prec <= 0 @@ -223,7 +223,7 @@ module BigMath # digits of precision, +numeric+. # # BigMath.E(10).to_s - # #=> "0.271828182845904523536028752390026306410273E1" + # #=> "0.271828182845904523536028752390026306410273e1" # def E(prec) raise ArgumentError, "Zero or negative precision for E" if prec <= 0 |