A
Arndt Jonasson
I'm still at a loss as to why Math::Complex's cbrt() isn't
considered sufficient.
c:\users\jgamble>perl -MMath::Complex -le "print cbrt(64);"
4
Somehow I missed your suggestion when I continued to critizise the
"**(1/3)" solution. Sorry about that. 'cbrt' seems to take care about
integerness (whether that is guaranteed I couldn't see from a quick
glance in the manual):
arndt ~/perl 4359> perl -MMath::Complex -le "print (cbrt(64)==4);"
1
arndt ~/perl 4360> perl -le "print (((64)**(1/3))==4)"
arndt ~/perl 4361>