[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Kim.fateman at UCB-C70
- Subject: Re: CR
- From: VaughanW.REFLECS at HI-Multics
- Date: Tue ,8 Dec 81 11:53:00 EDT
- Cc: lisp-forum at MIT-MC
- In-reply-to: Msg of 12/07/81 10:36 from Kim.fateman
A program that "depends on the badness of code" is an anomaly - and its
very dependence on a bug is itself a lurking bug. viz. sqrt(-4) ought
to be (2*i, -2*i) and if your package can't return that answer, then
ERROR. Of course, you can always claim "but my SQRT isn't supposed to
be the mathematical square root" but that's no excuse. The package
developer named it SQRT because (s)he either
(a) thought it really was the mathematical square root,
(b) knew it wasn't, but thought the differences were trivial,
(c) knew the differences weren't trivial but thought the user
wouldn't realize it,
(d) was ordered to call it SQRT.
In all cases, SQRT is supposed to be thought of as the true square root.
QED. So it ought to behave the same way.