MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / as_decimal

Method as_decimal

lean_py/z3/core.py:597–600  ·  view source on GitHub ↗
(self, prec: int = 10)

Source from the content-addressed store, hash-verified

595 return Fraction(self._num, self._den)
596
597 def as_decimal(self, prec: int = 10) -> str:
598 ctx = getcontext()
599 ctx.prec = prec
600 return str(Decimal(self._num) / Decimal(self._den))
601
602 def as_string(self) -> str:
603 return f"{self._num}/{self._den}"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected