From tlumley at u.washington.edu  Fri Apr  8 00:16:32 2005
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Fri Apr  8 00:17:48 2005
Subject: [Rd] complex tangent (PR#7781)
In-Reply-To: <20050407214108.A4A5FCA4D@slim.kubism.ku.dk>
References: <20050407214108.A4A5FCA4D@slim.kubism.ku.dk>
Message-ID: <Pine.A41.4.61b.0504071510080.346778@homer12.u.washington.edu>


On Thu, 7 Apr 2005 pfortini@wyeth.com wrote:
>
> static void z_tan(Rcomplex *r, Rcomplex *z)
> {
>    double x2, y2, den;
>    x2 = 2.0 * z->r;
>    y2 = 2.0 * z->i;
>    den = cos(x2) + cosh(y2);
>    r->r = sin(x2)/den;
>    /* any limit above about log(DBL_EPSILON) will do */
>    if (fabs(r->i) < 40.0)

You need z->i (or y2) here, r->i hasn't been initialized yet. Otherwise, 
yes.


 	-thomas


[Rd] complex tangent (PR#7781)
Thomas Lumley