On Sun, Jul 19, 2009 at 12:11 AM, william
ratcliff<[email protected]> wrote:
> Ah, I must have been unclear, I was not talking about comparing two floating
> points, but rather if there were floating points in an expression.
> Suppose for example, one had performed an analytic calculation and obtained,
> f=8*x+y
> but, then doing some involved calculation in sympy obtains
> f=7.999999999999999*x+.999999999999999*y
> Then I would like to claim that one would like to have the two expressions
> are equivalent (for testing) within some accuracy.   One possibility I
> suppose it to look at the difference between expressions and term by term
> check all numbers and check to see if it's below some tolerance.....But, I
> wanted to check if this is already in sympy, or if it is something that
> should be in sympy.  I'm thinking about this for purposes of unit testing
> code that relies on sympy.  One can use AssertAlmostEqual and specify a
> tolerance for regular python unit tests, but for sympy, this currently will
> not work.

Ah, I got it. No, currently this is not implemented. I think it would
be useful though --- but I also don't know any other way besides what
you wrote.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to