Warp wrote:
>
> Chris Huff <chr### [at] mac com> wrote:
> : And the only benefit would be lower memory usage, which is
> : really only relevant if you are storing huge arrays.
>
> It's not the only benefit. The other benefit would be precision. If you
> use very large integers, floats may lose information.
> This may be important when making mathematical operations. For example:
>
> 25^7/1953125 ( = 3125 )
>
> may give a different result if we use integers or if we use floats.
... and this is why one should never check equality between two floats!
--
__ __ __ __ _
| | / \ / / |_ / |/
\/\/ \__/ /_ /_ |__ \_ |\
Post a reply to this message
|