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-Thread: 103376,677963b1aa23e668 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: What's stopping you from using Ada for your next commercial project? Date: Tue, 15 Mar 2011 12:11:31 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <7d308b7b-51d7-4c93-85c8-eecb40f843d0@glegroupsg2000goo.googlegroups.com> <88bf5879-c58e-4ae1-ad9e-e2b6a48729fe@34g2000pru.googlegroups.com> <80b0754d-b6f2-4861-988e-f76c51f20ed9@t19g2000prd.googlegroups.com> <4d7e4dbd$0$6778$9b4e6d93@newsspool3.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 15 Mar 2011 12:11:31 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="4pjzwDT2MPp9AkNxUo/C4Q"; logging-data="27930"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18VlB9CKMQ5D4geb1aJAL6zTwzUu9KHgLA=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:8y+hoqHoNYwC8dL9lg0sVDqeGrY= Xref: g2news1.google.com comp.lang.ada:18209 Date: 2011-03-15T12:11:31+00:00 List-Id: On 2011-03-14, J-P. Rosen wrote: > Le 14/03/2011 21:04, Simon Clubley a �crit : >> For example, if you needed to implement code which handled values to (say) >> 3 decimal places, you could just multiply the value by 1000 and treat it >> as a integer internally. >> >> Ie: 123.456 becomes 123456 and 345.45 becomes 345450. >> > Not that simple when it comes to multiplication and division. You need > to scale the result, and make sure you don't lose accuracy... i.e., do > all the work that the compiler does for you. > Quite true; I should have given a more detailed response. Ada is just a personal interest of mine but I am employed as a developer in a business environment so I am very familiar with using fixed point operations in code and it seems quite natural to me. It does surprise me therefore how little I see fixed point calculations been used in other environments. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world