I have problem in calculation in android, i am doing the calculation
((1 * (1 + ((0.025 * 12) * ((6-1) / 12))) / 6);
In php generate value
echo ((1*(1+((0.025*12)*((6-1)/12))))/6);
Result :
0.1875
But in android :
System.out.println(((1*(1+((0.025*12)*((6-1)/12))))/6));
Result :
0.16666666666666666
I've tried everything to do rounding on decimal values, but the results are different. How do i do the exact calculation to be able to adjust to the given value of php?
Thank you in advance.