Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: root function

by igelkott (Priest)
on Jun 22, 2008 at 00:55 UTC ( [id://693328]=note: print w/replies, xml ) Need Help??


in reply to root function

calculate the root

Besides the suggested home-made functions, you could also try pow in the POSIX module.

Replies are listed 'Best First'.
Re^2: root function
by ikegami (Patriarch) on Jun 22, 2008 at 04:31 UTC
    Either you're calling ** a home-made function, or they're just as needed for pow as for **.
      calling ** a home-made function

      I wouldn't call the ** operator a "function" at all. ;-)

      I didn't mean anything wrong by home-made but just tried to answer the op literally with an alternative solution. Nothing too serious.

        You apparently missed my point: Your solution has the same problems as **:
        >perl -le"use POSIX qw( pow ); print pow(-3, 1/3); -1.#IND

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-19 22:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found