big.Float came in go 1.5; will big.Complex come next?
go 1.4 had big.Int and big.Rat, then go 1.5 brought big.Float into the same universe. Does anyone know if there's any plans for big.Complex, and if so, will it be in go 1.6?
Posted Oct 18, 2015, 1:24 PM UTC
205
I doubt it. big.Int, big.Rat, and big.Float are all different ways of encoding some subset of the real numbers. You could model a subset of the complex numbers using any of them. Depending on your needs, using 2 big.Floats or 2 big.Rats would be totally sufficient.
Building a big.Complex using two big.Float values might be easy enough. The big.Complex version of the functions in the math.cmplx package would be more complicated, especially if you wanted to be able to raise a big.Complex to the power of a big.Rat which could return a list of values, the count of which would depend on the denominator in the big.Rat, if I remember the Fundamental Theorem of Algebra correctly.