Ajout du code pour initialiser les flottants IEEE.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@487 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 1995-11-28 15:09:20 +00:00
parent 52744a80c3
commit 07efd83d7f
1 changed files with 21 additions and 0 deletions

View File

@ -166,7 +166,26 @@ void do_test()
INTTEST(r[96], (f >= g));
}
#ifdef __i386__
#ifdef __linux__
#include <i386/fpu_control.h>
#endif
#ifdef __FreeBSD__
#include <floatingpoint.h>
#endif
#endif
void init_ieee_floats()
{
#ifdef __i386__
#ifdef __linux__
__setfpucw(_FPU_IEEE);
#endif
#ifdef __FreeBSD__
fpsetmask(0);
#endif
#endif
}
int main(argc, argv)
int argc;
@ -174,6 +193,8 @@ int main(argc, argv)
{
double weird[4];
init_ieee_floats();
if (argc >= 5) {
x = atoi(argv[1]);
y = atoi(argv[2]);