るりまサーチ (Ruby 3.1)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.010秒)

別のキーワード

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

キーワード

検索結果

bigdecimal (22.0)

bigdecimal は浮動小数点数演算ライブラリです。 任意の精度で 10 進表現された浮動小数点数を扱えます。

...求める桁数は自分で指定することができます。

//emlist[pi.rb][ruby]{
#!/usr/local/bin/ruby

require "bigdecimal"
#
# Calculates 3.1415.... (the number of times that a circle's diameter
# will fit around the circle) using J. Machin's formula.
#
def big_pi(sig) # sig: Number of sign...

matrix (22.0)

行列と数ベクトルを扱うためのライブラリです。

行列と数ベクトルを扱うためのライブラリです。

行列、ベクトルの各要素には Ruby の任意の数オブジェクト(Numeric の
サブクラス、Float, Integer, Complex, Rational など)
が使えます。