delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/12/13/13:57:35

From: gpk AT physics DOT att DOT com
Date: Sun, 13 Dec 92 13:05:34 EST
Original-From: physics!gpk (Greg Kochanski)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Tanh()

Yes, tanh() is broken.  It is trivially fixable, as the code is in C,
and the error is truly blatant.  For the nonmathematical,
tanh(x)=(exp(x)-exp(-x))/(exp(x)+exp(-x)).
It is an isolated error which I accidentally introduced when I submitted
improved hyperbolic trig functions.  After you've fixed it and recompiled,
update .../lib/libm.a as follows:
ar dv libm.a __.SYMDEF
ar rv libm.a tanh.o
ar s libm.a

--Greg Kochanski
gpk AT physics DOT att DOT com  AT&T Physics Research -- Physics for Fun and Profit

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019