[Jprogramming] Accumulation, interest, and simulation
Roger Hui
rhui000 at shaw.ca
Mon Jul 20 07:32:01 HKT 2009
In all but the simplest cases, I prefer forks over hooks.
----- Original Message -----
From: "R.E. Boss" <r.e.boss at planet.nl>
Date: Sunday, July 19, 2009 12:38
Subject: Re: [Jprogramming] Accumulation, interest, and simulation
To: 'Programming forum' <programming at jsoftware.com>
> acc1=: (] * +/\@:%) */\
> d acc1 1+r
> 1000 1040 1102.4 1657.52 1740.396
>
>
> R.E. Boss
>
>
> > -----Oorspronkelijk bericht-----
> > Van: programming-bounces at jsoftware.com [mailto:programming-
> > bounces at jsoftware.com] Namens Roger Hui
> > Verzonden: zaterdag 18 juli 2009 18:43
> > Aan: Programming forum
> > Onderwerp: Re: [Jprogramming] Accumulation, interest, and simulation
> >
> > Found it. Now the question is whether it solves
> > the same problem.
> >
> > John Gaboury, Letter to the Editor, APL Quote-Quad,
> > Volume 7, Number 4, Winter 1977.
> >
> > acc=: [ (] * +/\@:%) */\@]
> >
> > r=. 0.05 0.04 0.06 0.05 0.05 NB.
> interest rates
> > d=. 1000 0 0 500
> 0 NB. deposits
> > d acc 1+r
> > 1000 1040 1102.4 1657.52 1740.4
> >
> >
> >
> > ----- Original Message -----
> > From: Roger Hui <rhui000 at shaw.ca>
> > Date: Saturday, July 18, 2009 9:19
> > Subject: Re: [Jprogramming] Accumulation, interest, and simulation
> > To: Programming forum <programming at jsoftware.com>
> >
> > > There was (I think) a very neat solution APL published
> > > in the Quote-Quad in the late 1970s - early 1980s.
> > > It was a very short one-liner involving */\ and +/\ .
> > > I'll see if I can find it or reproduce it.
> > >
> > > Perhaps Joey Tuttle (the keeper of all things) would
> > > have a copy of it. I am pretty sure it would be in
> > > one of the IPSA utility workspaces, such as 880 sauce.
> > > The function would be called "accum" or some such.
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: Bill Harris <bill_harris at facilitatedsystems.com>
> > > Date: Saturday, July 18, 2009 8:20
> > > Subject: Re: [Jprogramming] Accumulation, interest, and simulation
> > > To: Programming forum <programming at jsoftware.com>
> > >
> > > > Thanks, all. I figured \. came into it somehow, but I
> > > > didn't get from
> > > > there to the end. I'll study your solutions later today.
> > > >
> > > > Bill
> > > >
> > > > PS: Thanks for not being misled by my typo in the original
> Aprime> > > example, which didn't include the second deposit in the
> > > rolling sum.
More information about the Programming
mailing list