Approximation structures with moderate complexity in functional optimization and dynamic programming