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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!feeds.phibee-telecom.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Noob question.. Autopromotion? Date: Mon, 05 May 2014 20:30:02 +0100 Organization: A noiseless patient Spider Message-ID: References: <9ac10bab-2ade-4ac8-a99b-336595e38f67@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="6c8e46900abaabd1a3b7c03d9ac850ff"; logging-data="27480"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198nCISstfmHcFnvdRKhrgLGsJHyBZ9Y4I=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:heRYV/BZcDcV+RAsYUU+wMPEMPQ= sha1:texeznwXPCwC521ANwBpuy5D8vI= X-Original-Bytes: 1831 Xref: number.nntp.dca.giganews.com comp.lang.ada:186253 Date: 2014-05-05T20:30:02+01:00 List-Id: "Nasser M. Abbasi" writes: > On 5/5/2014 9:22 AM, sdalemorrey@gmail.com wrote: > >> >> So the question is, if I use some sort of floating point type for >> all 3 values, >> > > Would not using Fixed point type be better for financial application? > > https://www2.adacore.com/gap-static/GNAT_Book/html/aarm/AA-3-5-9.html > > Ada is one of few languages that supports fixed point type > as build-in data type. > > --Nasser I'd have thought you'd use Annex F's decimal arithmetic[1], if your compiler supports it. It might be better to link to a more up-to-date version of the ARM! [2] [1] https://www2.adacore.com/gap-static/GNAT_Book/html/aarm/AA-F-2.html [2] http://www.ada-auth.org/standards/12rm/html/RM-TTL.html