Language models can generate a Python function that does the math perfectly.
I bet you would get better results if you tweaked the prompt to say "Generate a Python program that solves X math problem" and then just ran the resulting Python script.
It does not need to be AGI to be useful.