るりまサーチ

最速Rubyリファレンスマニュアル検索!
145件ヒット [1-100件を表示] (0.058秒)

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dh p
  5. rsa p

クラス

キーワード

検索結果

<< 1 2 > >>

BigDecimal#_dump -> String (6103.0)

BigDecimal._load で復元可能な文字列を返します。 Marshal.#dump から呼び出されます。

...
BigDecimal
._load で復元可能な文字列を返します。
Marshal.#dump から呼び出されます。

//emlist[][ruby]{
require 'bigdecimal'
inf = BigDecimal('Infinity') # => Infinity
s = Marshal.dump(inf) # => "\x04\bu:\x0FBigDecimal\x0F9:Infinity"
Marshal.load(s) # => I...
...nfinity
//}

@see BigDecimal._load, Marshal.#dump, Marshal.#load...

BigDecimal#dup -> BigDecimal (6103.0)

self を返すように、BigDecimal で定義されています。

...self を返すように、BigDecimal で定義されています。...

BigDecimal#exponent -> Integer (6103.0)

self の指数部を整数値で返します。

self の指数部を整数値で返します。

BigDecimal#inspect -> String (6103.0)

BigDecimal オブジェクトを表す文字列を返します。

...
BigDecimal
オブジェクトを表す文字列を返します。

//emlist[][ruby]{
require "bigdecimal"
BigDecimal
("1234.5678").inspect
# => "0.12345678e4"
//}...

BigDecimal#precs -> [Integer, Integer] (6103.0)

self の有効数字と最大有効数字の配列を返します。

self の有効数字と最大有効数字の配列を返します。

絞り込み条件を変える

BigDecimal#save_exception_mode { ... } -> object (6103.0)

例外処理に関する BigDecimal.mode の設定を保存してブロックを評価し ます。ブロック中で変更した設定はブロックの評価後に復元されます。

...例外処理に関する BigDecimal.mode の設定を保存してブロックを評価し
ます。ブロック中で変更した設定はブロックの評価後に復元されます。

ブロックの評価結果を返します。...

BigDecimal#split -> [Integer, String, Integer, Integer] (6103.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...

BigDecimal#power(n) -> BigDecimal (3103.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 (3103.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...

Float#to_d(prec) -> BigDecimal (126.0)

自身を BigDecimal に変換します。

... BigDecimal に変換します。

@param prec 計算結果の精度。省略した場合は Float::DIG + 1 です。

@return BigDecimal に変換したオブジェクト

//emlist[][ruby]{
require 'bigdecimal'
require 'bigdecimal/util'

p
1.0.to_d # => 0.1e1
p
(1.0 / 0).to_d # => Infinity

p
...
...(1.0 / 3).to_d / (2.0 / 3).to_d # => 0.5e0
p
((1.0 / 3) / (2.0 / 3)).to_d # => 0.5e0
//}

@raise ArgumentError prec に負の数を指定した場合に発生します。...

絞り込み条件を変える

<< 1 2 > >>