Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ints promoted to float with many terms in sum #1407

Open
baggepinnen opened this issue Jan 16, 2025 · 0 comments
Open

Ints promoted to float with many terms in sum #1407

baggepinnen opened this issue Jan 16, 2025 · 0 comments

Comments

@baggepinnen
Copy link
Collaborator

The first expression below maintains integer coefficients, while adding one more term in the sum promotes all of them to floats.

julia>     -216*Tsettle^2*ogain^3 - 1296*Tsettle^2*ogain^2
-1296(Tsettle^2)*(ogain^2) - 216(Tsettle^2)*(ogain^3)

julia>     -216*Tsettle^2*ogain^3 - 1296*Tsettle^2*ogain^2 - 648*Tsettle^2*ogain
-648.0(Tsettle^2)*ogain - 1296.0(Tsettle^2)*(ogain^2) - 216.0(Tsettle^2)*(ogain^3)

This is bad since solve_multivar only likes ints and rationals (rationals also promote like the ints above)

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

No branches or pull requests

1 participant