Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Signals and floating point exceptions

by sleepingsquirrel (Chaplain)
on Jun 23, 2004 at 22:47 UTC ( [id://369198]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $SIG{FPE}=sub{...};
    
  2. or download this
        /*if (right == 0.0)
          DIE(aTHX_ "Illegal division by zero");*/
    
  3. or download this
    $ ./perl -e '$a=1.23/0.00;print "\$a=$a\n"'
    $a=inf
    
  4. or download this
        if (right == 0.0)
            PUSHs(&PL_sv_undef);/*DIE(aTHX_ "Illegal division by zero");*/
        else
            PUSHn( left / right );
    
  5. or download this
    $ ./perl -e 'print "UNDEFINED\n" unless (defined(1.23/0.00))'
    UNDEFINED
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-24 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found