ID: 12505
Updated by: jmcastagnetto
Status: Open
Bug Type: Arrays related
Old Operating System: Red Hat Linux 7.1
Operating System: Red Hat Linux 6.1
Old PHP Version: 4.0.4pl1
PHP Version: latest CVS (08/01/01)
New Comment:

The problem is with the typecasting to LONG, if you use the code:

echo array_sum($tt)."\n";

The result is the correct one (3704252811)

Solution would be to

1) use floating point representation for bign numbers in PHP code (add caveat to the 
manual perhaps?)


2) check that the array_sum result is nor overflowing LONG in the C code 
implementation and bump the type to DOUBLE if it does.

second option would be better IMHO

Previous Comments:

[2001-08-01 04:02:52] [EMAIL PROTECTED]

echo "Total_tt=".$total_tt;

// Prints  Total_tt=-590714485

Must be 3704252811.


Edit this bug report at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to