#41152 [NEW]: round()ing HUGE numbers
From: mark at divindedesigns dot ca
Operating system: linux/windows
PHP version: 5.2.1
PHP Bug Type: *Math Functions
Bug description: round()ing HUGE numbers
Description:
------------
when you round(378240328403284.234) or other large numbers... php
automatically translates it with scientific notation... i'm just wondering
if we can add that as an option only... say round(#,#,SCIENTIFIC) or
whatnot...
i know you can use number_format()... but that's not the intended use of
that function.
Reproduce code:
---------------
<?
echo round(324324434324322324.324,2);
?>
Expected result:
----------------
outputs "324324434324322324.32"
Actual result:
--------------
outputs "3.2432443432432E+17"
--
Edit bug report at http://bugs.php.net/?id=41152&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41152&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41152&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41152&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41152&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41152&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41152&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41152&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41152&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41152&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41152&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41152&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41152&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41152&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41152&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41152&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41152&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41152&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41152&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41152&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41152&r=mysqlcfg
Thread (5 messages)
- mark at divindedesigns dot ca