delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq089.html   search  

| Previous | Next | Up | Top |

11.5 Numeric exceptions--sometimes

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.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

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