quad2m (problem 3.2.1, negative)

Percentage Accurate: 52.3% → 87.6%
Time: 2.7s
Alternatives: 10
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 10 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: 52.3% 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: 87.6% accurate, 0.6× speedup?

\[\begin{array}{l} t_0 := \sqrt{b\_2 \cdot b\_2 - c \cdot a}\\ \mathbf{if}\;b\_2 \leq -6099999999999999841728801650498289360189552030478590321787836116030972686527957979843325463625728:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq \frac{-4678880108828875}{346583711765101857447301773017885462929554634421977071896309947576827663475703202879996800763017447262173901370175446478621769728}:\\ \;\;\;\;\frac{\frac{0 + c \cdot a}{a}}{t\_0 - b\_2}\\ \mathbf{elif}\;b\_2 \leq 240000000000000007829447601155211065538340938625732871707250923667456:\\ \;\;\;\;\frac{-t\_0}{a} - \frac{b\_2}{a}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (let* ((t_0 (sqrt (- (* b_2 b_2) (* c a)))))
  (if (<=
       b_2
       -6099999999999999841728801650498289360189552030478590321787836116030972686527957979843325463625728)
    (* -1/2 (/ c b_2))
    (if (<=
         b_2
         -4678880108828875/346583711765101857447301773017885462929554634421977071896309947576827663475703202879996800763017447262173901370175446478621769728)
      (/ (/ (+ 0 (* c a)) a) (- t_0 b_2))
      (if (<=
           b_2
           240000000000000007829447601155211065538340938625732871707250923667456)
        (- (/ (- t_0) a) (/ b_2 a))
        (* -2 (/ b_2 a)))))))
double code(double a, double b_2, double c) {
	double t_0 = sqrt(((b_2 * b_2) - (c * a)));
	double tmp;
	if (b_2 <= -6.1e+96) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= -1.35e-113) {
		tmp = ((0.0 + (c * a)) / a) / (t_0 - b_2);
	} else if (b_2 <= 2.4e+68) {
		tmp = (-t_0 / a) - (b_2 / 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) :: t_0
    real(8) :: tmp
    t_0 = sqrt(((b_2 * b_2) - (c * a)))
    if (b_2 <= (-6.1d+96)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= (-1.35d-113)) then
        tmp = ((0.0d0 + (c * a)) / a) / (t_0 - b_2)
    else if (b_2 <= 2.4d+68) then
        tmp = (-t_0 / a) - (b_2 / 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 t_0 = Math.sqrt(((b_2 * b_2) - (c * a)));
	double tmp;
	if (b_2 <= -6.1e+96) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= -1.35e-113) {
		tmp = ((0.0 + (c * a)) / a) / (t_0 - b_2);
	} else if (b_2 <= 2.4e+68) {
		tmp = (-t_0 / a) - (b_2 / a);
	} else {
		tmp = -2.0 * (b_2 / a);
	}
	return tmp;
}
def code(a, b_2, c):
	t_0 = math.sqrt(((b_2 * b_2) - (c * a)))
	tmp = 0
	if b_2 <= -6.1e+96:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= -1.35e-113:
		tmp = ((0.0 + (c * a)) / a) / (t_0 - b_2)
	elif b_2 <= 2.4e+68:
		tmp = (-t_0 / a) - (b_2 / a)
	else:
		tmp = -2.0 * (b_2 / a)
	return tmp
