Your message dated Thu, 11 Jun 2009 22:17:07 +0000
with message-id <e1mesa3-00037t...@ries.debian.org>
and subject line Bug#530381: fixed in python-gmpy 1.04-1
has caused the Debian Bug report #530381,
regarding python-mpmath: strangely high accuracy in computing pi
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 ow...@bugs.debian.org
immediately.)


-- 
530381: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530381
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python-mpmath
Version: 0.11-2
Severity: normal

The following Python code uses mpmath to implement Salamin's algorithm
for computing pi (using arithmetic and geometric means).  The number
of digits of accuracy should roughly double with each iteration, and
it does so if mp.dps=1000 (the number of digits is printed at the end
of each swing through the loop).  

However, if mp.dps=4000, then the number of digits doubles for a few
iterations, then goes to infinity:

    3.0
    8.1
   18.7
   40.3
   83.6
    inf
    inf
    inf

Somehow the estimate became exactly equal to pi.  It seems strange to
me and I wonder if it's a bug in one of the math functions like sqrt
or whether it's a feature.  Or perhaps mpmath computes pi using the
same algorithm?


from mpmath import *

mp.dps = 4000

# a sequence is successive arithmetic means; 
# g sequence is successive geometric means
a, b = 1, sqrt(0.5)
n = 1
sum = 0
factor = 2
while n < mp.dps-10:
    n = -log(a*a-b*b)/log(10)
    a,b = (a+b)/2, sqrt(a*b)
    factor *= 2
    sum += factor * (a*a-b*b)
    M = (a+b)/2
    estimate = 4*M*M/(1-sum)
    digits = -log(abs(estimate-pi))/log(10)
    print "%7.1f" % digits


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.29-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-mpmath depends on:
ii  python-support                1.0.3      automated rebuilding support for P

python-mpmath recommends no packages.

Versions of packages python-mpmath suggests:
ii  python-gmpy                   1.03.ds-1  Interfaces GMP to Python for fast,
ii  python-matplotlib             0.98.3-5   Python based plotting system in a 
ii  python-mpmath-doc             0.11-2     library for arbitrary-precision fl

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: python-gmpy
Source-Version: 1.04-1

We believe that the bug you reported is fixed in the latest version of
python-gmpy, which is due to be installed in the Debian FTP archive:

python-gmpy_1.04-1.diff.gz
  to pool/main/p/python-gmpy/python-gmpy_1.04-1.diff.gz
python-gmpy_1.04-1.dsc
  to pool/main/p/python-gmpy/python-gmpy_1.04-1.dsc
python-gmpy_1.04-1_amd64.deb
  to pool/main/p/python-gmpy/python-gmpy_1.04-1_amd64.deb
python-gmpy_1.04.orig.tar.gz
  to pool/main/p/python-gmpy/python-gmpy_1.04.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 530...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Kelly <aomig...@gmail.com> (supplier of updated python-gmpy package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Thu, 11 Jun 2009 08:43:15 -0700
Source: python-gmpy
Binary: python-gmpy
Architecture: source amd64
Version: 1.04-1
Distribution: unstable
Urgency: low
Maintainer: Martin Kelly <aomig...@gmail.com>
Changed-By: Martin Kelly <aomig...@gmail.com>
Description: 
 python-gmpy - Interfaces GMP to Python for fast, unbound-precision computations
Closes: 530381
Changes: 
 python-gmpy (1.04-1) unstable; urgency=low
 .
   * New upstream release
   * Probably fixes a bug in python-mpmath (Closes: #530381)
   * Bump Standards-Version to 3.8.1 (no changes needed)
Checksums-Sha1: 
 f99a9e4fde47e010c496bb705b58700e6a88213f 1181 python-gmpy_1.04-1.dsc
 98c251d9ae941442af2787eb109c36c52c915897 213664 python-gmpy_1.04.orig.tar.gz
 80b89ccdc992effc41da0b94c41f90250a268e8d 2292 python-gmpy_1.04-1.diff.gz
 1c8633e7786d637a079ad428812822ca12f660ef 152308 python-gmpy_1.04-1_amd64.deb
Checksums-Sha256: 
 048262f98c2c116f9772a10a9a32cdc00ffc0060795a8276348a624a756b2683 1181 
python-gmpy_1.04-1.dsc
 a73234c174343936eac2df62049821dd5b13fe4d2513a5cd0fa366d742b651d1 213664 
python-gmpy_1.04.orig.tar.gz
 2ac113783d67c19d836220f6fe09bf36217d0e6dc45362b774e07c7b1ac0f9d5 2292 
python-gmpy_1.04-1.diff.gz
 0b2df93de2028a24698a3077a2cabd9eb9b003dcde5270d92d20aa47f61f71ff 152308 
python-gmpy_1.04-1_amd64.deb
Files: 
 d4a9b14c89499c75fdabc9a203c80cb7 1181 python optional python-gmpy_1.04-1.dsc
 7539c15a7ab28be4fea84c488cefc774 213664 python optional 
python-gmpy_1.04.orig.tar.gz
 be7ab2adac586e0751f5d18b0e1171fd 2292 python optional 
python-gmpy_1.04-1.diff.gz
 a6342eb6c78a9d685ac2c9103d6a8997 152308 python optional 
python-gmpy_1.04-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkoxgS4ACgkQB01zfu119ZmkggCgxiawe1IbDxmLo3PXjmvaYdpq
hZMAoL54oHgmNSLGn/T2wHERS6Zxp2mL
=CSrF
-----END PGP SIGNATURE-----



--- End Message ---
_______________________________________________
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/python-modules-team

Reply via email to