On 2007-01-16 15:50:09 +0000, Andrew Haley wrote:
> This is a disgreement about interpretation of the langauge in the
> standard, which is:
> 
> "The result of the / operator is the quotient from the division of the
> first operand by the second; the result of the % operator is the
> remainder. In both operations, if the value of the second operand is
> zero, the behavior is undefined. When integers are divided, the result
> of the / operator is the algebraic quotient with any fractional part
> discarded.87) If the quotient a/b is representable, the expression
> (a/b)*b + a%b shall equal a."
> 
> If the quotient a/b is *not* representable, is the behaviour of %
> well-defined or not?  It doesn't say.

The C standard already says "the result of the % operator is the
remainder". Then, "If the quotient a/b is representable, the expression
(a/b)*b + a%b shall equal a." is just redundant information.

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

Reply via email to