Re: Definition of integer division

From: Geoffrey.Coram <Geoffrey.Coram_at_.....>
Date: Wed Dec 14 2005 - 10:51:01 PST
Kevin -
OK, I had been searching for "coerc" when I found that one
statement.  A few paragraphs above, I found this:

- Expression type depends only on the operands. It does ot
  depend on the LHS (if any).

followed by
- For non-self-determined operands the following rules apply:
    if any operand is real, the result is real;
    

If I have
  real a;
  a = 5.0 + 1/2;

then I guess "1/2" is an expression (and its type is
integer), and thus "integer division" is performed
(no coercion is needed).

At first I thought "5.0 + 1/2" was the expression.


I'm still a little concerned about the sentence (in 4.1.5)
  For the division or modulus operators, if the second operand
  is a zero, then the entire result value shall be x.

because "x" doesn't make sense in an analog context.

-Geoffrey
Received on Wed Dec 14 10:51:08 2005

This archive was generated by hypermail 2.1.8 : Wed Dec 14 2005 - 10:51:18 PST