vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
985 stars 118 forks source link

Bad error message for full SubSmallExtension #512

Open jodavies opened 1 month ago

jodavies commented 1 month ago

If you fill the SubSmallExtension:

* Sort which fills (sub)smallextension:

#: SmallSize 1000K
#: SmallExtension 1200K
#: TermsInSmall 2M
#: SubSmallSize 1000K
#: SubSmallExtension 1200K
#: SubTermsInSmall 2M

Symbol x,n;
CFunction f,g,prf;
CFunction hold;

Local test = 1;
.sort

PolyRatFun prf;
Term;
   Multiply (<f(1)>+...+<f(150)>)*(<g(1)>+...+<g(100)>);
   Identify f(x?) = prf(n-x,n+x);
EndTerm;

.end

FORM crashes with Please increase SmallExtension in form.set. Of course, increasing SmallExtension will never get you anywhere in this case.

I've not yet worked out how to determine here https://github.com/vermaseren/form/blob/b82093350ae986ad6c65a9ad25bf748efa53d7be/sources/sort.c#L2236 whether we are doing a regular or sub-buffer sort. If this information is known, the error message can be printed with "Sub", accordingly.

Also the user may not be using a form.set file, maybe the error should just refer generically to the "(Sub)SmallExtension setup parameter".

tueda commented 1 month ago

Right. In this case,

#: SubSmallExtension 15M

is needed, indeed.