るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.050秒)
トップページ > クエリ:Integer[x] > クエリ:to_f[x] > クエリ:subsec[x]

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

ライブラリ

クラス

検索結果

Time#subsec -> Integer | Rational (18232.0)

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

...%10.9f" % t.to_f # => "946749845.000005960"
p t.subsec #=> (3/500000)
//}

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