Theoretical and Numerical Analysis of Approximate Dynamic Programming with Approximation Errors