Please investigate a potential divide by 0 is ignored by Intel C++ compiler ( v13.x / W5 level of warnings / no warning or remark displayed ). I've done a verification with Microsoft C++ compiler and it reports:
double dX = 1.0L;
double dResult = (-dX + dX )/(-dX + dX );
..\Common\PrtTests.cpp(21076) : warning C4723: potential divide by 0
Thanks in advance.
In the event that the compiler (version you have) is faulty and returns 0.0 as opposed to NaN, then try using "volatile double dX = 1.0L;"
IOW force the compiler to generate code to perform the calculation (as opposed to having the optimization pre-compute the result).