60件ヒット
[1-60件を表示]
(0.115秒)
別のキーワード
ライブラリ
- bigdecimal (48)
- openssl (12)
クラス
- BigDecimal (48)
-
OpenSSL
:: BN (12)
検索結果
先頭5件
-
BigDecimal
# coerce(other) -> Array (21256.0) -
self と other が同じクラスになるよう、self か other を変換し [other, self] という配列にして返します。
...クト
BigDecimal#coerce は Ruby における強制型変換のための機能です。
BigDecimal オブジェクトとその他のオブジェクト間の各種の計算は
BigDecimal#coerce の結果を元に行われます。
//emlist[][ruby]{
require "bigdecimal"
a = BigDecimal("1.0")
b = a......lf の有効桁数を
用いて変換を行います。
数値を表す文字列から BigDecimal オブジェクトに変換する機能はデフォ
ルトでは無効になっています。必要な場合は ENABLE_NUMERIC_STRING を有効に
して Ruby をコンパイルしてください。... -
OpenSSL
:: BN # coerce(other) -> Array (21238.0) -
自身と other が同じクラスになるよう、自身か other を変換し [other, self] という配列にして返します。
...。
//emlist[][ruby]{
require 'openssl'
p 1.to_bn.coerce(2) # => [2, 1]
//}
@param other 変換の基準となるオブジェクト
@raise TypeError 変換に失敗した場合に発生します
coerce メソッドの詳細な説明は、Numeric#coerce にあります。
@see Numeric#coerce... -
BigDecimal
# ==(other) -> bool (3219.0) -
self が other と等しい場合に true を、そうでない場合に false を返します。
...self が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//}... -
BigDecimal
# ===(other) -> bool (3219.0) -
self が other と等しい場合に true を、そうでない場合に false を返します。
...self が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//}... -
BigDecimal
# eql?(other) -> bool (3219.0) -
self が other と等しい場合に true を、そうでない場合に false を返します。
...self が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//}...