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

Re: CR

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.