i believe that double have x2 precision of float .
in my calculator 10/3 is 3.3333333333333333333333333333333
when i do the following code :
#include <stdlib.h>
#include <stdio.h>
void main() {
double var = (double )10 / (double )3;
float var2 = (float )10 / (float )3;
printf("%f %f \n" , var , var2 );
}
i get the same number of digits after 3, :
3.3333333333333335 3.3333332538604736
why do i get the same number of digits? and why the value is different ? and how to do a division for double and float and get all the numbers and digits in c (like in my calculator) ?