#33991 [NEW]: Bug test #25665 returns false positive on Solaris
From: akim at freedom dot com
Operating system: Solaris 2.9 / SPARC
PHP version: 5.0.4
PHP Bug Type: Math related
Bug description: Bug test #25665 returns false positive on Solaris
Description:
------------
acos() function returns "0" rather than "NAN" for values of |x| > 1. Among
other things this causes test ext/standard/tests/math/bug25665.phpt to
fail.
This may be caused by ambiguous handling of out-of-range arguments in the
Solaris implementation of acos(). From the acos() man page: "If the value
of x is not in the range [-1,1], and is not +-Inf or NaN, either 0.0 or
NaN is returned and errno is set to EDOM."
Configure line:
./configure --with-apxs=/www/apache/bin/apxs --with-mssql=/www/freetds063
--enable-ftp
Dependencies:
libsybdb.so.5 => /www/freetds063/lib/libsybdb.so.5
libnsl.so.1 => /lib/libnsl.so.1
libsocket.so.1 => /lib/libsocket.so.1
libc.so.1 => /lib/libc.so.1
libresolv.so.2 => /lib/libresolv.so.2
libm.so.1 => /lib/libm.so.1
libdl.so.1 => /lib/libdl.so.1
libz.so.1 => /lib/libz.so.1
libxml2.so.2 => /usr/local/lib/libxml2.so.2
libpthread.so.1 => /lib/libpthread.so.1
libiconv.so.2 => /usr/local/lib/libiconv.so.2
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libmp.so.2 => /lib/libmp.so.2
/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1
libthread.so.1 => /lib/libthread.so.1
librt.so.1 => /lib/librt.so.1
libaio.so.1 => /lib/libaio.so.1
libmd5.so.1 => /lib/libmd5.so.1
/usr/platform/SUNW,UltraAX-i2/lib/libmd5_psr.so.1
gcc -v output:
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.4.2
Reproduce code:
---------------
<?php
set_time_limit(5);
var_dump(acos(1.01));
var_dump(log(0));
?>
Expected result:
----------------
float(NAN)
float(-INF)
Actual result:
--------------
float(0)
float(-INF)
--
Edit bug report at http://bugs.php.net/?id=33991&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33991&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33991&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33991&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33991&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33991&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33991&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33991&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33991&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33991&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33991&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33991&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33991&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33991&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33991&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33991&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33991&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33991&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33991&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33991&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33991&r=mysqlcfg
Thread (7 messages)
- akim at freedom dot com