use warnings; use strict; use feature 'say'; use constant { ACCURACY => 1e5, RANGE => 1.2, LON => -119.31665, }; my $lon_current = -119.31666; my $deviation = abs(ACCURACY * (LON - $lon_current)); say "Within range: $deviation" if $deviation < RANGE;