1件ヒット
[1-1件を表示]
(0.079秒)
検索結果
先頭1件
-
bigdecimal (76.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...