`Computing metasurfaces' to perform mathematical operations