# untested sub is_approximately_an_integer { my $x = shift; my $eps = 0.0001; return abs( $x-round($x) ) < $eps; }