Why not check the result and also check for the presence of parentheses? That way you can verify the result and make sure nobody's just copying and pasting in an answer.
One could easily do something like (-2.466..) as the answer, but given that you just need a simple way to verify answers, I think my strategy works well.
I think you could get away with not even checking for parens, if you go with the idea that people doing it properly won't try to cheat it (because they'll learn nothing).
For people who do want to 'cheat', the grade is meaningless anyway.
I thought about that, but my reasoning for checking parens is that there's a decent subset of people who might get stuck and just google an answer, but if it gets rejected, then they'll put more time into figuring out the correct answer.
I guess I'm trying to view it from the POV of a beginner, as most CS people/programmers can work through this without needing the website.
One could easily do something like (-2.466..) as the answer, but given that you just need a simple way to verify answers, I think my strategy works well.