-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
mathsMathematical functionsMathematical functionsrationalsThe Rational type and values thereofThe Rational type and values thereof
Description
MWE:
julia> Rational{Integer}(4//3) * 5.2
ERROR: promotion of types Rational{Integer} and Float64 failed to change any arguments
Stacktrace:
[1] error(::String, ::String, ::String)
@ Base ./error.jl:44
[2] sametype_error(input::Tuple{Rational{Integer}, Float64})
@ Base ./promotion.jl:424
[3] not_sametype(x::Tuple{Rational{Integer}, Float64}, y::Tuple{Rational{Integer}, Float64})
@ Base ./promotion.jl:418
[4] promote
@ ./promotion.jl:401 [inlined]
[5] *(x::Rational{Integer}, y::Float64)
@ Base ./promotion.jl:430
[6] top-level scope
@ REPL[34]:1
Which seems to indicate a missing promotion rule. I'd expect this to promote to Float64
.
Metadata
Metadata
Assignees
Labels
mathsMathematical functionsMathematical functionsrationalsThe Rational type and values thereofThe Rational type and values thereof