From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109d8a,c7637cfdf68e766 X-Google-Attributes: gid109d8a,public X-Google-Thread: f8362,c7637cfdf68e766 X-Google-Attributes: gidf8362,public X-Google-Thread: 103376,c7637cfdf68e766 X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,c7637cfdf68e766 X-Google-Attributes: gidf43e6,public X-Google-Thread: 107079,c7637cfdf68e766 X-Google-Attributes: gid107079,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: floating point comparison Date: 1997/09/09 Message-ID: #1/1 X-Deja-AN: 271192924 Distribution: inet References: <33EA46CC.226@pseserv3.fw.hac.com> <871377938snz@nezumi.demon.co.uk> <5usm7v$bui@redtail.cruzio.com> Organization: New York University Newsgroups: comp.lang.ada,sci.math.num-analysis,comp.software-eng,comp.theory,sci.math Date: 1997-09-09T00:00:00+00:00 List-Id: schafly said, replying to Eachus <<> In general it is much more work to write fixed point than floating > point code, but especially in Ada, the error analysis is easy. Errors > are only introduced by explicit conversions never by arithmetic > operations. Not true. Try computing 1/3 in fixed point.>> This shows a lack of appreciation for how things are done in Ada. if you have two fixed-point values of 1.0 and 3.0, then the division 1.0/3.0 gives a semantically precise and exact answer. That is true of any division of fixed-point values. BUT, to do anything interesting with this exact value, it must be converted to a specific fixed-point type, hence Eachus' comment that "errors" [that word again :-)] are introduced only by conversions. This approach greatly simplifies analysis of the propagation of these "errors".