Fortran : sign

program main
implicit none
if (-0.0 == 0.0) write(*,*) "for other manipulations they are indentical "
! don't do such thing for real variables
if (sign(2.0, -0.0) < sign(2.0, 0.0)) write (*,*)"for sign intrinsic procedure they are different"

end program main 
!integer zero wil be taken an positive

猜你喜欢

转载自blog.csdn.net/qq_40436147/article/details/84303194