Inadequate support of `promote_rule` for non-concrete types
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Reproduce the listed promote_rule cases in the Julia REPL and read the handling in ColorTypes.jl. Compare the behavior with issue #342, then establish expected results for the examples, including avoiding StackOverflowError. Done means the non-concrete promotion cases behave consistently without the reported errors.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
For better or worse, PR #207 is the most significant change in FPN v0.9.
However the current promote_rule for non-concrete types is somewhat imperfect.
In ColorTypes.jl, I am keenly aware that the handling of non-concrete types can lead to chaos.
Here, I’d like to think about ways to make things a little better, as long as they don’t go against common sense.
julia> promote_rule(Normed{UInt8, 8}, Fixed{Int8, 7})
Float32
julia> promote_rule(Normed{UInt8}, Fixed{Int8})
Union{} # -> Float32
julia> promote_rule(Normed{UInt8}, Normed{UInt8})
Union{} # -> Normed{UInt8}
julia> promote_rule(Normed{UInt8}, Normed{UInt16})
Union{} # -> Normed{UInt16}
julia> promote_rule(Normed{UInt8}, Normed)
Union{} # -> Normed
julia> promote_rule(Normed{UInt8}, Normed{Union{UInt8, UInt16}})
Union{} # -> Normed (Any desire to make this more strict is a path to despair.)
julia> promote_rule(Normed{UInt8}, FixedPoint)
Union{} # -> FixedPoint
julia> promote_rule(Normed{UInt8}, Float64)
Float64
julia> promote_rule(Normed, Float64)
ERROR: StackOverflowError # -> BigFloat
julia> promote_rule(Normed{UInt8}, Int8)
Float32
julia> promote_rule(Normed, Int8)
Normed # -> BigFloat
Some of the unnatural promotions or stack overflow errors are caused by issue #342. In other words, fixing issue #342 will resolve some of these issues.
- Ngôn ngữ chính
- Julia
- Star
- 95
- Fork
- 38
- Merge trung bình
- 16 giờ 31 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JuliaMath/FixedPointNumbers.jl
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
JuliaMath/FixedPointNumbers.jl#342 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
JuliaMath/FixedPointNumbers.jl#337 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
JuliaMath/FixedPointNumbers.jl#331 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs comments
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
JuliaMath/FixedPointNumbers.jl#318 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
add-on enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
JuliaMath/FixedPointNumbers.jl#311 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của JuliaMath/FixedPointNumbers.jl
Issue tương tự
-
add-on doc enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
JuliaGraphics/ColorTypes.jl#344 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
`enzymexla.linalg.lu` lowering fails for a tall matrix: the permutation is built with the pivot typeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
EnzymeAD/Enzyme-JAX#3286 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
SciML/LinearSolve.jl#1359 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
EnzymeAD/ReactantNitro.jl#13 ·