function code(a, b_2, c)
	t_0 = sqrt(Float64(Float64(b_2 * b_2) - Float64(c * a)))
	tmp = 0.0
	if (b_2 <= -6.1e+96)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= -1.35e-113)
		tmp = Float64(Float64(Float64(0.0 + Float64(c * a)) / a) / Float64(t_0 - b_2));
	elseif (b_2 <= 2.4e+68)
		tmp = Float64(Float64(Float64(-t_0) / a) - Float64(b_2 / a));
	else
		tmp = Float64(-2.0 * Float64(b_2 / a));
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	t_0 = sqrt(((b_2 * b_2) - (c * a)));
	tmp = 0.0;
	if (b_2 <= -6.1e+96)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= -1.35e-113)
		tmp = ((0.0 + (c * a)) / a) / (t_0 - b_2);
	elseif (b_2 <= 2.4e+68)
		tmp = (-t_0 / a) - (b_2 / a);
	else
		tmp = -2.0 * (b_2 / a);
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$2, -6099999999999999841728801650498289360189552030478590321787836116030972686527957979843325463625728], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, -4678880108828875/346583711765101857447301773017885462929554634421977071896309947576827663475703202879996800763017447262173901370175446478621769728], N[(N[(N[(0 + N[(c * a), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] / N[(t$95$0 - b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 240000000000000007829447601155211065538340938625732871707250923667456], N[(N[((-t$95$0) / a), $MachinePrecision] - N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision], N[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \sqrt{b\_2 \cdot b\_2 - c \cdot a}\\
\mathbf{if}\;b\_2 \leq -6099999999999999841728801650498289360189552030478590321787836116030972686527957979843325463625728:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

\mathbf{elif}\;b\_2 \leq \frac{-4678880108828875}{346583711765101857447301773017885462929554634421977071896309947576827663475703202879996800763017447262173901370175446478621769728}:\\
\;\;\;\;\frac{\frac{0 + c \cdot a}{a}}{t\_0 - b\_2}\\

\mathbf{elif}\;b\_2 \leq 240000000000000007829447601155211065538340938625732871707250923667456:\\
\;\;\;\;\frac{-t\_0}{a} - \frac{b\_2}{a}\\

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b_2 < -6.0999999999999998e96

    1. Initial program 52.3%

      \[\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-/.f6435.8%

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

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

    if -6.0999999999999998e96 < b_2 < -1.35e-113

    1. Initial program 52.3%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}\right)\right)}{\mathsf{neg}\left(a\right)}} \]
      3. div-flipN/A

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

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

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

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

        \[\leadsto \frac{1}{\frac{-a}{\mathsf{neg}\left(\color{blue}{\left(\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}\right)}\right)}} \]
      8. sub-negate-revN/A

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

        \[\leadsto \frac{1}{\frac{-a}{\color{blue}{\sqrt{b\_2 \cdot b\_2 - a \cdot c} + \left(\mathsf{neg}\left(\left(-b\_2\right)\right)\right)}}} \]
      10. +-commutativeN/A

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

        \[\leadsto \frac{1}{\frac{-a}{\color{blue}{\left(\mathsf{neg}\left(\left(-b\_2\right)\right)\right) + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}}} \]
      12. lift-neg.f64N/A

        \[\leadsto \frac{1}{\frac{-a}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(b\_2\right)\right)}\right)\right) + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}} \]
      13. remove-double-neg52.2%

        \[\leadsto \frac{1}{\frac{-a}{\color{blue}{b\_2} + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}} \]
      14. lift-*.f64N/A

        \[\leadsto \frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - \color{blue}{a \cdot c}}}} \]
      15. *-commutativeN/A

        \[\leadsto \frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - \color{blue}{c \cdot a}}}} \]
      16. lower-*.f6452.2%

        \[\leadsto \frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - \color{blue}{c \cdot a}}}} \]
    3. Applied rewrites52.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - c \cdot a}}}} \]
    4. Applied rewrites47.8%

      \[\leadsto \color{blue}{\frac{\frac{0 + c \cdot a}{a}}{\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2}} \]

    if -1.35e-113 < b_2 < 2.4000000000000001e68

    1. Initial program 52.3%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}\right)}\right)}{\mathsf{neg}\left(a\right)} \]
      4. sub-negate-revN/A

        \[\leadsto \frac{\color{blue}{\sqrt{b\_2 \cdot b\_2 - a \cdot c} - \left(-b\_2\right)}}{\mathsf{neg}\left(a\right)} \]
      5. div-subN/A

        \[\leadsto \color{blue}{\frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{\mathsf{neg}\left(a\right)} - \frac{-b\_2}{\mathsf{neg}\left(a\right)}} \]
      6. distribute-neg-frac2N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a}\right)\right) - \frac{b\_2}{a}} \]
      10. distribute-neg-fracN/A

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

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

        \[\leadsto \frac{\color{blue}{-\sqrt{b\_2 \cdot b\_2 - a \cdot c}}}{a} - \frac{b\_2}{a} \]
      13. lift-*.f64N/A

        \[\leadsto \frac{-\sqrt{b\_2 \cdot b\_2 - \color{blue}{a \cdot c}}}{a} - \frac{b\_2}{a} \]
      14. *-commutativeN/A

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

        \[\leadsto \frac{-\sqrt{b\_2 \cdot b\_2 - \color{blue}{c \cdot a}}}{a} - \frac{b\_2}{a} \]
    3. Applied rewrites51.7%

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

    if 2.4000000000000001e68 < b_2

    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

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

Alternative 2: 87.6% accurate, 0.6× speedup?

