ライブラリ
- ビルトイン (737)
- bigdecimal (36)
-
bigdecimal
/ math (72) - cmath (246)
-
irb
/ ext / math-mode (12) -
irb
/ extend-command (12) - mathn (8)
- matrix (12)
- rake (12)
クラス
- Complex (48)
- Float (57)
-
IRB
:: Context (12) - Integer (32)
- Module (48)
- Numeric (48)
-
Rake
:: FileList (12) - Range (24)
- Vector (12)
モジュール
- BigMath (96)
- CMath (240)
- Enumerable (48)
-
IRB
:: ContextExtender (12) - Kernel (24)
- Math (356)
オブジェクト
- main (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - BigMath (12)
- CMath (6)
- DomainError (12)
- E (24)
- Float (12)
- Marshal フォーマット (12)
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 4 . 0 (9) - PI (24)
- Random (12)
- Ruby用語集 (12)
- acos (18)
- acos! (6)
- acosh (18)
- acosh! (6)
- angle (36)
-
angle
_ with (12) - arg (36)
- asin (18)
- asin! (6)
- asinh (18)
- asinh! (6)
- atan (30)
- atan! (6)
- atan2 (18)
- atan2! (6)
- atanh (18)
- atanh! (6)
- bigdecimal (12)
-
bigdecimal
/ math (12) - bsearch (24)
- cbrt (18)
- cbrt! (6)
- cmath (6)
- cos (30)
- cos! (6)
- cosh (18)
- cosh! (6)
- digits (24)
- erf (12)
- erfc (12)
- exp (30)
- exp! (6)
- frexp (12)
- gamma (12)
- hypot (12)
- include (36)
-
install
_ extend _ commands (12) - irb (4)
-
irb
/ ext / math-mode (4) - ldexp (12)
- lgamma (12)
- log (48)
- log! (12)
- log10 (18)
- log10! (6)
- log2 (18)
- log2! (6)
- math? (4)
-
math
_ mode (4) -
math
_ mode= (4) - mathn (4)
-
max
_ by (48) -
module
_ function (36) - phase (36)
- polar (24)
- printf (24)
- round (21)
- rsqrt (4)
-
ruby 1
. 6 feature (12) -
ruby 1
. 9 feature (12) - sin (30)
- sin! (6)
- sinh (18)
- sinh! (6)
- sqrt (42)
- sqrt! (6)
- tan (18)
- tan! (6)
- tanh (18)
- tanh! (6)
- メソッド呼び出し(super・ブロック付き・yield) (12)
検索結果
先頭5件
-
Math (38018.0)
-
浮動小数点演算をサポートするモジュールです。
...浮動小数点演算をサポートするモジュールです。
Math モジュールにはさまざま数学関数がモジュール関数として定義されています。
モジュール関数は以下のように,モジュールの特異メソッドとして呼び出す使い方と、
モ......ジュールをインクルードしてレシーバーを省略した形で呼び出す使い方の両方ができます。
=== 例
//emlist[][ruby]{
pi = Math.atan2(1, 1)*4;
include Math
pi2 = atan2(1, 1)*4
//}... -
Math
. # log(x) -> Float (21060.0) -
x の対数(logarithm)を返します。
...らかに負の数を指定した場合に発生します。
//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 (21060.0) -
x の対数(logarithm)を返します。
...らかに負の数を指定した場合に発生します。
//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 (21042.0) -
2 を底とする x の対数(binary logarithm)を返します。
...@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 (21036.0) -
x の常用対数(common logarithm)を返します。
...se 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... -
Math
. # acos(x) -> Float (21024.0) -
x の逆余弦関数(arccosine)の値をラジアンで返します。
...定した場合に発生します。
@raise Math::DomainError x に範囲外の実数を指定した場合に発生します。
@raise RangeError x に実数以外の数値を指定した場合に発生します。
//emlist[例][ruby]{
Math.acos(0) == Math::PI/2 # => true
//}
@see Math.#cos... -
Math
. # asin(x) -> Float (21024.0) -
x の逆正弦関数(arcsine)の値をラジアンで返します。
...定した場合に発生します。
@raise Math::DomainError x に範囲外の実数を指定した場合に発生します。
@raise RangeError x に実数以外の数値を指定した場合に発生します。
//emlist[例][ruby]{
Math.asin(1) == Math::PI/2 # => true
//}
@see Math.#sin... -
Math
. # atan2(y , x) -> Float (21024.0) -
y / x の逆正接関数(arctangent)の値をラジアンで返します。
...list[例][ruby]{
Math.atan2(1,0) #=> 1.5707963267949
Math.atan2(-1,0) #=> -1.5707963267949
//}
@raise TypeError y, x に数値以外を指定した場合に発生します。
@raise RangeError y, x に実数以外の数値を指定した場合に発生します。
@see Math.#atan, Math.#tan... -
Math
. # exp(x) -> Float (21024.0) -
x の指数関数(exponential)の値を返します。
...以外を指定した場合に発生します。
@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...