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

Function _fp_op

lean_py/z3/core.py:3341–3350  ·  view source on GitHub ↗
(name: str, *args: ExprRef)

Source from the content-addressed store, hash-verified

3339
3340
3341def _fp_op(name: str, *args: ExprRef) -> FPRef:
3342 # Filter out rounding mode args — we only support RNE
3343 real_args = [a for a in args if not isinstance(a, FPRMRef)]
3344 fp_args = [a for a in real_args if isinstance(a, FPRef)]
3345 sort = fp_args[0]._sort if fp_args else FPSort(11, 53)
3346 merged: frozenset[tuple[str, ASTSort]] = frozenset()
3347 for a in real_args:
3348 if isinstance(a, ExprRef):
3349 merged = merged | a._vars
3350 return FPRef(FpOpNode(name, tuple(a._ast for a in real_args)), sort, merged)
3351
3352
3353def _fp_pred(name: str, *args: ExprRef) -> BoolRef:

Callers 12

fpAddFunction · 0.85
fpSubFunction · 0.85
fpMulFunction · 0.85
fpDivFunction · 0.85
fpNegFunction · 0.85
fpAbsFunction · 0.85
fpSqrtFunction · 0.85
fpFMAFunction · 0.85
fpRemFunction · 0.85
fpMinFunction · 0.85
fpMaxFunction · 0.85
fpRoundToIntegralFunction · 0.85

Calls 3

FpOpNodeClass · 0.90
FPSortFunction · 0.85
FPRefClass · 0.85

Tested by

no test coverage detected