143件ヒット
[1-100件を表示]
(0.054秒)
検索結果
先頭5件
-
Math
. # log(x) -> Float (18147.0) -
x の対数(logarithm)を返します。
...x の対数(logarithm)を返します。
引数 x, b の両方に 0 を指定した場合は Float::NAN を返します。
@param x 正の実数を指定します。
@param b 底を指定します。省略した場合は自然対数(natural logarithm)を計算します。
@raise TypeErr......らかに負の数を指定した場合に発生します。
//emlist[例][ruby]{
Math.log(0) # => -Infinity
Math.log(1) # => 0.0
Math.log(Math::E) # => 1.0
Math.log(Math::E**3) # => 3.0
Math.log(12, 3) # => 2.2618595071429146
//}
@see Math.#log2, Math.#log10, Math.#exp... -
Math
. # log(x , b) -> Float (18147.0) -
x の対数(logarithm)を返します。
...x の対数(logarithm)を返します。
引数 x, b の両方に 0 を指定した場合は Float::NAN を返します。
@param x 正の実数を指定します。
@param b 底を指定します。省略した場合は自然対数(natural logarithm)を計算します。
@raise TypeErr......らかに負の数を指定した場合に発生します。
//emlist[例][ruby]{
Math.log(0) # => -Infinity
Math.log(1) # => 0.0
Math.log(Math::E) # => 1.0
Math.log(Math::E**3) # => 3.0
Math.log(12, 3) # => 2.2618595071429146
//}
@see Math.#log2, Math.#log10, Math.#exp... -
Math
. # log2(x) -> Float (6140.0) -
2 を底とする x の対数(binary logarithm)を返します。
...2 を底とする x の対数(binary logarithm)を返します。
@param x 正の実数
@raise TypeError xに数値以外を指定した場合に発生します。
@raise Math::DomainError x に範囲外の実数を指定した場合に発生します。
@raise RangeError xに実数以外......の数値を指定した場合に発生します。
//emlist[例][ruby]{
Math.log2(1) # => 0.0
Math.log2(2) # => 1.0
Math.log2(32768) # => 15.0
Math.log2(65536) # => 16.0
//}
@see Math.#log, Math.#log10... -
Math
. # log10(x) -> Float (6134.0) -
x の常用対数(common logarithm)を返します。
...x の常用対数(common logarithm)を返します。
@param x 正の実数
@raise TypeError xに数値以外を指定した場合に発生します。
@raise Math::DomainError x に範囲外の実数を指定した場合に発生します。
@raise RangeError xに実数以外の数値を......指定した場合に発生します。
//emlist[例][ruby]{
Math.log10(1) # => 0.0
Math.log10(10) # => 1.0
Math.log10(10**100) # => 100.0
//}
@see Math.#log, Math.#log2... -
Kernel
. # spawn(env , program , *args , options={}) -> Integer (105.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
.../emlist[][ruby]{
pid = spawn(command, :in=>"/dev/null") # read mode
pid = spawn(command, :out=>"/dev/null") # write mode
pid = spawn(command, :err=>"log") # write mode
pid = spawn(command, 3=>"/dev/null") # read mode
//}
stdout と stderr をリダイレクトした場合は、
ファイルは write......(command, :out=>["log", "w"]) # 0644 assumed
# write mode、パーミッション 0600 でファイルをオープンし、リダイレクトする。
pid = spawn(command, :out=>["log", "w", 0600])
# flagを文字列でなくビットで指定する
pid = spawn(command, :out=>["log", File::WRONLY|Fi......ルデスクリプタを同時にリダイレクトできます。
//emlist[][ruby]{
# stdout と stderr を "log" ファイルにリダイレクト
pid = spawn(command, [:out, :err]=>["log", "w"])
//}
複数のファイルデスクリプタを合わせてリダイレクトするには、
[ :child,... -
Kernel
. # spawn(program , *args) -> Integer (105.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
.../emlist[][ruby]{
pid = spawn(command, :in=>"/dev/null") # read mode
pid = spawn(command, :out=>"/dev/null") # write mode
pid = spawn(command, :err=>"log") # write mode
pid = spawn(command, 3=>"/dev/null") # read mode
//}
stdout と stderr をリダイレクトした場合は、
ファイルは write......(command, :out=>["log", "w"]) # 0644 assumed
# write mode、パーミッション 0600 でファイルをオープンし、リダイレクトする。
pid = spawn(command, :out=>["log", "w", 0600])
# flagを文字列でなくビットで指定する
pid = spawn(command, :out=>["log", File::WRONLY|Fi......ルデスクリプタを同時にリダイレクトできます。
//emlist[][ruby]{
# stdout と stderr を "log" ファイルにリダイレクト
pid = spawn(command, [:out, :err]=>["log", "w"])
//}
複数のファイルデスクリプタを合わせてリダイレクトするには、
[ :child,... -
Kernel
. # spawn(command , options={}) -> Integer (20.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash... -
Kernel
. # spawn(env , command , options={}) -> Integer (20.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
引数を外部コマンドとして実行しますが、生成した
子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash... -
Math
. # lgamma(x) -> [Float , Integer] (19.0) -
log(|gamma(x)|) と、gamma(x) の符号を返します。
...
log(|gamma(x)|) と、gamma(x) の符号を返します。
符号は +1 もしくは -1 で返されます。
@param x 実数
@raise TypeError xに数値以外を指定した場合に発生します。
@raise Math::DomainError x に -∞ を渡した場合に発生します。
@raise RangeErro... -
Math
. # acosh(x) -> Float (9.0) -
x の逆双曲線余弦関数(area hyperbolic cosine)の値を返します。
...x の逆双曲線余弦関数(area hyperbolic cosine)の値を返します。
=== 定義
acosh(x) = log(x + sqrt(x * x - 1)) [x >= 1]
@param x x >= 1 の範囲の実数
@raise TypeError x に数値以外を指定した場合に発生します。
@raise Math::DomainError x に範囲外...