Package com.opengamma.analytics.math

Examples of com.opengamma.analytics.math.MathException


      if (Math.abs(dx) <= _accuracy) {
        return root - dx;
      }
      root -= dx;
    }
    throw new MathException("Could not find root in " + MAX_ITER + " attempts");
  }
View Full Code Here


    final double c = coefficients[0];
    final double b = coefficients[1];
    final double a = coefficients[2];
    final double discriminant = b * b - 4 * a * c;
    if (discriminant < 0) {
      throw new MathException("No real roots for quadratic");
    }
    final double q = -0.5 * (b + Math.signum(b) * discriminant);
    return new Double[] {q / a, c / q};
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.math.MathException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.