[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weird math
- To: email@example.com
- Subject: Re: weird math
- From: "rudolf mittelmann" <firstname.lastname@example.org>
- Date: Thu, 26 Aug 1993 11:34:27 +0200
- Cc: email@example.com
- Reply-to: "rudolf mittelmann" <firstname.lastname@example.org>
In message <ogSyAUS00WBO89I3Jn@andrew.cmu.edu> Steven Ritter writes:
> According to my reading of CLtL2 (292-293), this should not happen:
> ? (= 1.4 (/ 7 5))
> Especially since:
> ? (= 1.4 (coerce (/ 7 5) 'float))
> This isn't a general bug because:
> ? (= 1.5 (/ 3 2))
> This is the kind of bug that can shake your faith in the truth and
> purity of mathematics.
> I'm using MCL 2.0p2
I tried your three statements in Lucid Common Lisp (Sun) and got
*exactly* the same results.
In spite of the "correctness" of Lisps behavior with respect to
the language definition (as pointed out in Bill's response),
to the programmer this looks really weird.
Never compare numbers except you know they are integers?!?
What does Mathematica return here?