tanh of a matrix
matrix
Matrix tanH(Matrix matrix) { return matrix.performFunction((x) => (exp(2 * x) - 1) / (exp(2 * x) + 1)); }