2件ヒット
[1-2件を表示]
(0.073秒)
別のキーワード
ライブラリ
- bigdecimal (1)
-
json
/ add / bigdecimal (1)
検索結果
-
BigDecimal
# add(other , n) -> BigDecimal (54310.0) -
和を計算します。
...の精度が n より大きい
ときは BigDecimal.mode で指定された方法で丸められます。
@param other self に足す数を指定します。
@param n 有効桁数を整数で指定します。0 を指定した場合は
BigDecimal#+ と同じ値を返します。
@raise A......rgumentError n に負の数を指定した場合に発生します。
@see BigDecimal#+... -
BigDecimal
# to _ json(*args) -> String (25.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...