-
Notifications
You must be signed in to change notification settings - Fork 146
Check for bad terms in fast notation in get_variables #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Should this check ( |
|
You are right, this check could equally go in |
tueda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the code looks fine.
Optionally, the code for triggering the error could be reused with goto, like:
else if (*e < 0) {
term_too_complicated_error:
MLOCK(ErrorMessageLock);
MesPrint("ERROR: polynomials and polyratfuns must contain symbols only");
MUNLOCK(ErrorMessageLock);
Terminate(1);
}
else {
for (int i=with_arghead ? ARGHEAD : 0; with_arghead ? i<e[0] : e[i]!=0; i+=e[i]) {
if (i+1<i+e[i]-ABS(e[i+e[i]-1]) && e[i+1]!=SYMBOL) {
goto term_too_complicated_error;
}|
While here it would probably be fine, other areas of the code have been cumbersome to debug because you have to determine which of many |
|
How about giving Terminate a second parameter that indicates which call it was?
Then one can change things easily, using grep.
… On 8 Nov 2024, at 10:07, jodavies ***@***.***> wrote:
While here it would probably be fine, other areas of the code have been cumbersome to debug because you have to determine which of many goto have actually caused a termination. In my opinion it could be beneficial to actually remove this pattern from the code entirely, but that requires some effort also...
—
Reply to this email directly, view it on GitHub <#570 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABJPCEU344ZMQ7VLOMIODO3Z7R5O7AVCNFSM6AAAAABRIMFKASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRUGE4DKMRUGI>.
You are receiving this because you are subscribed to this thread.
|
|
When this PR is done #526 , But still if you have several |
These created numerators of 0. Fixes form-dev#567
These created numerators of 0. Fixes #567