Perhaps this is why engineers want 0**0 = 1
foreach my $close_to_zero (1e-3, 1e-4, 1e-5, 1e-6, 1e-7, 1e-8, 1e-9, 1e-10, 1e-11, 1e-12, 1e-13, ){ print $close_to_zero**$close_to_zero,"\n"; }
produces
0.993116048420934 0.999079389984462 0.999884877372469 0.999986184584876 0.999998388191734 0.99999981579321 0.999999979276734 0.999999997697415 0.999999999746716 0.999999999972369 0.999999999997007

If you approach zero from the negative side, it doesn't work. There are many other directions you can approach from, using complex numbers. From these directions the answer also seems to head toward a limit of 1.

use Math::Complex; my $j=sqrt(-1)/100; foreach my $close_to_zero (-1e-3-$j*1e-3, -1e-4-$j*1e-4, -1e-5-$j*1e-5, -1e-6-$j*1e-6, -1e-7-$j*1e-7, -1e-8-$j*1e-8, -1e-9-$j*1e-9, -1e-10-$j*1e-10, -1e-11-$j*1e-11, -1e-12-$j*1e-12, -1e-13-$j*1e-13, ){ print $close_to_zero**$close_to_zero,"\n"; }
prints
1.00689492851834+0.00322274943578533i 1.00091826683245+0.000322665621543586i 1.00011482165982+3.24709453669811e-05i 1.00001378423429+3.2697926634863e-06i 1.00000160867421+3.29277874043755e-07i 1.00000018389316+3.31579990412048e-08i 1.0000000206919+3.33882521438423e-09i 1.00000000229945+3.36185100395793e-10i 1.00000000025297+3.38487684801375e-11i 1.0000000000276+3.40790269818147e-12i 1.00000000000299+3.43092854902761e-13i

So my engineering view is that 0**0==1 most of the time, for large values of zero.

It should work perfectly the first time! - toma


In reply to Re: 0**0 by toma
in thread 0**0 by Juerd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.