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: 103376,183ebe04e93f0506 X-Google-Attributes: gid103376,public X-Google-Thread: 101deb,704fdaec147f48c,start X-Google-Attributes: gid101deb,public X-Google-Thread: 107079,183ebe04e93f0506 X-Google-Attributes: gid107079,public From: rav@goanna.cs.rmit.edu.au (robin) Subject: Re: fixed point vs floating point Date: 1997/12/03 Message-ID: <6627vl$s4h$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 294683484 Expires: 3 March 1998 00:00:00 GMT References: <65846t$4vq$1@gonzo.sun3.iaf.nl> <65c58j$1302@mean.stat.purdue.edu> Distribution: inet Organization: Comp Sci, RMIT University, Melbourne, Australia. NNTP-Posting-User: rav Newsgroups: comp.lang.pl1,comp.lang.ada,sci.math.num-analysis Date: 1997-12-03T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) writes: >As to expecting the language to do scaling autoamtically, I think this is >a mistake for fixed-point. PL/1 tried and failed, PL/I did not fail. Automatic scaling of fixed-point intermediate results is highly successful. It works on the principle of preserving as many digits after the binary/decimal point as possible. > and COBOL certainly >does not succeed (a common coding rule in COBOL is never to use the >COMPUTE verb, precisely because the scaling is not well defined). >I think any attempt to automatically determine the scaling of intermediate >results in multiplications and divisions in fixed-point is doomed to failure. It isn't really, but the user needs to understand how fixed-point arithmetic -- with a fractional part -- works. >This just *has* to be left up to the programmer, since it is highly >implementation dependent.