add the "diff_sign" function
This commit is contained in:
parent
9c148c3d7e
commit
2d7739dd1d
@ -28,6 +28,25 @@ module mathstuff2
|
||||
|
||||
end subroutine
|
||||
|
||||
! ----------------------------------------------------------------
|
||||
|
||||
logical function diff_sign(a, b)
|
||||
integer, intent(in) :: a, b
|
||||
|
||||
! write(0, *) "diff_sign", a, b
|
||||
if ( (a .lt. 0) .and. (b .ge. 0) ) then
|
||||
diff_sign = .TRUE.
|
||||
return
|
||||
endif
|
||||
if ( (a .ge. 0) .and. (b .lt. 0) ) then
|
||||
diff_sign = .TRUE.
|
||||
return
|
||||
endif
|
||||
diff_sign = .FALSE.
|
||||
|
||||
end function
|
||||
|
||||
|
||||
! ----------------------------------------------------------------
|
||||
end module mathstuff2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user