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

Type oscillation in promotion #52

Closed
ajkeller34 opened this issue Feb 7, 2017 · 1 comment
Closed

Type oscillation in promotion #52

ajkeller34 opened this issue Feb 7, 2017 · 1 comment

Comments

@ajkeller34
Copy link
Collaborator

julia> x, y = 10m, 1
(10 m, 1)

julia> px, py = promote(x, y)
(10 m, 1)

julia> ppx, ppy = promote(px, py)
(10 m, 1)

julia> (typeof(y), typeof(py), typeof(ppy))
(Int64, Quantity{Int64, Dimensions:{}, Units:{}}, Int64)

Tip of the hat to @timholy for finding this gem. Guess I should add a damping term to my type oscillator.

@timholy
Copy link
Contributor

timholy commented Jun 14, 2017

Nice! No damping term, even!

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

2 participants