php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54578 bitwiseNot_basiclong_64bit test fails on ppc64
Submitted: 2011-04-20 19:52 UTC Modified: -
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: jwboyer at linux dot vnet dot ibm dot com Assigned:
Status: Open Package: *Math Functions
PHP Version: 5.3.6 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-04-20 19:52 UTC] jwboyer at linux dot vnet dot ibm dot com
Description:
------------
When running the bitwiseNot_basiclong_64bit.phpt test on ppc64, the output 
differs 
in one place from the expected results.  This seems to be a result of MAX_64Bit 
+ 
1 being internally interpreted as a float and some kind of rounding error, 
however I'm not certain that is the case.  The failing test is the third from 
the bottom in the output.

I originally found this in 5.3.2 on RHEL 6, but I built a local 5.3.6 and it 
happens there still as well.

bash-4.1# php --version
PHP 5.3.6 (cli) (built: Apr 20 2011 09:26:51) 
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
bash-4.1# 


Expected result:
----------------
--EXPECT--
--- testing: 9223372036854775807 ---
int(-9223372036854775808)
--- testing: -9223372036854775808 ---
int(9223372036854775807)
--- testing: 2147483647 ---
int(-2147483648)
--- testing: -2147483648 ---
int(2147483647)
--- testing: 9223372034707292160 ---
int(-9223372034707292161)
--- testing: -9223372034707292160 ---
int(9223372034707292159)
--- testing: 2147483648 ---
int(-2147483649)
--- testing: -2147483649 ---
int(2147483648)
--- testing: 4294967294 ---
int(-4294967295)
--- testing: 4294967295 ---
int(-4294967296)
--- testing: 4294967293 ---
int(-4294967294)
--- testing: 9223372036854775806 ---
int(-9223372036854775807)
--- testing: 9.2233720368548E+18 ---
int(9223372036854775807)
--- testing: -9223372036854775807 ---
int(9223372036854775806)
--- testing: -9.2233720368548E+18 ---
int(9223372036854775807)
===DONE===

Actual result:
--------------
--- testing: 9223372036854775807 ---
int(-9223372036854775808)
--- testing: -9223372036854775808 ---
int(9223372036854775807)
--- testing: 2147483647 ---
int(-2147483648)
--- testing: -2147483648 ---
int(2147483647)
--- testing: 9223372034707292160 ---
int(-9223372034707292161)
--- testing: -9223372034707292160 ---
int(9223372034707292159)
--- testing: 2147483648 ---
int(-2147483649)
--- testing: -2147483649 ---
int(2147483648)
--- testing: 4294967294 ---
int(-4294967295)
--- testing: 4294967295 ---
int(-4294967296)
--- testing: 4294967293 ---
int(-4294967294)
--- testing: 9223372036854775806 ---
int(-9223372036854775807)
--- testing: 9.2233720368548E+18 ---
int(-9223372036854775808)
--- testing: -9223372036854775807 ---
int(9223372036854775806)
--- testing: -9.2233720368548E+18 ---
int(9223372036854775807)
===DONE===


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 06:01:27 2019 UTC