\[\begin{array}{l} t_0 := \sqrt{b\_2 \cdot b\_2 - c \cdot a}\\ \mathbf{if}\;b\_2 \leq -54999999999999998043547987204697905647054195046560117650923133451965273229273060805030445056:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq \frac{-7225426368408531}{1852673427797059126777135760139006525652319754650249024631321344126610074238976}:\\ \;\;\;\;c \cdot \frac{a}{\left(t\_0 - b\_2\right) \cdot a}\\ \mathbf{elif}\;b\_2 \leq 240000000000000007829447601155211065538340938625732871707250923667456:\\ \;\;\;\;\frac{-t\_0}{a} - \frac{b\_2}{a}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (let* ((t_0 (sqrt (- (* b_2 b_2) (* c a)))))
  (if (<=
       b_2
       -54999999999999998043547987204697905647054195046560117650923133451965273229273060805030445056)
    (* -1/2 (/ c b_2))
    (if (<=
         b_2
         -7225426368408531/1852673427797059126777135760139006525652319754650249024631321344126610074238976)
      (* c (/ a (* (- t_0 b_2) a)))
      (if (<=
           b_2
           240000000000000007829447601155211065538340938625732871707250923667456)
        (- (/ (- t_0) a) (/ b_2 a))
        (* -2 (/ b_2 a)))))))
double code(double a, double b_2, double c) {
	double t_0 = sqrt(((b_2 * b_2) - (c * a)));
	double tmp;
	if (b_2 <= -5.5e+91) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= -3.9e-63) {
		tmp = c * (a / ((t_0 - b_2) * a));
	} else if (b_2 <= 2.4e+68) {
		tmp = (-t_0 / a) - (b_2 / 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) :: t_0
    real(8) :: tmp
    t_0 = sqrt(((b_2 * b_2) - (c * a)))
    if (b_2 <= (-5.5d+91)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= (-3.9d-63)) then
        tmp = c * (a / ((t_0 - b_2) * a))
    else if (b_2 <= 2.4d+68) then
        tmp = (-t_0 / a) - (b_2 / 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 t_0 = Math.sqrt(((b_2 * b_2) - (c * a)));
	double tmp;
	if (b_2 <= -5.5e+91) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= -3.9e-63) {
		tmp = c * (a / ((t_0 - b_2) * a));
	} else if (b_2 <= 2.4e+68) {
		tmp = (-t_0 / a) - (b_2 / a);
	} else {
		tmp = -2.0 * (b_2 / a);
	}
	return tmp;
}
def code(a, b_2, c):
	t_0 = math.sqrt(((b_2 * b_2) - (c * a)))
	tmp = 0
	if b_2 <= -5.5e+91:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= -3.9e-63:
		tmp = c * (a / ((t_0 - b_2) * a))
	elif b_2 <= 2.4e+68:
		tmp = (-t_0 / a) - (b_2 / a)
	else:
		tmp = -2.0 * (b_2 / a)
	return tmp
