Implement the two classic squashing activations and their derivatives, written in terms of the outputs (that's how backprop reuses the forward pass):
sigmoid(x) and sigmoid_grad(s) where s = sigmoid(x): tanh(x) and tanh_grad(t) where t = tanh(x): sigmoid must not overflow for large negative inputs (no warnings for x = -1000).