604件ヒット
[1-100件を表示]
(0.092秒)
種類
- インスタンスメソッド (362)
- モジュール関数 (99)
- 特異メソッド (66)
- 定数 (55)
- 変数 (22)
クラス
モジュール
- Enumerable (55)
- Kernel (44)
- Math (77)
キーワード
-
$ -F (11) -
$ ; (11) - == (11)
- === (11)
- =~ (11)
-
MAX
_ 10 _ EXP (11) -
MAX
_ EXP (11) -
MIN
_ 10 _ EXP (11) -
MIN
_ EXP (11) - MULTILINE (11)
- [] (11)
- []= (33)
- casefold? (11)
-
class
_ eval (11) - compile (11)
- cosh (11)
- eql? (11)
- eval (33)
-
fixed
_ encoding? (11) - frexp (11)
-
instance
_ eval (11) -
last
_ match (22) - ldexp (11)
- log (22)
- match (44)
- match? (24)
-
max
_ by (44) -
module
_ eval (11) - new (11)
- pack (19)
- sinh (11)
- slice (33)
- slice! (11)
- sum (11)
-
try
_ convert (11) - unpack (11)
- ~ (11)
検索結果
先頭5件
-
Math
. # exp(x) -> Float (18227.0) -
x の指数関数(exponential)の値を返します。
...x の指数関数(exponential)の値を返します。
すなわち e の x 乗の値を返します(e は自然対数の底)。
@param x 実数
@raise TypeError x に数値以外を指定した場合に発生します。
@raise RangeError x に実数以外の数値を指定した場合......に発生します。
//emlist[例][ruby]{
Math.exp(0) # => 1.0
Math.exp(1) # => 2.718281828459045
Math.exp(1.5) # => 4.4816890703380645
//}
@see exp(3), Math.#log... -
Math
. # ldexp(x , exp) -> Float (12325.0) -
実数 x に 2 の exp 乗をかけた数を返します。
...実数 x に 2 の exp 乗をかけた数を返します。
@param x 実数
@param exp 整数。小数点以下切捨て。
@raise TypeError 引数のどちらかに数値以外を指定した場合に発生します。
@raise RangeError 引数のどちらかに実数以外の数値を指定し......た場合に発生します。
//emlist[例][ruby]{
fraction, exponent = Math.frexp(1234)
Math.ldexp(fraction, exponent) # => 1234.0
//}... -
File
. expand _ path(path , default _ dir = & # 39; . & # 39;) -> String (9202.0) -
path を絶対パスに展開した文字列を返します。 path が相対パスであれば default_dir を基準にします。
...ます。
path が相対パスであれば default_dir を基準にします。
先頭の ~ はホームディレクトリ(環境変数 HOME が使われます)に、
~USER はそのユーザのホームディレクトリに展開されます。
//emlist[例][ruby]{
p Dir.getwd....../home/matz"
p File.expand_path("..") #=> "/home/matz/work"
p File.expand_path("..", "/tmp") #=> "/"
p File.expand_path("~") #=> "/home/matz"
p File.expand_path("~foo") #=> "/home/foo"
//}
@param path パスを表す文字列を指定します。
@param default_dir path が......相対パスであれば default_dir を基準に展開されます。... -
Regexp
. compile(string , option = nil , code = nil) -> Regexp (9202.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...@param option Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp::EXTENDED
の論理和を指定します。
Integer 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE の......力します。
@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。
//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1.match(str)
p $~ # => "This is Regexp"
t2 = Regexp.compile('
this # ここは......regexp # ここも使用されない
', Regexp::EXTENDED | Regexp::IGNORECASE)
t2.match(str)
p Regexp.last_match # => "This is Regexp"
str = "ふるいけや\nかわずとびこむ\nみずのおと"
t2 = Regexp.compile("ふる.*?と", Regexp::MULTILINE)
p t2.match(str)[0] # => "ふるいけや... -
Float
:: MAX _ 10 _ EXP -> Integer (9109.0) -
最大の 10 進の指数です。
...最大の 10 進の指数です。
通常はデフォルトで 308 です。
@see Float::MIN_10_EXP... -
Float
:: MAX _ EXP -> Integer (9109.0) -
最大の Float::RADIX 進の指数です。
...最大の Float::RADIX 進の指数です。
通常はデフォルトで 1024 です。
@see Float::MIN_EXP... -
Float
:: MIN _ 10 _ EXP -> Integer (9109.0) -
最小の 10 進の指数です。
...最小の 10 進の指数です。
通常はデフォルトで -307 です。
@see Float::MAX_10_EXP... -
Float
:: MIN _ EXP -> Integer (9109.0) -
最小の Float::RADIX 進の指数です。
...最小の Float::RADIX 進の指数です。
通常はデフォルトで -1021 です。
@see Float::MAX_EXP... -
Regexp
# casefold? -> bool (9102.0) -
正規表現が大文字小文字の判定をしないようにコンパイルされている時、 真を返します。
...正規表現が大文字小文字の判定をしないようにコンパイルされている時、
真を返します。
//emlist[例][ruby]{
reg = Regexp.new("foobar", Regexp::IGNORECASE)
p reg.casefold? # => true
reg = Regexp.new("hogehoge")
p reg.casefold? # => false
//}... -
Regexp
. last _ match -> MatchData (9102.0) -
カレントスコープで最後に行った正規表現マッチの MatchData オ ブジェクトを返します。このメソッドの呼び出しは $~ の参照と同じです。
...のメソッドの呼び出しは $~
の参照と同じです。
//emlist[例][ruby]{
/(.)(.)/ =~ "ab"
p Regexp.last_match # => #<MatchData:0x4599e58>
p Regexp.last_match[0] # => "ab"
p Regexp.last_match[1] # => "a"
p Regexp.last_match[2] # => "b"
p Regexp.last_match[3] # => nil
//}...