delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/08/11/09:03:45

Date: Tue 11 Aug 92 08:42:06
From: ronis AT ronis DOT chem DOT mcgill DOT ca (David M. Ronis)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Followup on my pow & hypot comments

  
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 -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019