Article View: alt.folklore.computers
Article #696Re: Problem in Turbo Pascal 4.0
From: lin... Peter van der Linden
Date: Wed, 03 Jan 1990 19:01
Date: Wed, 03 Jan 1990 19:01
16 lines
1647 bytes
1647 bytes
Kees Huizing - Eindhoven Univ of Techn - The Netherlands, wants to know: > the equality operator "=" does not (do) on reals what it pretends to do. > I accept that it cannot detect perfect equality of reals, but what it could do > is detect equality up to some representation dependent accuracy. > Why is it not done this way? A very reasonable question Kees! A number of years ago, a gentleman by the name of Dijkstra, located not a million miles from where you are, had the very same thought, and implemented it into an early Algol compiler. The experiment was soon deemed a failure when it was found that this had the inadvertent and unwanted side effect that comparison was no longer transitive. I.e. if A equalled B, and B equalled C, a program could not conclude that A = C ! ---------------- Disclaimer: I'm no Jack Kennedy, but I'm no Dan Quayle either. Peter van der Linden lin...@SuN.cOm (415) 336-6206
Technical Details
Message-ID:
<129838@sun.Eng.Sun.COM>Path:
mbox-mo1.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sun-barr!newstop!sun!adapt!lindenReferences:
<4658@ur-cc.UUCP> <4660@ur-cc.UUCP> <803@tuewsd.lso.win.tue.nl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!sun-barr!newstop!sun!adapt!linden From: lin...@adapt.Sun.COM (Peter van der Linden) Newsgroups: comp.lang.pascal,alt.folklore.computers Subject: Re: Problem in Turbo Pascal 4.0 Keywords: Nonterminating Repeat loop, real, representation Message-ID: <129838@sun.Eng.Sun.COM> Date: 3 Jan 90 19:01:18 GMT References: <4658@ur-cc.UUCP> <4660@ur-cc.UUCP> <803@tuewsd.lso.win.tue.nl> Sender: ne...@sun.Eng.Sun.COM Reply-To: linden@sun.UUCP (Peter van der Linden) Organization: Sun Microsystems, Mountain View Lines: 16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit