Skip to content

Preserving type with Num(::Irrational) #629

@moble

Description

@moble

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions