るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.035秒)
トップページ > バージョン:2.7.0[x] > クエリ:Numeric[x] > クエリ:-[x] > 種類:クラス[x]

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric -@
  4. numeric %
  5. numeric i

ライブラリ

キーワード

検索結果

Numeric (118804.0)

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

...d
//}

また、任意桁の切上げ、切捨て、四捨五入を行うメソッドは以下のように
定義できます。

//emlist[][ruby]{
class
Numeric
def roundup(d=0)
x = 10**d
if self > 0
self.quo(x).ceil * x
else
self.quo(x).floor * x
end
end

def roun...

Matrix (196.0)

数Numericを要素とする行列を扱うクラスです。

数Numericを要素とする行列を扱うクラスです。

行列

m * n 個の数a(i,j)を

[ a(0,0) a(0,1) a(0,2) a(0,3) ... a(0,n-1) ]
[ a(1,0) a(1,1) a(1,2) a(1,3) ... a(1,n-1) ]
[ a(2,0) a(2,1) a(2,2) a(2,3) ... a(2,n-1) ]
[ ]
[ a(m-1,0) a(m-1,n-1) ]

...

Complex (94.0)

複素数を扱うクラスです。

複素数を扱うクラスです。

Complex オブジェクトを作成するには、Kernel.#Complex、
Complex.rect、Complex.polar、Numeric#to_c、
String#to_c のいずれかを使用します。

//emlist[Complex オブジェクトの作り方][ruby]{
Complex(1) # => (1+0i)
Complex(2, 3) # => (2+3i)
Complex.polar(2, 3) # => (-1.9799849932008908+0.2822400161197344i)
Complex(0....