4件ヒット
[1-4件を表示]
(0.010秒)
キーワード
- bigdecimal (1)
-
bigdecimal
/ util (1) - fiddle (1)
- matrix (1)
検索結果
-
bigdecimal
/ util (70.0) -
String、Integer、Float、Rational, NilClass オブジェクトを BigDecimal オブジェクトに変換する機能を提供します。
String、Integer、Float、Rational, NilClass オブジェクトを
BigDecimal オブジェクトに変換する機能を提供します。
* String#to_d
* Integer#to_d
* Float#to_d
* Rational#to_d
* NilClass#to_d
これらのメソッドを使うには 'bigdecimal/util' を require する必要があります。
なお、Ruby 2.6.0 以降では、'bigdecimal/util' を require すると、
'bigdecimal' 本体も require されます。 -
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... -
fiddle (22.0)
-
*.dllや*.soなど、ダイナミックリンクライブラリを扱うためのライブラリです。
*.dllや*.soなど、ダイナミックリンクライブラリを扱うためのライブラリです。
dl と同等の機能を持ちますが、
dl は 2.0 以降deprecated となり、2.2.0 で削除されました。このライブラリ
を代わりに使います。
=== 使い方
通常は fiddle/import ライブラリを require して
Fiddle::Importer モジュールを使用します。
Fiddle モジュール自体はプリミティブな機能しか提供していません。
Fiddle::Importer モジュールは以下のようにユーザが定義した
モジュールを拡張する形で使います。
require ... -
matrix (22.0)
-
行列と数ベクトルを扱うためのライブラリです。
行列と数ベクトルを扱うためのライブラリです。
行列、ベクトルの各要素には Ruby の任意の数オブジェクト(Numeric の
サブクラス、Float, Integer, Complex, Rational など)
が使えます。