Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13207 invoked from network); 29 Nov 2008 02:02:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2008 02:02:58 -0000 Authentication-Results: pb1.pair.com header.from=chris_se@gmx.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=chris_se@gmx.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.net designates 213.165.64.20 as permitted sender) X-PHP-List-Original-Sender: chris_se@gmx.net X-Host-Fingerprint: 213.165.64.20 mail.gmx.net Linux 2.5 (sometimes 2.4) (4) Received: from [213.165.64.20] ([213.165.64.20:50108] helo=mail.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/B3-27999-EC2A0394 for ; Fri, 28 Nov 2008 21:02:56 -0500 Received: (qmail invoked by alias); 29 Nov 2008 02:02:50 -0000 Received: from p54A17EED.dip.t-dialin.net (EHLO chris-se.dyndns.org) [84.161.126.237] by mail.gmx.net (mp027) with SMTP; 29 Nov 2008 03:02:51 +0100 X-Authenticated: #186999 X-Provags-ID: V01U2FsdGVkX18TyxR1ZlUTG3blP/vgIcbhAE4ZUie7S9Et3LBEoJ gHLpoxSXoWw9lG Received: from [192.168.0.175] (HSI-KBW-082-212-059-033.hsi.kabelbw.de [82.212.59.33]) by chris-se.dyndns.org (Postfix) with ESMTP id 6E4B06948; Sat, 29 Nov 2008 02:56:43 +0100 (CET) Message-ID: <4930A2B3.5030709@gmx.net> Date: Sat, 29 Nov 2008 03:02:27 +0100 User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: Lukas Kahwe Smith CC: PHP Internals References: <36F14278-2896-40E1-971C-E488E890EAF7@pooteeweet.org> In-Reply-To: <36F14278-2896-40E1-971C-E488E890EAF7@pooteeweet.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.53 Subject: Re: [PHP-DEV] apha3 From: chris_se@gmx.net (Christian Seiler) Hi Lukas, First of all, @all: - I didn't have time to update it yet but the basically nothing has changed except for implementation details wrt. FPU precision. For FPU precision explanations see (*). > Anyways, a few items from the top of my head that I know people were > talking about: > - rounding patch I've split the patch in two parts: (1) Make the Zend Engine always use double FPU precision on x87 platforms (creates zend_float.h, defines certain macros, uses those macros in zend_strtod.c and zend_operators.c), include the correct configure checks that detect the switching method. zend_float.h is basically a copy of my xpfpa.h from (*) where I put in the research on the behaviour of different platforms and compiler versions. (2) Modify round() behaviour as described in the RFC (that also uses the x87 FPU precision switch). The second part will only compile if the first part was applied. It is basically the same patch as I have already posted to this list - just with a few cleanups. Here are the basic changes to the previous patch versions: a) Added Zend/tests/fpu_prec_001.phpt which tests for double precision. With single, double-extended or quad precision, it will fail. b) @Macrus: I've thought about your points wrt. cross-compilation and I am now certain that if the configure test scripts compile & link, the code will also work - so there is no need to execute it. I've thus changed AC_TRY_RUN to AC_LINK_IFELSE. c) Added ext/standard/tests/math/round_{prerounding,large_exp,modes}.phpt which check for the new behaviour of round(). d) Some minor cleanups to the FPU macros and configure checks. Anyway, here are the patches, please remember that 1+3 test files are added with the patches: PHP 5.3, ZE2 FPU precision: http://www.christian-seiler.de/temp/php/2008-11-28-fpu+rounding/php53-fpu.patch PHP 5.3, round() behaviour: http://www.christian-seiler.de/temp/php/2008-11-28-fpu+rounding/php53-round.patch PHP 6, ZE2 FPU precision: http://www.christian-seiler.de/temp/php/2008-11-28-fpu+rounding/php6-fpu.patch PHP 6, round() behaviour: http://www.christian-seiler.de/temp/php/2008-11-28-fpu+rounding/php6-round.patch (*) Regards, Christian