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.
Printable View
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)
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.
FYI - The pow() function is in <cmath>.