diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2009-10-24 10:06:03 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2009-10-24 10:06:03 +0000 |
commit | c9d1a10456f34e37db6d24d68d38df541e8b77ba (patch) | |
tree | 3945efb6df120be7f60f1e70a32d87e5894e7de7 /lib | |
parent | 593d1651ef4c42769036980a070d6a01e7897bf4 (diff) |
document log2() and log2f(); from thomas pfaff
ok otto millert martynas
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libm/Makefile | 7 | ||||
-rw-r--r-- | lib/libm/man/exp.3 | 20 |
2 files changed, 22 insertions, 5 deletions
diff --git a/lib/libm/Makefile b/lib/libm/Makefile index cbd7c5a80a8..3b810a5ff39 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.70 2009/07/29 18:43:28 martynas Exp $ +# $OpenBSD: Makefile,v 1.71 2009/10/24 10:06:02 jmc Exp $ # $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $ # # @(#)Makefile 5.1beta 93/09/24 @@ -169,8 +169,8 @@ MAN+= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \ copysign.3 ilogb.3 nextafter.3 scalbn.3 MLINKS+=erf.3 erfc.3 -MLINKS+=exp.3 exp2.3 exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 \ - exp.3 pow.3 +MLINKS+=exp.3 exp2.3 exp.3 expm1.3 exp.3 log.3 exp.3 log2.3 \ + exp.3 log10.3 exp.3 log1p.3 exp.3 pow.3 MLINKS+=hypot.3 cabs.3 MLINKS+=scalbn.3 scalbln.3 MLINKS+=logb.3 scalb.3 @@ -200,6 +200,7 @@ MLINKS+=exp.3 exp2f.3 MLINKS+=exp.3 expm1f.3 MLINKS+=exp.3 log10f.3 MLINKS+=exp.3 log1pf.3 +MLINKS+=exp.3 log2f.3 MLINKS+=exp.3 logf.3 MLINKS+=exp.3 powf.3 MLINKS+=fabs.3 fabsf.3 diff --git a/lib/libm/man/exp.3 b/lib/libm/man/exp.3 index 37ce6a054c3..119d2d4987d 100644 --- a/lib/libm/man/exp.3 +++ b/lib/libm/man/exp.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: exp.3,v 1.20 2008/12/12 00:10:26 martynas Exp $ +.\" $OpenBSD: exp.3,v 1.21 2009/10/24 10:06:02 jmc Exp $ .\" .\" Copyright (c) 1985, 1991 Regents of the University of California. .\" All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91 .\" -.Dd $Mdocdate: December 12 2008 $ +.Dd $Mdocdate: October 24 2009 $ .Dt EXP 3 .Os .Sh NAME @@ -42,6 +42,8 @@ .Nm expm1f , .Nm log , .Nm logf , +.Nm log2 , +.Nm log2f , .Nm log10 , .Nm log10f , .Nm log1p , @@ -70,6 +72,10 @@ .Ft float .Fn logf "float x" .Ft double +.Fn log2 "double x" +.Ft float +.Fn log2f "float x" +.Ft double .Fn log10 "double x" .Ft float .Fn log10f "float x" @@ -135,6 +141,16 @@ function is a single precision version of .Fn log10 . .Pp The +.Fn log2 +function computes the value of the logarithm of argument +.Fa x +to base 2. +The +.Fn log2f +function is a single precision version of +.Fn log2 . +.Pp +The .Fn log1p function computes the value of log(1+x) accurately even for tiny argument |