summaryrefslogtreecommitdiff
path: root/ext/mssql/php_mssql.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2008-10-29 20:03:34 +0000
committerIlia Alshanetsky <iliaa@php.net>2008-10-29 20:03:34 +0000
commit22f3c8b05bf1333c04e9eb1a57c27cc660c678b5 (patch)
tree755f578aa582c3d8e52adc2e151efb4166c5cfc9 /ext/mssql/php_mssql.c
parentb9c03aa4a58820ac0c917ae247553d58e90672d9 (diff)
downloadphp-git-22f3c8b05bf1333c04e9eb1a57c27cc660c678b5.tar.gz
Fixed bug #42294 (Unified solution for round() based on C99 round)
[DOC] New implementation of round() to work-around inconsistencies for win32 and 64 bit platforms. This solution is very roughly based on BSD's implmentation of round(), which itself is an implementation of C99 standard. We take the absolute value of number we want to round time the 10 to the power of the number of decimal spaces we are rounding to. The resulting value is rounded up and the pre-rounded value is subtracted from it. If the difference is greater then 0.5000000001 we round up, otherwise we round down.
Diffstat (limited to 'ext/mssql/php_mssql.c')
0 files changed, 0 insertions, 0 deletions