function code(a, b_2, c)
	t_0 = sqrt(Float64(Float64(b_2 * b_2) - Float64(c * a)))
	tmp = 0.0
	if (b_2 <= -5.5e+91)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= -3.9e-63)
		tmp = Float64(c * Float64(a / Float64(Float64(t_0 - b_2) * a)));
	elseif (b_2 <= 2.4e+68)
		tmp = Float64(Float64(Float64(-t_0) / a) - Float64(b_2 / a));
	else
		tmp = Float64(-2.0 * Float64(b_2 / a));
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	t_0 = sqrt(((b_2 * b_2) - (c * a)));
	tmp = 0.0;
	if (b_2 <= -5.5e+91)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= -3.9e-63)
		tmp = c * (a / ((t_0 - b_2) * a));
	elseif (b_2 <= 2.4e+68)
		tmp = (-t_0 / a) - (b_2 / a);
	else
		tmp = -2.0 * (b_2 / a);
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$2, -54999999999999998043547987204697905647054195046560117650923133451965273229273060805030445056], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, -7225426368408531/1852673427797059126777135760139006525652319754650249024631321344126610074238976], N[(c * N[(a / N[(N[(t$95$0 - b$95$2), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 240000000000000007829447601155211065538340938625732871707250923667456], N[(N[((-t$95$0) / a), $MachinePrecision] - N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision], N[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \sqrt{b\_2 \cdot b\_2 - c \cdot a}\\
\mathbf{if}\;b\_2 \leq -54999999999999998043547987204697905647054195046560117650923133451965273229273060805030445056:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

\mathbf{elif}\;b\_2 \leq \frac{-7225426368408531}{1852673427797059126777135760139006525652319754650249024631321344126610074238976}:\\
\;\;\;\;c \cdot \frac{a}{\left(t\_0 - b\_2\right) \cdot a}\\

\mathbf{elif}\;b\_2 \leq 240000000000000007829447601155211065538340938625732871707250923667456:\\
\;\;\;\;\frac{-t\_0}{a} - \frac{b\_2}{a}\\

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b_2 < -5.4999999999999998e91

    1. Initial program 52.3%

      \[\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-/.f6435.8%

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

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

    if -5.4999999999999998e91 < b_2 < -3.9000000000000002e-63

    1. Initial program 52.3%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}\right)\right)}{\mathsf{neg}\left(a\right)}} \]
      3. div-flipN/A

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

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

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

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

        \[\leadsto \frac{1}{\frac{-a}{\mathsf{neg}\left(\color{blue}{\left(\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}\right)}\right)}} \]
      8. sub-negate-revN/A

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

        \[\leadsto \frac{1}{\frac{-a}{\color{blue}{\sqrt{b\_2 \cdot b\_2 - a \cdot c} + \left(\mathsf{neg}\left(\left(-b\_2\right)\right)\right)}}} \]
      10. +-commutativeN/A

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

        \[\leadsto \frac{1}{\frac{-a}{\color{blue}{\left(\mathsf{neg}\left(\left(-b\_2\right)\right)\right) + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}}} \]
      12. lift-neg.f64N/A

        \[\leadsto \frac{1}{\frac{-a}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(b\_2\right)\right)}\right)\right) + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}} \]
      13. remove-double-neg52.2%

        \[\leadsto \frac{1}{\frac{-a}{\color{blue}{b\_2} + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}} \]
      14. lift-*.f64N/A

        \[\leadsto \frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - \color{blue}{a \cdot c}}}} \]
      15. *-commutativeN/A

        \[\leadsto \frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - \color{blue}{c \cdot a}}}} \]
      16. lower-*.f6452.2%

        \[\leadsto \frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - \color{blue}{c \cdot a}}}} \]
    3. Applied rewrites52.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - c \cdot a}}}} \]
    4. Applied rewrites42.6%

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

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

        \[\leadsto \frac{\color{blue}{0 + c \cdot a}}{\left(\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2\right) \cdot a} \]
      3. +-lft-identityN/A

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

        \[\leadsto \frac{\color{blue}{c \cdot a}}{\left(\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2\right) \cdot a} \]
      5. associate-/l*N/A

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

        \[\leadsto \color{blue}{c \cdot \frac{a}{\left(\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2\right) \cdot a}} \]
      7. lower-/.f6446.0%

        \[\leadsto c \cdot \color{blue}{\frac{a}{\left(\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2\right) \cdot a}} \]
    6. Applied rewrites46.0%

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

    if -3.9000000000000002e-63 < b_2 < 2.4000000000000001e68

    1. Initial program 52.3%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\color{blue}{\left(\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}\right)}\right)}{\mathsf{neg}\left(a\right)} \]
      4. sub-negate-revN/A

        \[\leadsto \frac{\color{blue}{\sqrt{b\_2 \cdot b\_2 - a \cdot c} - \left(-b\_2\right)}}{\mathsf{neg}\left(a\right)} \]
      5. div-subN/A

        \[\leadsto \color{blue}{\frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{\mathsf{neg}\left(a\right)} - \frac{-b\_2}{\mathsf{neg}\left(a\right)}} \]
      6. distribute-neg-frac2N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a}\right)\right) - \frac{b\_2}{a}} \]
      10. distribute-neg-fracN/A

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

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

        \[\leadsto \frac{\color{blue}{-\sqrt{b\_2 \cdot b\_2 - a \cdot c}}}{a} - \frac{b\_2}{a} \]
      13. lift-*.f64N/A

        \[\leadsto \frac{-\sqrt{b\_2 \cdot b\_2 - \color{blue}{a \cdot c}}}{a} - \frac{b\_2}{a} \]
      14. *-commutativeN/A

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

        \[\leadsto \frac{-\sqrt{b\_2 \cdot b\_2 - \color{blue}{c \cdot a}}}{a} - \frac{b\_2}{a} \]
    3. Applied rewrites51.7%

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

    if 2.4000000000000001e68 < b_2

    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

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

