On Thu, Nov 7, 2019 at 3:59 AM Alex Herbert <[email protected]> wrote:
> > There is a matrix for real/imaginary/complex all-vs-all additive and > multiplicative operators in the standard (tables in G.5.1 and G.5.2). > The question is do we want to support the entire matrix: > > Covered: > > Complex.multiplyReal(double x) as Complex.multiply(double x) > Complex.divideReal(double x) as Complex.divide(double x) > Complex.addReal(double x) as Complex.add(double x) > Complex.subtractReal(double x) as Complex.subtract(double x) > > Not covered: > > Complex.multiplyImaginary(double x) > Complex.divideImaginary(double x) > Complex.addImaginary(double x) > Complex.subtractImaginary(double x) > Complex.subtractFromReal(double x) > Complex.subtractFromImaginary(double x) > > > I am going through Complex now to fix code coverage and make it in line > with the C.99 standard. I will push all the config changes with the > update to Complex. Should be done be end of today. Well that's interesting, I did not see that the standard specified all-vs-all methods in all those cases. There isn't a performance gain for multiplying by an imaginary double like there is for a real double, as one has to deal with imaginary*imaginary, so one might as well just pass a Complex rather than an imaginary double. Consequently I would imagine implementations of that corner of the standard's matrix are pretty rare. But I see no reason not to have it for completeness and continuing the goal I set, of being the only non-C library that I've ever seen that fulfills the whole standard. +1
