5
Answers

Math.Pow can't handle fractions ?

Ask a question
Sascha B

Sascha B

13y
4.7k
1
Hello,

I saw this problem today.
I used to calculate this: varX = Math.Pow(varx, 1/3);
Everytime I get only an integer that is completly wrong!
But if I use this: varX = Math.Pow(varx, 0.333333);
Then the result is allright...
What is wrong with this function?
I can't express 1/3 as a double number cause it's endless.

Please help me...

Answers (5)