# How to use modulo on 36 digit numbers?

#### Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

•  Subject
• Author
• Posted on

Hi all,

i want to make a check for international bank account numbers.

The IBAN can be 36 digits long.

To check a german IBAN i need to make modulo 97 to it an check if the
rest is equal to 1. (german IBAN is 22 digits long, the number to check
is 24 digits long) e.g.
210501700012345678131468 mod 97 = 1

But when i do this:
\$rest = 210501700012345678131468 % 97;
I get 0 instead of the correct result (1).

How to use modulo on 36 digit numbers?

Best Regards
Daniela Waranie

## Re: How to use modulo on 36 digit numbers?

rote:

http://www.php.net/manual/en/function.bcmod.php

## Re: How to use modulo on 36 digit numbers?

I'm a little interested in how the bcmod function implements.

=E5=9C=A8 Sun, 11 Oct 2009 15:07:57 +0800=EF=BC=8Ccrimaniak@googlemail.c=
om  =

de> wrote:

## Re: How to use modulo on 36 digit numbers?

GuangXiN wrote:

> I'm a little interested in how the bcmod function implements.
>
>

<top posting fixed>

You can get the source from http://www.php.net .  It has everything you
could want.

Also, please don't top post.  Thanks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================