Hi, it's me again.
The latest svn works like a charm. ./configure, make, make check,
make install, make installcheck. Couldn't be easier.
Now, my two questions aren't necessarily bugs, but the
blog is titled "bugs and discussion". Anyway, how would I go about
repeating a function using ⍣ until the answer reaches a certain value?
e.g.:
FIB ← { 2 ↓ ( { ⍵ , +/ ¯2 ↑ ⍵ } ⍣ ⍵ ) 0 1 }
FIB 5
1 2 3 5 8
As you can see, FIB produces a vector of the ⍵ first Fibonacci numbers.
Now I want to produce a vector of all the Fibonacci numbers under, say, 1000.
I could just do:
{(⍵ ∊ ⍳1000) / ⍵} FIB 30
as the 30th Fibonacci number is obviously above 1000, but I'm sure
there's a more elegant (and versatile) way of doing this.
I keep wanting to do something like:
while ( ( ¯1 ↑ FIB i ) < 1000) {
i++;
}
FIB i
but I know I can't.
It's not elegant anyway :)
Best regards,
Louis