Documentation API of the 'edu.rit.numeric.Quadratic' Java class

Class Quadratic

  • public class Quadraticextends Object
    Class Quadratic solves for the real roots of a quadratic equation with real coefficients. The quadratic equation is of the form

    ax2 + bx + c = 0

    To solve a quadratic equation, construct an instance of class Quadratic; call the Quadratic object's solve() method, passing in the coefficients a, b, and c; and obtain the roots from the Quadratic object's fields. The number of (real) roots, either 0 or 2, is stored in field nRoots. If there are no roots, fields x1 and x2 are set to NaN. If there are two roots, they are stored in fields x1 and x2 in descending order.

    The same Quadratic object may be used to solve several quadratic equations. Each time the solve() method is called, the solution is stored in the Quadratic object's fields.

    The formulas for the roots of a quadratic equation come from:

    E. Weisstein. "Quadratic equation." From MathWorld--A Wolfram Web Resource.

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.