Android Question Problem with Power function

Noone can answer without seeing your code...
I guess you are using int, double, long etc wrong or you use NumberFormat wrong.
 
Upvote 0
If this is realy all your code, which deals with this - then i don't understand......

powertest.png
 
Upvote 0
:confused::confused:
Ok, i'm out :(
Till some experts arrive i suggest you play wirh NumberFormat.
Sorry for not being a better help ;)
 
Upvote 0
It sounds like it may be a device specific result.

What device are you running it on? Do you have a different one to try.

Gives 625 on both Bluestacks and my Sony Xperia.
 
Upvote 0
hello,
You are right. With an Alcatel device (android 6.0.1) is correct 625, with Alcatel (android 2.3.6) correct 625 but with another device Turbox model s (android 4.4.4) return 624.9999997
 
Upvote 0
Never show double values without using NumberFormat (or the equivalent smart string modifier). NumberFormat will take care of rounding the value based on the required number of decimals.
But this does not tell us why the answer is correct 625 on many devices without invoking the numberformat or smart string, but not on others.
 
Upvote 0
Back
Top