in reply to Floating Point Errors

Floating point numbers are only approximate. To check for a floating point value being zero you have to check for its absolute value being smaller than some small tolerance, i.e.:
sub is_zero { abs($_[0]) < 1e-10 }
Likewise, two floating point numbers should be considered equal if their difference is zero (as defined by your application). This is something that you always have to do when you use floating point numbers.

For more on the subject, see the node Why is Zero not 0?

If you need exact arithmetic, perl has support for arbitrary precision numbers in the form of big integers and big rationals. See perldoc bigint and perldoc bigrat respectively.