Another way is using quadratic squaring

   #;(;@:{L:0 1)~^:(5) 1;1 0
9227465

which is more efficient: 

   #;(;;{.)^:(42) 1;0   NB. Miller
1134903170

   ts'#;(;;{.)^:(42) 1;0'
1.2000234 3.7580992e9

versus 

   #; ([ ;@:{L:0 1~ [:,L:0 ])/(;@:{L:0 1)~^:(5 3 1) 1;1 0       NB. Boss
1134903170

   ts'#; ([ ;@:{L:0 1~ [:,L:0 ])/(;@:{L:0 1)~^:(5 3 1) 1;1 0'
0.88478818 3.770689e9


In http://archive.vector.org.uk/art10501080 the rabbit sequence is used to 
describe L-systems in J.


R.E. Boss


(Add your info to http://www.jsoftware.com/jwiki/Community/Demographics )


> -----Oorspronkelijk bericht-----
> Van: [email protected] 
> [mailto:[email protected]] Namens Raul Miller
> Verzonden: dinsdag 23 juli 2013 18:18
> Aan: Programming forum
> Onderwerp: [Jprogramming] golden strings
> 
> http://www.johndcook.com/blog/2013/07/23/golden-strings/
> 
>    0.5#.|.0,;(;;{.)^:(6) 1;0
> 0.709803
> 
> :)
> 
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to