Using Symbolic Computation to Generate Efficient Numerical Code Michael B. Monagan and Gregory J. Fee Center for Experimental and Constructive Mathematics Simon Fraser University Abstract We are interested in how symbolic computation can be used to automatically create an efficient numerical code. Typically symbolic computation preceeds numerical computation. Some commercial numerical environments now permit the user to perform some symbolic computations in their interactive sessions. Examples include MathCAD and MATLAB which can call Maple. Some commercial symbolic environments are developing tools to permit numerical computations to be done in them. Examples include Maple and axiom which can call routines in the NAG libraries. The latter are more complicated because numerical software often takes as input functions as parameters. A simple example is a numerical integrator - you have to give it the integrand, a function, typically a Fortran or C subroutine where usually the user must code the function. We are interested in building a system that will automatically write the Fortran or C code for for the user. We will describe our software and give three demonstrations, firstly of it's use in constucting a numerical approximation for a function, second for computing Gradients for optimization problems and third, some preliminary work in automating the solutions of PDEs.