[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bignum branch

From: Achim Gratz
Subject: Re: bignum branch
Date: Sat, 04 Aug 2018 20:28:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Tom Tromey writes:
> Yes, I understand.  What specifically is weird about this situation, for
> me, is that min and max aren't like arithemetic operations like + or
> -.

As numerical comparison, they are defined to yield valid results over
some domain.  If one of the comparison partners is outside that domain,
then you can't give back a result.  It would be akin to declaring that
"yellow is heavier than an apple".

> And, the naive approach to writing min or max would not always
> (depending on argument ordering) preserve NaN, because min and max,
> presumably, are defined in terms of comparisons -- which always return
> false with NaN.

Yes, that needs to be special cased unless you do the sort in a way
that the NaN always ends up at the appropriate end, i.e. whatever your
comparison operator, it must preserve the NaN if it gives you back
"false".  One of the reasons that isnan() is a thing you'll find in

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]