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.8 required=5.0 tests=BAYES_50,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bc1441bb4023e50f,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!uns-out.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!KNOLOGY.NET-a2kHrUvQQWlmc!not-for-mail Date: Sun, 20 Jul 2008 18:27:08 -0500 From: rd <162144@gmail.com> User-Agent: Thunderbird 1.5 (X11/20060318) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Financial Calculations in Ada Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <860d1$4883ccd5$45490079$7570@KNOLOGY.NET> X-Complaints-To: abuse@usenetserver.com Organization: UseNetServer.com X-Trace: 860d14883ccd5e0eca5dc07570 X-Original-Bytes: 1166 Xref: g2news1.google.com comp.lang.ada:1229 Date: 2008-07-20T18:27:08-05:00 List-Id: I'm playing around some with Ada, and today started with the intent of cooking up a crappy mortgage calculator. I did the obvious: type Money is delta 0.01 digits 12; package MIO is new Ada.Text_IO.Decimal_IO (Money); use MIO; I hit a brick wall more quickly than usual in that I couldn't figure out a good way to handle interest rates that might have a decimal value with more digits than my Money type, such as 7.125. Can anyone give me any tips on how to handle this sort of thing in Ada? -- rd