I try to understand when casting causes data losing and how it works.
so for the following examples i try to understand if there is data loss and if yes why:
(i - int(4),f - float(4),d-double(8)
)
i == (int)(float) i; // sizeof(int)==sizeof(float) <- no loss
i == (int)(double) i; // sizeof(int)!=sizeof(double) <- possible loss
f == (float)(double) f;// sizeof(double)!=sizeof(float) <- possible loss
d == (float) d;// sizeof(double)!=sizeof(float) <- possible loss
Is it sufficient to base the answer only on type sizes?(+ round )