Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mstan!amull From: amull@Morgan.COM (Andrew P. Mullhaupt) Newsgroups: comp.lang.pascal Subject: Re: Problem in Turbo Pascal 4.0 Summary: How can I put it? You're totally wrong! Message-ID: <659@dummy.Morgan.COM> Date: 10 Jan 90 02:14:27 GMT References: <4658@ur-cc.UUCP> <1989Dec30.135702.12086@cs.dal.ca> <1990Jan9.051558.16015@waikato.ac.nz> Organization: Morgan Stanley & Co. NY, NY Lines: 23 In article <1990Jan9.051558.16015@waikato.ac.nz>, ldo@waikato.ac.nz (Lawrence D'Oliveiro) writes: > Anybody who says "You should never check for equality with reals" > obviously hasn't used a system that supports IEEE 754 arithmetic! Your assertion is neither obvious nor true. Its implication is also false. You should never check for equality with floating point representations of numbers. Suppose you depend on the following expression (even in IEEE 754): boolean_var := (0.0) = ( ((4.0 / 3.0) - 1.0) * 3.0 - 1.0) you'll likely get what you didn't want. There are lot's of other good reasons (storage history being one) why you it isn't wise to check for equality with floating point representations of numbers. Later, Andrew Mullhaupt