Automatic Generation of Numerical Code