Angenommen, 32-Bit-INTs und normale 4- und 8-Byte-IEEE-754-Schwimmer/Doppel, wäre es:
i == (int)(float) i; // possible loss (32 -> 23 -> 32 bits)
i == (int)(double) i; // no loss (32 -> 52 -> 32 bits)
f == (float)(double) f; // no loss (23 -> 52 -> 23 bits)
d == (float) d; // possible loss (52 -> 23 -> 52 bits)
Beachten Sie, dass int 32 Bit Präzision, Float 23 Bit, Double 52.