jeudi 1 septembre 2016

why no overflow when using double variable?

i'm trying to understand why in the following situation i don't get an overflow:

double x = 1.7976931348623157E+308; //this is the max value of double

x = x + 0.5;

When checking the value of x after adding 0.5 i still get the same result.

Anyone?

Aucun commentaire:

Enregistrer un commentaire