Post Reply 
Plus42 Equations, Preview Release
06-16-2022, 04:00 PM
Post: #752
RE: Plus42 Equations, Preview Release
(06-16-2022 03:20 PM)Ajaja Wrote:  I'm trying to use named equations recursively in Plus42 v1.0.7 but found that they EVAL very slow. Or maybe I'm doing something wrong.
My test equation is "FIB(N):IF(N≤1:N:FIB(N-2)+FIB(N-1))" and it takes significant amount of time to calculate even for N=30 on my smartphone.
Printer is OFF.
Any hints/suggestions?

The number of evaluations of FIB grows exponentially with N. For N=30, FIB is called 2,692,537 times.

It could be sped up a lot using memoization...
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Plus42 Equations, Preview Release - Thomas Okken - 06-16-2022 04:00 PM



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