るりまサーチ

最速Rubyリファレンスマニュアル検索!
276件ヒット [1-100件を表示] (0.114秒)
トップページ > クエリ:t[x] > クエリ:Ruby[x] > モジュール:Math[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

種類

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

Math.#atan(x) -> Float (6107.0)

x の逆正接関数(arctangent)の値をラジアンで返します。

...x の逆正接関数(arctangent)の値をラジアンで返します。

@param x 実数

@return 返される値の範囲は [-π/2, +π/2] です。

@raise TypeError x に数値以外を指定した場合に発生します。

@raise RangeError x に実数以外の数値を指定した場合...
...に発生します。

//emlist[例][ruby]{
Math
.atan(0) # => 0.0
//}

@see Math.#atan2, Math.#tan...

Math.#atan2(y, x) -> Float (6107.0)

y / x の逆正接関数(arctangent)の値をラジアンで返します。

...逆正接関数(arctangent)の値をラジアンで返します。

@param y 実数
@param x 実数

@return 返される値の範囲は [-π, π] です。


//emlist[例][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.#cbrt(x) -> Float (6107.0)

x の立方根(cubic root)を返します。

...(cubic root)を返します。

@param x 実数

@raise TypeError xに数値以外を指定した場合に発生します。

@raise RangeError xに実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
-9.upto(9) {|x|
p [x, Math.cbrt(x), Math.cbrt(x)**3]
}
# =>...
....0, -1.0]
# [0, 0.0, 0.0]
# [1, 1.0, 1.0]
# [2, 1.25992104989487, 2.0]
# [3, 1.44224957030741, 3.0]
# [4, 1.5874010519682, 4.0]
# [5, 1.7099759466767, 5.0]
# [6, 1.81712059283214, 6.0]
# [7, 1.91293118277239, 7.0]
# [8, 2.0, 8.0]
# [9, 2.0800838230519, 9.0]
//}

@see Math.#sqrt...

Math.#hypot(x, y) -> Float (6107.0)

sqrt(x*x + y*y) を返します。

...sqrt(x*x + y*y) を返します。

この値は x, y を直交する 2 辺とする直角三角形の斜辺(hypotenuse)の長さです。

@param x 実数
@param y 実数

@raise TypeError 引数のどちらかに数値以外を指定した場合に発生します。

@raise RangeError 引数...
...のどちらかに実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
Math
.hypot(3, 4) #=> 5.0
//}...

Math.#sqrt(x) -> Float (6107.0)

x の非負の平方根(principal square root)を返します。

...x の非負の平方根(principal square root)を返します。

@param x 0または正の実数

@raise TypeError xに数値以外を指定した場合に発生します。

@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, 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.449...
...48974278318, 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...

絞り込み条件を変える

Math.#tan(x) -> Float (6107.0)

x の正接関数(tangent)の値を返します。

...tangent)の値を返します。

@param x 実数(ラジアンで与えます)

@return 実数

@raise TypeError x に数値以外を指定した場合に発生します。

@raise RangeError x に実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
Math
.tan...
...(0) # => 0.0
//}

@see Math.#atan, Math.#atan2...

Math.#acos(x) -> Float (3107.0)

x の逆余弦関数(arccosine)の値をラジアンで返します。

...ジアンで返します。

@param x -1.0 <= x <= 1 の範囲内の実数

@return 返される値の範囲は [0, +π] です。

@raise TypeError x に数値以外を指定した場合に発生します。

@raise Math::DomainError x に範囲外の実数を指定した場合に発生します。...
...@raise RangeError x に実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
Math
.acos(0) == Math::PI/2 # => true
//}

@see Math.#cos...

Math.#asin(x) -> Float (3107.0)

x の逆正弦関数(arcsine)の値をラジアンで返します。

...アンで返します。

@param x -1.0 <= x <= 1 の範囲内の実数

@return 返される値の範囲は[-π/2, +π/2] です。

@raise TypeError x に数値以外を指定した場合に発生します。

@raise Math::DomainError x に範囲外の実数を指定した場合に発生します...
...

@raise RangeError x に実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
Math
.asin(1) == Math::PI/2 # => true
//}

@see Math.#sin...

Math.#cos(x) -> Float (3107.0)

x の余弦関数(cosine)の値を返します。

...(ラジアンで与えます)

@return [-1, 1] の実数

@raise TypeError x に数値以外を指定した場合に発生します。

@raise RangeError x に実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
Math
.cos(Math::PI) # => -1.0
//}

@see Math.#acos...
<< 1 2 3 > >>