Problems with exp() functions returning NaN and infinity

Sorry, I am not a Windows user, I have no idea if the flags are correct.

If you write a very simple repro case and post it the full code, someone may be able to help.
An error in the math library for exp is highly unlikely.