Mail Archives: djgpp/1992/08/11/09:03:45
I looked at the assembly language code for the pow function (in
$(GNUDIRECTORY)\libsrc\m\src\exp.s). The problem is that it fails to
test for the condition x<0 , y integral or not-integral. As you know
the result is complex and hence not defined for real return values
when y is non-integral. In MSDOS, the result is defined as zero in
this case, and an error condition is set. What happens in GCC is
unclear. To fix this requires a small rewrite of this code. The fix
should not be hard and the compiler includes an assembler. I have to
dig through my 80386/80486 programming guide in order to find out
what to do. The hypot function seems to be working fine in the
version of the compiler I have now (I tested it).
- Raw text -