265件ヒット
[101-200件を表示]
(0.071秒)
ライブラリ
- ビルトイン (158)
- bigdecimal (36)
- matrix (20)
- openssl (12)
- pathname (21)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6)
クラス
- Array (21)
- BasicObject (12)
- BigDecimal (36)
-
File
:: Stat (12) - Fixnum (3)
- Float (12)
- Hash (12)
- IO (12)
- Matrix (12)
- Numeric (24)
-
OpenSSL
:: BN (12) - Pathname (21)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (12)
- Struct (38)
- Vector (8)
検索結果
先頭5件
-
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 する場合は対象の...