4.3.0-pre1 printf weirdness

From: Date: Thu, 17 Oct 2002 18:36:19 +0000
Subject: 4.3.0-pre1 printf weirdness
Groups: php.dev 
Request: Send a blank email to php-dev+get-89679@lists.php.net to get a copy of this message
<?php printf("%01.2f",-2999/100); echo "<br>"; printf("%01.2f",-3000/100); echo "<br>"; printf("%01.2f",-3000/100); echo "<br>"; printf("%01.2f",-3000/100); echo "<br>"; printf("%01.2f",-3001/100); echo "<br>"; printf("%01.2f",-3000/100); ?> 4.2.3 output: -29.99 -30.00 -30.00 -30.00 -30.01 -30.00 4.3.0pre1 output: -29.99 296.14 0.00 0.00 -30.01 296.14 If I comment out one or more of the printf()'s that use -3000/100, but not all of them, I can get the returned output of the others to change to all sorts of neat things (just never -30.00). At one point one of them output 3245234172.00. This is on a stock redhat8 box. Regards Mike Robinson

« previous php.dev (#89679) next »