Comments on ANSI public Oct 86 Public review draft.
faustus at ucbcad.UUCP
faustus at ucbcad.UUCP
Tue Mar 10 06:40:52 AEST 1987
In article <4804 at brl-adm.ARPA>, Schauble at mit-multics.arpa (Paul Schauble) writes:
> Honeywell uses a slightly unusual register structure that give a float
> or double contained in a register an extra 8 bits precision. This is
> lost when the value is stored into memory....
>
> FLD X Get X into register
> FMP Y Multiply by Y, giving result in register.
> Result is *double precision plus extra 8 bits*.
> That's right, single*single yields double.
> FST Z Store results, truncating to single precision
> without extra bits.
> FCMP Z First of IF statement. Compares truncated value
> In memory to extra precision value in register.
> Result is probably not equal.
I think the problem isn't with the arithmetic operations being
performed, but with the test for equality. I think the hardware should
be intelligent enough to say that a single in memory is equal to a
double+ in a register, if the MSB's of the register are the same as the
bits of the single. (Assuming that the FST just truncates.) Otherwise
equality in floating point has no useful meaning. Are problems like
this common enough that it would be better to just say that it's
undefined, as opposed to complaining to the makers of this sort of
hardware?
Wayne
More information about the Comp.lang.c
mailing list