[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re[2]: floats
>>>>> "sshteingold" == sshteingold <sshteingold@cctrading.com> writes:
sshteingold> 2. single+float=single is a *MAJOR* *bug*.
sshteingold> People who wrote ANSI CL standard are not idiots. They had something
sshteingold> in mind -- correct computations, to be sure. (I am trying hard to
sshteingold> contain my emotions. Sorry.) You are trading *correct* result for
sshteingold> pretty-looking result. This is unbelievable!!!!!!!!!!!!!!!
Who says single+double=single is incorrect? Most languages usually
say double is the right answer, but so what? Returning double is no
more correct than single, and, in terms of interval arithmetic, is no
worse.
Of course, this means CLISP, will never be an ANSI CL, no matter what
else it includes.
[P.S. I've had this discussion before on this list. It is the way it
for a reason. I prefer the ANSI way, but I understand and can agree
with the current answer.]
sshteingold> To use your impnotes example: "(- (+ 1.7 pi) pi) should not return
sshteingold> 1.700000726342836417234L0," This 1.700000whatever is still 1.7, for
sshteingold> purposes of practical computations. But when I am getting *negative*
(coerce 1.7 'double-float) is not the same as 1.7d0. or 1.7L0. By
your reasoning, single-float should be more than enough for a
"practical" computation. So what's the problem.
sshteingold> standard deviations, this is not correct in any possible sense!!!!
You should compute standard deviations more carefully then. The usual
formula for standard deviations is known to be fairly sensitive to
round-off errors, and affects all floating precisions.
sshteingold> Single for 1.123 is OK, but when I take squares etc., it stops being
sshteingold> OK!! I know that and I want to use doubles because of that!
What does taking "take squares...stop being OK" mean?
sshteingold> You think that a float is always imprecise. You are *wrong*. 123456.7
sshteingold> is *precise*, and I should not have to use ratios to tell clisp that!
False. xxx.7 cannot be represented exactly in (binary) floating-point.
Hence it is not precise.
sshteingold> And if I want to compute the square, I want it to be precise too.
sshteingold> Anyway, can you name another computer system where
sshteingold> single+double=single?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Correctness is not a popularity contest.
sshteingold> I just can't believe this could ever happen!
sshteingold> I am sorry, it is kind of hard to remain calm when encountering
sshteingold> something like this.
Calm down. Take several deep breaths, and continue the discussion
without ranting and raving.
Ray