MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / multiply

Method multiply

src/main/java/com/thealgorithms/maths/FFT.java:100–105  ·  view source on GitHub ↗

Multiplies this complex number by another. @param z The number to be multiplied. @return The product.

(Complex z)

Source from the content-addressed store, hash-verified

98 * @return The product.
99 */
100 public Complex multiply(Complex z) {
101 Complex temp = new Complex();
102 temp.real = this.real * z.real - this.img * z.img;
103 temp.img = this.real * z.img + this.img * z.real;
104 return temp;
105 }
106
107 /**
108 * Multiplies this complex number by a scalar.

Callers 11

fftMethod · 0.95
fftBluesteinMethod · 0.95
karatsubaMethod · 0.45
isKaprekarNumberMethod · 0.45
factorialMethod · 0.45
isAutomorphic3Method · 0.45
convolutionFFTMethod · 0.45
sylvesterMethod · 0.45

Calls

no outgoing calls

Tested by 2