ライブラリ
- ビルトイン (661)
- bigdecimal (33)
-
bigdecimal
/ math (66) - cmath (246)
-
irb
/ ext / math-mode (12) -
irb
/ extend-command (11) - mathn (8)
- matrix (11)
- rake (11)
クラス
- Complex (44)
- Float (52)
-
IRB
:: Context (12) - Integer (29)
- Module (30)
- Numeric (44)
-
Rake
:: FileList (11) - Range (22)
- Vector (11)
モジュール
- BigMath (88)
- CMath (240)
- Enumerable (44)
-
IRB
:: ContextExtender (11) - Kernel (22)
- Math (327)
オブジェクト
- main (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - BigMath (11)
- CMath (6)
- DomainError (11)
- E (22)
- Float (11)
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (8) - PI (22)
- Random (11)
- Ruby用語集 (11)
- acos (17)
- acos! (6)
- acosh (17)
- acosh! (6)
- angle (33)
-
angle
_ with (11) - arg (33)
- asin (17)
- asin! (6)
- asinh (17)
- asinh! (6)
- atan (28)
- atan! (6)
- atan2 (17)
- atan2! (6)
- atanh (17)
- atanh! (6)
- bigdecimal (11)
-
bigdecimal
/ math (11) - bsearch (22)
- cbrt (17)
- cbrt! (6)
- cmath (6)
- cos (28)
- cos! (6)
- cosh (17)
- cosh! (6)
- digits (22)
- erf (11)
- erfc (11)
- exp (28)
- exp! (6)
- frexp (11)
- gamma (11)
- hypot (11)
- include (33)
-
install
_ extend _ commands (11) - irb (4)
-
irb
/ ext / math-mode (4) - ldexp (11)
- lgamma (11)
- log (45)
- log! (12)
- log10 (17)
- log10! (6)
- log2 (17)
- log2! (6)
- math? (4)
-
math
_ mode (4) -
math
_ mode= (4) - mathn (4)
-
max
_ by (44) -
module
_ function (19) - phase (33)
- polar (22)
- printf (22)
- round (19)
- rsqrt (4)
-
ruby 1
. 6 feature (11) -
ruby 1
. 9 feature (11) - sin (28)
- sin! (6)
- sinh (17)
- sinh! (6)
- sqrt (39)
- sqrt! (6)
- tan (17)
- tan! (6)
- tanh (17)
- tanh! (6)
- メソッド呼び出し(super・ブロック付き・yield) (11)
検索結果
先頭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... -
Math
. # sqrt(x) -> Float (21024.0) -
x の非負の平方根(principal square root)を返します。
...合に発生します。
@raise Math::DomainError x に範囲外の実数を指定した場合に発生します。
@raise RangeError xに実数以外の数値を指定した場合に発生します。
//emlist[例][ruby]{
0.upto(10) {|x|
p [x, Math.sqrt(x), Math.sqrt(x)**2]
}
# => [0, 0.0, 0.0......1.0, 1.0]
# [2, 1.4142135623731, 2.0]
# [3, 1.73205080756888, 3.0]
# [4, 2.0, 4.0]
# [5, 2.23606797749979, 5.0]
# [6, 2.44948974278318, 6.0]
# [7, 2.64575131106459, 7.0]
# [8, 2.82842712474619, 8.0]
# [9, 3.0, 9.0]
# [10, 3.16227766016838, 10.0]
//}
@see Integer.sqrt, Math.#cbrt...