[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weird math
- To: firstname.lastname@example.org
- Subject: Re: weird math
- From: "rudolf mittelmann" <email@example.com>
- Date: Thu, 26 Aug 1993 11:34:27 +0200
- Cc: firstname.lastname@example.org
- Reply-to: "rudolf mittelmann" <email@example.com>
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?