Concisely describe the proposed feature
Allow using x ** y in Taichi kernels
Describe the solution you'd like
In the preprocessor, convert x ** y into ti.pow(x, y).
Add a binary operator pow to the IR and codegen.
Implementing this feature will help the contributor understand the Taichi compiler code structure. Assigning this task to our great intern @xumingkuan as a practice.
Issue raised here: https://forum.taichi.graphics/t/the-right-use-method-of-sqrt/68
What a great chance to dive into the Taichi compiler! May I have a try (just for exercise)?
Sure, thanks! Let's reduce some burden on @xumingkuan then.
If either of you guys are interested, we can also implement its gradients for differentiable programming:
d(x^y)/dx: https://www.wolframalpha.com/input/?i=d%28x%5Ey%29%2Fdx
d(x^y)/dy: https://www.wolframalpha.com/input/?i=d%28x%5Ey%29%2Fdy
Code to modify:
Just passing by. Duplicated with #247?
This is nicely implemented by @archibate.
Most helpful comment
What a great chance to dive into the Taichi compiler! May I have a try (just for exercise)?