Hello all, Consider the program below which is an attempt to prove that the angle inscribed at the center by any two points on a circle is always twice the angle inscribed on the circumference:
from sympy import Circle, Point, Segment def prove_theorem(): c = Point(0, 0) c1 = Circle(c, 2) p = c1.random_point() q = c1.random_point() r = c1.random_point() pc = Segment(p, c) qc = Segment(q, c) pcq = pc.angle_between(qc) pr = Segment(p, r) qr = Segment(q, r) prq = pr.angle_between(qr) print((pcq/prq).evalf()) if __name__=='__main__': for _ in range(100): prove_theorem() The result which should always be 2.00 theoretically ranges from 0.533910696827908 to 26.3044198350215. The only source of this randomness seems to be the random_point() method. But, is such a huge variance expected? Is there a way to minimize this variance? Thanks for any hints. Best, Amit. -- 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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CANODV3kmEAGpONBtO%3Dt6gkXNgTU4WdKWYF-V%3DSL2em9_a3UtgA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.