note 2589 modified in printf by ronabop

From: Date: Fri, 25 Aug 2000 08:11:46 +0000
Subject: note 2589 modified in printf by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-3120@lists.php.net to get a copy of this message
Be careful: printf ("(9.95 * 100) = %d \n", (9.95 * 100)); '994' First %d converts a float to an int by truncation. Second floats are notorious for tiny little rounding errors. http://www.php.net/manual/function.printf.php

« previous php.notes (#3120) next »