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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6a8952cbe009f3ed X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.198.196 with SMTP id ep4mr4953028qab.3.1358500657649; Fri, 18 Jan 2013 01:17:37 -0800 (PST) X-Received: by 10.49.116.34 with SMTP id jt2mr1903085qeb.38.1358500657550; Fri, 18 Jan 2013 01:17:37 -0800 (PST) Path: k2ni675qap.0!nntp.google.com!p13no1192409qai.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 18 Jan 2013 01:17:37 -0800 (PST) In-Reply-To: <4905b963-0036-4129-8050-fb26ef0154d6@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=130.240.232.139; posting-account=Rr9I-QoAAACS-nOzpA-mGxtAlZ46Nb6I NNTP-Posting-Host: 130.240.232.139 References: <4905b963-0036-4129-8050-fb26ef0154d6@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <32314026-23ae-45b8-a4c5-e589e7d79de2@googlegroups.com> Subject: Re: Numerical calculations: Why not use fixed point types for everything? From: Ada novice Injection-Date: Fri, 18 Jan 2013 09:17:37 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2013-01-18T01:17:37-08:00 List-Id: On Thursday, January 17, 2013 5:25:30 PM UTC+1, Adam Beneschan wrote: > (2) Many processors have built-in support for mathematical functions on f= loating-point values (square root, trig functions, log, e**x). If your pro= gram does lots of those, you'll probably want to use floating-point numbers= instead of calling library functions to do the computation (slow) or const= antly converting back and forth between fixed- and floating-point. >=20 >=20 > -- Adam Thanks to all of you for your inputs. So if I am just writing a program tha= t won't be run on a separate DSP platform but only on my computer, then I c= an go for fixed-point representation as long as I am not working with exces= sively large or excessively small values. I have read (John Mc Cormick: Building parallel...with Ada's book) that fix= ed point arithmetic is faster than floating-point arithmetic since integer = instructions are faster so I would ask about the second point put by Adam t= hat mathematical functions are slow with fixed-point numbers. Can you pleas= e elaborate on that? Thanks YC