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
The problem seems to be that LinearAlgebra.givensAlgorithm gets stuck in an infinite loop if one of its input arguments is Inf.
Actually dlartg upon which that function is based does the same
Even though the paper upon which the algorithms is based, On Computing Givens Rotations Reliably and Efficiently, states that "On a machine with correct IEEE floating point semantics with NaNs and +-inf, we insist that any standard conforming implementation must terminate and return some output values in all cases as described below.". More details are given in the section Exceptional Cases.
Not sure what the best approach to fix this is.
Should givensAlgorithm be modified?
(Also, the name is a bit confusing, perhaps it should be called something like_givens_rotation?)
Or should the the relevant !rdivand !ldiv be modified by adding something like the following in the beginning of the methods?
ifisinf(shift)
ifall(isfinite, F.data) &&all(isfinite, B)
returnfill!(B, zero(eltype(B)))
elsereturnfill!(B, eltype(B)(NaN))
endend
The text was updated successfully, but these errors were encountered:
olof3
changed the title
rdiv!(B, F::UpperHessenberg; shift::Number) does not return if shift=Inf.
rdiv!(B, F::UpperHessenberg; shift::Number) does not return if shift=Inf
Dec 19, 2019
This issue was mentioned in #31738.
The problem seems to be that
LinearAlgebra.givensAlgorithm
gets stuck in an infinite loop if one of its input arguments isInf
.Actually
dlartg
upon which that function is based does the sameEven though the paper upon which the algorithms is based, On Computing Givens Rotations Reliably and Efficiently, states that "On a machine with correct IEEE floating point semantics with NaNs and +-inf, we insist that any standard conforming implementation must terminate and return some output values in all cases as described below.". More details are given in the section Exceptional Cases.
Not sure what the best approach to fix this is.
Should
givensAlgorithm
be modified?(Also, the name is a bit confusing, perhaps it should be called something like_givens_rotation?)
Or should the the relevant
!rdiv
and!ldiv
be modified by adding something like the following in the beginning of the methods?The text was updated successfully, but these errors were encountered: