return value of log()

Tim Prince tprince@computer.org
Wed Mar 7 04:56:00 GMT 2001


The math library adopted by cygwin is part of newlib, an entirely
separate project not even oriented to the same type of usage as cygwin
or even the glibc.  I imagine it may be intended not to depend on
running on targets which implement IEEE standard.  If you're using gcc
or g++, it's easy to supply your own behavior by linking your own
version first, or by supplying an in-line definition.  IIRC, all the
math functions test out fairly well on elefunt, except for asinf/acosf.
I don't know why you would write an app to depend on the NaN behavior;
you would at least have to forgo -ffast-math or supply and use your own
isnan() and take other special precautions to make that work.

----- Original Message -----
From: "Kenta MURATA" <muraken2@nifty.com>
To: "Cygwin ML" <cygwin@cygwin.com>
Sent: Wednesday, March 07, 2001 2:10 AM
Subject: return value of log()


> Hi there,
>
> I can't understand that log(x) returns -HUGE_VAL if x < 0.
> Becaus, IEEE definition returns NaN.
>
> Why adopt this implementation?
>
> --
> Kenta Murata <muraken2@nifty.com>
" http://village.infoweb.ne.jp/~muraken/ "
>
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
>


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list