Bug 1135677 - ellipse construction problem in computational geometry
Summary: ellipse construction problem in computational geometry
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sympy
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-30 08:28 UTC by Przemek Klosowski
Modified: 2014-09-25 10:34 UTC (History)
1 user (show)

Fixed In Version: sympy-0.7.5-2.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-25 10:34:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Przemek Klosowski 2014-08-30 08:28:21 UTC
Description of problem:
ellipse construction problem in computational geometry 

Version-Release number of selected component (if applicable):
sympy-0.7.5-1.fc20.noarch


How reproducible: every time


Steps to Reproduce:
1. run sympy:
   python
   from sympy import *

2. enter command 
   Circle(Point(5,5), 3).is_tangent(Circle(Point(0,5),1))

Actual results:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/sympy/geometry/ellipse.py", line 771, in is_tangent
    return (inter is not None and isinstance(inter[0], Point)
IndexError: list index out of range


Expected results:  False


Additional info:

the expression is working fine for other values of the second circle radius:

Circle(Point(5,5), 3).is_tangent(Circle(Point(0,5),3))
returns False

Circle(Point(5,5), 3).is_tangent(Circle(Point(0,5),2))
returns True

Comment 1 Jerry James 2014-09-03 20:08:15 UTC
This looks like an easy bug to fix.  The code line in question is this:

            return (inter is not None and isinstance(inter[0], Point)
                    and len(inter) == 1)

where, clearly, we should be checking len(inter) == 1 *before* we try to look at inter[0].  I'll make a patch to reverse those two tests and then it should work.  Thanks for the report.

Comment 2 Fedora Update System 2014-09-11 14:32:58 UTC
sympy-0.7.5-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/sympy-0.7.5-3.fc21

Comment 3 Fedora Update System 2014-09-11 15:33:42 UTC
sympy-0.7.5-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/sympy-0.7.5-2.fc20

Comment 4 Fedora Update System 2014-09-12 14:30:27 UTC
Package sympy-0.7.5-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing sympy-0.7.5-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-10750/sympy-0.7.5-2.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-09-23 04:25:47 UTC
sympy-0.7.5-4.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2014-09-25 10:34:00 UTC
sympy-0.7.5-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.