8.6.1.1140 D>S d-to-s DOUBLE
n is the equivalent of d. An ambiguous condition exists if d lies outside the range of a signed single-cell number.
See:
Rationale:
Testing:
T{ -1234 -1 D>S -> -1234 }T
T{ MAX-INT 0 D>S -> MAX-INT }T
T{ MIN-INT -1 D>S -> MIN-INT }T
ContributeContributions
JimPeterson [199] Inaccurate Test Cases?Suggested Testcase2021-05-14 20:22:32
The test cases appear to assume a two's complement implementation of doubles even though the rationale for the existence of this word is that the implementation might not be two's complement. A similar situation exists for S>D
, whose entry says even less about the possibility of signed-magnitude doubles. I think the only viable test cases would have S>D
followed by D>S
. Without the presence of D>S
in the core word set, I can't think of any feasible test case for S>D
that does not rely on the double word set.
Alternatively, the standard could state that the implementation of doubles must be two's complement, and make this word obsolete. Are there any systems in use that don't use two's complement?