Reputation: 1
Whenever I put the following into a program it always comes back with NaN
. Does anybody know why? Is there a way I can fix this?
double test = -1.17425 * (pow(10, 3)) / (5.75 * (pow(10, 6)));
System.out.print(test);
Upvotes: 0
Views: 93
Reputation: 416
Works just fine on my computer. I get:
-2.0421739130434784E-4
Which math library are you using? Try this:
double test = -1.17425*(Math.pow(10,3))/(5.75*(Math.pow(10,6)));
Upvotes: 1