[Rd] floating point control on windows

From: Chris Paulse <cpaulse_at_aecom.yu.edu>
Date: Mon 29 Aug 2005 - 14:52:16 GMT


I'm sure that this question has come up many times before. When I load an R extension dll I've built with the Microsoft compiler, I get the warning:  

Warning message:

DLL attempted to change FPU control word from 8001f to 9001f  

So, what I did to try to fix the problem (to my knowledge, Microsoft will not support compile time switching of floating point control until version 8.0 of their compiler - see: http://blogs.msdn.com/ericflee) was to place the following statement inside R_init_mylib:    

_controlfp(_MCW_PC, _PC_64); // use extended precision for operations in x87
This didn't fix my problem. I ended up sprinkling these liberally throughout my code, but that didn't help. One thing I do like about the Microsoft compiler is the debugging facility. But, I'll definitely switch to gcc if this is necessary to get rid of the problem.  


Chris Paulse    

        [[alternative HTML version deleted]]

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Aug 30 00:59:37 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:19 GMT