| * Copyright 2023 Google LLC |

| * Use of this source code is governed by a BSD-style license that can be |

| * found in the LICENSE file. |

| * Utilities for dealing with quadratic formulas with one variable: |

| * Calculate a very accurate discriminant. |

| * Note the form of the quadratic is slightly different from the normal formulation. |

| * The method used to calculate the discriminant is from |

| * "On the Cost of Floating-Point Computation Without Extra-Precise Arithmetic" |

| static double Discriminant(double A, double B, double C); |

| * Puts up to 2 real solutions to the equation |

| static int RootsReal(double A, double B, double C, double solution[2]); |

| * Evaluates the quadratic function with the 3 provided coefficients and the |

| static double EvalAt(double A, double B, double C, double t) { |