http://qs321.pair.com?node_id=239203


in reply to NV/IV Bug ?

1.15 in binary is... ooops, an infinite series. There is special magic in place for what is basically 1.1499999999999 when multiplied and printed. But when you you force to int(), you dodge that magic and get the proper truncated value.

--
$you = new YOU;
honk() if $you->love(perl)

Replies are listed 'Best First'.
Re: Re: NV/IV Bug ?
by MZSanford (Curate) on Feb 27, 2003 at 18:52 UTC
    Thanks, that explains. Inconsistant (by design) Magic application. If neither worked, i would not have posted ... i do understand floating point numbers, but the inconsistancy was bothering me. Thanks again.
    from the frivolous to the serious