diff --git a/Modules/mathstuff2.f90 b/Modules/mathstuff2.f90 index 2536ae6..afa6c52 100644 --- a/Modules/mathstuff2.f90 +++ b/Modules/mathstuff2.f90 @@ -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