[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Same .m file: different results with different versions of Octave
From: |
perseu.as |
Subject: |
Re: Same .m file: different results with different versions of Octave |
Date: |
Sat, 17 Apr 2010 10:31:22 -0800 (PST) |
Judd Storrs-2 wrote:
>
> I suspect you are correct that tanh seems to be broken in octave. What
> I see is that the Z() function is always returning NaN and the NaN
> come from the tanh(). The problem can be reproduced with octave I have
> on my machine (Octave 3.0.5, 3.2.3, 3.3.51+, Ubuntu 9.10 64-bit)
>
>> tanh(50000+50000i)
> NaN
>
> But in Matlab:
>
>> tanh(50000+50000i)
> 1
>
> I suspect that you're seeing differences in the C math libraries
> between the machines. This may be a bug in libc related to these
> (supposedly fixed) bugs from 2005
>
> FWIW the sample code testing libc fails on my machine. Perhaps it's
> time to file a bug report.
>
> --judd
>
Following your hint these are my tests:
# Created by Octave 3.0.1 (Debian Lenny 5.04) libc6 2.7-18lenny2
n = (50000+50000i);
s = sinh(n) => (-Inf - Inf i)
c = cosh(n) => (-Inf - Inf i)
r = s/c => (NaN - NaN i)
tanh(n) => 0
# Created by Octave 3.2.4 (compiled on Debian Lenny 5.04) libc6 2.7-18lenny2
n = (50000+50000i);
s = sinh(n) => (-Inf - Inf i)
c = cosh(n) => (-Inf - Inf i)
r = s/c => (NaN - NaN i)
tanh(n) => 0
# Created by Octave 3.2.3 (Windows XP)
n = (50000 + 50000i);
s = sinh(n) => (-Inf - Inf i)
c = cosh(n) => (-Inf - Inf i)
r = s/c => (NaN - NaN i)
tanh(n) => 1
# Created by Octave 3.0.5 (CentO 5.4 64 bits) glibc-2.5-42.el5_4.3
n = (50000+50000i);
s = sinh(n) => (-Inf - Inf i)
c = cosh(n) => (-Inf - Inf i)
r = s/c => (NaN - NaN i)
tanh(n) => NaN
Different results from each system.
Do you suggest that I file a bug report to Octave or Linux distros?
--
View this message in context:
http://n4.nabble.com/Same-m-file-different-results-with-different-versions-of-Octave-tp2013296p2014350.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Same .m file: different results with different versions of Octave, Perseu, 2010/04/16
- Re: Same .m file: different results with different versions of Octave, Judd Storrs, 2010/04/16
- Re: Same .m file: different results with different versions of Octave, perseu.as, 2010/04/16
- Re: Same .m file: different results with different versions of Octave, Judd Storrs, 2010/04/16
- Re: Same .m file: different results with different versions of Octave, perseu.as, 2010/04/16
- Re: Same .m file: different results with different versions of Octave, Judd Storrs, 2010/04/17
- Re: Same .m file: different results with different versions of Octave,
perseu.as <=
- Re: Same .m file: different results with different versions of Octave, Thomas D. Dean, 2010/04/17
- Re: Same .m file: different results with different versions of Octave, Judd Storrs, 2010/04/18
- Re: Same .m file: different results with different versions of Octave, Thomas D. Dean, 2010/04/18
- Re: Same .m file: different results with different versions of Octave, perseu.as, 2010/04/18
- Re: Same .m file: different results with different versions of Octave, John W. Eaton, 2010/04/18
- Re: Same .m file: different results with different versions of Octave, Judd Storrs, 2010/04/18
- Re: Same .m file: different results with different versions of Octave, Jaroslav Hajek, 2010/04/19
- Re: Same .m file: different results with different versions of Octave, Judd Storrs, 2010/04/19
- Re: Same .m file: different results with different versions of Octave, Jaroslav Hajek, 2010/04/19
- Re: Same .m file: different results with different versions of Octave, John W. Eaton, 2010/04/18