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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e99ea9c9d228f6b8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-17 00:50:52 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: Andrew Newsgroups: comp.lang.ada Subject: Re: interest computing problem Date: Wed, 17 Sep 2003 02:47:48 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:42604 Date: 2003-09-17T02:47:48-05:00 List-Id: tmoran@acm.org wrote: >>Your ending balance will be 1.00022E+03 > > If you use Long_Float instead of Float you will get > 1.02014488268319E+03 > Raising to the 365th, rather than 364th (7*52=364) power gives > 1.02020078103290 > which matches within rounding error what your banker friend says. i just tried to use long_float although I am probably mis-using it here is my attempted implementation of it .. sorry about the spelling it's now 2:42 am ========= procedure Interest is Initialamt : Long_Float; Interest : Long_Float; TimeNWeeks : Integer; DRate : Long_Float; Days : Integer; Balance : Long_Float; package NUMBER_IO is new INTEGER_IO(INTEGER); use NUMBER_IO; package Float1_IO is new Float_IO(FLOAT); use Float1_IO; =========== do I need to also make package Float1_IO is new Float_IO(FLOAT); be package Float1_IO is new Float_IO(Long_FLOAT); actually I'll try that... nope that didn't help either.... i'm probably not using "Long_Float" correctly... if you want could you show me the correct syntax.. either that or else I'll try to look it up in the morning.. i need some slpee.. err sleep