xpile 0.1.616

Polyglot transpile workbench (Python/C/C++/Rust/Ruchy/Lean ↔ Rust/Ruchy/PTX/WGSL/SPIR-V) with provable contracts at every layer.
1
2
3
4
5
6
7
# PMAT-502bp (Tranche 2): negation of a float variable (-x where x: float).
def neg(x: float) -> float:
    return -x


def diff(a: float, b: float) -> float:
    return -a + b