You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
514 B
20 lines
514 B
C (C) Copr. 1986-92 Numerical Recipes Software ]2w.1,r1..
|
|
|
|
FUNCTION pvdpythag(a,b)
|
|
implicit none
|
|
include 'lib/TensorReduction/Include/types.f'
|
|
real(dp):: a,b,pvdpythag
|
|
real(dp):: absa,absb
|
|
absa=abs(a)
|
|
absb=abs(b)
|
|
if(absa.gt.absb)then
|
|
pvdpythag=absa*sqrt(1._dp+(absb/absa)**2)
|
|
else
|
|
if(absb.eq.0._dp)then
|
|
pvdpythag=0._dp
|
|
else
|
|
pvdpythag=absb*sqrt(1._dp+(absa/absb)**2)
|
|
endif
|
|
endif
|
|
return
|
|
END
|