JuliaMath / JuliaMath/FixedPointNumbers.jl
`promote_type(::Fixed, ::Rational)` should return `Fixed`
Open
- Dominant language
- Julia
- Stars
- 95
- Forks
- 38
- Avg merge
- 13m
- Merged PRs (30d)
- 2
Description
Julia [suggests using `Rational` numbers](https://docs.julialang.org/en/v1/manual/style-guide/#Avoid-using-floats-for-numeric-literals-in-generic-code-when-possible) rather than floating-point literals, as floats are more disruptive. While good advice in general, this means code following the style guide will tend to disrupt fixed point numbers, since `promote_type(::Fixed, ::Rational)` currently returns `Rational`. I think we should flip this convention, to have fixed point numbers behave like floats in this regard.
Contributor guide
Assessment
This issue has not been assessed yet.