Re: Third-root

new topic     » goto parent     » topic index » view thread      » older message » newer message

Einar Mogen writes:
> I need a function that can calculate the "third-root" of a number (I'm not
> sure if it is called that in english, but I hope you understand what I
> mean, like a=third_root(8), gives a=2). I didn't find such a routine in
> Euphoria, and I do not know how to make it myself.

The n-th root of a number is the same as that
number raised to the power 1/n.

So the square root of x would be power(x, 1/2) or power(x, 0.5)
although sqrt(x) is faster.

The third-root or "cube root" would be power(x, 1/3)

Regards,
  Rob Craig
  Rapid Deployment Software

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu