ckrause / loda

LODA is an assembly language, a computational model and a tool for mining integer sequence programs.
Apache License 2.0
20 stars 5 forks source link

Check more terms #62

Closed ckrause closed 3 years ago

ckrause commented 3 years ago

We currently check 250 terms to determine whether a program matches a sequence. If it contains values exceeding the 64-bit range, we truncate the sequence to be checked.

Recent tests show that there are around 60 programs up to A060000 that have incorrect terms. We should extend the check to more terms to filter out these incorrect programs.

The proposal is: we keep the existing logic for 250 terms and extend it by an additional test: we test also terms up to, say, N=1000, but with the following behavior: we discard the program if we found a difference, but we do NOT discard the program if an overflow occurs in this range.

ckrause commented 3 years ago

I think these two changes should actually suffice:

ckrause commented 3 years ago

Forgot one place: in dumpProgram we should only print (at most) 250 terms, not 1000: https://github.com/ckrause/loda/blob/master/src/oeis_manager.cpp#L398

karttu commented 3 years ago

Just a quick comment: make it at least 2000. I will later elaborate here why.

ckrause commented 3 years ago

That should be ok, but we'll need to do this first: https://github.com/ckrause/loda/issues/63

ckrause commented 3 years ago

done