quad2m (problem 3.2.1, negative)

Percentage Accurate: 53.1% → 85.7%
Time: 59.8s
Alternatives: 7
Speedup: 1.7×

Specification

?
\[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
(FPCore (a b_2 c)
  :precision binary64
  (/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
double code(double a, double b_2, double c) {
	return (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b_2, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    code = (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a
end function
public static double code(double a, double b_2, double c) {
	return (-b_2 - Math.sqrt(((b_2 * b_2) - (a * c)))) / a;
}
def code(a, b_2, c):
	return (-b_2 - math.sqrt(((b_2 * b_2) - (a * c)))) / a
function code(a, b_2, c)
	return Float64(Float64(Float64(-b_2) - sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a)
end
function tmp = code(a, b_2, c)
	tmp = (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a;
end
code[a_, b$95$2_, c_] := N[(N[((-b$95$2) - N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 7 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 53.1% accurate, 1.0× speedup?

\[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
(FPCore (a b_2 c)
  :precision binary64
  (/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
double code(double a, double b_2, double c) {
	return (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b_2, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    code = (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a
end function
public static double code(double a, double b_2, double c) {
	return (-b_2 - Math.sqrt(((b_2 * b_2) - (a * c)))) / a;
}
def code(a, b_2, c):
	return (-b_2 - math.sqrt(((b_2 * b_2) - (a * c)))) / a
function code(a, b_2, c)
	return Float64(Float64(Float64(-b_2) - sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a)
end
function tmp = code(a, b_2, c)
	tmp = (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a;
end
code[a_, b$95$2_, c_] := N[(N[((-b$95$2) - N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a}

Alternative 1: 85.7% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-4208996133570293}{2475880078570760549798248448}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 520000000000000000996151044582027742832296666177899845799457827591677248586074153099842795456253768237056:\\ \;\;\;\;\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2 \cdot b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<= b_2 -4208996133570293/2475880078570760549798248448)
  (* -1/2 (/ c b_2))
  (if (<=
       b_2
       520000000000000000996151044582027742832296666177899845799457827591677248586074153099842795456253768237056)
    (/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a)
    (/ (* -2 b_2) a))))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -1.7e-12) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 5.2e+104) {
		tmp = (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a;
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b_2, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b_2 <= (-1.7d-12)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= 5.2d+104) then
        tmp = (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a
    else
        tmp = ((-2.0d0) * b_2) / a
    end if
    code = tmp
end function
public static double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -1.7e-12) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 5.2e+104) {
		tmp = (-b_2 - Math.sqrt(((b_2 * b_2) - (a * c)))) / a;
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
def code(a, b_2, c):
	tmp = 0
	if b_2 <= -1.7e-12:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= 5.2e+104:
		tmp = (-b_2 - math.sqrt(((b_2 * b_2) - (a * c)))) / a
	else:
		tmp = (-2.0 * b_2) / a
	return tmp
function code(a, b_2, c)
	tmp = 0.0
	if (b_2 <= -1.7e-12)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= 5.2e+104)
		tmp = Float64(Float64(Float64(-b_2) - sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a);
	else
		tmp = Float64(Float64(-2.0 * b_2) / a);
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -1.7e-12)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= 5.2e+104)
		tmp = (-b_2 - sqrt(((b_2 * b_2) - (a * c)))) / a;
	else
		tmp = (-2.0 * b_2) / a;
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -4208996133570293/2475880078570760549798248448], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 520000000000000000996151044582027742832296666177899845799457827591677248586074153099842795456253768237056], N[(N[((-b$95$2) - N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(-2 * b$95$2), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-4208996133570293}{2475880078570760549798248448}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

\mathbf{elif}\;b\_2 \leq 520000000000000000996151044582027742832296666177899845799457827591677248586074153099842795456253768237056:\\
\;\;\;\;\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{-2 \cdot b\_2}{a}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b_2 < -1.7e-12

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-1}{2} \cdot \color{blue}{\frac{c}{b\_2}} \]
      2. lower-/.f6434.9%

        \[\leadsto \frac{-1}{2} \cdot \frac{c}{\color{blue}{b\_2}} \]
    4. Applied rewrites34.9%

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]

    if -1.7e-12 < b_2 < 5.2e104

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]

    if 5.2e104 < b_2

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \color{blue}{\frac{a \cdot c}{b\_2}}}{a} \]
      2. lower-/.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{\color{blue}{b\_2}}}{a} \]
      3. lower-*.f6427.3%

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}{a} \]
    4. Applied rewrites27.3%

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    5. Taylor expanded in b_2 around inf

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
    6. Step-by-step derivation
      1. lower-*.f6435.5%

        \[\leadsto \frac{-2 \cdot \color{blue}{b\_2}}{a} \]
    7. Applied rewrites35.5%

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 81.0% accurate, 0.9× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-7404544304199621}{21778071482940061661655974875633165533184}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq \frac{5687876567655377}{18347988927920572092886567162416695526372519913346248989900710715095383008707878464560148424881005492436992}:\\ \;\;\;\;\frac{\left(-b\_2\right) - \sqrt{-a \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2 \cdot b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -7404544304199621/21778071482940061661655974875633165533184)
  (* -1/2 (/ c b_2))
  (if (<=
       b_2
       5687876567655377/18347988927920572092886567162416695526372519913346248989900710715095383008707878464560148424881005492436992)
    (/ (- (- b_2) (sqrt (- (* a c)))) a)
    (/ (* -2 b_2) a))))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -3.4e-25) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 3.1e-91) {
		tmp = (-b_2 - sqrt(-(a * c))) / a;
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b_2, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b_2 <= (-3.4d-25)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= 3.1d-91) then
        tmp = (-b_2 - sqrt(-(a * c))) / a
    else
        tmp = ((-2.0d0) * b_2) / a
    end if
    code = tmp
end function
public static double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -3.4e-25) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 3.1e-91) {
		tmp = (-b_2 - Math.sqrt(-(a * c))) / a;
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
def code(a, b_2, c):
	tmp = 0
	if b_2 <= -3.4e-25:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= 3.1e-91:
		tmp = (-b_2 - math.sqrt(-(a * c))) / a
	else:
		tmp = (-2.0 * b_2) / a
	return tmp
function code(a, b_2, c)
	tmp = 0.0
	if (b_2 <= -3.4e-25)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= 3.1e-91)
		tmp = Float64(Float64(Float64(-b_2) - sqrt(Float64(-Float64(a * c)))) / a);
	else
		tmp = Float64(Float64(-2.0 * b_2) / a);
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -3.4e-25)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= 3.1e-91)
		tmp = (-b_2 - sqrt(-(a * c))) / a;
	else
		tmp = (-2.0 * b_2) / a;
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -7404544304199621/21778071482940061661655974875633165533184], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 5687876567655377/18347988927920572092886567162416695526372519913346248989900710715095383008707878464560148424881005492436992], N[(N[((-b$95$2) - N[Sqrt[(-N[(a * c), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(-2 * b$95$2), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-7404544304199621}{21778071482940061661655974875633165533184}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

\mathbf{elif}\;b\_2 \leq \frac{5687876567655377}{18347988927920572092886567162416695526372519913346248989900710715095383008707878464560148424881005492436992}:\\
\;\;\;\;\frac{\left(-b\_2\right) - \sqrt{-a \cdot c}}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{-2 \cdot b\_2}{a}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b_2 < -3.4e-25

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-1}{2} \cdot \color{blue}{\frac{c}{b\_2}} \]
      2. lower-/.f6434.9%

        \[\leadsto \frac{-1}{2} \cdot \frac{c}{\color{blue}{b\_2}} \]
    4. Applied rewrites34.9%

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]

    if -3.4e-25 < b_2 < 3.0999999999999998e-91

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around 0

      \[\leadsto \frac{\left(-b\_2\right) - \color{blue}{\sqrt{\mathsf{neg}\left(a \cdot c\right)}}}{a} \]
    3. Step-by-step derivation
      1. lower-sqrt.f64N/A

        \[\leadsto \frac{\left(-b\_2\right) - \sqrt{\mathsf{neg}\left(a \cdot c\right)}}{a} \]
      2. lower-neg.f64N/A

        \[\leadsto \frac{\left(-b\_2\right) - \sqrt{-a \cdot c}}{a} \]
      3. lower-*.f6434.0%

        \[\leadsto \frac{\left(-b\_2\right) - \sqrt{-a \cdot c}}{a} \]
    4. Applied rewrites34.0%

      \[\leadsto \frac{\left(-b\_2\right) - \color{blue}{\sqrt{-a \cdot c}}}{a} \]

    if 3.0999999999999998e-91 < b_2

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \color{blue}{\frac{a \cdot c}{b\_2}}}{a} \]
      2. lower-/.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{\color{blue}{b\_2}}}{a} \]
      3. lower-*.f6427.3%

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}{a} \]
    4. Applied rewrites27.3%

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    5. Taylor expanded in b_2 around inf

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
    6. Step-by-step derivation
      1. lower-*.f6435.5%

        \[\leadsto \frac{-2 \cdot \color{blue}{b\_2}}{a} \]
    7. Applied rewrites35.5%

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 80.5% accurate, 0.9× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-7404544304199621}{21778071482940061661655974875633165533184}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq \frac{5002207817901643}{9619630419041620901435312524449124464130795720328478190417063819395928166869436184427311097384012607618805661696}:\\ \;\;\;\;c \cdot \sqrt{\frac{-1}{a \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2 \cdot b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -7404544304199621/21778071482940061661655974875633165533184)
  (* -1/2 (/ c b_2))
  (if (<=
       b_2
       5002207817901643/9619630419041620901435312524449124464130795720328478190417063819395928166869436184427311097384012607618805661696)
    (* c (sqrt (/ -1 (* a c))))
    (/ (* -2 b_2) a))))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -3.4e-25) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 5.2e-97) {
		tmp = c * sqrt((-1.0 / (a * c)));
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b_2, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b_2 <= (-3.4d-25)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= 5.2d-97) then
        tmp = c * sqrt(((-1.0d0) / (a * c)))
    else
        tmp = ((-2.0d0) * b_2) / a
    end if
    code = tmp
