Your message dated Fri, 12 Jun 2009 06:17:06 +0000
with message-id <[email protected]>
and subject line Bug#530381: fixed in mpmath 0.12-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 [email protected]
immediately.)


-- 
530381: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530381
Debian Bug Tracking System
Contact [email protected] 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: mpmath
Source-Version: 0.12-1

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

mpmath_0.12-1.diff.gz
  to pool/main/m/mpmath/mpmath_0.12-1.diff.gz
mpmath_0.12-1.dsc
  to pool/main/m/mpmath/mpmath_0.12-1.dsc
mpmath_0.12.orig.tar.gz
  to pool/main/m/mpmath/mpmath_0.12.orig.tar.gz
python-mpmath-doc_0.12-1_all.deb
  to pool/main/m/mpmath/python-mpmath-doc_0.12-1_all.deb
python-mpmath_0.12-1_all.deb
  to pool/main/m/mpmath/python-mpmath_0.12-1_all.deb



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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sandro Tosi <[email protected]> (supplier of updated mpmath 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 [email protected])


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

Format: 1.8
Date: Fri, 12 Jun 2009 08:04:37 +0200
Source: mpmath
Binary: python-mpmath python-mpmath-doc
Architecture: source all
Version: 0.12-1
Distribution: unstable
Urgency: low
Maintainer: Debian Python Modules Team 
<[email protected]>
Changed-By: Sandro Tosi <[email protected]>
Description: 
 python-mpmath - library for arbitrary-precision floating-point arithmetic
 python-mpmath-doc - library for arbitrary-precision floating-point arithmetic 
- Docum
Closes: 530381
Changes: 
 mpmath (0.12-1) unstable; urgency=low
 .
   * New upstream release
     - pi calculation precision fixed; Closes: #530381
   * debian/{control, rules}
     - added dpatch
   * debian/patches/10_fix_test.dpatch
     - added to fix test execution (solution provided by upstream author)
   * debian/control
     - bump Standards-Version to 3.8.1
       + added debian/README.source
Checksums-Sha1: 
 19cfe35d64b33e13d6ec82d4dacc01ec75dd1b5b 1417 mpmath_0.12-1.dsc
 d04a67f6b11ed5db402f6fdac4a309d6f2c1f61e 280474 mpmath_0.12.orig.tar.gz
 56250fa5bf3b3b5100c618ef1ebec1886cdd7a97 4883 mpmath_0.12-1.diff.gz
 50c3caf2bcc051bb8aaa9a0ade7852f95564d164 258778 python-mpmath_0.12-1_all.deb
 fbeee97b088cb0acf8242c67b7bdba3da3ca1670 614064 
python-mpmath-doc_0.12-1_all.deb
Checksums-Sha256: 
 8476e04f1301586b3f058c51aa0847052dd96b7187da61d5ce4ff1b68fe1c769 1417 
mpmath_0.12-1.dsc
 267534d1d9117cb8fbd03b82c74751f9c6e6addf1187b4a976ac405158ca1103 280474 
mpmath_0.12.orig.tar.gz
 99e8eaf10481cc4ca291dccb932065eae4ef94d3389441aa19027d470046376a 4883 
mpmath_0.12-1.diff.gz
 124b6cbe9b1565682966427aa4ef643f31f134e61bb4bbf21adb74cf2ea37e15 258778 
python-mpmath_0.12-1_all.deb
 19c960818d1eb0e34c2f037bf38cb964e26de938a7d6cb0ab14acae68798c0d6 614064 
python-mpmath-doc_0.12-1_all.deb
Files: 
 b0b99b2ec2f51dd7c43b1c19f5ebceab 1417 python optional mpmath_0.12-1.dsc
 511fa67cb18b385e33c01cf6465ca267 280474 python optional mpmath_0.12.orig.tar.gz
 577247bd56ecb24c8a8c028c131da30f 4883 python optional mpmath_0.12-1.diff.gz
 3cc2ced0d309e341e520bfb30751144c 258778 python optional 
python-mpmath_0.12-1_all.deb
 9dbbd0b6f18ee97994a5972063f3d848 614064 doc optional 
python-mpmath-doc_0.12-1_all.deb

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

iEYEARECAAYFAkox8lYACgkQAukwV0RN2VD7twCfSMnJVe+ZQ3TbUOs1CcAOMugs
CMYAn03ODP+vSJwKby/JECSY7rJs7oc3
=C4r4
-----END PGP SIGNATURE-----



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

Reply via email to