るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

検索結果

Time#subsec -> Integer | Rational (24220.0)

時刻を表す分数を返します。

...あります。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5,6)
p "%10.9f" % t.to_f # => "946749845.000005960"
p t.subsec #=> (3/500000)
//}

to_f の値と subsec の値の下のほうの桁の値は異なる場合があります。
というのは IEEE 754 double はそれを表...
...すのに十分な精度を
持たないからです。subsec で得られる値が正確です。...