Comment #4 on issue 3617 by [email protected]: Impossible to work with floating point numbers in the geometry module
http://code.google.com/p/sympy/issues/detail?id=3617

So probably we just need to pick a suitable norm, and make sure that points are within epsilon of wherever we want them to be in that norm (I'm guessing just standard Euclidean norm will be fine, but I don't know enough numerical analysis to know for sure; also can we just reuse Point.distance or will that lead to circular reasoning, so to speak?).

I applied that patch and ran the tests, and the only failures were:

_____________________________________________________________________________________________________________________________________________________________
______________________________________________________ sympy/geometry/tests/test_geometry.py:test_line ______________________________________________________ File "/users/aaronmeurer/documents/python/sympy/sympy/sympy/geometry/tests/test_geometry.py", line 255, in test_line
    Point(2, 1 + C.tan(0.05*pi))))
AssertionError

and from the doctests:

________________________________________________________________ sympy.geometry.point.Point _________________________________________________________________
File "sympy/geometry/point.py", line 70, in sympy.geometry.point.Point
Failed example:
    Point(0.5, 0.25)
Expected:
    Point(1/2, 1/4)
Got:
    Point(0.5, 0.25)
_____________________________________________________________________________________________________________________________________________________________
_______________________________________________________________ sympy.geometry.util.centroid ________________________________________________________________
File "sympy/geometry/util.py", line 347, in sympy.geometry.util.centroid
Failed example:
    centroid(p, q)
Expected:
    Point(1, -sqrt(2) + 2)
Got:
    Point(1, 2*sqrt(2)/(2 + 2*sqrt(2)))

(on that last one, 2*sqrt(2)/(2 + 2*sqrt(2)) == -sqrt(2) + 2). So it looks like they're all just an issues of expecting exact results.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to