#33168 [Opn->Bgs]: Incorrect abs() result.

From: Date: Sat, 28 May 2005 05:15:21 +0000
Subject: #33168 [Opn->Bgs]: Incorrect abs() result.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79636@lists.php.net to get a copy of this message
ID: 33168 Updated by: rasmus@php.net Reported By: dima at snaiper dot no-ip dot com -Status: Open +Status: Bogus Bug Type: Math related Operating System: windows xp PHP Version: 5.0.4 New Comment: If you want higher precision from the math functions in PHP, then you need to configure that in your ini file via the precision directive. Previous Comments: ------------------------------------------------------------------------ [2005-05-28 01:15:03] dima at snaiper dot no-ip dot com Description: ------------ I get rounded value in abs() function. Reproduce code: --------------- echo abs(-10.414234005636601); echo "<br>"; echo abs(-340.1242340053423432423000000000000234324636601); echo "<br>"; echo abs(-1320.72423000340056366201); Expected result: ---------------- 10.414234005636601 340.1242340053423432423000000000000234324636601 1320.72423000340056366201 Actual result: -------------- 10.4142340056 340.124234005 1320.72423 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33168&edit=1

« previous php.bugs (#79636) next »