sub same_sign { (0 <=> $_[0]) == (0 <=> $_[1]) || (! $_[0] || ! $_[1]); }
to check for either operand being somewhat false ;-)
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re^2: Seeing if two numbers have the same sign
by shmem
in thread Seeing if two numbers have the same sign
by grinder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |