72件ヒット
[1-72件を表示]
(0.151秒)
ライブラリ
- ビルトイン (55)
- bigdecimal (11)
- cmath (6)
検索結果
先頭5件
-
Math
:: DomainError (33000.0) -
数学関数(module Math のモジュール関数)で与えた引数が定義域 に含まれていない場合に発生します。
...数学関数(module Math のモジュール関数)で与えた引数が定義域
に含まれていない場合に発生します。... -
FloatDomainError (24016.0)
-
正負の無限大や NaN (Not a Number) を Bignum に変換しようとしたり、 NaN との比較を行ったときに発生します。
...正負の無限大や NaN (Not a Number) を Bignum に変換しようとしたり、
NaN との比較を行ったときに発生します。... -
CMath
. # asin!(x) -> Float (15306.0) -
実数 x の逆正弦関数の値をラジアンで返します。Math.#asin のエイリ アスです。
...返します。Math.#asin のエイリ
アスです。
@param x -1.0 <= x <= 1 の範囲内の実数。
@raise TypeError x に数値以外を指定した場合に発生します。
@raise Math::DomainError x に範囲外の実数を指定した場合に発生します。
@raise RangeError x に......実数以外の数値を指定した場合に発生します。
@see Math.#asin... -
Math
. # asin(x) -> Float (15306.0) -
x の逆正弦関数(arcsine)の値をラジアンで返します。
...逆正弦関数(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
. # lgamma(x) -> [Float , Integer] (9306.0) -
log(|gamma(x)|) と、gamma(x) の符号を返します。
...log(|gamma(x)|) と、gamma(x) の符号を返します。
符号は +1 もしくは -1 で返されます。
@param x 実数
@raise TypeError xに数値以外を指定した場合に発生します。
@raise Math::DomainError x に -∞ を渡した場合に発生します。
@raise RangeErro......r xに実数以外の数値を指定した場合に発生します。
//emlist[例][ruby]{
Math.lgamma(0) # => [Infinity, 1]
//}
@see Math.#gamma... -
Math
. # gamma(x) -> Float (9242.0) -
x のガンマ関数の値を返します。
...@param x 実数
@raise TypeError xに数値以外を指定した場合に発生します。
@raise Math::DomainError x に負の整数、もしくは -∞ を渡した場合に発生します。
@raise RangeError xに実数以外の数値を指定した場合に発生します。
//emlist[例]......[ruby]{
def fact(n) (1..n).inject(1) {|r,i| r*i } end
1.upto(26) {|i| p [i, Math.gamma(i), fact(i-1)] }
# => [1, 1.0, 1]
# [2, 1.0, 1]
# [3, 2.0, 2]
# [4, 6.0, 6]
# [5, 24.0, 24]
# [6, 120.0, 120]
# [7, 720.0, 720]
# [8, 5040.0, 5040]
# [9, 40320.0, 40320]
# [10, 362880.0, 362880]......09094217170944e+19, 51090942171709440000]
# [23, 1.1240007277776077e+21, 1124000727777607680000]
# [24, 2.5852016738885062e+22, 25852016738884976640000]
# [25, 6.204484017332391e+23, 620448401733239439360000]
# [26, 1.5511210043330954e+25, 15511210043330985984000000]
//}
@see Math.#lgamma... -
BigMath
. # log(x , prec) -> BigDecimal (9206.0) -
x の自然対数を prec で指定した精度で計算します。
...す。NaN を指定した場合には NaN
を返します。
@param x 計算対象の数値を Integer、Float、
Rational、BigDecimal オブジェクトのいずれかで指定
します。
@param prec 計算結果の精度を指定します。
@raise Math::DomainError x に 0......が指定された場合に発生します。
@raise ArgumentError prec に 0 以下の数値が指定された場合に発生します。
//emlist[][ruby]{
require "bigdecimal/math"
puts BigMath::log(BigDecimal('2'), 10) #=> 0.693147180559945309417232112588603776354688e0
//}...