Re: [PHP-DEV] Re: cvs: php-src(PHP_5_3) /ext/standard math.c

2008-10-30 Thread Christian Seiler
Hi, [For conclusive proposal, see below.] >> 1) Internal FPU precision on x86. > > Do you have any test cases show the error? Sure. Consider the following C code: #include int main (int argc, char **argv) { volatile double v = 100.0; printf ("%.35f\n%.35f\n", 0.002877, 2877.0 / v);

Re: [PHP-DEV] Re: cvs: php-src(PHP_5_3) /ext/standard math.c

2008-10-30 Thread Christian Seiler
Hi Stefan, >> 1) Define some macros for math-related functions that will ensure the >> function itself always uses double precision. Add configure checks for >> these macros. > > Do you know what the rationale behind the standard compiler behaviour is? > Because trying to outsmart the compiler i

[PHP-DEV] Re: cvs: php-src(PHP_5_3) /ext/standard math.c

2008-10-30 Thread Ilia Alshanetsky
On 30-Oct-08, at 5:55 AM, Christian Seiler wrote: 1) Internal FPU precision on x86. Do you have any test cases show the error? 2) Specification problem (which rounding mode should actually be used?) 3) Dividing/multiplying by >= 10^23 is not exact. 4) round (1.255, 2) should give 1.26 bu

Re: [PHP-DEV] Re: cvs: php-src(PHP_5_3) /ext/standard math.c

2008-10-30 Thread Marcus Boerger
Hello Christian, Thursday, October 30, 2008, 10:55:48 AM, you wrote: > Hi, >> Modified files: (Branch: PHP_5_3) >> /php-src/ext/standard math.c >> Log: >> Fixed bug #42294 (Unified solution for round() based on C99 round) >> [DOC] New implementation of round() to wo

[PHP-DEV] Re: cvs: php-src(PHP_5_3) /ext/standard math.c

2008-10-30 Thread Christian Seiler
Hi, > Modified files: (Branch: PHP_5_3) > /php-src/ext/standard math.c > Log: > 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 so