Skip to content

Commit

Permalink
Update slam_randomNumber.f90
Browse files Browse the repository at this point in the history
The if clause in line 216 doesn't work with the current ifx compiler as it doesn't necessarily check the if statements sequentially and stops after finding the first untrue argument. These if arguments have to be separated as is done within this change.
  • Loading branch information
manschub authored Jan 9, 2025
1 parent a6afc50 commit cfdd70c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/math/slam_randomNumber.f90
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,12 @@ real(dp) function getRandomNumber(iopt, xmean, xsigma)
else if(iopt == RANDOM_NORMAL .or. iopt == RANDOM_LOG_NORMAL) then

!** check if there is already a number available
if(isOtherNumber(iopt) .and. (xmean_prev == xmean) .and. (xsigma_prev == xsigma)) then
if(isOtherNumber(iopt)) then
if ((xmean_prev == xmean) .and. (xsigma_prev == xsigma)) then

getRandomNumber = otherNumber(iopt)
isOtherNumber(iopt) = .false.
getRandomNumber = otherNumber(iopt)
isOtherNumber(iopt) = .false.
end if

else !** generate two new numbers

Expand Down

0 comments on commit cfdd70c

Please sign in to comment.