mexprp icon indicating copy to clipboard operation
mexprp copied to clipboard

Implement operations for rug::Complex

Open IntrepidPig opened this issue 6 years ago • 1 comments

  • [x] add
  • [x] sub
  • [x] mul
  • [x] div
  • [x] pow
  • [x] sqrt
  • [ ] nrt
  • [x] abs
  • [x] sin
  • [x] cos
  • [x] tan
  • [x] asin
  • [x] acos
  • [x] atan
  • [ ] atan2
  • [x] floor
  • [ ] ceil
  • [ ] round
  • [x] log

IntrepidPig avatar Apr 07 '18 08:04 IntrepidPig

I don't think atan2 makes sense with Complex numbers.

ceil and round can be implemented in the same way as floor.

nrtis a little more complex - if this returns a Multiple under the same rules as sqrt it could be quite slow to compute all the roots for higher values of n, but I think using rug's root_of_unity function you could find the primary root using pow(1/n) and then multiply it by the roots of unity to get each separate result... This would only work for integer values of n though.

autumnull avatar Aug 04 '21 21:08 autumnull