You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As pointed out on discourse, the eigvals functions and a number of other linalg functions are incorrectly promoting rationals to Float32 rather than Float64.
They are calling promote_type(Float32, typeof(one(T)/norm(one(T)))). The Float32 was added by @andreasnoack in JuliaLang/julia#5526 to ensure that Float16 data was promoted to Float32, and the norm call was added by @andreasnoack in JuliaLang/julia#5652, at which point he changed norm(::Rational) to produce a floating-point result. However, the norm(::Rational) method was subsequently changed back to produce a rational result, at which point this bug was introduced.
A simple fix would be to add a float call here (and in other functions that use this promotion scheme).
The text was updated successfully, but these errors were encountered:
As pointed out on discourse, the
eigvals
functions and a number of other linalg functions are incorrectly promoting rationals toFloat32
rather thanFloat64
.They are calling
promote_type(Float32, typeof(one(T)/norm(one(T))))
. TheFloat32
was added by @andreasnoack in JuliaLang/julia#5526 to ensure thatFloat16
data was promoted toFloat32
, and thenorm
call was added by @andreasnoack in JuliaLang/julia#5652, at which point he changednorm(::Rational)
to produce a floating-point result. However, thenorm(::Rational)
method was subsequently changed back to produce a rational result, at which point this bug was introduced.A simple fix would be to add a
float
call here (and in other functions that use this promotion scheme).The text was updated successfully, but these errors were encountered: