6件ヒット
[1-6件を表示]
(0.008秒)
別のキーワード
クラス
- BigDecimal (6)
検索結果
先頭5件
-
BigDecimal
# *(other) -> BigDecimal (54310.0) -
積を計算します。
...積を計算します。
@param other self に掛ける数を指定します。
計算結果の精度についてはlib:bigdecimal#precisionを参照してください。... -
BigDecimal
# **(n) -> BigDecimal (18310.0) -
self の n 乗を計算します。
self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。
@see Integer#pow -
BigDecimal
# power(n) -> BigDecimal (9010.0) -
self の n 乗を計算します。
self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。
@see Integer#pow -
BigDecimal
# power(n , prec) -> BigDecimal (9010.0) -
self の n 乗を計算します。
self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。
@see Integer#pow -
BigDecimal
# split -> [Integer , String , Integer , Integer] (58.0) -
BigDecimal 値を 0.xxxxxxx*10**n と表現したときに、 符号 (NaNのときは 0、それ以外は+1か-1になります)、 仮数部分の文字列("xxxxxxx")と、基数(10)、更に指数 n を配列で返します。
...
BigDecimal 値を 0.xxxxxxx*10**n と表現したときに、
符号 (NaNのときは 0、それ以外は+1か-1になります)、
仮数部分の文字列("xxxxxxx")と、基数(10)、更に指数 n を配列で返します。
//emlist[][ruby]{
require "bigdecimal"
a = BigDecimal("3.14159265")
f......, x, y, z = a.split
//}
とすると、f = 1、x = "314159265"、y = 10、z = 1 になります。
従って、以下のようにする事で Float に変換することができます。
//emlist[][ruby]{
s = "0."+x
b = f*(s.to_f)*(y**z)
//}
@see BigDecimal#to_f... -
BigDecimal
# mult(other , n) -> BigDecimal (28.0) -
積を計算します。
...の精度が n より大きい
ときは BigDecimal.mode で指定された方法で丸められます。
@param other self に掛ける数を指定します。
@param n 有効桁数を整数で指定します。0 を指定した場合は
BigDecimal#* と同じ値を返します。
@rais......e ArgumentError n に負の数を指定した場合に発生します。
@see BigDecimal#*...