2 log - base 10 logarithm
8 x nonzero real or complex
9 eps nonzero real, defaults to epsilon()
11 return real or complex
14 Approximate the base 10 logarithm function of x by a multiple of
15 epsilon, the error having absolute value less than 0.75 * eps.
16 If n is a positive integer, log(x, 10^-n) will usually be correct
17 to the n-th decimal place.
20 ; print log(10), log(100), log(1e10), log(1e500)
23 ; print log(128), log(23209), log(2^17-19)
24 ~2.10720996964786836649 ~4.36565642852838930424 ~5.11744696704937330414
26 ; print log(2+3i, 1e-5)
27 ~0.55696845725899964822+~0.42681936428109216144i
34 NUMBER *qlog(NUMBER *x, NUMBER *eps)
35 COMPLEX *c_log(COMPLEX *x, NUMBER *eps)
40 ## Copyright (C) 2006 Landon Curt Noll
42 ## Calc is open software; you can redistribute it and/or modify it under
43 ## the terms of the version 2.1 of the GNU Lesser General Public License
44 ## as published by the Free Software Foundation.
46 ## Calc is distributed in the hope that it will be useful, but WITHOUT
47 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
48 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
49 ## Public License for more details.
51 ## A copy of version 2.1 of the GNU Lesser General Public License is
52 ## distributed with calc under the filename COPYING-LGPL. You should have
53 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
54 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
56 ## @(#) $Revision: 30.1 $
57 ## @(#) $Id: log,v 30.1 2007/03/16 11:10:42 chongo Exp $
58 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/log,v $
60 ## Under source code control: 2006/05/06 23:56:04
61 ## File existed as early as: 2006
63 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
64 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/