Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Welcome to the Monastery
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Does he have log and exp available?

print exp( log( 100 ) *.5 );; 10 print exp( log( 1000 ) *.3333333333333333333333 );; 10

Ie.

sub pow{ exp( log( $_[0] ) * $_[1] ) };; printf "%2d : %20.17f\n", $_, pow( 10**$_, 1/$_ ) for 1 .. 20;; 1 : 10.00000000000000200 2 : 10.00000000000000200 3 : 9.99999999999999820 4 : 10.00000000000000200 5 : 10.00000000000000200 6 : 9.99999999999999820 7 : 9.99999999999999820 8 : 10.00000000000000200 9 : 9.99999999999999820 10 : 10.00000000000000200 11 : 10.00000000000000200 12 : 9.99999999999999820 13 : 10.00000000000000200 14 : 9.99999999999999820 15 : 9.99999999999999820 16 : 10.00000000000000200 17 : 10.00000000000000200 18 : 9.99999999999999820 19 : 10.00000000000000200 20 : 10.00000000000000200 printf "%2d : %20.17f\n", $_, pow( 12345**$_, 1/$_ ) for 1 .. 20;; 1 : 12345.00000000000500000 2 : 12345.00000000000500000 3 : 12345.00000000000500000 4 : 12345.00000000000500000 5 : 12345.00000000000500000 6 : 12345.00000000000500000 7 : 12345.00000000000500000 8 : 12345.00000000000500000 9 : 12345.00000000000500000 10 : 12345.00000000000500000 11 : 12345.00000000000500000 12 : 12345.00000000000500000 13 : 12345.00000000000500000 14 : 12345.00000000000500000 15 : 12344.99999999998400000 16 : 12345.00000000000500000 17 : 12344.99999999998400000 18 : 12345.00000000000500000 19 : 12344.99999999998400000 20 : 12345.00000000000500000

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re: [OT] Function to do x**y for |y|<1 w/o ** operator. by BrowserUk
in thread [OT] Function to do x**y for |y|<1 w/o ** operator. by swampyankee

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (10)
    As of 2014-04-17 00:10 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (437 votes), past polls