Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.arch Subject: Re: COBOL, Article on new mainframe use Date: Tue, 20 Aug 2024 23:27:34 -0000 (UTC) Organization: A noiseless patient Spider Lines: 19 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 21 Aug 2024 01:27:34 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b7054728ccecf746f3a261c5985019ab"; logging-data="3739374"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YbF8gV7L3R3pNpFG3wtC3" User-Agent: Pan/0.159 (Vovchansk; ) Cancel-Lock: sha1:6eLBhZx8hEr3YDvterQr66i+T4I= Bytes: 1638 On Tue, 20 Aug 2024 11:51:14 -0400, EricP wrote: > John Levine wrote: >> >> According to Lawrence D'Oliveiro : >> >>> Oh, and compound interest requires working with transcendental >>> functions, doesn’t it? >> >> Uh, no, it's just repeated multiplication. > > For some simple bonds, parts of the price or yield calculations are > integer power series so one could roll your own integer power function > optimized to do the minimum number of multiplies. > > x^17 = ((((x^2)^2)^2)^2)*x > I’d really like to see how you’d write that in COBOL ...