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

| Previous | Up | Top |

11.8 Floating point exception in libm functions

Q: When I use the ldexp function, my program crashes with SIGFPE. What's wrong?


A: There is a bug in the scaling code in libm.a library released with DJGPP v2.0 which affects several library functions such as ldexp. A work-around is to link without -lm switch; this will cause GCC to use math functions from libc.a. If you need math functions which are only in libm.a, or if you need libm.a for better numerical performance, a patched version of libm is available, courtesy of Tom Demmer. DJGPP v2.01 corrects this bug, so upgrade to that version if you can.


  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)