Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Seeing if two numbers have the same sign

by poolpi (Hermit)
on Jan 11, 2008 at 09:55 UTC ( [id://661841]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    #!/usr/bin/perl 
    ...
        my ( $x, $y ) = ( $val->[$_][0], $val->[$_][1] );
        print same_sign( $x, $y ) ? '' : 'not ', "same sign\n";
    }
    
  2. or download this
     1  2 => same sign
    -1  2 => not same sign
     1 -2 => not same sign
    -1 -2 => same sign
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://661841]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-23 20:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found