nerdamer icon indicating copy to clipboard operation
nerdamer copied to clipboard

Umbrella issue: Make complex numbers first-class citizens, similar to symbols

Open Happypig375 opened this issue 6 years ago • 8 comments

This aims to fix the underlying problem of #13. Currently, not all functions support complex numbers. Complex number specific functions are also not there. Making them supported everywhere will enhance consistency.

Sub-tasks:

Existing operators

  • [ ] +
  • [ ] -
  • [ ] *
  • [ ] /
  • [ ] ^
    • [ ] i^0.5 form
    • [ ] x^i form (x^i = e^(i log(x)) = cos(log(x))+i sin(log(x)))
    • [ ] (i+1)^2 form
  • [ ] !
  • [ ] =
  • [ ] :=
  • [ ] ,

#133

  • [ ] < (should keep current implementation returning false or throw?)
  • [ ] <=
  • [ ] ==
  • [ ] !=
  • [ ] > (should keep current implementation returning false or throw?)
  • [ ] >=

Existing functions

trigonometric

  • [ ] cos
  • [ ] sin
  • [ ] tan
  • [ ] acos
  • [ ] asin
  • [ ] atan
  • [ ] sec
  • [ ] csc
  • [ ] cot

matrix and vector

  • [ ] matrix
  • [ ] imatrix (should throw?)
  • [ ] matget
  • [ ] matset
  • [ ] invert
  • [ ] transpose
  • [ ] vector
  • [ ] vecget
  • [ ] vecset
  • [ ] cross
  • [ ] dot

hyperbolic trig

  • [ ] cosh
  • [ ] sinh
  • [ ] tanh
  • [ ] acosh
  • [ ] asinh
  • [ ] atanh

math functions

  • [ ] log(i)
    • [ ] log(x, i)
    • [ ] log(i, x)
    • [ ] log(i, i)
  • [ ] log10
  • [ ] min
    • [ ] min(i, i)
  • [ ] max
    • [ ] max(i, i)
  • [ ] floor (floor(a+b i) => floor(a)+floor(b)i)
  • [ ] ceil (ceil(a+b i) => ceil(a)+ceil(b)i)
  • [ ] Si
  • [ ] Ci
  • [ ] Ei
  • [ ] rect
  • [ ] step
  • [ ] sinc
  • [ ] Shi
  • [ ] Chi
  • [ ] fact
  • [ ] factorial
  • [ ] dfactorial
  • [ ] exp
  • [ ] mod
  • [ ] erf
  • [ ] round (round(a+b i) => round(a)+round(b)i)
  • [ ] pfactor
  • [ ] sqrt
  • [ ] expand
  • [ ] fib
  • [ ] tri

Calculus

  • [ ] sum
  • [ ] product
  • [ ] diff
  • [ ] integrate
  • [ ] defint

Algebra

  • [ ] divide
  • [ ] factor
  • [ ] gcd
  • [ ] roots
  • [ ] coeffs

Solve

  • [ ] solve
  • [ ] solveFor
  • [ ] solveEquations

Extra

  • [ ] laplace
  • [ ] mean
  • [ ] mode
  • [ ] median
  • [ ] smpvar
  • [ ] variance
  • [ ] smpstdev
  • [ ] stdev

Expression

  • [ ] buildFunction
  • [ ] evaluate
  • [ ] sub
  • [ ] variables
  • [ ] toTeX
  • [ ] text

#165

  • [ ] IF
  • [ ] div
  • [ ] gamma_incomplete
  • [ ] parens
  • [ ] setEquation
  • [ ] sign
  • [ ] zscore

New operators

  • [ ] %

New functions

  • [x] arg (synonym to phase)
  • [x] conjg
  • [x] real
  • [x] imaginary
  • [ ] phase (synonym to arg)
  • [ ] magnitude

#121

  • [ ] sech
  • [ ] csch
  • [ ] coth
  • [ ] asec
  • [ ] acsc
  • [ ] acot
  • [ ] asech
  • [ ] acsch
  • [ ] acoth

#144

  • [x] lcm

#145

  • [x] trunc (trunc(a+b i) => trunc(a)+trunc(b)i)

#153

  • [x] atan2

#160

  • [x] determinant
  • [x] size

Happypig375 avatar Aug 20 '17 13:08 Happypig375

Noted. Can you please lump them into one issue so it's easier to track. For instance nerdamer doesn't account for complex numbers and then update the functions you're requesting. This makes it easier for me to get an overall idea of what to work on.

jiggzson avatar Aug 20 '17 13:08 jiggzson

Can you please lump them into one issue so it's easier to track. For instance nerdamer doesn't account for complex numbers and then update the functions you're requesting. This makes it easier for me to get an overall idea of what to work on.

Nevermind. This works too

jiggzson avatar Aug 20 '17 13:08 jiggzson

Nevermind. This works too

Ok

Happypig375 avatar Aug 20 '17 14:08 Happypig375

I just figured out that GitHub markdown supports checkboxes. Will revamp the umbrella issue.

Happypig375 avatar Aug 20 '17 14:08 Happypig375

Wow. So much clearer. Thanks.

jiggzson avatar Aug 20 '17 14:08 jiggzson

Unchecked all to avoid false assumptions.

Happypig375 avatar Aug 21 '17 01:08 Happypig375

Finalizing the list... Anything missing?

Happypig375 avatar Aug 22 '17 08:08 Happypig375

Nope that covers it all. There are some items on the list that are just in my playpen at the moment. Conditionals and branching is one such example. I doubt I'll be documenting those any time soon since I don't even know if I'll be adding them permanently. I'll be focusing on imaginaries for the time being since that seems the be the heaviest weighing issue.

jiggzson avatar Aug 22 '17 21:08 jiggzson