How does damage resistance work?

Damage resistance in Fallout 4 is calculated differently from in the other Fallout games. Instead of being a straight calculation, the damage resistance is based not just on the resistance value, but also on the incoming damage. When your damage resistance is precisely equal to the incoming damage, the damage will be cut in half. Any damage resistance above that shows diminishing returns. The approximate formula, taken from here, is enter image description here