Skip to content
11 changes: 10 additions & 1 deletion SRC/clartg.f90
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ subroutine CLARTG( f, g, c, s, r )
d = sqrt( f2 )*sqrt( h2 )
end if
p = 1 / d
c = f2*p
if( f2 > safmin * g2 ) then
c = 1 / sqrt( one + g2/f2 )
else
c = f2*p
end if
s = conjg( g )*( f*p )
r = f*( h2*p )
else
Expand Down Expand Up @@ -224,6 +228,11 @@ subroutine CLARTG( f, g, c, s, r )
d = sqrt( f2 )*sqrt( h2 )
end if
p = 1 / d
if( f2 > safmin * g2 ) then
c = (1 / sqrt( one + g2/f2 )) * w
else
c = ( f2*p )*w
end if
c = ( f2*p )*w
Copy link
Contributor

@langou langou Oct 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weslleyspereira: I think you want to remove line 236.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I forgot it. Thanks!

s = conjg( gs )*( fs*p )
r = ( fs*( h2*p ) )*u
Expand Down