RE: [PHP] Problem with HUGE floating values and fmod

2006-02-18 Thread Marco Almeida
-Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 17 de Fevereiro de 2006 20:40 To: php-general@lists.php.net; [EMAIL PROTECTED] Subject: Re: [PHP] Problem with HUGE floating values and fmod On Fri, Feb 17, 2006 at 06:48:13PM -, Marco Almeida wro

Re: [PHP] Problem with HUGE floating values and fmod

2006-02-17 Thread Curt Zirzow
On Fri, Feb 17, 2006 at 06:48:13PM -, Marco Almeida wrote: > Hi there, > > I'm trying to calculate check digits for a payment system, using the ISO > 7064 (MOD 97-10) algorithm, wich is, already translated to PHP: > > $check=98-fmod(($num*100),97); > > Where $num is a huge number... > > Ex

[PHP] Problem with HUGE floating values and fmod

2006-02-17 Thread Marco Almeida
Hi there, I'm trying to calculate check digits for a payment system, using the ISO 7064 (MOD 97-10) algorithm, wich is, already translated to PHP: $check=98-fmod(($num*100),97); Where $num is a huge number... Example: 90150123123400043211 should have check digit 51 In windows calculator: 98 -