Mail Archives: djgpp/1996/02/11/08:06:36
On Sat, 10 Feb 1996, Orlando Andico wrote:
> I have a program which calculates arc-cosines. Under DJGPP and GCC
> (Linux), the program runs properly and calculates the correct final
> result. However, compiling the program under Turbo C++ (3.0) results in a
> floating point domain error. Why is this so? Any ideas would be appreciated.
The two environments set up the x87 control word differently, so some
errors might go undetected in one of them, but not in the other. Also,
the default math functions in DJGPP don't check for domain errors (and
thus might bomb your program); use the libm.a (add -lm to the link
command line) to get better functions.
- Raw text -