Open ajm143 opened 2 years ago
From a quick look at the line in the code, I can see that there are possibilities for an arithmetic error - it could be divide by zero, or root of a negative numbers (signed zero?). Do we have a view on the intrinsic sqrt vs **0.5_dp. I would have assumed the intrinsic would be faster (although a optimising compiler might replace the power with the intrinsic). But I was wondering if the error message from the intrinsic might be nicer?
I think the intrinsic would be nicer.
I flagged it because, when I get a minute, I also want to check the maths/algorithm behind it i.e. should the function go to Infinity / NaN etc... Sure I can make the code compile and run by setting the -ieee flag, but I'd like to check that's ok.
Describe the bug Arithmetic error in calculating refraction for a metal
To Reproduce Use NAG compiler on
testopt_optics_drude
without-ieee=full
flagExpected behavior Unclear. I'd like to check what sort of error it is, NaN or Infinity, and check that that's expected behaviour.
Screenshots
Desktop (please complete the following information):