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: Wed, 21 Apr 2010 19:16:39 -0400

On Wed, Apr 21, 2010 at 7:04 PM, Thomas D. Dean <address@hidden> wrote:
> So, using real valued functions, den cannot be zero, I believe.

The naming convention used in the file is confusing, but we kept it
for consistency. The use "x" to mean the real part of "x" and "ix" to
mean the imaginary part of x. :)

In other words if x = a + b*i then

sinhx = sinh(a)
cosix = cos(b)

So

den = (sinhx*sinhx + cosix*cosix);

is zero when both sinhx and cosix are zero.

sinhx is zero for a==0.
cosix is zero for pi/2 + n*pi

On the other hand, pi is transcendental and can't be represented as
floats. But in theory, since they are squared, both could underflow
after squaring (i.e. become closer to zero than the closest floating
point number that is not zero and be rounded/truncated to zero).


--judd


reply via email to

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