prolog:

test(X) :- X is -2^2.

1 ?- test(X).

X = 4

but i would not put my faith in prolog's parser, or math capabilities for that matter.