2 tanh - hyperbolic tangent
9 eps nonzero real, defaults to epsilon()
14 Calculate the tanh of x to the nearest or next to nearest multiple of
15 epsilon, with absolute error less than .75 * abs(eps).
17 tanh(x) = (exp(2*x) - 1)/(exp(2*x) + 1)
20 ; print tanh(1, 1e-5), tanh(1, 1e-10), tanh(1, 1e-15), tanh(1, 1e-20)
21 .76159 .761594156 .761594155955765 .76159415595576488812
24 unlike sin and cos, x must be real
28 NUMBER *qtanh(NUMBER *x, NUMBER *eps)
31 sinh, cosh, sech, csch, coth, epsilon
33 ## Copyright (C) 1999 Landon Curt Noll
35 ## Calc is open software; you can redistribute it and/or modify it under
36 ## the terms of the version 2.1 of the GNU Lesser General Public License
37 ## as published by the Free Software Foundation.
39 ## Calc is distributed in the hope that it will be useful, but WITHOUT
40 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
41 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
42 ## Public License for more details.
44 ## A copy of version 2.1 of the GNU Lesser General Public License is
45 ## distributed with calc under the filename COPYING-LGPL. You should have
46 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
47 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
49 ## @(#) $Revision: 30.1 $
50 ## @(#) $Id: tanh,v 30.1 2007/03/16 11:10:42 chongo Exp $
51 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/tanh,v $
53 ## Under source code control: 1994/03/19 01:40:30
54 ## File existed as early as: 1994
56 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
57 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/