I am getting the following error:
Unknown floating point exception 90a1
Floating point co-processor fault at address 00418b50 in file.... at line number ...
This is the function I am using:
!+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
FUNCTION Sh_calc(Re,Sc)
!++
END FUNCTION Sh_calc
!****+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++
USE nrtype
USE ProgramOptions,ONLY:TimerOn
USE Timing,ONLY:Sh_calc_timer
USE DerivedTypes,ONLY:timer
! Dummy Variables
REAL(DP),INTENT(IN) :: Re,Sc
REAL(DP) :: Sh_calc
!----+-----------------------------------------------------------------+
! TIMING
IF(TimerOn) CALL CPU_TIME(Sh_calc_timer%t1)
!----+-----------------------------------------------------------------+
! Calculate Sherwood number from the Ranz-Marshall correlation
Sh_calc = 2d0+6d-1SQRT(Re)Sc**33d-2
!----+-----------------------------------------------------------------+
! TIMING
IF(TimerOn)THEN
Sh_calc_timer%calls=Sh_calc_timer%calls+1
CALL CPU_TIME(Sh_calc_timer%t2)
Sh_calc_timer%tot_time=Sh_calc_timer%tot_time+&
(Sh_calc_timer%t2-Sh_calc_timer%t1)
END IF
!**+
I am not sure what is causing this error. Is it because something inside square root is getting negative?