Le lundi 29 février 2016 20:39:08 UTC+1, Jason Merrill a écrit : > > Well I for one think this library is pretty cool. >
Thank you for that; have a look at the following example: Take: a=[k^2-2*k^3+5*k-1+k%12 for k=0:64] This is a crazy sequence of 65 integers! My function detects a recurrence relation of order 16: [1,-3,3,-1,0,0,0,0,0,0,0,0,-1,3,-3,1] A quick check for number with index 42 gives: b = recvec(a) transpose(a[27:42])*b actually prints 0 (as expected). I will add such an example in the README. > Taking a guess, recvec will generate an answer for any sequence, but for > "general sequences" that are not generated by a short linear recurrence, > you will still get some answer that is half the length of the input, and no > particular indication that anything went wrong. Whether this guess is right > or not, it would definitely be helpful to document what happens there. > A failure returns an empty array. Regards, tb.
