Commit 621d7cdb authored by Robert Bradshaw's avatar Robert Bradshaw

CEP 516 in pure mode

parent a88130ee
...@@ -6,6 +6,19 @@ def empty_decorator(x): ...@@ -6,6 +6,19 @@ def empty_decorator(x):
def locals(**arg_types): def locals(**arg_types):
return empty_decorator return empty_decorator
# Special functions
def cdiv(a, b):
q = a / b
if q < 0:
q += 1
def cmod(a, b):
r = a % b
if (a*b) < 0:
r -= b
return r
# Emulated language constructs # Emulated language constructs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment