207件ヒット
[1-100件を表示]
(0.046秒)
種類
- インスタンスメソッド (110)
- 文書 (42)
- 特異メソッド (22)
- ライブラリ (22)
- 定数 (11)
ライブラリ
- ビルトイン (33)
- bigdecimal (99)
-
json
/ add / bigdecimal (11)
クラス
- BigDecimal (110)
- Integer (33)
キーワード
- ** (22)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
EXCEPTION
_ ALL (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Ruby用語集 (11)
- bigdecimal (11)
-
bigdecimal
/ newton (11) - mode (22)
- mult (11)
- pow (22)
- power (22)
- split (11)
-
to
_ json (11)
検索結果
先頭5件
-
BigDecimal
# *(other) -> BigDecimal (39307.0) -
積を計算します。
...積を計算します。
@param other self に掛ける数を指定します。
計算結果の精度についてはlib:bigdecimal#precisionを参照してください。... -
BigDecimal
# **(n) -> BigDecimal (27303.0) -
self の n 乗を計算します。
self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。
@see Integer#pow -
BigDecimal
# power(n) -> BigDecimal (24203.0) -
self の n 乗を計算します。
self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。
@see Integer#pow -
BigDecimal
# power(n , prec) -> BigDecimal (24203.0) -
self の n 乗を計算します。
self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。
@see Integer#pow -
BigDecimal
. mode(s) -> Integer | nil (21524.0) -
BigDecimal の計算処理の制御方法を設定、確認します。
...
BigDecimal の計算処理の制御方法を設定、確認します。
第2引数を省略、または nil を指定すると現状の設定値を返します。
@param s 制御方法の設定、確認を行う項目を BigDecimal::EXCEPTION_*、
BigDecimal::ROUND_MODE のいずれか......で指定します。
@param v 引数 s が BigDecimal::ROUND_MODE の場合は
BigDecimal::ROUND_MODE 以外の BigDecimal::_ROUND* のいず
れかを指定します。指定した丸め処理が有効になります。
それ以外の場合は、true、false、nil の......なります。
* BigDecimal::EXCEPTION_NaN のとき、非数(NaN)
* BigDecimal::EXCEPTION_INFINITY のとき、無限(+ or -Infinity)
* BigDecimal::EXCEPTION_UNDERFLOW のとき、ゼロ
* BigDecimal::EXCEPTION_OVERFLOW のとき、+Infinity か -Infinity
* BigDecimal::EXCEPTION_ZERODIV... -
BigDecimal
. mode(s , v) -> Integer | nil (21524.0) -
BigDecimal の計算処理の制御方法を設定、確認します。
...
BigDecimal の計算処理の制御方法を設定、確認します。
第2引数を省略、または nil を指定すると現状の設定値を返します。
@param s 制御方法の設定、確認を行う項目を BigDecimal::EXCEPTION_*、
BigDecimal::ROUND_MODE のいずれか......で指定します。
@param v 引数 s が BigDecimal::ROUND_MODE の場合は
BigDecimal::ROUND_MODE 以外の BigDecimal::_ROUND* のいず
れかを指定します。指定した丸め処理が有効になります。
それ以外の場合は、true、false、nil の......なります。
* BigDecimal::EXCEPTION_NaN のとき、非数(NaN)
* BigDecimal::EXCEPTION_INFINITY のとき、無限(+ or -Infinity)
* BigDecimal::EXCEPTION_UNDERFLOW のとき、ゼロ
* BigDecimal::EXCEPTION_OVERFLOW のとき、+Infinity か -Infinity
* BigDecimal::EXCEPTION_ZERODIV... -
BigDecimal
# mult(other , n) -> BigDecimal (21225.0) -
積を計算します。
...積を計算します。
self * other を最大で n 桁まで計算します。計算結果の精度が n より大きい
ときは BigDecimal.mode で指定された方法で丸められます。
@param other self に掛ける数を指定します。
@param n 有効桁数を整数で指定し......ます。0 を指定した場合は
BigDecimal#* と同じ値を返します。
@raise ArgumentError n に負の数を指定した場合に発生します。
@see BigDecimal#*... -
BigDecimal
# to _ json(*args) -> String (21218.0) -
自身を JSON 形式の文字列に変換して返します。
..._json を呼び出しています。
@param args 使用しません。
//emlist[例][ruby]{
require 'json/add/bigdecimal'
BigDecimal('0.123456789123456789').to_json # => "{\"json_class\":\"BigDecimal\",\"b\":\"36:0.123456789123456789e0\"}"
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json......rator::GeneratorMethods::Hash#to_json
に渡されます。
//emlist[例][ruby]{
require 'json/add/bigdecimal'
BigDecimal('0.123456789123456789').to_json # => "{\"json_class\":\"BigDecimal\",\"b\":\"36:0.123456789123456789e0\"}"
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json... -
BigDecimal
:: EXCEPTION _ ALL -> Integer (21182.0) -
BigDecimal の計算において例外を発生させるかどうかを設定、確認する 際の値を返します。
...
BigDecimal の計算において例外を発生させるかどうかを設定、確認する
際の値を返します。
以下の例外全てが対象です。
* BigDecimal::EXCEPTION_INFINITY
* BigDecimal::EXCEPTION_NaN
* BigDecimal::EXCEPTION_OVERFLOW
* BigDecimal::EXCEPTION_UNDERFLOW
* B......igDecimal::EXCEPTION_ZERODIVIDE
BigDecimal.mode の第 1 引数に指定します。... -
BigDecimal
# split -> [Integer , String , Integer , Integer] (21166.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...