Bug #3570: Decimal Increments to intergers product strange values
| From: | mitcheld at discover dot lpl dot london dot on dot ca | Date: | Tue, 22 Feb 2000 16:09:29 +0000 |
| Subject: | Bug #3570: Decimal Increments to intergers product strange values | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15797@lists.php.net to get a copy of this message | ||
From: mitcheld@discover.lpl.london.on.ca
Operating system: Redhat Linux 6.1
PHP version: 3.0.12
PHP Bug Type: Misbehaving function
Bug description: Decimal Increments to intergers product strange values
for ($x = 0 ; $x < 100; $x+=.1) {
echo "$x<BR>\n";
}
Some numbers add up fine, other start moving at values different than the step:
53.5
53.6
53.7
53.8
53.9
54
54.1
54.200000000001
54.300000000001
54.400000000001
54.500000000001
54.600000000001
54.700000000001
54.800000000001
54.900000000001