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

Re: 0**0

by Abigail-II (Bishop)
on Jan 16, 2003 at 16:40 UTC ( [id://227415]=note: print w/replies, xml ) Need Help??


in reply to 0**0

# uname -srvm HP-UX B.11.00 C 9000/712 # perl -v This is perl, version 4.0 $RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $ Patch level: 36 Copyright (c) 1989, 1990, 1991, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 4.0 source +kit. # perl -wle 'print 0**0' pow: DOMAIN error 0 #

Replies are listed 'Best First'.
Re: Re: 0**0
by Juerd (Abbot) on Jan 16, 2003 at 17:26 UTC

    This is perl, version 4.0

    Thanks, but my code won't run with Perl 4 anyway. Have you got Perl 5 installed on that box? If it doesn't work, I'll have to avoid using 0**0 in my code.

    Juerd
    - http://juerd.nl/
    - spamcollector_perlmonks@juerd.nl (do not use).
    

      jkruck:<rue> % uname -srvm HP-UX B.11.00 U 9000/800 jkruck:<rue> % perl -v This is perl, version 5.005_03 built for PA-RISC1.1 Copyright 1987-1999, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5.0 source +kit. Complete documentation for Perl, including FAQ lists, should be found +on this system using `man perl' or `perldoc perl'. If you have access to + the Internet, point your browser at http://www.perl.com/, the Perl Home Pa +ge. jkruck:<rue> % perl -wle 'print 0**0' 1
      Clearly, if you are doing some numerical analysis, and you know in your case that 0**0 = 1 is not the right way to go, you absolutely should be checking for zeroes and handling them appropriately.

      Scott
      Project coordinator of the Generic Model Organism Database Project

        Clearly, if you are doing some numerical analysis, and you know in your case that 0**0 = 1 is not the right way to go, you absolutely should be checking for zeroes and handling them appropriately.

        I need it to be 1. The question is if Perl will always say 0**0 is 1, or if it does something different on other platforms. Because even mathematicians can't agree on what 00 should be, I wonder if Perl will always deal with it in the same way, or depending on system configuration.

        Juerd
        - http://juerd.nl/
        - spamcollector_perlmonks@juerd.nl (do not use).
        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-18 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found