Alternative 3: 87.4% accurate, 0.7× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq -54999999999999998043547987204697905647054195046560117650923133451965273229273060805030445056:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq \frac{-7225426368408531}{1852673427797059126777135760139006525652319754650249024631321344126610074238976}:\\ \;\;\;\;c \cdot \frac{a}{\left(\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2\right) \cdot a}\\ \mathbf{elif}\;b\_2 \leq 240000000000000007829447601155211065538340938625732871707250923667456:\\ \;\;\;\;\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -54999999999999998043547987204697905647054195046560117650923133451965273229273060805030445056)
  (* -1/2 (/ c b_2))
  (if (<=
       b_2
       -7225426368408531/1852673427797059126777135760139006525652319754650249024631321344126610074238976)
    (* c (/ a (* (- (sqrt (- (* b_2 b_2) (* c a))) b_2) a)))
    (if (<=
         b_2
         240000000000000007829447601155211065538340938625732871707250923667456)
      (/ (- (- 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 <= -5.5e+91) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= -3.9e-63) {
		tmp = c * (a / ((sqrt(((b_2 * b_2) - (c * a))) - b_2) * a));
	} else if (b_2 <= 2.4e+68) {
		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 <= (-5.5d+91)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= (-3.9d-63)) then
        tmp = c * (a / ((sqrt(((b_2 * b_2) - (c * a))) - b_2) * a))
    else if (b_2 <= 2.4d+68) 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 <= -5.5e+91) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= -3.9e-63) {
		tmp = c * (a / ((Math.sqrt(((b_2 * b_2) - (c * a))) - b_2) * a));
	} else if (b_2 <= 2.4e+68) {
		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 <= -5.5e+91:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= -3.9e-63:
		tmp = c * (a / ((math.sqrt(((b_2 * b_2) - (c * a))) - b_2) * a))
	elif b_2 <= 2.4e+68:
		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 <= -5.5e+91)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= -3.9e-63)
		tmp = Float64(c * Float64(a / Float64(Float64(sqrt(Float64(Float64(b_2 * b_2) - Float64(c * a))) - b_2) * a)));
	elseif (b_2 <= 2.4e+68)
		tmp = Float64(Float64(Float64(-b_2) - sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a);
	else
		tmp = Float64(-2.0 * Float64(b_2 / a));
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -5.5e+91)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= -3.9e-63)
		tmp = c * (a / ((sqrt(((b_2 * b_2) - (c * a))) - b_2) * a));
	elseif (b_2 <= 2.4e+68)
		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, -54999999999999998043547987204697905647054195046560117650923133451965273229273060805030445056], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, -7225426368408531/1852673427797059126777135760139006525652319754650249024631321344126610074238976], N[(c * N[(a / N[(N[(N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b$95$2), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 240000000000000007829447601155211065538340938625732871707250923667456], 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[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq -54999999999999998043547987204697905647054195046560117650923133451965273229273060805030445056:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

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

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

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b_2 < -5.4999999999999998e91

    1. Initial program 52.3%

      \[\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-/.f6435.8%

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

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

    if -5.4999999999999998e91 < b_2 < -3.9000000000000002e-63

    1. Initial program 52.3%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Step-by-step derivation
      1. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\mathsf{neg}\left(\left(\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}\right)\right)}{\mathsf{neg}\left(a\right)}} \]
      3. div-flipN/A

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

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

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

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

        \[\leadsto \frac{1}{\frac{-a}{\mathsf{neg}\left(\color{blue}{\left(\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}\right)}\right)}} \]
      8. sub-negate-revN/A

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

        \[\leadsto \frac{1}{\frac{-a}{\color{blue}{\sqrt{b\_2 \cdot b\_2 - a \cdot c} + \left(\mathsf{neg}\left(\left(-b\_2\right)\right)\right)}}} \]
      10. +-commutativeN/A

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

        \[\leadsto \frac{1}{\frac{-a}{\color{blue}{\left(\mathsf{neg}\left(\left(-b\_2\right)\right)\right) + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}}} \]
      12. lift-neg.f64N/A

        \[\leadsto \frac{1}{\frac{-a}{\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(b\_2\right)\right)}\right)\right) + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}} \]
      13. remove-double-neg52.2%

        \[\leadsto \frac{1}{\frac{-a}{\color{blue}{b\_2} + \sqrt{b\_2 \cdot b\_2 - a \cdot c}}} \]
      14. lift-*.f64N/A

        \[\leadsto \frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - \color{blue}{a \cdot c}}}} \]
      15. *-commutativeN/A

        \[\leadsto \frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - \color{blue}{c \cdot a}}}} \]
      16. lower-*.f6452.2%

        \[\leadsto \frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - \color{blue}{c \cdot a}}}} \]
    3. Applied rewrites52.2%

      \[\leadsto \color{blue}{\frac{1}{\frac{-a}{b\_2 + \sqrt{b\_2 \cdot b\_2 - c \cdot a}}}} \]
    4. Applied rewrites42.6%

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

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

        \[\leadsto \frac{\color{blue}{0 + c \cdot a}}{\left(\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2\right) \cdot a} \]
      3. +-lft-identityN/A

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

        \[\leadsto \frac{\color{blue}{c \cdot a}}{\left(\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2\right) \cdot a} \]
      5. associate-/l*N/A

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

        \[\leadsto \color{blue}{c \cdot \frac{a}{\left(\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2\right) \cdot a}} \]
      7. lower-/.f6446.0%

        \[\leadsto c \cdot \color{blue}{\frac{a}{\left(\sqrt{b\_2 \cdot b\_2 - c \cdot a} - b\_2\right) \cdot a}} \]
    6. Applied rewrites46.0%

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

    if -3.9000000000000002e-63 < b_2 < 2.4000000000000001e68

    1. Initial program 52.3%

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

    if 2.4000000000000001e68 < b_2

    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

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