end function
public static double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -3.4e-25) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 5.2e-97) {
		tmp = c * Math.sqrt((-1.0 / (a * c)));
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
def code(a, b_2, c):
	tmp = 0
	if b_2 <= -3.4e-25:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= 5.2e-97:
		tmp = c * math.sqrt((-1.0 / (a * c)))
	else:
		tmp = (-2.0 * b_2) / a
	return tmp
function code(a, b_2, c)
	tmp = 0.0
	if (b_2 <= -3.4e-25)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= 5.2e-97)
		tmp = Float64(c * sqrt(Float64(-1.0 / Float64(a * c))));
	else
		tmp = Float64(Float64(-2.0 * b_2) / a);
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -3.4e-25)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= 5.2e-97)
		tmp = c * sqrt((-1.0 / (a * c)));
	else
		tmp = (-2.0 * b_2) / a;
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -7404544304199621/21778071482940061661655974875633165533184], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 5002207817901643/9619630419041620901435312524449124464130795720328478190417063819395928166869436184427311097384012607618805661696], N[(c * N[Sqrt[N[(-1 / N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(-2 * b$95$2), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-7404544304199621}{21778071482940061661655974875633165533184}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

\mathbf{elif}\;b\_2 \leq \frac{5002207817901643}{9619630419041620901435312524449124464130795720328478190417063819395928166869436184427311097384012607618805661696}:\\
\;\;\;\;c \cdot \sqrt{\frac{-1}{a \cdot c}}\\

\mathbf{else}:\\
\;\;\;\;\frac{-2 \cdot b\_2}{a}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b_2 < -3.4e-25

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-1}{2} \cdot \color{blue}{\frac{c}{b\_2}} \]
      2. lower-/.f6434.9%

        \[\leadsto \frac{-1}{2} \cdot \frac{c}{\color{blue}{b\_2}} \]
    4. Applied rewrites34.9%

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]

    if -3.4e-25 < b_2 < 5.2000000000000001e-97

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in c around -inf

      \[\leadsto \color{blue}{\frac{c \cdot \sqrt{-1 \cdot \frac{a}{c}}}{a}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{c \cdot \sqrt{-1 \cdot \frac{a}{c}}}{\color{blue}{a}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{c \cdot \sqrt{-1 \cdot \frac{a}{c}}}{a} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{c \cdot \sqrt{-1 \cdot \frac{a}{c}}}{a} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{c \cdot \sqrt{-1 \cdot \frac{a}{c}}}{a} \]
      5. lower-/.f6413.8%

        \[\leadsto \frac{c \cdot \sqrt{-1 \cdot \frac{a}{c}}}{a} \]
    4. Applied rewrites13.8%

      \[\leadsto \color{blue}{\frac{c \cdot \sqrt{-1 \cdot \frac{a}{c}}}{a}} \]
    5. Taylor expanded in a around inf

      \[\leadsto c \cdot \color{blue}{\sqrt{\frac{-1}{a \cdot c}}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \sqrt{\frac{-1}{a \cdot c}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto c \cdot \sqrt{\frac{-1}{a \cdot c}} \]
      3. lower-/.f64N/A

        \[\leadsto c \cdot \sqrt{\frac{-1}{a \cdot c}} \]
      4. lower-*.f6428.3%

        \[\leadsto c \cdot \sqrt{\frac{-1}{a \cdot c}} \]
    7. Applied rewrites28.3%

      \[\leadsto c \cdot \color{blue}{\sqrt{\frac{-1}{a \cdot c}}} \]

    if 5.2000000000000001e-97 < b_2

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \color{blue}{\frac{a \cdot c}{b\_2}}}{a} \]
      2. lower-/.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{\color{blue}{b\_2}}}{a} \]
      3. lower-*.f6427.3%

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}{a} \]
    4. Applied rewrites27.3%

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    5. Taylor expanded in b_2 around inf

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
    6. Step-by-step derivation
      1. lower-*.f6435.5%

        \[\leadsto \frac{-2 \cdot \color{blue}{b\_2}}{a} \]
    7. Applied rewrites35.5%

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 71.5% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-7691111892168569}{3495959950985713037648777335653666807949431051290362857597833215614143555340930683513828645730545455985029236965209926766894148041634933679253543217964426223207137977048243664827490388364133151397099610379851714779776678907072458937421726941708288}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq \frac{8322990519904913}{112472844863579909570263462692149546471742427957547915827518889315295939516787196757976017152597271428748022765838022378080206651387357492225212879521629096378368}:\\ \;\;\;\;\sqrt{-1 \cdot \frac{c}{a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2 \cdot b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -7691111892168569/3495959950985713037648777335653666807949431051290362857597833215614143555340930683513828645730545455985029236965209926766894148041634933679253543217964426223207137977048243664827490388364133151397099610379851714779776678907072458937421726941708288)
  (* -1/2 (/ c b_2))
  (if (<=
       b_2
       8322990519904913/112472844863579909570263462692149546471742427957547915827518889315295939516787196757976017152597271428748022765838022378080206651387357492225212879521629096378368)
    (sqrt (* -1 (/ c a)))
    (/ (* -2 b_2) a))))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -2.2e-231) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 7.4e-146) {
		tmp = sqrt((-1.0 * (c / a)));
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b_2, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b_2 <= (-2.2d-231)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= 7.4d-146) then
        tmp = sqrt(((-1.0d0) * (c / a)))
    else
        tmp = ((-2.0d0) * b_2) / a
    end if
    code = tmp
