With warnings enabled, Fortran gives an error if the argument of an exp is below ~-500, when getting close to 0. This is triggered in h exp(−(x-a₁)²/(2a₂²)−(y-b₁)²/(2b₂²))-(z-c)=0
Captured the exception by setting h exp(−(x-a₁)²/(2a₂²)−(y-b₁)²/(2b₂²)) = 0 if −(x-a₁)²/(2a₂²)−(y-b₁)²/(2b₂²) <= -50
With warnings enabled, Fortran gives an error if the argument of an exp is below ~-500, when getting close to 0. This is triggered in
h exp(−(x-a₁)²/(2a₂²)−(y-b₁)²/(2b₂²))-(z-c)=0
Captured the exception by setting
h exp(−(x-a₁)²/(2a₂²)−(y-b₁)²/(2b₂²)) = 0
if−(x-a₁)²/(2a₂²)−(y-b₁)²/(2b₂²) <= -50