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

Function lean_py_of_float

LeanPy/native/python_bridge.c:496–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

494 (void)world; ENSURE_INIT(); WITH_GIL();
495 long long v;
496 if (lean_is_scalar(n)) {
497 v = (long long) lean_scalar_to_int64(n);
498 } else {
499 /* big int: stringify via Lean would be ideal; for now reject. */
500 return raise_io_error("LeanPy: Int out of int64 range not supported");
501 }
502 return ok_owned_or_err(p_PyLong_FromLongLong(v));

Callers

nothing calls this directly

Calls 1

ok_owned_or_errFunction · 0.85

Tested by

no test coverage detected