Skip to content
Prev 17373 / 63421 Next

floating point control on windows

Thanks for the guidance.

Using the following code fixed my problem:

#ifdef _WIN32
BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
					 )
{
	if (ul_reason_for_call == DLL_PROCESS_ATTACH)
	{
		Rwin_fpset();
	}

    return TRUE;
}
#endif

-----Original Message-----
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] 
Sent: Monday, August 29, 2005 10:53 AM
To: Chris Paulse
Cc: r-devel at r-project.org
Subject: Re: [Rd] floating point control on windows

We recommend calling Rwin_fpset() which is exported by R.dll and is known
to do the trick.  As it contains

     _controlfp(_PC_64, _MCW_PC);

it may be that the args you used are incorrect (and I am not on Windows 
to check the docs, but note that is the form used in the URL you cite).
On Mon, 29 Aug 2005, Chris Paulse wrote:

            
R
x87