RE: One more technical FAQ about MHEG-5 IS

Emmanuel BEUQUE (
Wed, 19 Mar 1997 18:15:10 +0100

A (At) 17:33 19/03/97, Xavier MARIE ecrivait (wrote):
>>>If I remember well what I learned at school and what is returned by my
>scientific calculator (HP28S), the result shall be 1.
>I think that arithmetics specify that :
>(a MOD b) shall be within the range [0, (b-1)]
>but if we follow the equality, we got :
>a DIV b = -1 so -1 * 3 + (a MOD b) = -5
>that means that (a MOD b) = -2
>I know that Macromedia Director 5 also gives this result but that doesn't
>seem correct to me.
>I would like to have the feeling of the MHEG community about what is correct.
>Is the equality erroneous in the standard or should it work like that in
>all MHEG engines ?
>So MHEG and Director give the same result (but you don't agree with it),

That's right !

>>From what I remember REMainder and MODulo are two different things.

I fully agree with this.

>And what you refer to is the remainder of the integer division.

No, I do refer to the MODULO, which, as I said,
shall be within the range [0, (b-1)]

But it seems that it is MHEG-5 (not me definitely) that refer to what you
call the remainder by giving the following (remainder) equality in the
definition of its modulo action :
"(a DIV b) * b + (a MOD b) = a"

Wasn't I clear enough ? I hope to be so now... ;-)


Emmanuel BEUQUE Email:
mediaServ tel: +33 (0) 2 99 64 36 64
Multimedia consultant & developer fax: +33 (0) 2 99 64 36 65