Odd behaviour in computation of intersection in Poincare Disc

58 views Asked by At

I'm trying to compute the intersection of two geodesics in the Poincare disc. My code is a bit too long to paste here so let me just share the short-link to it. https://sagecell.sagemath.org/?q=dxqdvm
Anyway, I'm getting the following error in the intersection computation in a part of the code. Error message is ValueError: negative number cannot be raised to a fractional power.

So, i printed out the geodesics involved in this computation as follows;

Geodesic in PD from 0.9173343623719807 + 0.3981176554884141*I to 0.39811765407683164 + 0.9173343629845988*I
Geodesic in PD from -0.4409894081700523 + 0.8975123073706717*I to 0.7311976448002898 + 0.6821656721343501*I

Now, I understood that this much larger float-point precision sits behind these printed out numbers but I tried to reproduce the error as follows (https://sagecell.sagemath.org/?q=pooerg);

from sage.geometry.hyperbolic_space.hyperbolic_interface import HyperbolicPlane

PD = HyperbolicPlane().PD()

l1 = PD.get_geodesic(0.9173343623719807 + 0.3981176554884141 * I, 0.39811765407683164 + 0.9173343629845988 * I)
l2 = PD.get_geodesic(-0.4409894081700523 + 0.8975123073706717 * I, 0.7311976448002898 + 0.6821656721343501 * I)
l1.intersection(l2)

But this time I'm getting the ValueError: geodesics don't intersect...

Could someone tell me why I can't reproduce the error?

Edit

  • 2024/02/22 7am JST: Fixed the typo in the coordinate of point.
0

There are 0 answers