also small negative values cause problems
Logic differs from the original formulation now
This commit is contained in:
parent
6b5b0fae22
commit
171a93ca30
|
@ -462,8 +462,8 @@ pure function qu2ro(qu) result(ro)
|
||||||
real(pReal) :: s
|
real(pReal) :: s
|
||||||
real(pReal), parameter :: thr = 1.0e-8_pReal
|
real(pReal), parameter :: thr = 1.0e-8_pReal
|
||||||
|
|
||||||
if (qu(1) < thr) then
|
if (abs(qu(1)) < thr) then
|
||||||
ro = [qu(2), qu(3), qu(4), IEEE_value(ro(4),IEEE_positive_inf)]
|
ro = [qu(2), qu(3), qu(4), IEEE_value(1.0_pReal,IEEE_positive_inf)]
|
||||||
else
|
else
|
||||||
s = norm2(qu(2:4))
|
s = norm2(qu(2:4))
|
||||||
if (s < thr) then
|
if (s < thr) then
|
||||||
|
|
Loading…
Reference in New Issue