errata/282: signing

From: Steven Sharp (sharp@cadence.com)
Date: Mon May 03 2004 - 15:52:36 PDT

  • Next message: Alec Stanculescu: "Re: errata/282: signing"

    Alec,

    You cannot tell someone what they meant when they wrote something;
    you can only ask them.

    Have you asked the people responsible for the signed arithmetic proposal
    what they meant? I have. You are trying to tell me that they meant
    something different from what they say they meant. I have to conclude
    that you are wrong, and that they meant what they say.

    You are including the datatypes task force in the distribution of this
    discussion. As a result, I wonder if your real concern is the problems
    that would occur if the rules for signedness were applied to the new
    type system. This concern could have arisen because the 2001 LRM uses
    the term "type" when talking about signedness. It tries to roll reals
    in as a type also, and claim the same rules apply, but this is wrong
    since different rules apply to reals, and always have.

    I agree with you that these rules probably won't work if applied to
    datatypes in general. They don't even work for reals. The rules are
    applied to the signedness of vector expressions, which is why they need
    to work similarly to the rules for sizes of vectors. Just because the
    LRM text uses the term "type" for signedness does not mean that new types
    will have to follow the same rules. It just means that if they don't,
    the signedness rules will have to stop using the term "type".

    Note that the correct rules for reals do not convert non-real operands
    to real until they are about to be combined with a real at an operator.
    Subexpressions that will be implicitly converted to real this way are
    treated as self-determined until that point. This behavior is similar
    to most programming languages, and is what apparently seems natural to
    you. When it is documented correctly, this could form a starting point
    for rules for other datatypes.

    Steven Sharp
    sharp@cadence.com



    This archive was generated by hypermail 2.1.4 : Mon May 03 2004 - 15:32:54 PDT and
    sponsored by Boyd Technology, Inc.