Pikker1981


Hi there friends,

Can any of you please advice me as to how I am going to accomplish certain mathematical functions on numbers such as working out the n-th root of a number since the mathematical functions built in don't go past the square root (2nd root)

Regards
<!--[if !msEquation]--> <!--[if !vml]--> <![endif]--><!--[if !vml]--><!--[endif]--><!--[endif]-->



Re: Complex Math functions

clintz


hi,
you can use the POWER function since the equivalent exponential function of an [n'th root of x] is [x power of 1/n]..
e.g.
if you want to get the 5th root of 100, use POWER(100, 1.0/5.0)

- clintz






Re: Complex Math functions

Pikker1981

Thank you very much clintz.





Re: Complex Math functions

[rh4m1ll3] Rhamille Golimlim

you can also create user defined function (UDF) for other mathematical functions that you need.. like factorial, permutations, etc.





Re: Complex Math functions

Pikker1981

It seems i have rejoiced to early:

if i do a simple query like select power(27,1/3),
the resulting value is 1 not 3. why is that

Regards





Re: Complex Math functions

Manivannan.D.Sekaran

bcs 1/3 = 0 (INTEGER DIVISION)

So anything power 0 = 1

To overcome this use the following expression

Select Power(27.0,1.0/3.0)






Re: Complex Math functions

Pikker1981

lol of course, thanks so much once again
Regards