Subject: standards/30800: log2() family of functions
To: None <standards-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Rui Paulo <rpaulo@NetBSD.org>
List: netbsd-bugs
Date: 07/21/2005 12:36:01
>Number:         30800
>Category:       standards
>Synopsis:       log2() family of functions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    standards-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 21 12:36:01 +0000 2005
>Originator:     Rui Paulo
>Release:        NetBSD 3.99.7
>Organization:
>Environment:
System: NetBSD proton.internal.fnop.net 3.99.7 NetBSD 3.99.7 (proton) #3: Wed Jul 20 00:16:14 WEST 2005 rpaulo@proton.internal.fnop.net:/home/rpaulo/netbsd/obj-head/sys/arch/i386/compile/proton i386
Architecture: i386
Machine: i386
>Description:
As you know, you can compute log_2(x) by: log(x) / log(2).
However, log2*() seems to be a required function for C99. FreeBSD doesn't
support this function at the time of the writing, but there is an open
PR at http://www.freebsd.org/cgi/query-pr.cgi?pr=83845.

I don't know if we can use the patch in that PR since it comes from SunSoft.

I think the NetBSD libc misses some C99 functions so we aren't fully
C99-compliant, but this can be a start.

http://www.opengroup.org/onlinepubs/009695399/functions/log2.html
>How-To-Repeat:
>Fix: