Yes, I already have it implemented in my code. But I was curious about why is not already implemented. I mean, the sigmoid is in the API and is also a one-liner.
But playing a bit with your code I think I might found it out.  When k grows calculating the gradient may be way too much since it the function resembles the impulse function (with gradient 0 everywhere but in one point that “has infinite” gradient).
Thanks for the answer though