You seemed to respond to my:
newfib=: 13 : '(,{:+ [: {:}:)^:(y-2) 1 1'
with:
F3=: [:, ([:+/\ +/\.)^: (<@]`(1x 1"_))
So I now like a simple J version:
f4=:[: , ([: +/\ +/\.)^:(([: i. ])`(1 1"_))
but here is a surprise:
0{|.F3 100
280571172992510140037611932413038677189525
0{|.f4 100
2.80571e41
J thinks it's "good enough" for beginners too!
(F3-:f4)100
1
Thanks for the reference. Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of R.E. Boss
Sent: Saturday, June 07, 2014 6:09 AM
To: Programming forum
Subject: [Jprogramming] fibonacci performance
[:, ([:+/\ +/\.)^: (<@]`(1x 1"_))
http://www.jsoftware.com/jwiki/RE%20Boss/J-blog/Fibonacci#New_performance_re
cord
R.E. Boss
(Add your info to <http://www.jsoftware.com/jwiki/Community/Demographics>
http://www.jsoftware.com/jwiki/Community/Demographics )
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm