Low-resource hardware implementation of the hyperbolic tangent for artificial neural networks