| Previous | Next | Up | Top |
Q: I have a program which works with FP emulation, but dies with "Numeric Exception" when run on a machine with a co-processor. It also runs OK when compiled with Microsoft C.
Can't you people make your floating-point code right?
A: This might be still a problem with your program. Under DJGPP, the 80x87 control word is set up so that it generates an exception when your program feeds it with a
NaN ("Not a Number"), while the emulator doesn't have this behavior. You should make sure that your program doesn't generate NaNs, or set the 80x87 control word to a different value. A
library function called _control87
can be used from within a program to set the coprocessor to a non-default state.

You can help support this site by
visiting the advertisers that sponsor it! (only once each, though)