Best calculator for recurrence relations
02-25-2020, 08:01 PM
Post: #14
 John Keith Senior Member Posts: 740 Joined: Dec 2013
RE: Best calculator for recurrence relations
(02-25-2020 07:15 PM)DavidM Wrote:  This could probably be sped up by doing the computations on the stack instead of with a symbolic expression, but the readability would take a significant hit (IMHO).

This is indeed the case. You end up with lots of PICKs and GETs and the programs are as hard to write as they are to read. They are also a lot faster.

For example, here is a program for a similar sequence:

Code:
 %%HP: T(3)A(R)F(.); @ Returns A070867, a highly chaotic sequence, which is sequence 'F' from S. Wolfram, @ 'A New Kind of Science', p.129. @ Expression: A(0) = A(1) = 1; A(n) = A(n-A(n-1)-1) + A(n-A(n-2)-1) \<< \-> s   \<< 1 1 3 s     FOR n OVER n SWAP - n SWAP - 1 + PICK OVER n SWAP - n SWAP - 2 + PICK +     NEXT s \->LIST   \>> \>>
 « Next Oldest | Next Newest »

 Messages In This Thread Best calculator for recurrence relations - carey - 02-18-2020, 03:50 AM RE: Best calculator for sequences (recurrence relations) - Gerald H - 02-18-2020, 05:21 AM RE: Best calculator for sequences (recurrence relations) - John Keith - 02-18-2020, 02:05 PM RE: Best calculator for sequences (recurrence relations) - Dave Britten - 02-18-2020, 01:07 PM RE: Best calculator for sequences (recurrence relations) - Gerald H - 02-18-2020, 08:29 PM RE: Best calculator for sequences (recurrence relations) - David Hayden - 02-18-2020, 09:30 PM RE: Best calculator for sequences (recurrence relations) - Dave Britten - 02-18-2020, 10:08 PM RE: Best calculator for sequences (recurrence relations) - John Keith - 02-19-2020, 06:12 PM RE: Best calculator for recurrence relations - Gerald H - 02-23-2020, 10:54 AM RE: Best calculator for recurrence relations - John Keith - 02-23-2020, 07:09 PM RE: Best calculator for recurrence relations - Csaba Tizedes - 02-25-2020, 03:08 PM RE: Best calculator for recurrence relations - Dave Britten - 02-25-2020, 04:14 PM RE: Best calculator for recurrence relations - DavidM - 02-25-2020, 07:15 PM RE: Best calculator for recurrence relations - John Keith - 02-25-2020 08:01 PM RE: Best calculator for recurrence relations - DavidM - 02-26-2020, 03:28 PM RE: Best calculator for recurrence relations - John Keith - 02-26-2020, 07:56 PM

User(s) browsing this thread: 1 Guest(s)