Size of Float built-in type

?

  • 32 bits

    Votes: 0 0.0%
  • 64 bits

    Votes: 0 0.0%

  • Total voters
    1

alextretyak

Administrator
Staff member
In favor of 64 bits:
  1. Compatibility. Floating point literals in C/C++ are treated as 64 bits (e.g. auto f = 0.0;, then type of f is double, which is 64 bits on most platforms).
  2. Time in 11l is represented as a floating point number of seconds since the epoch, the mantissa of which must be at least 32 bits (single precision float has just 23 bits of mantissa). However, Time.unix_time() method can return Float64, not just Float.
 
Top