a = lerp(a, B, 1.0 - exp(-delta * RATE2))
a = lerp(a, B, -expm1(-delta * RATE2))
And (as pointed in the above) if you're worried about the slowness of it, just Taylor expand it to x+x²/2.
Finally, unless division is too costly, do:
a = lerp(a, B, -expm1(delta / -T))
It's not the half-life (sorry) but it's still a lot more intuitive as a parameter.