Hey I need to know how to calculate fraction exponents such as:
answer = x to the power of y/z
ex: answer = 5 to the power of two fifths
Thanks for any help your can give.
Hey I need to know how to calculate fraction exponents such as:
answer = x to the power of y/z
ex: answer = 5 to the power of two fifths
Thanks for any help your can give.
pow(x,y/z)
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie
Rational exponents are defined as:
x^(a/b) = The b:th root of x^a
On rare occations this can be calculated exactly, but usually we can only approximate it.
x raised to the power of an irrational number is approximated using rational numbers.
x^a is undefined if x is negative and a is an irrational number.
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
FYI - The pow() function is in <cmath>.