修改函数

This commit is contained in:
misaki 2025-04-18 09:00:46 +08:00
parent f36c8a3673
commit 9bdcc93fa3

19
Fortran/FUNC_sign.f90 Normal file
View File

@ -0,0 +1,19 @@
!
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