precision problem -need help

Hi,
I made two little scripts to find the intersection of two vectors, one by picking 4 vertices, one by selecting 2 edges of same polyobject.
Problem is that if sometimes it look ok, sometimes it seems to lack of precision.
Is somebody can help.
thanks

AttachmentSize
yoko-intersect_edge.mcr1.01 KB
yoko-intersect.mcr1.01 KB