Re: Bug #12505: array_sum function total calculate error

From: Date: Wed, 01 Aug 2001 08:15:49 +0000
Subject: Re: Bug #12505: array_sum function total calculate error
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-61726@lists.php.net to get a copy of this message
On 1 Aug 2001 omeroz@kamilkoc.com.tr wrote:

> From:             omeroz@kamilkoc.com.tr
> Operating system: Red Hat Linux 7.1
> PHP version:      4.0.4pl1
> PHP Bug Type:     Arrays related
> Bug description:  array_sum function total calculate error
> $tt=array(382478633,367687181,452504275,471367521,848270658,1181944543);
> $total_tt=array_sum($tt);
> echo "Total_tt=".$total_tt;
> // Prints  Total_tt=-590714485
> Must be 3704252811.

Confirmed on:

	i386 / OpenBSD-current / PHP 4.0.6 (from OpenBSD ports tree)
	i386 / RH 7.1 / PHP 4.0.5 	   (from RH Rawhide)
	i386 / RH 7.0 / PHP 4.0.5	   (from Arvin's 4.0.5 RPMS)

-- 
<---------------------------------------------------------------------->
          Heikki Korpela -- heko@iki.fi -- http://iki.fi/heko/



Thread (7 messages)

« previous php.dev (#61726) next »