MathGroup Archive 1991

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Bug in Tanh[x]

  • To: Barry Merriman <barry at math.ucla.edu>
  • Subject: Re: Bug in Tanh[x]
  • From: ags at seaman.cc.purdue.edu (Dave Seaman)
  • Date: Fri, 01 Mar 91 15:35:53 -0800
  • Cc: mathgroup at yoda.ncsa.uiuc.edu
  • In-reply-to: Your message of Wed, 27 Feb 91 19:07:15 -0800. <9103010544.AA15552@yoda.ncsa.uiuc.edu>

	Someone must have found this bug previously, but there is
	a nasty bug in Tanh[x] (in version 1.* on a NeXT).
	
	Just try 
	
	Plot[Tanh[x],{x,-3,3}]
	
	to _see_ what I mean. (I always though tanh(x) was continuous :-)
	
	Fortunately, its easy to write your own "tanh[x]":
	
	tanh[x_] := (Exp[x] - Exp[-x])/(Exp[x] + Exp[-x])
	
	which works fine.
	
	NeXT 1.2 (Januuary 20, 1990) 
	
I tried this using Mathematica 1.2 on a NeXT (under 1.0) and I see no problem.
The two plots are identical (both nicely continuous).

Dave Seaman



  • Next by Date: Re: A few questions
  • Next by thread: Re: A few questions