Derivative of the smoothed unity score
The chain rule gives a factor of −(x−1), divided by the smoothing square root and the squared score denominator. For T>0 it is finite everywhere and equals zero at the target. This matches the C++ helper’s body and avoids the original score’s cusp.