doubles are floating point-numbers
I wil exmaple a double
Example:
when doubles are having a rounded number it will not save it as an integer, and will keep its type of format as a double
that will produce a doule number that is 19.0 while the 19.0 and 19 hasthe same meaning but the type of format where it has stored in the meemory is diffrent from each other
another point to tell is that the doubles store the minimal decimal value meaning that
19.00 wont be stored and the minimum is 19.0
Exmaple:
[cc lang="php"]
$My_d1 = 1.999;
$My_d2 = 0.111;
$The_Sum = $My_d1 + $My_d2;
print(“$The_Sum”)
the result is:2.0 instead of 2.000
voshka
Related posts: