Ask Your Question

Revision history [back]

Float-point precision in instantiation of point in Hyperbolic geometry module

I'm in the middle of debugging some other codebase and I figured that the following specific point causing the issue. Now, I would like to instantiate the point based on the that coordinate. But the result of printing on console indicates that the last few digits have been rounded...

from sage.geometry.hyperbolic_space.hyperbolic_interface import HyperbolicPlane

# Instantiate HyperbolicPlane
PD = HyperbolicPlane().PD()

p = PD.get_point(CC(0.13816890584139213 + 0.4878012008585488*I))
print(p)  # -> Point in PD 0.138168905841392 + 0.487801200858549*I

Float-point precision in instantiation of point in Hyperbolic geometry module

I'm in the middle of debugging some other codebase (working in a Poincare Disk of hyperbolic-geometry) and I figured that the following specific point causing the issue. Now, I would like to instantiate the point based on the that coordinate. But the result of printing on console indicates that the last few digits have been rounded...

from sage.geometry.hyperbolic_space.hyperbolic_interface import HyperbolicPlane

# Instantiate HyperbolicPlane
PD = HyperbolicPlane().PD()

p = PD.get_point(CC(0.13816890584139213 + 0.4878012008585488*I))
print(p)  # -> Point in PD 0.138168905841392 + 0.487801200858549*I

Could anyone help me instantiate the point on this particular coordinate?