end function
public static double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -2.2e-231) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 7.4e-146) {
		tmp = Math.sqrt((-1.0 * (c / a)));
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
def code(a, b_2, c):
	tmp = 0
	if b_2 <= -2.2e-231:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= 7.4e-146:
		tmp = math.sqrt((-1.0 * (c / a)))
	else:
		tmp = (-2.0 * b_2) / a
	return tmp
function code(a, b_2, c)
	tmp = 0.0
	if (b_2 <= -2.2e-231)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= 7.4e-146)
		tmp = sqrt(Float64(-1.0 * Float64(c / a)));
	else
		tmp = Float64(Float64(-2.0 * b_2) / a);
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -2.2e-231)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= 7.4e-146)
		tmp = sqrt((-1.0 * (c / a)));
	else
		tmp = (-2.0 * b_2) / a;
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -7691111892168569/3495959950985713037648777335653666807949431051290362857597833215614143555340930683513828645730545455985029236965209926766894148041634933679253543217964426223207137977048243664827490388364133151397099610379851714779776678907072458937421726941708288], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 8322990519904913/112472844863579909570263462692149546471742427957547915827518889315295939516787196757976017152597271428748022765838022378080206651387357492225212879521629096378368], N[Sqrt[N[(-1 * N[(c / a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(-2 * b$95$2), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-7691111892168569}{3495959950985713037648777335653666807949431051290362857597833215614143555340930683513828645730545455985029236965209926766894148041634933679253543217964426223207137977048243664827490388364133151397099610379851714779776678907072458937421726941708288}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

\mathbf{elif}\;b\_2 \leq \frac{8322990519904913}{112472844863579909570263462692149546471742427957547915827518889315295939516787196757976017152597271428748022765838022378080206651387357492225212879521629096378368}:\\
\;\;\;\;\sqrt{-1 \cdot \frac{c}{a}}\\

\mathbf{else}:\\
\;\;\;\;\frac{-2 \cdot b\_2}{a}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b_2 < -2.2000000000000001e-231

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-1}{2} \cdot \color{blue}{\frac{c}{b\_2}} \]
      2. lower-/.f6434.9%

        \[\leadsto \frac{-1}{2} \cdot \frac{c}{\color{blue}{b\_2}} \]
    4. Applied rewrites34.9%

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]

    if -2.2000000000000001e-231 < b_2 < 7.3999999999999997e-146

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in a around -inf

      \[\leadsto \color{blue}{\sqrt{-1 \cdot \frac{c}{a}}} \]
    3. Step-by-step derivation
      1. lower-sqrt.f64N/A

        \[\leadsto \sqrt{-1 \cdot \frac{c}{a}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{-1 \cdot \frac{c}{a}} \]
      3. lower-/.f6417.7%

        \[\leadsto \sqrt{-1 \cdot \frac{c}{a}} \]
    4. Applied rewrites17.7%

      \[\leadsto \color{blue}{\sqrt{-1 \cdot \frac{c}{a}}} \]

    if 7.3999999999999997e-146 < b_2

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \color{blue}{\frac{a \cdot c}{b\_2}}}{a} \]
      2. lower-/.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{\color{blue}{b\_2}}}{a} \]
      3. lower-*.f6427.3%

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}{a} \]
    4. Applied rewrites27.3%

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    5. Taylor expanded in b_2 around inf

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
    6. Step-by-step derivation
      1. lower-*.f6435.5%

        \[\leadsto \frac{-2 \cdot \color{blue}{b\_2}}{a} \]
    7. Applied rewrites35.5%

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 68.0% accurate, 1.7× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-3643240559531591}{202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2 \cdot b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -3643240559531591/202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784)
  (* -1/2 (/ c b_2))
  (/ (* -2 b_2) a)))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -1.8e-308) {
		tmp = -0.5 * (c / b_2);
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b_2, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b_2 <= (-1.8d-308)) then
        tmp = (-0.5d0) * (c / b_2)
    else
        tmp = ((-2.0d0) * b_2) / a
    end if
    code = tmp
