1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/examples/wavelets.code
Jacob Eberhardt f7b197791f Code samples adapted so they have a main function
Code samples now reflect the changes made to the absy by adding functions.
2017-06-13 17:39:20 +02:00

19 lines
405 B
Text

def main(in1, in2, in3, in4, in5, in6, in7, in8):
// first iteration
a = (in1 + in2) / 2
b = (in3 + in4) / 2
c = (in5 + in6) / 2
d = (in7 + in8) / 2
e = (in1 - in2) / 2
f = (in3 - in4) / 2
g = (in5 - in6) / 2
h = (in7 - in8) / 2
// second iteration
i = (a + b) / 2
j = (c + d) / 2
k = (e - f) / 2
l = (g - h) / 2
// third iteration
out1 = (i + j) / 2
return (k - l) / 2