るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Float#%(other) -> Float (8001.0)

算術演算子。剰余を計算します。

算術演算子。剰余を計算します。

@param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 剰余
3.0 % 1.2 # => 0.6000000000000001
3.0 % 0.0 # ZeroDivisionError
//}

Float#*(other) -> Float (8001.0)

算術演算子。積を計算します。

算術演算子。積を計算します。

@param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 積
2.4 * 3 # => 7.2
//}

Float#**(other) -> Float (8001.0)

算術演算子。冪を計算します。

算術演算子。冪を計算します。

@param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 冪
1.2 ** 3.0 # => 1.7279999999999998
3.0 + 4.5 - 1.3 / 2.4 * 3 % 1.2 ** 3.0 # => 5.875
0.0 ** 0 # => 1.0
//}

Float#+(other) -> Float (8001.0)

算術演算子。和を計算します。

算術演算子。和を計算します。

@param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 和
3.0 + 4.5 # => 7.5
//}

Float#-(other) -> Float (8001.0)

算術演算子。差を計算します。

算術演算子。差を計算します。

@param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 差
4.5 - 1.3 # => 3.2
//}

絞り込み条件を変える

Float#-@ -> Float (8001.0)

単項演算子の - です。 self の符号を反転させたものを返します。

単項演算子の - です。
self の符号を反転させたものを返します。

//emlist[例][ruby]{
- 1.2 # => -1.2
- -1.2 # => 1.2
//}

Float#/(other) -> Float (8001.0)

算術演算子。商を計算します。

算術演算子。商を計算します。

@param other 二項演算の右側の引数(対象)

//emlist[例][ruby]{
# 商
1.3 / 2.4 # => 0.541666666666667
1.0 / 0 # => Infinity
//}

Float#<(other) -> bool (8001.0)

比較演算子。数値として小さいか判定します。

比較演算子。数値として小さいか判定します。

@param other 比較対象の数値
@return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。

//emlist[例][ruby]{
3.14 < 3.1415 # => true
3.14 <= 3.1415 # => true
//}

Float#<=(other) -> bool (8001.0)

比較演算子。数値として等しいまたは小さいか判定します。

比較演算子。数値として等しいまたは小さいか判定します。

@param other 比較対象の数値
@return self よりも other の方が大きい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[例][ruby]{
3.14 < 3.1415 # => true
3.14 <= 3.1415 # => true
//}

Float#<=>(other) -> -1 | 0 | 1 | nil (8001.0)

self と other を比較して、self が大きい時に正、 等しい時に 0、小さい時に負の整数を返します。 比較できない場合はnilを返します

self と other を比較して、self が大きい時に正、
等しい時に 0、小さい時に負の整数を返します。
比較できない場合はnilを返します

//emlist[例][ruby]{
3.05 <=> 3.14 # => -1
1.732 <=> 1.414 # => 1
3.3 - 3.3 <=> 0.0 # => 0
3.14 <=> "hoge" # => nil
3.14 <=> 0.0/0.0 # => nil
//}

絞り込み条件を変える

<< 1 2 3 ... > >>