[ create a new paste ] login | about

Link: http://codepad.org/r7o086sS    [ raw code | output | fork ]

PHP, pasted on Jan 29:
1
2
3
4
5
6
7
8
<?php

$precision = 18;

while($precision--) {
  ini_set('precision', $precision);
  echo $precision.":".(342349.23 - 341765.07)."\n";
}


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
17:584.15999999997439
16:584.1599999999744
15:584.159999999974
14:584.15999999997
13:584.16
12:584.16
11:584.16
10:584.16
9:584.16
8:584.16
7:584.16
6:584.16
5:584.16
4:584.2
3:584
2:580
1:600
0:600


Create a new paste based on this one


Comments: