I don\'t understand why are float values different from double values. From the example bellow it appears that float provides different result than double for the same opera
public class Main {
public static void main(String[] args) {
float a=12.6664287277627762f;
double b=12.6664287277627762;
System.out.println(a);
System.out.println(b);
}
}
Output:
12.666429
12.666428727762776
float can handle about 7 decimal places. A double can handle about 16 decimal places.