This is the full project under PelleC for the fortran library for the AT&T f2c fortran to C translator.
The only problem is in the module "unint.c", I was bothered to look for the PellesC equivalent, if any exists, of the function:
_control87(EM_DENORMAL | EM_UNDERFLOW | EM_INEXACT, MCW_EM);
If you have time to fix, please do and let me know. :mrgreen:
Something like this will probably work, but I can't see that it will add very much to the party...
void __declspec(naked) __cdecl _update_x87_control_word(void)
{
__asm {
sub esp, 4
fstcw WORD PTR [esp]
or WORD PTR [esp], (0x0002 /*denormal*/)|(0x0010 /*underflow*/)|(0x0020 /*inexact*/);
fldcw WORD PTR [esp]
add esp, 4
ret
}
}