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

Numeric type not preserved in @system #139

Closed
mforets opened this issue Jan 28, 2020 · 1 comment · Fixed by #169
Closed

Numeric type not preserved in @system #139

mforets opened this issue Jan 28, 2020 · 1 comment · Fixed by #169
Assignees

Comments

@mforets
Copy link
Member

mforets commented Jan 28, 2020

With:

julia> @system(x' = 2x)
LinearContinuousSystem{Float64,IdentityMultiple{Float64}}([2.0])

I expected that the numeric type of this system is an integer. Actually, I like to keep it as is, but we should stress this point in the docs (so i leave this issue open, to consider the documentation update).

@mforets
Copy link
Member Author

mforets commented Jan 30, 2020

See also that:

julia> @system(x' = -2x)
LinearContinuousSystem{Float64,IdentityMultiple{Float64}}([-2.0])

julia> @system(x' = -x)
LinearContinuousSystem{Int64,IdentityMultiple{Int64}}([-1])

In the second case i expected a Float64. (or at least, the two versions should give the same numerical value).

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

Successfully merging a pull request may close this issue.

2 participants