"division: function singularity" in libjava/java/lang/e_log.c:107
Andrew Haley
aph@cambridge.redhat.com
Thu Jan 31 04:47:00 GMT 2002
Tom Tromey writes:
> >>>>> "Christian" == Christian Joensson <c.christian.joensson@telia.com> writes:
>
> Christian> When looking through the testresults in
> Christian> http://gcc.gnu.org/ml/gcc-testresults/2002-02/msg00363.html
> Christian> I see a strange warning "division: function singularity".
>
> I never saw a reply to this.
>
> Christian> ../../../libjava/java/lang/e_log.c: In function `__ieee754_log':
> Christian> ../../../libjava/java/lang/e_log.c:107: warning: division: function singularity
> Christian> Is this a serious warning?
It's this line:
if (hx<0) return (x-x)/zero; /* log(-#) = NaN */
In other words, the code is deliberately returning NaN for log of a
negative number. The compiler is complaining about correct code.
Andrew.
More information about the Java
mailing list