@prefix : <#> .
@prefix math: <http://www.w3.org/2000/10/swap/math#> .

# Integer raise to integer
{ ("2" "3") math:exponentiation 8 } => {:test1a a :SUCCESS}.
{ (2 3) math:exponentiation 8 } => {:test1b a :SUCCESS}.
{ (-2 3) math:exponentiation -8 } => {:test1c a :SUCCESS}.
{ (2 -3) math:exponentiation 0.125e0 } => {:test1d a :SUCCESS}.
{ (-2 -3) math:exponentiation -0.125e0 } => {:test1e a :SUCCESS}.
{ (2 0) math:exponentiation 1 } => {:test1f a :SUCCESS}.
{ (0 0) math:exponentiation 1 } => {:test1g a :SUCCESS}.
{ (0 4) math:exponentiation 0 } => {:test1h a :SUCCESS}.

# Combinations of types
{ (2.7 2) math:exponentiation 7.29 } => {:test2a a :SUCCESS}.
{ (16 0.5) math:exponentiation 4.0 } => {:test2b a :SUCCESS}.
{ (16 0.5e0) math:exponentiation 4.0e0 } => {:test2c a :SUCCESS}.

# Double
{ (0.0e0 3) math:exponentiation 0.0e0 } => {:test3a a :SUCCESS}.
{ (-0.0e0 3) math:exponentiation -0.0e0 } => {:test3b a :SUCCESS}.

# Argument errors
{ (1) math:exponentiation ?x } => {:test4a a :FAILURE}.
{ (1 2 3) math:exponentiation ?x } => {:test4b a :FAILURE}.
