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

ChebyCoeff::slope_a() type error leads to incorrect result #29

Open
jakelangham opened this issue Sep 28, 2021 · 0 comments
Open

ChebyCoeff::slope_a() type error leads to incorrect result #29

jakelangham opened this issue Sep 28, 2021 · 0 comments

Comments

@jakelangham
Copy link

ChebyCoeff::slope_a() for nontrivial profiles typically returns extremely high values - at least for my build environment (gcc 6.4.0).

This is because the loop index n is given as auto, becoming an unsigned int, but its negation is required in the computation leading to an overflow.

I wonder if some compilers behave differently leading to this not being picked up before.

Anyway, this can be fixed quickly by using an int instead, as in ChebyCoeff::slope_b().

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