[r6rs-discuss] response to formal comment 8 [equality predicates and NaN]
Per Bothner wrote:
> > For example, a system with delayed boxing of
> > inexact real numbers may box the two arguments to eqv?
> > separately, the boxing process may involve a change of
> > precision, and the two separate changes of precision may
> > result in two different payloads.
>
> I really can't visualize how this could be. If two unboxed
> flonums have the same precision, representation, and bit-pattern,
> how could any sane implementation box them into two values
> with different precision?
Indeed. I understand that the IEEE spec allows great freedom in this
area, but does anyone know of real hardware or a real Scheme
implementation that behaves in this way?
If such a system did exist, an alternative might be to make all NaNs
eqv?, even if they have different payloads. This would guarantee that
(let ((x ...)) (eqv? x x)) was true for all numbers.
Regards,
Alan
Received on Thu Jan 04 2007 - 12:09:10 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC