Search code examples
ats

What is the symbol for the exponentiation operation in ATS?


For instance, how can I write an expression in ATS for the 10th power of x? I tried both x^10 and x^^10, but neither worked.


Solution

  • The exponentiation operator both for integer and float values in ATS is **, as in implement main0 () = println! (2 ** 10) // prints 1024.