Re: problem with euphoria's power()

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

On 5 Aug 2001, at 20:09, daryl_vdb at HOTMAIL.COM wrote:

> 
> Consider the following line of code:
> 
> ? power(-8, 1/3)
> 
> I get the following error:
> 
> can't raise negative number to non-integer power.
> 
> Wrong! raising any number to 1/3 gives the cubed root, and anyone with even 
> a little math experience knows that all negative numbers have real cubed 
> roots. Same applies with 1 / <any odd integer>.  So, what's the problem Rob?

If we had the log10 function instead of the natural logs function, we could get
any root
or power by using that function:

atom = 10E(0.3 x log(1728))
-- atom = 12

Kat

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

Search



Quick Links

User menu

Not signed in.

Misc Menu