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!news3.google.com!feeder.news-service.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: What's stopping you from using Ada for your next commercial project? Date: Mon, 14 Mar 2011 23:12:39 +0100 Organization: Adalog 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: Mon, 14 Mar 2011 22:12:17 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="cJo7kSTQUrCFv2/D8KKtqw"; logging-data="25286"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kZ6Zw7r8s0mXtl15wuLqX" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: Cancel-Lock: sha1:DI/wlW4FoStMLTyJnbnxPEWEDQQ= Xref: g2news1.google.com comp.lang.ada:18195 Date: 2011-03-14T23:12:39+01:00 List-Id: 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. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Adalog a d�m�nag� / Adalog has moved: 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00