> >the $c will be an NV of of 5.000000000000000, or thereabouts, een
> >while $a and $b are IVs.
>
> Note: integers have an exact representation in floating point. There is
...as long as they are [minint, maxint].
> no "thereabouts". It is exactly 5.000000000000000.
Yeah, bad example. Yours is slightly better. I think I was thinking
something like computations losing precision.
> However, 0.2 + 0.3 is not exactly 0.5, because 0.2 and 0.3 are both
> approximations. 0.5 has an exact representation in FP, as has 1/1024.
>
> Since FP calculations on modern processors are at least as fast as
> integer calculations, there is hardly any reason to prefer integers to FP.
...if one is concerned only about speed.
> Bigints, that's another matter.
Yes, let's not sacrifice precision.
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen