Add syntax sugar for 'pow' operation
Submitted by pancake
Link to original bug (#618740)
Description
I was looking for a way to do an exponent of an integer number, but resulted in that there's no way to do it in C or Vala a part from implement it by yourself. C's pow() lives in libm and it is for double and float, but not int.
I think it would be good for Vala to support '**' operator to call pow() or just implement it as an inline function, so the compiler can optimize to put a single opcode, or just keep it as a simple loop multiplying the value N times.
Python and many other languages support '**' and , we can probably think on the same, square roots are somewhat more dependant on floating point numbers, so maybe I would not implement sqrt in language.
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information