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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 107f24,626a0a064b320310 X-Google-Attributes: gid107f24,public X-Google-Thread: f4fd2,626a0a064b320310 X-Google-Attributes: gidf4fd2,public X-Google-Thread: 1164ba,626a0a064b320310 X-Google-Attributes: gid1164ba,public X-Google-Thread: 10259a,626a0a064b320310 X-Google-Attributes: gid10259a,public X-Google-Thread: 103d24,626a0a064b320310 X-Google-Attributes: gid103d24,public X-Google-Thread: 114809,626a0a064b320310 X-Google-Attributes: gid114809,public X-Google-Thread: 103376,ea8ea502d35ca2ce X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-31 06:33:04 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.algonet.se!newsfeed1.telenordia.se!algonet!uab.ericsson.se!abc.exu.ericsson.se!not-for-mail From: Raymond Toy Newsgroups: comp.lang.ada,comp.lang.lisp,comp.lang.smalltalk,comp.lang.basic,comp.lang.functional,comp.lang.scheme,comp.lang.perl Subject: Re: Beginner's Language? Date: 31 May 2001 09:29:12 -0400 Organization: Ericsson Inc., RTP, NC Message-ID: <4npucpsl3r.fsf@rtp.ericsson.se> References: <9cukad$nn68@news-dxb> <9d6b6e$1bt$1@nh.pace.co.uk> <87snihxiwc.fsf@frown.here> <9dbi83$sji$1@nh.pace.co.uk> <87heyu7cqd.fsf@frown.here> <9dc20p$hh15e$1@ID-37382.news.dfncis.de> <9dclnt$9ic1@news.cis.okstate.edu> <3B02C05B.BA4B63C6@raytheon.com> <8766ei7fct.fsf@deneb.enyo.de> <9f52c7$pqb$1@s1.read.news.oleane.net> NNTP-Posting-Host: edgedsp4.rtp.ericsson.se Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (anise) Xref: archiver1.google.com comp.lang.ada:7926 comp.lang.lisp:11041 comp.lang.smalltalk:10368 comp.lang.functional:5996 comp.lang.scheme:4079 comp.lang.perl:3065 Date: 2001-05-31T09:29:12-04:00 List-Id: >>>>> "Jean-Pierre" == Jean-Pierre Rosen writes: Jean-Pierre> "Johan Kullstam" a �crit dans le message news: m3r8x6tsa5.fsf@sysengr.res.ray.com... >> you can always do fixed point with integers. >> >> for example, to do dollars to two decimal places, just count pennies >> instead of dollars. >> >> other than a little notational convenience, i've never understood what >> the big deal was with fixed point. >> Jean-Pierre> Everything looks simple to people who didn't try to implement it... Jean-Pierre> Addition and subtraction are easy, but multiplication Jean-Pierre> and division require some care. If you implement Jean-Pierre> fixed points with integers, you'll end up doing by Jean-Pierre> hand exactly what the compiler does for you, except Jean-Pierre> that the people who wrote the compiler were educated Jean-Pierre> in computer arithmetic, and believe me, there are Jean-Pierre> lots of pitfalls there. (Said by someone who did an Jean-Pierre> implementation of fixed point arithmetic). Why is multiplication/division much harder? You pretend the numbers of integers, do the operation, and then figure out where the fixed point should be. That's not too hard. As a DSP guy working on fixed-point DSPs, we do this all the time. Ray