るりまサーチ

最速Rubyリファレンスマニュアル検索!
265件ヒット [101-200件を表示] (0.071秒)

別のキーワード

  1. _builtin zero?
  2. matrix zero
  3. matrix zero?
  4. pathname zero?
  5. bigdecimal zero?

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 3 > >>

Matrix#zero? -> bool (6102.0)

行列が零行列ならば true を返します。

行列が零行列ならば true を返します。

OpenSSL::BN#zero? -> bool (6102.0)

自身が 0 である場合に true を返します。

自身が 0 である場合に true を返します。

Vector#zero? -> bool (6102.0)

すべての要素がゼロであれば true を返します。

すべての要素がゼロであれば true を返します。

BigDecimal#nonzero? -> self | nil (6101.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#sign -> -3 | -2 | -1 | 0 | 1 | 2 | 3 (19.0)

自身の符号等の性質に応じて、Integer を返します。

...0。 BigDecimal::SIGN_NaN と同じです。
+0 であれば、 1。 BigDecimal::SIGN_POSITIVE_ZERO と同じです。
-0 であれば、-1。 BigDecimal::SIGN_NEGATIVE_ZERO と同じです。
有限の正の値 であれば、 2。 BigDecimal::SIGN_POSITIVE_FINITE と同じ...
...mal("0").sign # => 1
p BigDecimal("100").sign # => 2
p BigDecimal("Infinity").sign # => 3
p BigDecimal("-0").sign # => -1
p BigDecimal("-5").sign # => -2
p BigDecimal("-Infinity").sign # => -3

p BigDecimal("0").sign == BigDecimal::SIGN_POSITIVE_ZERO # => true
//}...

絞り込み条件を変える

Hash#default_proc=(pr) (19.0)

ハッシュのデフォルト値を返す Proc オブジェクトを 変更します。

...}
h.default_proc = proc do |hash, key|
hash[key] = case
when (key % 15).zero?
"FizzBuzz"
when (key % 5).zero?
"Buzz"
when (key % 3).zero?
"Fizz"
else
key
end
end...

Array#pack(template) -> String (13.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

..."0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-126-23) # 非正規化数 (denormalized number)
end
elsif exp == 255
if fra == 0
sgn * Inf...
..."0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-1022-52) # 非正規化数 (denormalized number)
end
elsif exp == 2047
if fra == 0
sgn * Inf...

Array#pack(template, buffer: String.new) -> String (13.0)

配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。

..."0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-126-23) # 非正規化数 (denormalized number)
end
elsif exp == 255
if fra == 0
sgn * Inf...
..."0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-1022-52) # 非正規化数 (denormalized number)
end
elsif exp == 2047
if fra == 0
sgn * Inf...

String#unpack(template) -> Array (13.0)

Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。

..."0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-126-23) # 非正規化数 (denormalized number)
end
elsif exp == 255
if fra == 0
sgn * Inf...
..."0" ? +1.0 : -1.0
exp = Integer("0b" + e)
fra = Integer("0b" + f)
if exp == 0
if fra == 0
sgn * 0 # ±0 (positive/negative zero)
else
sgn * fra * 2**(-1022-52) # 非正規化数 (denormalized number)
end
elsif exp == 2047
if fra == 0
sgn * Inf...

BasicObject#method_missing(name, *args) -> object (7.0)

呼びだされたメソッドが定義されていなかった時、Rubyインタプリタがこのメソッド を呼び出します。

...p @data[lang][$1.to_i]
else
raise "#{lang} unknown"
end
else
super
end
end
end

dic = Foo.new({:English => %w(zero one two), :Esperanto => %w(nulo unu du)})
dic.find_2_in :Esperanto #=> "du"
//}

[注意] このメソッドを override する場合は対象の...

絞り込み条件を変える

<< < 1 2 3 > >>