I was taking another look at that formula, and I think I came up with something that looks better:
Code:
field[trtAPCost.value += 15 *(field[trtUser].value * field[trtUser].value - 25 * field[trtUser].value + 166) / 2
That way, there are no decimal values.