66件ヒット
[1-66件を表示]
(0.143秒)
検索結果
先頭5件
-
Rational
# denominator -> Integer (21126.0) -
分母を返します。常に正の整数を返します。
...分母を返します。常に正の整数を返します。
@return 分母を返します。
//emlist[例][ruby]{
Rational(7).denominator # => 1
Rational(7, 1).denominator # => 1
Rational(9, -4).denominator # => 4
Rational(-2, -10).denominator # => 5
//}
@see Rational#numerator... -
Complex
# denominator -> Integer (21114.0) -
分母を返します。
...と虚部の分母の最小公倍数を整数で返します。
1 2 3+4i <- numerator(分子)
- + -i -> ----
2 3 6 <- denominator(分母)
//emlist[例][ruby]{
Complex('1/2+2/3i').denominator # => 6
Complex(3).numerator # => 1
//}
@see Complex#numerator... -
Float
# denominator -> Integer (21114.0) -
自身を Rational に変換した時の分母を返します。
...自身を Rational に変換した時の分母を返します。
@return 分母を返します。
//emlist[例][ruby]{
2.0.denominator # => 1
0.5.denominator # => 2
//}
@see Float#numerator... -
Complex
# numerator -> Complex (3107.0) -
分子を返します。
...分子を返します。
//emlist[例][ruby]{
Complex('1/2+2/3i').numerator # => (3+4i)
Complex(3).numerator # => (3+0i)
//}
@see Complex#denominator... -
Float
# numerator -> Integer (3007.0) -
自身を Rational に変換した時の分子を返します。
...自身を Rational に変換した時の分子を返します。
@return 分子を返します。
//emlist[例][ruby]{
2.0.numerator # => 2
0.5.numerator # => 1
//}
@see Float#denominator... -
Rational
# numerator -> Integer (3007.0) -
分子を返します。
...分子を返します。
@return 分子を返します。
//emlist[例][ruby]{
Rational(7).numerator # => 7
Rational(7, 1).numerator # => 7
Rational(9, -4).numerator # => -9
Rational(-2, -10).numerator # => 1
//}
@see Rational#denominator...