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

Bug#153022: marked as done (libc6: [libm] exp() in directed rounding modes gives wrong results)



Your message dated Sun, 3 Mar 2013 16:33:45 -0800
with message-id <20130304003345.GA4914@elie.Belkin>
and subject line Re: [powerpc libm] exp() in directed rounding modes gives wrong results
has caused the Debian Bug report #153022,
regarding libc6: [libm] exp() in directed rounding modes gives wrong results
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
153022: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=153022
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6
Version: 2.2.5-6
Severity: important

Results of exp(x) for x = 1, 2, 3, 4, 5 in the 4 rounding modes:

N: exp(1) = 2.7182818284590451
Z: exp(1) = 2.7182818284590451
D: exp(1) = 2.7182818284590451
U: exp(1) = 0.0019731101788929995
N: exp(2) = 7.3890560989306504
Z: exp(2) = 4.0037745305985499
D: exp(2) = 4.0037745305985499
U: exp(2) = 7.3890560989306504
N: exp(3) = 20.085536923187668
Z: exp(3) = 20.085536923187664
D: exp(3) = 20.085536923187664
U: exp(3) = 2.6649233683874556
N: exp(4) = 54.598150033144236
Z: exp(4) = 32.045580221125
D: exp(4) = 32.045580221125
U: exp(4) = 54.598150033144243
N: exp(5) = 148.4131591025766
Z: exp(5) = 148.4131591025766
D: exp(5) = 148.4131591025766
U: exp(5) = -66.858041866653068

The program used is the following:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <fenv.h>

static int rnd[4] = { FE_TONEAREST, FE_TOWARDZERO, FE_DOWNWARD, FE_UPWARD };
static char rc[4] = "NZDU";

int main (int argc, char *argv[])
{
  int i;

  for (i = 1; i < argc; i++)
    {
      int r;
      double x;
      char *end;

      x = strtod (argv[i], &end);
      if (*end != '\0')
        exit (EXIT_FAILURE);

      for (r = 0; r < 4; r++)
        {
          double y;

          fesetround (rnd[r]);
          y = exp (x);
          printf ("%c: exp(%.17g) = %.17g\n", rc[r], x, y);
        }
    }

  return 0;
}

-- System Information
Debian Release: 3.0
Kernel Version: Linux ay 2.4.18-newpmac #1 Thu Mar 14 22:44:49 EST 2002 ppc unknown



--- End Message ---
--- Begin Message ---
Version: 2.16-0experimental0

Hi Vincent,

In 2002, Vincent Lefevre wrote:

> Results of exp(x) for x = 1, 2, 3, 4, 5 in the 4 rounding modes:

This is said to be finally fixed by glibc-2.16~902 (Fix exp in
non-default rounding modes (bug 3976), 2012-03-02)

If someone prepares a backport of the fix for 2.13.y, would you
like to test it?

Thanks,
Jonathan

--- End Message ---

Reply to: