Hardware and Software for Approximate Computing