end function
public static double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -1.8e-308) {
		tmp = -0.5 * (c / b_2);
	} else {
		tmp = (-2.0 * b_2) / a;
	}
	return tmp;
}
def code(a, b_2, c):
	tmp = 0
	if b_2 <= -1.8e-308:
		tmp = -0.5 * (c / b_2)
	else:
		tmp = (-2.0 * b_2) / a
	return tmp
function code(a, b_2, c)
	tmp = 0.0
	if (b_2 <= -1.8e-308)
		tmp = Float64(-0.5 * Float64(c / b_2));
	else
		tmp = Float64(Float64(-2.0 * b_2) / a);
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -1.8e-308)
		tmp = -0.5 * (c / b_2);
	else
		tmp = (-2.0 * b_2) / a;
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -3643240559531591/202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(-2 * b$95$2), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-3643240559531591}{202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

\mathbf{else}:\\
\;\;\;\;\frac{-2 \cdot b\_2}{a}\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b_2 < -1.7999999999999999e-308

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-1}{2} \cdot \color{blue}{\frac{c}{b\_2}} \]
      2. lower-/.f6434.9%

        \[\leadsto \frac{-1}{2} \cdot \frac{c}{\color{blue}{b\_2}} \]
    4. Applied rewrites34.9%

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]

    if -1.7999999999999999e-308 < b_2

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \color{blue}{\frac{a \cdot c}{b\_2}}}{a} \]
      2. lower-/.f64N/A

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{\color{blue}{b\_2}}}{a} \]
      3. lower-*.f6427.3%

        \[\leadsto \frac{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}{a} \]
    4. Applied rewrites27.3%

      \[\leadsto \frac{\color{blue}{\frac{-1}{2} \cdot \frac{a \cdot c}{b\_2}}}{a} \]
    5. Taylor expanded in b_2 around inf

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
    6. Step-by-step derivation
      1. lower-*.f6435.5%

        \[\leadsto \frac{-2 \cdot \color{blue}{b\_2}}{a} \]
    7. Applied rewrites35.5%

      \[\leadsto \frac{\color{blue}{-2 \cdot b\_2}}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 48.0% accurate, 1.7× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-3643240559531591}{202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -3643240559531591/202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784)
  (* -1/2 (/ c b_2))
  (/ (- b_2) a)))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -1.8e-308) {
		tmp = -0.5 * (c / b_2);
	} else {
		tmp = -b_2 / a;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b_2, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b_2 <= (-1.8d-308)) then
        tmp = (-0.5d0) * (c / b_2)
    else
        tmp = -b_2 / a
    end if
    code = tmp
