From:             liyanbj at cn dot ibm dot com
Operating system: Linux
PHP version:      5.1.4
PHP Bug Type:     Date/time related
Bug description:  Test of date_sunrise() and date_sunset() always FAIL on PPC64

Description:
------------
PROBLEM DESCRIPTION
===================
This problem happens on IBM PowerPC 64bit machine (PPC64) only, and is a
testing related problem (i.e. not a problem of php base). The result of
test "ext/standard/tests/general_functions/sunfuncts.phpt" on PPC64 differ
from the result from other architectures slightly.  For example:

~~~~ SNIP FROM TEST OUTPUT ~~~~
003+ 1044073855 06:30 6.515408927984
003- 1044073855 06:30 6.515408927982
......
~~~~ SNIP FROM TEST OUTPUT ~~~~

The first line is the result seen on any architecture other than PPC64,
while the second line is the result from PPC64 machines. 

I think it's due to the nuance between the implementation of PPC64
floating point related hardware and that of IA32.

According to common knowledge, two floating point numbers should never be
compared for equality.  So I think we should just compare part of the
result floating point numbers, say, a few digits from the beginning and
ignore the trailing digits.



HARDWARE ENVIRONMENT
====================
/proc/cpuinfo:
processor       : 0
cpu             : POWER5 (gr)
clock           : 1498.500000MHz
revision        : 2.2 (pvr 003a 0202)

processor       : 1
cpu             : POWER5 (gr)
clock           : 1498.500000MHz
revision        : 2.2 (pvr 003a 0202)

timebase        : 187548000
machine         : CHRP IBM,9111-520


SOFTWARE ENVIRONMENT
====================
SUSE Linux Enterprise Server (SLES) 10.

Reproduce code:
---------------
On PPC64 machine, compile php and run all test, then check:
/ext/standard/tests/general_functions/sunfuncts.diff


-- 
Edit bug report at http://bugs.php.net/?id=38374&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38374&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38374&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38374&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38374&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38374&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38374&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38374&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38374&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38374&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38374&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38374&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38374&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38374&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38374&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38374&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38374&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38374&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38374&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38374&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38374&r=mysqlcfg

Reply via email to