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

cruftier contagion corollaries cause consternation

    Date: Sat, 3 Nov 84 07:44 PST
    From: Bill Gosper <rwg%SPA-NIMBUS@SCRC-STONY-BROOK.ARPA>
    . . .
    A much cruftier corollary of floating contagion shows up in min
    and max.  It is a contradiction to say "max returns the argument
    that is greatest ..."  and then in the next sentence say "the
    implementation is free to produce ... [some rational's] floating
    point approximation".  Such an approximation is generally not any
    of the arguments, or worse, it may even by = to an argument that
    was not the largest!

Yum, it can be even worse with things like multiple-argument =.
There can be two rationals R1 and R2 which are different but both
= to some float F.  So, (= r1 r2 f) would be true if it was done
as (= (float r1) (float r2) f), i.e. do contagious coercion of all args
before doing anything else, but not if it was done as
(and (= r1 r2) (= r2 f)).  What would your users think if
(= r1 r2 f) was T in when run in NIL compiled and in Spice
interpreted, and NIL when run in NIL interpreted and in Spice