Help for this page

Select Code to Download


  1. or download this
     perl -Mbignum -E " for $x( -1,0,1){ $y = 0;  sub F{say $x % $y} F; $x
    +->bdiv; F;} "
    -1
    -inf
    ...
    NaN
    1
    inf
    
  2. or download this
        # Divide by zero and modulo zero.
        #
        # Division: Use the common convention that x / 0 is inf with the s
    +ame sign
    ...
        #       0 /    0 =  NaN                    0 %    0 =    0
        #      -5 /    0 = -inf                   -5 %    0 =   -5
        #    -inf /    0 = -inf                 -inf %    0 = -inf