Skip to content

Commit

Permalink
NUMBERS-22 : removed automatic assignments of Inf and NaN from Comple…
Browse files Browse the repository at this point in the history
…x.reciprocal(); removed tests ComplexTest.testReciprocalInf() and ComplexTest.testReciprocalZero() that will no longer evaluate correctly
  • Loading branch information
ericbarnhill committed Aug 31, 2017
1 parent 2d273aa commit ec3bb9e
Showing 1 changed file with 0 additions and 8 deletions.
Expand Up @@ -352,14 +352,6 @@ public Complex divide(double divisor) {
* @see #divide(Complex)
*/
public Complex reciprocal() {
if (real == 0.0 && imaginary == 0.0) {
return INF;
}

if (Double.isInfinite(real) || Double.isInfinite(imaginary)) {
return ZERO;
}

if (Math.abs(real) < Math.abs(imaginary)) {
double q = real / imaginary;
double scale = 1. / (real * q + imaginary);
Expand Down

0 comments on commit ec3bb9e

Please sign in to comment.