Re: bcmod()
| From: | Chris Sherwood | Date: | Tue, 17 Jun 2003 18:48:37 +0000 |
| Subject: | Re: bcmod() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151880@lists.php.net to get a copy of this message | ||
if I read it right it looks like it returns what is the remainder as per any
normal mod function
so fer instance you want to get the remainder when you divide 10 by 3 (which
we both know is 1)
$remainder = bcmod(10,3);
for example I think....
----- Original Message -----
From: "Thomas Bolioli" <info@terranovum.com>
To: <php-general@lists.php.net>
Sent: Tuesday, June 17, 2003 11:42 AM
Subject: [PHP] bcmod()
> The docs (see below) for bcmod() are rather skimpy. Does anyone have a
> clue as to how it works. Basically I want to do this (below code). PS: I
> am new to PHP but not to programming in general.
> Tom
>
> $i = 1;
> while (something true){
> $modulus = the_modulus_of($i / 4); // does php do % instead of /?
> if($modulus == 0){
> do_this_this_time();
> }
> $i++;
> }
>
> *bcmod*
>
> (PHP 3, PHP 4 )
> bcmod -- Get modulus of an arbitrary precision number
> Description
> string bcmod ( string left_operand, string modulus)
>
> Get the modulus of the left_operand using modulus.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>