my $ret = 1; for my $d (1e-15, 1e-20) { printf("%g %d %d\n", $d, ( $d )?1:0, ( $ret-$d != $ret )?1:0, ); }