616件ヒット
[1-100件を表示]
(0.110秒)
別のキーワード
ライブラリ
- bigdecimal (616)
キーワード
- % (12)
- * (12)
- ** (12)
- + (12)
- +@ (12)
- - (12)
- -@ (12)
-
/ (12) - < (12)
- <= (12)
- <=> (12)
- == (12)
- === (12)
- > (12)
- >= (12)
- abs (12)
- add (12)
- ceil (24)
- clone (8)
- coerce (12)
- div (24)
- divmod (12)
- dup (8)
- eql? (12)
- exponent (12)
- finite? (12)
- fix (12)
- floor (24)
- frac (12)
- hash (12)
- infinite? (12)
- modulo (12)
- mult (12)
- nan? (12)
- nonzero? (12)
- power (24)
- precs (12)
- quo (12)
- remainder (12)
- sqrt (12)
- sub (12)
-
to
_ f (12) -
to
_ i (12) -
to
_ int (12) -
to
_ r (12) -
to
_ s (24) - zero? (12)
検索結果
先頭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 を参照して下さい。...