SUB_WAVELET/Fortran/FUNC_sign.f90
2025-04-18 09:00:46 +08:00

19 lines
310 B
Fortran

!符号函数
real*8 function FUNC_sign(A)
implicit none
real*8 :: A
if(isnan(A)) then
FUNC_sign = A
elseif(A>0) then
FUNC_sign = 1.0
elseif(A<0) then
FUNC_sign = -1.0
elseif(A==0) then
FUNC_sign = 0.0
end if
end function