* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <fpu_control.h>
#include <fenv.h>
/* Change floating point precision to double (64-bit) from
* the extended (80-bit) Linux default. */
void setDoublePrecision() {
fpu_control_t cw;
fenv_t fenv;
_FPU_GETCW(cw);
fegetenv(&fenv);
cw &= ~_FPU_EXTENDED;
fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */
cw |= _FPU_DOUBLE;
fenv.__control_word |= 0x200; /* _FPU_DOUBLE */
_FPU_SETCW(cw);
fesetenv(&fenv);
}
void initialisePlatform() {
#ifdef __linux__
#endif
/* Change the x87 FPU precision to double (64-bit) from the extended
(80-bit) Linux default. Note, unlike on i386, my testcases pass
fenv.__control_word &= ~0x300; /*_FPU_EXTENDED */
fenv.__control_word |= 0x200; /*_FPU_DOUBLE */