564件ヒット
[1-100件を表示]
(0.017秒)
別のキーワード
ライブラリ
- bigdecimal (564)
キーワード
- % (11)
- * (11)
- ** (11)
- + (11)
- +@ (11)
- - (11)
- -@ (11)
-
/ (11) - < (11)
- <= (11)
- <=> (11)
- == (11)
- === (11)
- > (11)
- >= (11)
- abs (11)
- add (11)
- ceil (22)
- clone (7)
- coerce (11)
- div (22)
- divmod (11)
- dup (7)
- eql? (11)
- exponent (11)
- finite? (11)
- fix (11)
- floor (22)
- frac (11)
- hash (11)
- infinite? (11)
- modulo (11)
- mult (11)
- nan? (11)
- nonzero? (11)
- power (22)
- precs (11)
- quo (11)
- remainder (11)
- sqrt (11)
- sub (11)
-
to
_ f (11) -
to
_ i (11) -
to
_ int (11) -
to
_ r (11) -
to
_ s (22) - zero? (11)
検索結果
先頭5件
-
BigDecimal
# nonzero? -> self | nil (134.0) -
self が 0 以外のときに self を返します。0 のときに nil を返します。
...
self が 0 以外のときに self を返します。0 のときに nil を返します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0").nonzero? # => nil
BigDecimal("1").nonzero? # => 0.1e1
//}... -
BigDecimal
# +@ -> self (118.0) -
self を返します。
...
self を返します。... -
BigDecimal
# clone -> self (118.0) -
self を返すように、BigDecimal で定義されています。
...
self を返すように、BigDecimal で定義されています。... -
BigDecimal
# coerce(other) -> Array (55.0) -
self と other が同じクラスになるよう、self か other を変換し [other, self] という配列にして返します。
...
self と other が同じクラスになるよう、self か other を変換し [other,
self] という配列にして返します。
@param other 比較または変換するオブジェクト
BigDecimal#coerce は Ruby における強制型変換のための機能です。
BigDecimal オブジェ......オブジェクト間の各種の計算は
BigDecimal#coerce の結果を元に行われます。
//emlist[][ruby]{
require "bigdecimal"
a = BigDecimal("1.0")
b = a / 2.0 # => 0.5e0
//}
other に Rational オブジェクトを指定した場合は self の有効桁数を
用いて変換を行い... -
BigDecimal
# **(n) -> BigDecimal (29.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 (29.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 (29.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
# remainder(n) -> BigDecimal (29.0) -
self を n で割った余りを返します。
...
self を n で割った余りを返します。
@param n self を割る数を指定します。
//emlist[][ruby]{
require 'bigdecimal'
x = BigDecimal((2**100).to_s)
x.remainder(3).to_i # => 1
(-x).remainder(3).to_i # => -1
x.remainder(-3).to_i # => 1
(-x).remainder(-3).to_i # => -1
//}......戻り値は self と同じ符号になります。これは BigDecimal#% とは異な
る点に注意してください。詳細は Numeric#%、
Numeric#remainder を参照して下さい。... -
BigDecimal
# %(n) -> BigDecimal (23.0) -
self を n で割った余りを返します。
...
self を n で割った余りを返します。
@param n self を割る数を指定します。
//emlist[][ruby]{
require 'bigdecimal'
x = BigDecimal((2**100).to_s)
( x % 3).to_i # => 1
(-x % 3).to_i # => 2
( x % -3).to_i # => -2
(-x % -3).to_i # => -1
//}
戻り値は n と同じ符号にな......ります。これは BigDecimal#remainder とは
異なる点に注意してください。詳細は Numeric#%、
Numeric#remainder を参照して下さい。... -
BigDecimal
# <=>(other) -> -1 | 0 | 1 | nil (23.0) -
self が other より大きい場合に 1 を、等しい場合に 0 を、小さい場合には -1 をそれぞれ返します。
...
self が other より大きい場合に 1 を、等しい場合に 0 を、小さい場合には
-1 をそれぞれ返します。
self と other が比較できない場合には nil を返します。...