るりまサーチ

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

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. open3 capture2e
  4. matrix rank_e
  5. matrix det_e

ライブラリ

クラス

キーワード

検索結果

Integer#magnitude -> Integer (24338.0)

self の絶対値を返します。

...self の絶対値を返します。

//emlist[][ruby]{
-
12345.abs # => 12345
12345.abs # => 12345
-
1234567890987654321.abs # => 1234567890987654321
//}...

Complex#magnitude -> Numeric (24332.0)

自身の絶対値を返します。

...す。

以下の計算の結果を Float オブジェクトで返します。

sqrt(self.real ** 2 + self.imag ** 2)

//emlist[例][ruby]{
Complex(1, 2).abs # => 2.23606797749979
Complex(3, 4).abs # => 5.0
Complex('1/2', '1/2').abs # => 0.7071067811865476
//}

@see Complex#abs2...

Numeric#magnitude -> Numeric (24332.0)

自身の絶対値を返します。

...自身の絶対値を返します。

//emlist[例][ruby]{
12.abs #=> 12
(-34.56).abs #=> 34.56
-
34.56.abs #=> 34.56
//}...

Integer#abs -> Integer (21338.0)

self の絶対値を返します。

...self の絶対値を返します。

//emlist[][ruby]{
-
12345.abs # => 12345
12345.abs # => 12345
-
1234567890987654321.abs # => 1234567890987654321
//}...

Complex#abs -> Numeric (21332.0)

自身の絶対値を返します。

...す。

以下の計算の結果を Float オブジェクトで返します。

sqrt(self.real ** 2 + self.imag ** 2)

//emlist[例][ruby]{
Complex(1, 2).abs # => 2.23606797749979
Complex(3, 4).abs # => 5.0
Complex('1/2', '1/2').abs # => 0.7071067811865476
//}

@see Complex#abs2...

絞り込み条件を変える

Numeric#abs -> Numeric (21332.0)

自身の絶対値を返します。

...自身の絶対値を返します。

//emlist[例][ruby]{
12.abs #=> 12
(-34.56).abs #=> 34.56
-
34.56.abs #=> 34.56
//}...

Float#magnitude -> Float (21326.0)

自身の絶対値を返します。

...自身の絶対値を返します。

//emlist[例][ruby]{
34.56.abs # => 34.56
-
34.56.abs # => 34.56
//}...

Rational#magnitude -> Rational (21320.0)

自身の絶対値を返します。

...自身の絶対値を返します。

//emlist[例][ruby]{
Rational(1, 2).abs # => (1/2)
Rational(-1, 2).abs # => (1/2)
//}...

NEWS for Ruby 3.0.0 (9513.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...# and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
e
nd
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern match...
...ip checking a class and a object multiple times in a method when possible.
* Optimize accesses in some core classes like Hash and their subclasses.
* Method inlining support for some C methods
* `Kernel`: `#class`, `#frozen?`
* `Integer`: `#-@`, `#~`, `#abs`, `#bit_length...

Numeric (8214.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...値を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッド...
...ださい。


=> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Numeric Integer Fixnum Bignum Float Rational Complex
-
------------------------------------------------------------------------------------------...
... - - o o - - -
Numeric Integer Fixnum Bignum Float Rational Complex
-
------------------------------------------------------------------------------------------
abs
...
...=> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
Numeric Integer Float Rational Complex
-
-------------------------------------------------------------------------------
% | o o o -...
...- - -
^ | - o - - -
Numeric Integer Float Rational Complex
-
-------------------------------------------------------------------------------
abs
|...

絞り込み条件を変える