How to use the model from Python

#Make sure that cython extension is installed
#> pip install --user cython

# The source code of the mul8x7u_11N extension needs to be downloaded first
> curl -s "https://ehw.fit.vutbr.cz/evoapproxlib/v1.2022?folder=multiplers/8x7_unsigned/pareto_pwr_mre&file=mul8x7u_11N.c&pyx=bash" | bash

#Finally, the extension can be used in a Python script as follows
> python
import pyximport; pyximport.install()
import mul8x7u_11N

wce = e = 0
for i in range(0,2**8):
    for j in range(0,2**7):
        diff = abs(mul8x7u_11N.mul(i,j) - (i*j))
        if diff > wce: wce = diff
        e += diff

print('average error magnitude (mae)',e/(2.0**(15)))
print('worst-case error magnitude (wce)',wce)