help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Same .m file: different results with different versions of Octave


From: Judd Storrs
Subject: Re: Same .m file: different results with different versions of Octave
Date: Mon, 19 Apr 2010 03:20:17 -0400

On Mon, Apr 19, 2010 at 3:11 AM, Jaroslav Hajek <address@hidden> wrote:
> One minor drawback I can immediately see is that these formulas don't
> always reduce to plain tanh (R) when I = 0. Indeed, the result may be
> a bit off even for small numbers:
>
> octave:1> tanh(complex(1,0)) - tanh(1)
> ans = 0
> octave:2> testgsltanh(complex(1,0)) - tanh(1)
> ans =  1.1102e-16

Isn't that less than machine precision:

> tanh(1)*eps
ans =  1.6911e-16

The result isn't complex. [since sin(0) is 0].


--judd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]