From martin.becker at mx.uni-saarland.de  Mon Jul 27 12:41:42 2009
From: martin.becker at mx.uni-saarland.de (Martin Becker)
Date: Mon, 27 Jul 2009 12:41:42 +0200
Subject: [Rd] how to change FPU control word?
Message-ID: <4A6D8466.6000603@mx.uni-saarland.de>

Dear developers,

is there (already) a platform-independent way for (temporarily!) 
changing the fpu control word?
More precisely: I am looking for functions (accessible from C code in R 
packages) which read and write the fpu control word on x86 cpus (and 
cause no harm otherwise), because I need to (temporarily) turn off 
internal 80-bit precision for some algorithms relying on 64-bit IEEE 
arithmetics. Currently, I am using inline assembler (which works for x86 
cpus on Linux and Windows (MinGW)), but I am not sure what happens for 
other cpus/OSs (and I am not able to check this). I hope, there is 
already a better solution.
Any hints appreciated!

Thanks,
  Martin

-- 
Dr. Martin Becker
Statistics and Econometrics
Saarland University
Campus C3 1, Room 206
66123 Saarbruecken
Germany



[Rd] how to change FPU control word?
Martin Becker