I need a fast math parser for a graph plotter I'm writing, are there any decent ones in the opensource / freeware sector that anyone knows about?

I want the user to enter stuff like "y=3x^2+1" and my program will supply values for x. Then the program iterates on x and generates a load of Y values using the parser.