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 13:57:17 -0400

On Wed, Apr 21, 2010 at 8:43 AM, Thomas D. Dean <address@hidden> wrote:
>        t = sinh(arg)/cosh(arg);

The problem here is that this represents a complex division.

(a + bi)/(c + di) = [ (ac+bd) + (bc-ad)i ]/(c^2 + d^2)

The problems are the ac+bd and bc-ad parts. If ac ~ -bd or bc ~ ad
then the additions and subtractions will lose many digits of
precision. The idea is that if you work out the real and imaginary
components mathematically, you can formulate an expression that is
equivalent but will have nearly full (if not full) precision in those
cases.


--judd



reply via email to

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