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=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c872b4c479fe6a9b X-Google-Attributes: gid103376,public From: Al Christians Subject: Re: financial computations Date: 2000/05/09 Message-ID: <39182A7C.C1358EE2@easystreet.com>#1/1 X-Deja-AN: 621141900 Content-Transfer-Encoding: 7bit References: <391725AA.4F68ED72@gmx.de> <39182D26.F4FDB0F8@quadruscorp.com> <8f93qg$1g9$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsabuse@supernews.com Organization: Trillium Resources Corporation MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-05-09T00:00:00+00:00 List-Id: Robert Dewar wrote: > > What artithmetic do you use in these functions? > Note that the use of floating-point for many financial > computations, e.g. interest rate calculations for many > instruments, is illegal. > This would be way off-topic for this newsgroup, except that you are stating it as a reason to use your firm's product, so I'll inquire: What do you mean? What instruments? Illegal where? According to what law or ruling? Are you typing about the SIA rules for bond calculations? Certainly not the truth in lending law? The Cobol Programmers' Full Employment Act? Fixed-point decimal exponentiation is what ought to be illegal, on the grounds that it takes to long, as anyone who has done this in Cobol knows too well. Interest calculations often require exponentiation with non-integer exponents. The results of these calculations cannot be computed exactly, so any means of computation, fixed or floating point is an approximation. I can see that the law might require some certain accuracy in the approximations, but I don't expect that the law would care whether the decimal point was fixed or floating through the intermediate calculations. With enough precision, either approach could match the monetary values produced by the other. Al