end function
public static double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -1.8e-308) {
		tmp = -0.5 * (c / b_2);
	} else {
		tmp = -b_2 / a;
	}
	return tmp;
}
def code(a, b_2, c):
	tmp = 0
	if b_2 <= -1.8e-308:
		tmp = -0.5 * (c / b_2)
	else:
		tmp = -b_2 / a
	return tmp
function code(a, b_2, c)
	tmp = 0.0
	if (b_2 <= -1.8e-308)
		tmp = Float64(-0.5 * Float64(c / b_2));
	else
		tmp = Float64(Float64(-b_2) / a);
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -1.8e-308)
		tmp = -0.5 * (c / b_2);
	else
		tmp = -b_2 / a;
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -3643240559531591/202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], N[((-b$95$2) / a), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-3643240559531591}{202402253307310618352495346718917307049556649764142118356901358027430339567995346891960383701437124495187077864316811911389808737385793476867013399940738509921517424276566361364466907742093216341239767678472745068562007483424692698618103355649159556340810056512358769552333414615230502532186327508646006263307707741093494784}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

\mathbf{else}:\\
\;\;\;\;\frac{-b\_2}{a}\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b_2 < -1.7999999999999999e-308

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in b_2 around -inf

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-1}{2} \cdot \color{blue}{\frac{c}{b\_2}} \]
      2. lower-/.f6434.9%

        \[\leadsto \frac{-1}{2} \cdot \frac{c}{\color{blue}{b\_2}} \]
    4. Applied rewrites34.9%

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b\_2}} \]

    if -1.7999999999999999e-308 < b_2

    1. Initial program 53.1%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Taylor expanded in a around inf

      \[\leadsto \frac{\color{blue}{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}}{a} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{a \cdot \color{blue}{\left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}}{a} \]
      2. lower--.f64N/A

        \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \color{blue}{\sqrt{-1 \cdot \frac{c}{a}}}\right)}{a} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{\color{blue}{-1 \cdot \frac{c}{a}}}\right)}{a} \]
      4. lower-/.f64N/A

        \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \color{blue}{\frac{c}{a}}}\right)}{a} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}{a} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}{a} \]
      7. lower-/.f6419.6%

        \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}{a} \]
    4. Applied rewrites19.6%

      \[\leadsto \frac{\color{blue}{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}}{a} \]
    5. Taylor expanded in b_2 around inf

      \[\leadsto \frac{-1 \cdot \color{blue}{b\_2}}{a} \]
    6. Step-by-step derivation
      1. lower-*.f6415.6%

        \[\leadsto \frac{-1 \cdot b\_2}{a} \]
    7. Applied rewrites15.6%

      \[\leadsto \frac{-1 \cdot \color{blue}{b\_2}}{a} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{-1 \cdot b\_2}{a} \]
      2. mul-1-negN/A

        \[\leadsto \frac{\mathsf{neg}\left(b\_2\right)}{a} \]
      3. lift-neg.f6415.6%

        \[\leadsto \frac{-b\_2}{a} \]
    9. Applied rewrites15.6%

      \[\leadsto \frac{-b\_2}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 15.6% accurate, 2.9× speedup?

\[\frac{-b\_2}{a} \]
(FPCore (a b_2 c)
  :precision binary64
  (/ (- b_2) a))
double code(double a, double b_2, double c) {
	return -b_2 / a;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b_2, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    code = -b_2 / a
end function
public static double code(double a, double b_2, double c) {
	return -b_2 / a;
}
def code(a, b_2, c):
	return -b_2 / a
function code(a, b_2, c)
	return Float64(Float64(-b_2) / a)
end
function tmp = code(a, b_2, c)
	tmp = -b_2 / a;
end
code[a_, b$95$2_, c_] := N[((-b$95$2) / a), $MachinePrecision]
\frac{-b\_2}{a}
Derivation
  1. Initial program 53.1%

    \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
  2. Taylor expanded in a around inf

    \[\leadsto \frac{\color{blue}{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}}{a} \]
  3. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \frac{a \cdot \color{blue}{\left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}}{a} \]
    2. lower--.f64N/A

      \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \color{blue}{\sqrt{-1 \cdot \frac{c}{a}}}\right)}{a} \]
    3. lower-*.f64N/A

      \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{\color{blue}{-1 \cdot \frac{c}{a}}}\right)}{a} \]
    4. lower-/.f64N/A

      \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \color{blue}{\frac{c}{a}}}\right)}{a} \]
    5. lower-sqrt.f64N/A

      \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}{a} \]
    6. lower-*.f64N/A

      \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}{a} \]
    7. lower-/.f6419.6%

      \[\leadsto \frac{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}{a} \]
  4. Applied rewrites19.6%

    \[\leadsto \frac{\color{blue}{a \cdot \left(-1 \cdot \frac{b\_2}{a} - \sqrt{-1 \cdot \frac{c}{a}}\right)}}{a} \]
  5. Taylor expanded in b_2 around inf

    \[\leadsto \frac{-1 \cdot \color{blue}{b\_2}}{a} \]
  6. Step-by-step derivation
    1. lower-*.f6415.6%

      \[\leadsto \frac{-1 \cdot b\_2}{a} \]
  7. Applied rewrites15.6%

    \[\leadsto \frac{-1 \cdot \color{blue}{b\_2}}{a} \]
  8. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \frac{-1 \cdot b\_2}{a} \]
    2. mul-1-negN/A

      \[\leadsto \frac{\mathsf{neg}\left(b\_2\right)}{a} \]
    3. lift-neg.f6415.6%

      \[\leadsto \frac{-b\_2}{a} \]
  9. Applied rewrites15.6%

    \[\leadsto \frac{-b\_2}{a} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (a b_2 c)
  :name "quad2m (problem 3.2.1, negative)"
  :precision binary64
  :herbie-expected 10
  (/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))