Repository navigation
0.4.2
Changes
- Fixed:
int(x)of a float in native code returned -263 on x86 for NaN, an infinity, or a value past 263, and was undefined behavior in emitted C. It now gives CPython's answer:
x |
ppy run |
standalone binary, emitted C/C++ |
|---|---|---|
| NaN | ValueError: cannot convert float NaN to integer |
the same, exit status 1 |
| ±infinity | OverflowError: cannot convert float infinity to integer |
the same, exit status 1 |
| past 2**63 | the exact integer | OverflowError: the result does not fit in a 64-bit integer, exit status 1 |
The checks are range checks, so --unsafe keeps them. Nothing saturates to the largest or smallest word, since Python's integers have no largest. A value that fits still converts natively, truncated toward zero.
Install or upgrade with pip install --upgrade ppy-lang==0.4.2.
The full repository gate passed: 1,917 tests, 44/44 examples on all three paths, and the documentation examples.