[Patches] [ python-Patches-1012468 ] Rational.py various bugfixes

SourceForge.net noreply at sourceforge.net
Sat Sep 18 17:32:32 CEST 2004


Patches item #1012468, was opened at 2004-08-19 22:20
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1012468&group_id=5470

Category: Demos and tools
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Russell Blau (russblau)
Assigned to: Nobody/Anonymous (nobody)
Summary: Rational.py various bugfixes

Initial Comment:
Rational.py in the sandbox 
(python/python/nondist/sandbox/rational/Rational.py) 
contains a variety of minor (and not-so-minor) bugs, 
and some doctest errors as a result of changes 
introduced in recent Python versions.

A corrected version (that works for me) is attached.



----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2004-09-18 17:32

Message:
Logged In: YES 
user_id=21627

Please submit patches as unified or context diffs.

The file you have attached fails for me as well, I get

**********************************************************************
File "/tmp/Rational.py", line 115, in Rational
Failed example:
    float(p.trim(1L<<32)-p)
Expected:
    -7.3974359428840768e-020
Got:
    -7.3974359428840768e-20
**********************************************************************
File "/tmp/Rational.py", line 126, in Rational
Failed example:
    float(p.approximate(rational(1L)>>32)-p)
Expected:
    1.3733999215941832e-011
Got:
    1.3733999215941832e-11
**********************************************************************

I have now untabified Rational.py, please use that as a
starting point for further changes.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1012468&group_id=5470


More information about the Patches mailing list