RosettaCodeData/Task/Exponentiation-operator/Prolog/exponentiation-operator-3.pro

12 lines
114 B
Prolog
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
?- X is 2 ^^ 3.
X = 8.
?- X is 2 ^^ -3.
X = 0.125.
?- X is 2.5 ^^ -3.
X = 0.064.
?- X is 2.5 ^^ 3.
X = 15.625.