To handle irrationals robustly (so that pi*big(3)
is still a BigFloat
), the right thing is probably to define a new irrational
type with slightly different promotion rules. That is a bit tedious to do without make Irrational <: AbstractIrrational by stevengj · Pull Request #24245 · JuliaLang/julia · GitHub, unfortunately.
1 Like