Improve the semantics fptrunc. In r246792 I made it so
that how inexact results are computed are undefined. This seems
unnecessarily under specified. For example an implementation could be to return
undef for every value that cannot be represented exactly.
It is highly unlikely that anyone would want that so instead
- Define the possible values that could be returned when a value given to fptrunc cannot be exactly represented in the result type ty2. The possible values returned cover all possible IEEE-754 rounding modes because we explicitly do not define which of the possible value out of the possible values is chosen. For example Round to nearest even either returns the predecessor, truncated or successor value.
- Drop the discussion of what happens when a value cannot fit in type being cast to (i.e. ty2), previously the result was undefined. Instead the discussion of how to handle values that cannot be exactly represented covers this. This means that result is now defined.
What does truncation bring here considering you're already covering predecessor and successor?