ID: 33991 User updated by: akim at freedom dot com Reported By: akim at freedom dot com -Status: Feedback +Status: Open Bug Type: Math related Operating System: Solaris 2.9 / SPARC PHP Version: 5.0.4 New Comment:
Same results with latest snapshot. Previous Comments: ------------------------------------------------------------------------ [2005-08-04 08:43:08] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-08-04 02:19:08] akim at freedom dot com 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 this bug report at http://bugs.php.net/?id=33991&edit=1
