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: Søren Hauberg
Subject: Re: Same .m file: different results with different versions of Octave
Date: Mon, 19 Apr 2010 00:04:14 -0700

man, 19 04 2010 kl. 08:43 +0200, skrev Jaroslav Hajek:
> On Mon, Apr 19, 2010 at 8:24 AM, Judd Storrs <address@hidden> wrote:
> > On Mon, Apr 19, 2010 at 2:17 AM, Søren Hauberg <address@hidden> wrote:
> >> I am a bit lost in this thread. Has a bug report been filed against
> >> glibc?
> >
> > I haven't filed one because Thomas and Jaroslav have confused me about
> > if this is a problem or where the problem is. Jaroslav says it's
> > probably an optimization problem.
> 
> I already corrected myself. This is most likely a ctanh issue in libc.

The following program:

        #include <math.h>
        #include <complex.h>
        #include <stdio.h>
        #define _GNU_SOURCE
        #include <gnu/libc-version.h>
        
        int main (void)
        {
          double complex arg = 711 + 711 * _Complex_I;
          double complex s, c, r, t;
          s = csinh (arg);
          c = ccosh (arg);
          r = s / c;
          t = ctanh (arg);
          
          printf ("libc version %s\n", gnu_get_libc_version ());
          printf ("libc release %s\n", gnu_get_libc_release ());
          printf ("arg        = %f + %f * i\n", creal (arg), cimag
        (arg));
          printf ("tanh (arg) = %f + %f * i   (should be 1 + 0 * i)\n",
        creal (t), cimag (t));
            
          return 0;
        }

(A C version of a previously posted C++ program) gives me

        libc version 2.10.1
        libc release stable
        arg        = 711.000000 + 711.000000 * i
        tanh (arg) = 0.000000 + 0.000000 * i   (should be 1 + 0 * i)

That pretty much confirms that the bug is in libc, right? Is anything
besides this program needed to submit a bug report against glibc?

Søren




reply via email to

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