Hi Amit,

On Sat, Jun 29, 2013 at 4:32 AM, Amit Saha <[email protected]> wrote:
> Hello,
>
> Currently the is_perpendicular() method is defined, like so:
>
> a1, b1, c1 = l1.coefficients
>                                                                 a2,
> b2, c2 = l2.coefficients
>                                                             return
> bool(simplify(a1*a2 + b1*b2) == 0)
>
> Now it is possible (as I have just found) that the above sum may
> equate to something tlike 1e-15, but not 0 (same with the product of
> the slope coming to -0.9994).
>
> Does it make sense to have the provision for adding an epsilon value
> such that anything below that is deemed to be 0?

Can you post your code that gives 1e-15? The idea is that when only symbolic
values are used (i.e. no floating point numbers), you can compare directly to 0.

>
> Also, is there another way to check if two linear entities are
> perpendicular without resorting to epsilon checks in the user's code?
>
>
> PS: I really am enjoying going through SymPy's code, very easily
> understandable. Thank you all.

Glad to hear that.

Ondrej

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to