xpile 0.1.615

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
8
9
10
11
12
13
14
15
# PMAT-502bf (Tranche 2): int(s) / float(s) string parsing.
def to_int(s: str) -> int:
    return int(s)


def to_float(s: str) -> float:
    return float(s)


def add_parsed(a: str, b: str) -> int:
    return int(a) + int(b)


def numeric_still(x: float) -> int:
    return int(x)