  We study numerically the ODE/IM correspondence for untwisted affine Lie
algebras associated with simple Lie algebras including exceptional type. We
consider the linear problem obtained from the massless limit of that of the
modified affine Toda field equation. We found that the Q-functions in
integrable models are expressed as the inner product of the solution of the
dual linear problem and the subdominant solution of the linear problem. Using
Cheng's algorithm to obtain the solution of the linear problem, we can
determine efficiently the zeros of the Q-function, which is known to provide
the solutions of the Bethe ansatz equations. We calculate the zeros
numerically, which are shown to agree with the results from the Non-Linear
Integral Equations for simply-laced affine Lie algebras including the
exceptional type. By the folding procedure of the Dynkin diagrams of
simply-laced Lie algebras, we also find the correspondence for the linear
problem of the non-simply-laced affine Lie algebras.
