burn icon indicating copy to clipboard operation
burn copied to clipboard

Feature request: `Tensor::arctan` and other inverse trigonometric functions

Open ken-lauer opened this issue 9 months ago • 3 comments

Feature description

It would be great to have support for the inverse trigonometric functions on Tensors (f32, f64 if possible). This includes:

  • arctan
  • arccos
  • arcsin
  • arccot
  • arcsec
  • arccsc

Feature motivation

I'm giving Burn and alternatives a spin with some simple scientific computing routines. arctan is required for a specific calculation.

ken-lauer avatar Feb 14 '25 17:02 ken-lauer

Hi! I'd like to try implementing the inverse trig functions. I haven't contributed to this project yet.

My plan is to:

  1. Start with arctan
  2. Implement across all backends (ndarray, candle, etc.) 3.. Add comprehensive tests
  3. Would you also like me to implement in the same PR the automatic differentiation and IR?

Should I implement all 6 functions in one PR, or would you prefer them split up? Are there any specific considerations for the mathematical implementations?

niklund avatar Sep 01 '25 15:09 niklund

Thank you for your initiative! Smaller independent PRs are preferable especially since they're independent. Also you might learn on the pay. If you're not familiar with the project structure, you can read up on the contributor's book: https://burn.dev/books/contributor/

antimora avatar Sep 01 '25 15:09 antimora

Commenting again for visibilities sake: Makes sense, I will give it a try however for fun and will do a PR if I get anywhere!

niklund avatar Sep 02 '25 08:09 niklund