Something weird
If SWI-Prolog has not been compiled with GMP, then ^/2 performs float operations:
?- X is 12^2. X = 144.0. ?- X is 2^2. X = 4.0.
And so does **/2
?- X is 12**2. X = 144.0. ?- X is 2**2. X = 4.0.
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 ^
(“caret”)?)
And this page: