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

Function lean_unbox_float

lean_py/_runtime.py:612–616  ·  view source on GitHub ↗
(self, o)

Source from the content-addressed store, hash-verified

610 return ctor
611
612 def lean_unbox_float(self, o):
613 ctor_cls = structs.get("lean_ctor_object")
614 c = ctypes.cast(o, POINTER(ctor_cls))
615 addr = ctypes.addressof(c.contents) + ctor_cls.m_objs.offset
616 return ctypes.cast(addr, POINTER(c_double))[0]
617
618 def lean_unsigned_to_nat(self, n):
619 fn = getattr(self.lib, "lean_unsigned_to_nat", None)

Callers 1

leanpy_unbox_floatFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected