It's not quite right; the defense is more of an offset. Why did you put 0.175 into the offense? 16*50*(1+0.3) * (1-(0.15*2.05 + 0.175) = 501.8
In the physics engine, it's like this:
D(sum) = [D(bas)+MD(bas)+M(of)+M(luck)] * [1-M(def)],
where MD(bas) is a modifier determined by the difference between attack and defense. If the attack is lower, the sign is simply changed to a minus, and the coefficient is 0.025 instead of 0.05, but it's not put in parentheses with the armor.
Is there an error in the physics engine? Have you checked your version?