Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: zero to the power zero

by Steve_p (Priest)
on Feb 19, 2007 at 14:24 UTC ( [id://600853]=note: print w/replies, xml ) Need Help??


in reply to zero to the power zero

Hmmmm....
$ cat zero.c #include <stdio.h> int main() { printf("0 ** 0 == %d\n", 0 ^ 0); } $ ./zero 0 ** 0 == 0

Test your modules with bleadperl!

  rsync -avz rsync://public.activestate.com/perl-current/ .
  ./Configure -des -Dusedevel -Dprefix=/path/to/test/perl
  make test
  make install

Now, please test you modules! If you have test failures that don't happen with Perl 5.8.8, send a simplified test case to

perlbug at perl.org

Replies are listed 'Best First'.
Re^2: zero to the power zero
by zentara (Cardinal) on Feb 19, 2007 at 14:51 UTC
    Use math
    /* gcc -o zero zero.c -lm */ #include <stdio.h> #include <math.h> int main() { int i = 0; int j = 0; int k; k = pow(i,j); printf("%d\n",k); }
    Output: 1

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
Re^2: zero to the power zero
by Anonymous Monk on Feb 19, 2007 at 14:53 UTC
    printf("0 ** 0 == %d\n", 0 ^ 0);
    That's the xor operator.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2025-06-19 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.