Skip to content
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

Indexing monomial coefficients must check for garbage #73

Closed
mattsignorelli opened this issue Jan 22, 2024 · 2 comments
Closed

Indexing monomial coefficients must check for garbage #73

mattsignorelli opened this issue Jan 22, 2024 · 2 comments

Comments

@mattsignorelli
Copy link
Contributor

mattsignorelli commented Jan 22, 2024

GTPSA plays a lot of clever tricks to speed things up, and certain monomials may contain garbage when not "in use" . So checking if the monomial is garbage must be performed (and returned as 0 if it is garbage)
This can be done using mad_bit_tst given the order of the monomial and nz in the tpsa:

if (!mad_bit_tst(a->nz,o)) return 0.0

@mattsignorelli
Copy link
Contributor Author

Unfortunately this function is inlined and not exported

@mattsignorelli
Copy link
Contributor Author

Issue submitted upstream, getter functions mad_tpsa_getv getm, etc should check for nz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant