forked from M-Labs/artiq
1
0
Fork 0

test/py2llvm: pep8

This commit is contained in:
Sebastien Bourdeauducq 2014-12-06 14:54:41 +08:00
parent 9165031fd5
commit b830dd527c
1 changed files with 8 additions and 8 deletions

View File

@ -192,24 +192,24 @@ def frac_arith_encode_int_rev(op, a, b, x):
def frac_arith_float(op, a, b, x): def frac_arith_float(op, a, b, x):
if op == 0: if op == 0:
return Fraction(a, b) - x return Fraction(a, b) - x
elif op == 1: elif op == 1:
return Fraction(a, b) + x return Fraction(a, b) + x
elif op == 2: elif op == 2:
return Fraction(a, b) * x return Fraction(a, b) * x
else: else:
return Fraction(a, b) / x return Fraction(a, b) / x
def frac_arith_float_rev(op, a, b, x): def frac_arith_float_rev(op, a, b, x):
if op == 0: if op == 0:
return x - Fraction(a, b) return x - Fraction(a, b)
elif op == 1: elif op == 1:
return x + Fraction(a, b) return x + Fraction(a, b)
elif op == 2: elif op == 2:
return x * Fraction(a, b) return x * Fraction(a, b)
else: else:
return x / Fraction(a, b) return x / Fraction(a, b)
def array_test(): def array_test():