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