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

Preserving type with Num(::Irrational) #629

Closed
moble opened this issue Jun 23, 2022 · 0 comments · Fixed by #638
Closed

Preserving type with Num(::Irrational) #629

moble opened this issue Jun 23, 2022 · 0 comments · Fixed by #638

Comments

@moble
Copy link
Contributor

moble commented Jun 23, 2022

As described on discourse, using irrational numbers with symbolic expressions frequently doesn't work as expected. Specifically, even if we ask for the irrational to be converted to a Num, it will get converted to a Float64 as soon as it is actually used in an algebraic expression. We need to be able to preserve types, including retaining correct behavior even after the expression is used in ModelingToolkit.

I also found some discussion of this problem in #496, and in this older discourse post.

@moble moble changed the title Presevering type with Num(::Irrational) Preserving type with Num(::Irrational) Jun 24, 2022
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

Successfully merging a pull request may close this issue.

1 participant