2 ln - logarithm function
8 x nonzero real or complex
9 eps nonzero real, defaults to epsilon()
11 return real or complex
14 Approximate the natural 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, ln(x, 10^-n) will usually be correct
17 to the n-th decimal place.
20 ; print ln(10, 1e-5), ln(10, 1e-10), ln(10, 1e-15), ln(10, 1e-20)
21 2.30259 2.302585093 2.302585092994046 2.30258509299404568402
23 ; print ln(2+3i, 1e-5), ln(2+3i, 1e-10)
24 1.28247+.98279i 1.2824746787+.9827937232i
31 NUMBER *qln(NUMBER *x, NUMBER *eps)
32 COMPLEX *c_ln(COMPLEX *x, NUMBER *eps)
35 exp, acosh, asinh, atanh, log
37 ## Copyright (C) 1999 Landon Curt Noll
39 ## Calc is open software; you can redistribute it and/or modify it under
40 ## the terms of the version 2.1 of the GNU Lesser General Public License
41 ## as published by the Free Software Foundation.
43 ## Calc is distributed in the hope that it will be useful, but WITHOUT
44 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
45 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
46 ## Public License for more details.
48 ## A copy of version 2.1 of the GNU Lesser General Public License is
49 ## distributed with calc under the filename COPYING-LGPL. You should have
50 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
51 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
53 ## @(#) $Revision: 30.1 $
54 ## @(#) $Id: ln,v 30.1 2007/03/16 11:10:42 chongo Exp $
55 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ln,v $
57 ## Under source code control: 1995/10/11 04:41:26
58 ## File existed as early as: 1995
60 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
61 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/