Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2005 02:10:19 GMT
From:      "Steven G. Kargl" <kargls@comcast.net>
To:        freebsd-standards@FreeBSD.org
Subject:   Re: standards/83845: [ patch ] add log2() and log2f() support for libm
Message-ID:  <200507230210.j6N2AJ2S062457@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR standards/83845; it has been noted by GNATS.

From: "Steven G. Kargl" <kargls@comcast.net>
To: bug-followup@FreeBSD.org,  bogorodskiy@gmail.com
Cc:  
Subject: Re: standards/83845: [ patch ] add log2() and log2f() support for
 libm
Date: Fri, 22 Jul 2005 19:02:15 -0700

 See standards/82654.
 
 I have implementations for several C99 long double math functions,
 and in the process I implemented log2 and logf.  I also wrote or
 edited the man pages.  IMHO, for log2[fl], we want to use frexp[fl]
 to break x into x = f * 2**n where f is in the range [0.5,1).  We
 then have  log2(x) = n + log2(f).  We can now either evaluate log2(f)
 as log(f)/log(2) or directly use a polynomial approximation.
 
 -- 
 steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507230210.j6N2AJ2S062457>