Jump to content

Fibonacci word: Difference between revisions

m
(Added iterative approach →‎{{header|Scilab}})
Line 3,301:
=={{header|Scilab}}==
 
Two different approaches were implemented, and their execution times can be compared. Both examples use Scilab's [[Entropy#Scilab|entropy]] example. It is worth noting that the time spent executing entropy() is quite significant when using the iterative method, e.g. it usually takes 27 times longer to calculate the 37th word's entropy than it takes to generate it.
 
===Recursive approachfunction===
<lang>exec('.\entropy.sci',0);
 
Line 3,415:
!37 24157817 0.9594187 !</pre>
 
===Iterative approachmethod===
<lang>exec('.\entropy.sci',0);
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.