Author Topic: y root of x  (Read 682 times)

How would you do y root of x?
Like square root but any number instead of 2

mPow(%var,0.5) is square root
mPow(%var,1/3) is cube root
etc

roots are actually just exponents

Edit for more clarity:
mPow(4,0.5) = 2
mPow(8,1/3) = 2
mPow(16,0.25) = 2
mPow(32,0.2) = 2
« Last Edit: May 03, 2012, 10:33:32 PM by Treynolds416 »



mPow(%x, 1/%n);
Gets the nth root of x,
because in terms of exponents,
x^(b/n) is the nth root of x, to the power of b.
« Last Edit: May 03, 2012, 11:51:46 PM by Ipquarx »