Normcdf and use_dll on 64-bit


If you try to run a model file containing “normcdf” with the “use_dll” option and the MSVC compiler, Dynare complains that:

“normcdf() function is not supported with USE_DLL option and MSVC compiler; use Cygwin compiler instead.”

However, on 64-bit you have to use MSVC rather than Cygwin. I’m not sure I really understand where the Cygwin requirement is coming from, as Boost has very accurate normal C.D.F. functions (as do many other libraries).

Fixing this would be a great help.



Hi Tom,

using Boost would imply that the user has to provide it, in addition to MSVC, and that the location of the BOOST library is known at the time of compiling the DLL, either passing to Dynare preprocessor or modifying the mexopt.bat file. This puts quite an additional configuration burden on the users. On 32-bit systems, using cygwin in that case, is just simpler. True, it doesn’t solve the problem on 64-bit systems.



You could always just steal the code from Boost, you’re using compatible licenses I think.

Another possibility would be to at least support people who use the combination of ICC and Visual Studio. Even in MS mode ICC has a fully compatible math.h, called tgmath.h.

(If Mex is configured to use ICC and Dynare is configured to use MSVC then ICC does seem both to get used and to work (I think).)