Alternative 4: 85.9% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-7225426368408531}{1852673427797059126777135760139006525652319754650249024631321344126610074238976}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 240000000000000007829447601155211065538340938625732871707250923667456:\\ \;\;\;\;\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -7225426368408531/1852673427797059126777135760139006525652319754650249024631321344126610074238976)
  (* -1/2 (/ c b_2))
  (if (<=
       b_2
       240000000000000007829447601155211065538340938625732871707250923667456)
    (/ (- (- 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 <= -3.9e-63) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 2.4e+68) {
		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 <= (-3.9d-63)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= 2.4d+68) 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 <= -3.9e-63) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 2.4e+68) {
		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 <= -3.9e-63:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= 2.4e+68:
		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 <= -3.9e-63)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= 2.4e+68)
		tmp = Float64(Float64(Float64(-b_2) - sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a);
	else
		tmp = Float64(-2.0 * Float64(b_2 / a));
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -3.9e-63)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= 2.4e+68)
		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, -7225426368408531/1852673427797059126777135760139006525652319754650249024631321344126610074238976], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 240000000000000007829447601155211065538340938625732871707250923667456], 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[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-7225426368408531}{1852673427797059126777135760139006525652319754650249024631321344126610074238976}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

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

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


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

    1. Initial program 52.3%

      \[\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-/.f6435.8%

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

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

    if -3.9000000000000002e-63 < b_2 < 2.4000000000000001e68

    1. Initial program 52.3%

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

    if 2.4000000000000001e68 < b_2

    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

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

Alternative 5: 81.2% accurate, 0.9× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-7040159025628825}{1852673427797059126777135760139006525652319754650249024631321344126610074238976}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq \frac{4199521391583383}{139984046386112763159840142535527767382602843577165595931249318810236991948760059086304843329475444736}:\\ \;\;\;\;\frac{\left(-b\_2\right) - \sqrt{-a \cdot c}}{a}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -7040159025628825/1852673427797059126777135760139006525652319754650249024631321344126610074238976)
  (* -1/2 (/ c b_2))
  (if (<=
       b_2
       4199521391583383/139984046386112763159840142535527767382602843577165595931249318810236991948760059086304843329475444736)
    (/ (- (- 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.8e-63) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 3e-86) {
		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.8d-63)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= 3d-86) 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.8e-63) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 3e-86) {
		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.8e-63:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= 3e-86:
		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.8e-63)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= 3e-86)
		tmp = Float64(Float64(Float64(-b_2) - sqrt(Float64(-Float64(a * c)))) / a);
	else
		tmp = Float64(-2.0 * Float64(b_2 / a));
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -3.8e-63)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= 3e-86)
		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, -7040159025628825/1852673427797059126777135760139006525652319754650249024631321344126610074238976], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 4199521391583383/139984046386112763159840142535527767382602843577165595931249318810236991948760059086304843329475444736], N[(N[((-b$95$2) - N[Sqrt[(-N[(a * c), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-7040159025628825}{1852673427797059126777135760139006525652319754650249024631321344126610074238976}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

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

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


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

    1. Initial program 52.3%

      \[\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-/.f6435.8%

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

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

    if -3.8000000000000002e-63 < b_2 < 3.0000000000000001e-86

    1. Initial program 52.3%

      \[\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-*.f6433.7%

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

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

    if 3.0000000000000001e-86 < b_2

    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

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

Alternative 6: 80.9% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-7040159025628825}{1852673427797059126777135760139006525652319754650249024631321344126610074238976}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq \frac{4199521391583383}{139984046386112763159840142535527767382602843577165595931249318810236991948760059086304843329475444736}:\\ \;\;\;\;\frac{c}{\sqrt{-a \cdot c}}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -7040159025628825/1852673427797059126777135760139006525652319754650249024631321344126610074238976)
  (* -1/2 (/ c b_2))
  (if (<=
       b_2
       4199521391583383/139984046386112763159840142535527767382602843577165595931249318810236991948760059086304843329475444736)
    (/ c (sqrt (- (* a c))))
    (* -2 (/ b_2 a)))))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -3.8e-63) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 3e-86) {
		tmp = c / sqrt(-(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.8d-63)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= 3d-86) then
        tmp = c / sqrt(-(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.8e-63) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 3e-86) {
		tmp = c / Math.sqrt(-(a * c));
	} else {
		tmp = -2.0 * (b_2 / a);
	}
	return tmp;
}
def code(a, b_2, c):
	tmp = 0
	if b_2 <= -3.8e-63:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= 3e-86:
		tmp = c / math.sqrt(-(a * c))
	else:
		tmp = -2.0 * (b_2 / a)
	return tmp
function code(a, b_2, c)
	tmp = 0.0
	if (b_2 <= -3.8e-63)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= 3e-86)
		tmp = Float64(c / sqrt(Float64(-Float64(a * c))));
	else
		tmp = Float64(-2.0 * Float64(b_2 / a));
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -3.8e-63)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= 3e-86)
		tmp = c / sqrt(-(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, -7040159025628825/1852673427797059126777135760139006525652319754650249024631321344126610074238976], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 4199521391583383/139984046386112763159840142535527767382602843577165595931249318810236991948760059086304843329475444736], N[(c / N[Sqrt[(-N[(a * c), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-7040159025628825}{1852673427797059126777135760139006525652319754650249024631321344126610074238976}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

\mathbf{elif}\;b\_2 \leq \frac{4199521391583383}{139984046386112763159840142535527767382602843577165595931249318810236991948760059086304843329475444736}:\\
\;\;\;\;\frac{c}{\sqrt{-a \cdot c}}\\

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


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

    1. Initial program 52.3%

      \[\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-/.f6435.8%

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

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

    if -3.8000000000000002e-63 < b_2 < 3.0000000000000001e-86

    1. Initial program 52.3%

      \[\frac{\left(-b\_2\right) - \sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
    2. Applied rewrites29.1%

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

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

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

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

        \[\leadsto \frac{c}{\sqrt{-a \cdot c}} \]
      4. lower-*.f6429.5%

        \[\leadsto \frac{c}{\sqrt{-a \cdot c}} \]
    5. Applied rewrites29.5%

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

    if 3.0000000000000001e-86 < b_2

    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

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

Alternative 7: 70.8% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-8997827589086393}{112472844863579909570263462692149546471742427957547915827518889315295939516787196757976017152597271428748022765838022378080206651387357492225212879521629096378368}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq \frac{183729060881773}{8749002899132047697490008908470485461412677723572849745703082425639811996797503692894052708092215296}:\\ \;\;\;\;\sqrt{-1 \cdot \frac{c}{a}}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -8997827589086393/112472844863579909570263462692149546471742427957547915827518889315295939516787196757976017152597271428748022765838022378080206651387357492225212879521629096378368)
  (* -1/2 (/ c b_2))
  (if (<=
       b_2
       183729060881773/8749002899132047697490008908470485461412677723572849745703082425639811996797503692894052708092215296)
    (sqrt (* -1 (/ c a)))
    (* -2 (/ b_2 a)))))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -8e-146) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 2.1e-86) {
		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 <= (-8d-146)) then
        tmp = (-0.5d0) * (c / b_2)
    else if (b_2 <= 2.1d-86) 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 <= -8e-146) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 2.1e-86) {
		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 <= -8e-146:
		tmp = -0.5 * (c / b_2)
	elif b_2 <= 2.1e-86:
		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 <= -8e-146)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= 2.1e-86)
		tmp = sqrt(Float64(-1.0 * Float64(c / a)));
	else
		tmp = Float64(-2.0 * Float64(b_2 / a));
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -8e-146)
		tmp = -0.5 * (c / b_2);
	elseif (b_2 <= 2.1e-86)
		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, -8997827589086393/112472844863579909570263462692149546471742427957547915827518889315295939516787196757976017152597271428748022765838022378080206651387357492225212879521629096378368], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 183729060881773/8749002899132047697490008908470485461412677723572849745703082425639811996797503692894052708092215296], N[Sqrt[N[(-1 * N[(c / a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-8997827589086393}{112472844863579909570263462692149546471742427957547915827518889315295939516787196757976017152597271428748022765838022378080206651387357492225212879521629096378368}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

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

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


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

    1. Initial program 52.3%

      \[\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-/.f6435.8%

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

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

    if -8.0000000000000002e-146 < b_2 < 2.1e-86

    1. Initial program 52.3%

      \[\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-/.f6416.5%

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

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

    if 2.1e-86 < b_2

    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

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

Alternative 8: 67.7% accurate, 1.7× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{-5464863684898495}{12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848}:\\ \;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     -5464863684898495/12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848)
  (* -1/2 (/ c b_2))
  (* -2 (/ b_2 a))))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -4.4e-217) {
		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 <= (-4.4d-217)) 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 <= -4.4e-217) {
		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 <= -4.4e-217:
		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 <= -4.4e-217)
		tmp = Float64(-0.5 * Float64(c / b_2));
	else
		tmp = Float64(-2.0 * Float64(b_2 / a));
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= -4.4e-217)
		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, -5464863684898495/12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848], N[(-1/2 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], N[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{-5464863684898495}{12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848}:\\
\;\;\;\;\frac{-1}{2} \cdot \frac{c}{b\_2}\\

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


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

    1. Initial program 52.3%

      \[\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-/.f6435.8%

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

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

    if -4.3999999999999996e-217 < b_2

    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

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

Alternative 9: 43.7% accurate, 1.7× speedup?

\[\begin{array}{l} \mathbf{if}\;b\_2 \leq \frac{1454766195646295}{6325070415853456823515479584966165845298645305129441198653167438357198111499854590373761990669910140474596183259900372230931523043306046152094168748148078435047419508642698792639590866940413010663742739952273283392562733857021646831815729864036236135650314266011211548510419206725953204130822734645187695728365866909171712}:\\ \;\;\;\;-2 \cdot \frac{0}{a}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{b\_2}{a}\\ \end{array} \]
(FPCore (a b_2 c)
  :precision binary64
  (if (<=
     b_2
     1454766195646295/6325070415853456823515479584966165845298645305129441198653167438357198111499854590373761990669910140474596183259900372230931523043306046152094168748148078435047419508642698792639590866940413010663742739952273283392562733857021646831815729864036236135650314266011211548510419206725953204130822734645187695728365866909171712)
  (* -2 (/ 0 a))
  (* -2 (/ b_2 a))))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= 2.3e-307) {
		tmp = -2.0 * (0.0 / 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.3d-307) then
        tmp = (-2.0d0) * (0.0d0 / 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.3e-307) {
		tmp = -2.0 * (0.0 / a);
	} else {
		tmp = -2.0 * (b_2 / a);
	}
	return tmp;
}
def code(a, b_2, c):
	tmp = 0
	if b_2 <= 2.3e-307:
		tmp = -2.0 * (0.0 / a)
	else:
		tmp = -2.0 * (b_2 / a)
	return tmp
function code(a, b_2, c)
	tmp = 0.0
	if (b_2 <= 2.3e-307)
		tmp = Float64(-2.0 * Float64(0.0 / a));
	else
		tmp = Float64(-2.0 * Float64(b_2 / a));
	end
	return tmp
end
function tmp_2 = code(a, b_2, c)
	tmp = 0.0;
	if (b_2 <= 2.3e-307)
		tmp = -2.0 * (0.0 / a);
	else
		tmp = -2.0 * (b_2 / a);
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, 1454766195646295/6325070415853456823515479584966165845298645305129441198653167438357198111499854590373761990669910140474596183259900372230931523043306046152094168748148078435047419508642698792639590866940413010663742739952273283392562733857021646831815729864036236135650314266011211548510419206725953204130822734645187695728365866909171712], N[(-2 * N[(0 / a), $MachinePrecision]), $MachinePrecision], N[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;b\_2 \leq \frac{1454766195646295}{6325070415853456823515479584966165845298645305129441198653167438357198111499854590373761990669910140474596183259900372230931523043306046152094168748148078435047419508642698792639590866940413010663742739952273283392562733857021646831815729864036236135650314266011211548510419206725953204130822734645187695728365866909171712}:\\
\;\;\;\;-2 \cdot \frac{0}{a}\\

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


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

    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

      \[\leadsto \color{blue}{-2 \cdot \frac{b\_2}{a}} \]
    5. Taylor expanded in undef-var around zero

      \[\leadsto -2 \cdot \frac{0}{a} \]
    6. Step-by-step derivation
      1. Applied rewrites11.8%

        \[\leadsto -2 \cdot \frac{0}{a} \]

      if 2.2999999999999999e-307 < b_2

      1. Initial program 52.3%

        \[\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}{-2 \cdot \frac{b\_2}{a}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
        2. lower-/.f6434.6%

          \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
      4. Applied rewrites34.6%

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

    Alternative 10: 34.6% accurate, 2.4× speedup?

    \[-2 \cdot \frac{b\_2}{a} \]
    (FPCore (a b_2 c)
      :precision binary64
      (* -2 (/ b_2 a)))
    double code(double a, double b_2, double c) {
    	return -2.0 * (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 = (-2.0d0) * (b_2 / a)
    end function
    
    public static double code(double a, double b_2, double c) {
    	return -2.0 * (b_2 / a);
    }
    
    def code(a, b_2, c):
    	return -2.0 * (b_2 / a)
    
    function code(a, b_2, c)
    	return Float64(-2.0 * Float64(b_2 / a))
    end
    
    function tmp = code(a, b_2, c)
    	tmp = -2.0 * (b_2 / a);
    end
    
    code[a_, b$95$2_, c_] := N[(-2 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision]
    
    -2 \cdot \frac{b\_2}{a}
    
    Derivation
    1. Initial program 52.3%

      \[\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}{-2 \cdot \frac{b\_2}{a}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -2 \cdot \color{blue}{\frac{b\_2}{a}} \]
      2. lower-/.f6434.6%

        \[\leadsto -2 \cdot \frac{b\_2}{\color{blue}{a}} \]
    4. Applied rewrites34.6%

      \[\leadsto \color{blue}{-2 \cdot \frac{b\_2}{a}} \]
    5. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2025274 -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))