This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: return value of log()


On Wed, Mar 07, 2001 at 07:10:53PM +0900, Kenta MURATA wrote:
> Hi there,
> 
> I can't understand that log(x) returns -HUGE_VAL if x < 0.
> Becaus, IEEE definition returns NaN.
> 
> Why adopt this implementation?

In the newlib sources I found:

  /* Check for domain error here. */
  if (x <= 0.0)
    {
      errno = ERANGE;
      return (z_notanum.d);
    }

and AFAICS z_notanum is different from -HUGE_VAL. I suggest asking
in the newlib mailing list mailto:newlib@sources.redhat.com

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]