It seems that if SWI-Prolog has not been compiled with GMP, then
2^2 gives 4.0 (a float) instead of an integer.
But I'm not sure.
Do not confuse ^ exponention with the ^ exists operator
Outside of arithmetic contexts, the ^/2 operator is used to mark variables as "existentially quantified" (caret operator).
See this discussion:
[https://stackoverflow.com/questions/19931801/what-is-the-prolog-operator](What is the Prolog operator
And this page: