I'm using the following method on Windows 8 (Intel Atom Z3775):
public static strictfp void main(String args[])
{
float a = 0.000000002f;
float b = 90000300000000004f;
float c = a * b;
System.out.println(c);
}
which gives me: 1.80000592E8
When running
public strictfp void calculate()
{
float a = 0.000000002f;
float b = 90000300000000004f;
float c = a * b;
Toast.makeText(getApplicationContext(), c + "", Toast.LENGTH_LONG).show();
}
i get: 1.8000059E8
Why do they differ? Am I using strictfp wrong?