import tensorflow as tf

            a = tf.minimum(m_bound, m0)
            x = 1 - tf.pow(a / m0, 2)
            primitive = -0.5 * m0 * m0 * (tf.exp(c * x) * tf.sqrt(x) / c + 0.5 / tf.pow(-c, 1.5) * tf.sqrt(pi) * tf.erf(gradsafe_sqrt(-c * x)))
            # We have to safeguard the sqrt, because otherwise the analytic
