Hello Andi,

i updated the source on a mips machine (thx Joerg) and here is the relevant
configure part:
checking for fpclass... yes
checking for isinf... no
checking for isnan... yes
checking whether atof() accepts NAN... yes
checking whether atof() accepts INF... no

that means INF will be handled by 'return 1.0/0.0`which the compiler detects
and denotes by:
  The indicated floating-point operation result is out of range.
        return 1.0/0.0;
                  ^

Executing the test 'php run-tests.php ext/standard/tests/math/bug27646.phpt'
reveals that the test generally works as expected which means the fallback
solution works at least for the mips cpus.

marcus

Monday, March 29, 2004, 12:33:09 AM, you wrote:

> Hello Andi,

> it's just a fall back that for example works on intel and alpha machines.
> FreeBSD should use the direct setting (1st #if) on intel and the atof() way
> for other cpus. The problem here is i cannot check all systems but i could
> offer three solutions so far of which the first two work on most old *nix
> and all new *nix as well as all win systems. The third now tries to complete
> portability.

> marcus

> Sunday, March 28, 2004, 11:56:20 PM, you wrote:

>> Not sure on what platforms you expect the last #else to be reached but it
>> would raise a sigfloatingpoint on FreeBSD. Dividing by zero does not seem
>> like a good idea.

>> Andi

>> At 09:46 PM 3/28/2004 +0000, Marcus Boerger wrote:
>>>  #include "php_streams.h"
>>>@@ -957,9 +957,10 @@
>>>         ((php_uint32*)&val)[1] = PHP_DOUBLE_QUIET_NAN_HIGH;
>>>         ((php_uint32*)&val)[0] = 0;
>>>         return val;
>>>-#else
>>>-       /* hope the target platform is ISO-C compliant */
>>>+#elif defined(HAVE_ATOF_ACCEPTS_NAN)
>>>         return atof("NAN");
>>>+#else
>>>+       return 0.0/0.0;
>>>  #endif






-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to