Math::BigFloat will make these calculations precise, though slower.
my $var = Math::BigFloat->new($x) + Math::BigFloat->new($y) + Math::BigFloat->new($z);
Just make sure to pass them to the Math::BigFloat constructor while they are still strings. If you use them as numbers first you could lose the precision before it can be stored.
In reply to Re: $var == 1 fails when $var = 1
by Anonymous Monk
in thread $var == 1 fails when $var = 1
by mjlush
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |