While there might be math errors, I'm also certain that we aren't seeing all the rules in play. For instance, I think characters who are proficient with a weapon gain a +2 bonus on attack rolls with it, which is why the cleric has a +4 bonus with his warhammer instead of a +2 bonus.