log.3 (216211) | log.3 (251292) |
---|---|
1.\" Copyright (c) 2008-2010 David Schultz <das@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" | 1.\" Copyright (c) 2008-2010 David Schultz <das@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" |
25.\" $FreeBSD: head/lib/msun/man/log.3 216211 2010-12-05 22:11:22Z das $ | 25.\" $FreeBSD: head/lib/msun/man/log.3 251292 2013-06-03 09:14:31Z das $ |
26.\" | 26.\" |
27.Dd December 5, 2010 | 27.Dd June 3, 2013 |
28.Dt LOG 3 29.Os 30.Sh NAME 31.Nm log , 32.Nm logf , 33.Nm logl , 34.Nm log10 , 35.Nm log10f , | 28.Dt LOG 3 29.Os 30.Sh NAME 31.Nm log , 32.Nm logf , 33.Nm logl , 34.Nm log10 , 35.Nm log10f , |
36.Nm log10l , |
|
36.Nm log2 , 37.Nm log2f , | 37.Nm log2 , 38.Nm log2f , |
39.Nm log2l , |
|
38.Nm log1p , | 40.Nm log1p , |
39.Nm log1pf | 41.Nm log1pf , 42.Nm log1pl |
40.Nd logarithm functions 41.Sh LIBRARY 42.Lb libm 43.Sh SYNOPSIS 44.In math.h 45.Ft double 46.Fn log "double x" 47.Ft float 48.Fn logf "float x" | 43.Nd logarithm functions 44.Sh LIBRARY 45.Lb libm 46.Sh SYNOPSIS 47.In math.h 48.Ft double 49.Fn log "double x" 50.Ft float 51.Fn logf "float x" |
52.Ft long double 53.Fn logl "long double x" |
|
49.Ft double 50.Fn log10 "double x" 51.Ft float 52.Fn log10f "float x" | 54.Ft double 55.Fn log10 "double x" 56.Ft float 57.Fn log10f "float x" |
58.Ft long double 59.Fn log10l "long double x" |
|
53.Ft double 54.Fn log2 "double x" 55.Ft float 56.Fn log2f "float x" | 60.Ft double 61.Fn log2 "double x" 62.Ft float 63.Fn log2f "float x" |
64.Ft long double 65.Fn log2l "long double x" |
|
57.Ft double 58.Fn log1p "double x" 59.Ft float 60.Fn log1pf "float x" | 66.Ft double 67.Fn log1p "double x" 68.Ft float 69.Fn log1pf "float x" |
70.Ft long double 71.Fn log1pl "long double x" |
|
61.Sh DESCRIPTION 62The | 72.Sh DESCRIPTION 73The |
63.Fn log | 74.Fn log , 75.Fn logf , |
64and | 76and |
65.Fn logf | 77.Fn logl |
66functions compute the natural logarithm of 67.Fa x . 68.Pp 69The | 78functions compute the natural logarithm of 79.Fa x . 80.Pp 81The |
70.Fn log10 | 82.Fn log10 , 83.Fn log10f , |
71and | 84and |
72.Fn log10f | 85.Fn log10l |
73functions compute the logarithm base 10 of 74.Fa x , 75while | 86functions compute the logarithm base 10 of 87.Fa x , 88while |
76.Fn log2 | 89.Fn log2 , 90.Fn log2f , |
77and | 91and |
78.Fn log2f | 92.Fn log2l |
79compute the logarithm base 2 of 80.Fa x . 81.Pp 82The | 93compute the logarithm base 2 of 94.Fa x . 95.Pp 96The |
83.Fn log1p | 97.Fn log1p , 98.Fn log1pf , |
84and | 99and |
85.Fn log1pf | 100.Fn log1pl |
86functions compute the natural logarithm of 87.No "1 + x" . 88Computing the natural logarithm as 89.Li log1p(x) 90is more accurate than computing it as 91.Li log(1 + x) 92when 93.Fa x --- 8 unchanged lines hidden (view full) --- 102.Xr exp 3 , 103.Xr ilogb 3 , 104.Xr math 3 , 105.Xr pow 3 106.Sh STANDARDS 107The 108.Fn log , 109.Fn logf , | 101functions compute the natural logarithm of 102.No "1 + x" . 103Computing the natural logarithm as 104.Li log1p(x) 105is more accurate than computing it as 106.Li log(1 + x) 107when 108.Fa x --- 8 unchanged lines hidden (view full) --- 117.Xr exp 3 , 118.Xr ilogb 3 , 119.Xr math 3 , 120.Xr pow 3 121.Sh STANDARDS 122The 123.Fn log , 124.Fn logf , |
125.Fn logl , |
|
110.Fn log10 , 111.Fn log10f , | 126.Fn log10 , 127.Fn log10f , |
128.Fn log10l , |
|
112.Fn log2 , 113.Fn log2f , | 129.Fn log2 , 130.Fn log2f , |
131.Fn log2l , |
|
114.Fn log1p , | 132.Fn log1p , |
133.Fn log1pf , |
|
115and | 134and |
116.Fn log1pf | 135.Fn log1pl |
117functions conform to 118.St -isoC-99 . | 136functions conform to 137.St -isoC-99 . |