Reputation
Next privilege 125 Rep.
Vote down
Badges
1 2
Newest
 Enthusiast
Impact
0 people reached

  • 0 posts edited
  • 0 helpful flags
  • 33 votes cast
Jan
26
awarded  Enthusiast
Nov
27
comment Does anyone use Ceiling and *not* immediately cast it to an integer?
@Ralph: Yes. 64-bit floating point can only represent all integers exactly up to 2^53, which gives about 16 digits of precision. If you need more than that, you will have to use a decimal type or an arbitrary precision library. Some C and C++ compilers/architectures also support 80-bit "long doubles" with around 19 digits.
Nov
26
comment Does anyone use Ceiling and *not* immediately cast it to an integer?
@Ralph: Because the number has more digits than a floating point number can represent, so you lose some precision.
Sep
10
awarded  Autobiographer
Sep
10
awarded  Supporter