The operation pow(10, opponent_rating / 400);
does not equal to 177827.941004
.
opponent_rating / 400 == 5
Operations involving two integers will produce an integer,
in this case the result 5.25
gets clipped to 5
You should divide with a double to get a double result opponent_rating / 400.0
that is used in the pow function.