Doubles in PHP
Doubles
They like 3.14159 or 49.1. By default, doubles print with the minimum number of decimal places needed. For example, the code:
$many = 2.2888800; $many_2 = 2.2111200; $few = $many + $many_2; print(.$many + $many_2 = $few
.);
It produces the following browser output:
2.28888 + 2.21112 = 4.5
Doubles in PHP
Reviewed by Rajat Jha
on
19:48:00
Rating:
No comments: