Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
        $mask = (2 ** ($y + 1) -1) << ($bits - $y) if $x < 0;
        return $z | $mask;
    }
    
  2. or download this
    #!/usr/bin/perl
    
    ...
        $mask = ( -1 >> ($bits - $y) ) << ($bits - $y) if $x < 0;
        return $z | $mask;
    }