Cubic critical

Percentage Accurate: 52.9% → 89.8%
Time: 4.5s
Alternatives: 16
Speedup: 2.2×

Specification

?
\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * 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, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}

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 16 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.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * 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, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}

Alternative 1: 89.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)\\ t_1 := \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\\ t_2 := \sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-306}:\\ \;\;\;\;\frac{t\_2}{a \cdot 3}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \mathbf{elif}\;t\_1 \leq 10^{+226}:\\ \;\;\;\;\frac{\frac{t\_2}{a}}{3}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0
         (fma (/ c (fabs b)) -0.5 (* (/ (- (fabs b) b) a) 0.3333333333333333)))
        (t_1 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
        (t_2 (+ (sqrt (fma (* -3.0 a) c (* b b))) (- b))))
   (if (<= t_1 (- INFINITY))
     t_0
     (if (<= t_1 -5e-306)
       (/ t_2 (* a 3.0))
       (if (<= t_1 0.0)
         (* (/ c b) -0.5)
         (if (<= t_1 1e+226) (/ (/ t_2 a) 3.0) t_0))))))
double code(double a, double b, double c) {
	double t_0 = fma((c / fabs(b)), -0.5, (((fabs(b) - b) / a) * 0.3333333333333333));
	double t_1 = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
	double t_2 = sqrt(fma((-3.0 * a), c, (b * b))) + -b;
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_0;
	} else if (t_1 <= -5e-306) {
		tmp = t_2 / (a * 3.0);
	} else if (t_1 <= 0.0) {
		tmp = (c / b) * -0.5;
	} else if (t_1 <= 1e+226) {
		tmp = (t_2 / a) / 3.0;
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(a, b, c)
	t_0 = fma(Float64(c / abs(b)), -0.5, Float64(Float64(Float64(abs(b) - b) / a) * 0.3333333333333333))
	t_1 = Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
	t_2 = Float64(sqrt(fma(Float64(-3.0 * a), c, Float64(b * b))) + Float64(-b))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_0;
	elseif (t_1 <= -5e-306)
		tmp = Float64(t_2 / Float64(a * 3.0));
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(c / b) * -0.5);
	elseif (t_1 <= 1e+226)
		tmp = Float64(Float64(t_2 / a) / 3.0);
	else
		tmp = t_0;
	end
	return tmp
end
code[a_, b_, c_] := Block[{t$95$0 = N[(N[(c / N[Abs[b], $MachinePrecision]), $MachinePrecision] * -0.5 + N[(N[(N[(N[Abs[b], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(N[(-3.0 * a), $MachinePrecision] * c + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-b)), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$0, If[LessEqual[t$95$1, -5e-306], N[(t$95$2 / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[t$95$1, 1e+226], N[(N[(t$95$2 / a), $MachinePrecision] / 3.0), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)\\
t_1 := \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\\
t_2 := \sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-306}:\\
\;\;\;\;\frac{t\_2}{a \cdot 3}\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{c}{b} \cdot -0.5\\

\mathbf{elif}\;t\_1 \leq 10^{+226}:\\
\;\;\;\;\frac{\frac{t\_2}{a}}{3}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -inf.0 or 9.99999999999999961e225 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a))

    1. Initial program 52.9%

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

      \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{\sqrt{{b}^{2}}} + \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{c}{\sqrt{{b}^{2}}} \cdot \frac{-1}{2} + \color{blue}{\frac{1}{3}} \cdot \frac{\sqrt{{b}^{2}} - b}{a} \]
      2. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{{b}^{2}}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{b \cdot b}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
      5. rem-sqrt-square-revN/A

        \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
      6. lower-fabs.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
      9. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
      10. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
      11. pow2N/A

        \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{b \cdot b} - b}{a} \cdot \frac{1}{3}\right) \]
      12. rem-sqrt-square-revN/A

        \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\left|b\right| - b}{a} \cdot \frac{1}{3}\right) \]
      13. lower-fabs.f6467.5

        \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right) \]
    4. Applied rewrites67.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)} \]

    if -inf.0 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -4.99999999999999998e-306

    1. Initial program 52.9%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. Applied rewrites52.9%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]

      if -4.99999999999999998e-306 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -0.0

      1. Initial program 52.9%

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

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

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

          \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
        3. lower-/.f6434.6

          \[\leadsto \frac{c}{b} \cdot -0.5 \]
      4. Applied rewrites34.6%

        \[\leadsto \color{blue}{\frac{c}{b} \cdot -0.5} \]

      if -0.0 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < 9.99999999999999961e225

      1. Initial program 52.9%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. Step-by-step derivation
        1. Applied rewrites52.9%

          \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]
        2. Step-by-step derivation
          1. lift-/.f64N/A

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

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

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

            \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{-3 \cdot a}, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3} \]
          5. lift-*.f64N/A

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

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

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

            \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{\color{blue}{a \cdot 3}} \]
          9. associate-/r*N/A

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

            \[\leadsto \color{blue}{\frac{\frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{a}}{3}} \]
        3. Applied rewrites52.9%

          \[\leadsto \color{blue}{\frac{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a}}{3}} \]
      3. Recombined 4 regimes into one program.
      4. Add Preprocessing

      Alternative 2: 89.8% accurate, 0.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)\\ t_1 := \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\\ t_2 := \frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-306}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \mathbf{elif}\;t\_1 \leq 10^{+226}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (a b c)
       :precision binary64
       (let* ((t_0
               (fma (/ c (fabs b)) -0.5 (* (/ (- (fabs b) b) a) 0.3333333333333333)))
              (t_1 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
              (t_2 (/ (+ (sqrt (fma (* -3.0 a) c (* b b))) (- b)) (* a 3.0))))
         (if (<= t_1 (- INFINITY))
           t_0
           (if (<= t_1 -5e-306)
             t_2
             (if (<= t_1 0.0) (* (/ c b) -0.5) (if (<= t_1 1e+226) t_2 t_0))))))
      double code(double a, double b, double c) {
      	double t_0 = fma((c / fabs(b)), -0.5, (((fabs(b) - b) / a) * 0.3333333333333333));
      	double t_1 = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
      	double t_2 = (sqrt(fma((-3.0 * a), c, (b * b))) + -b) / (a * 3.0);
      	double tmp;
      	if (t_1 <= -((double) INFINITY)) {
      		tmp = t_0;
      	} else if (t_1 <= -5e-306) {
      		tmp = t_2;
      	} else if (t_1 <= 0.0) {
      		tmp = (c / b) * -0.5;
      	} else if (t_1 <= 1e+226) {
      		tmp = t_2;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      function code(a, b, c)
      	t_0 = fma(Float64(c / abs(b)), -0.5, Float64(Float64(Float64(abs(b) - b) / a) * 0.3333333333333333))
      	t_1 = Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
      	t_2 = Float64(Float64(sqrt(fma(Float64(-3.0 * a), c, Float64(b * b))) + Float64(-b)) / Float64(a * 3.0))
      	tmp = 0.0
      	if (t_1 <= Float64(-Inf))
      		tmp = t_0;
      	elseif (t_1 <= -5e-306)
      		tmp = t_2;
      	elseif (t_1 <= 0.0)
      		tmp = Float64(Float64(c / b) * -0.5);
      	elseif (t_1 <= 1e+226)
      		tmp = t_2;
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      code[a_, b_, c_] := Block[{t$95$0 = N[(N[(c / N[Abs[b], $MachinePrecision]), $MachinePrecision] * -0.5 + N[(N[(N[(N[Abs[b], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sqrt[N[(N[(-3.0 * a), $MachinePrecision] * c + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + (-b)), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$0, If[LessEqual[t$95$1, -5e-306], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision], If[LessEqual[t$95$1, 1e+226], t$95$2, t$95$0]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)\\
      t_1 := \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\\
      t_2 := \frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}\\
      \mathbf{if}\;t\_1 \leq -\infty:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-306}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;t\_1 \leq 0:\\
      \;\;\;\;\frac{c}{b} \cdot -0.5\\
      
      \mathbf{elif}\;t\_1 \leq 10^{+226}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -inf.0 or 9.99999999999999961e225 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a))

        1. Initial program 52.9%

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

          \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{\sqrt{{b}^{2}}} + \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{c}{\sqrt{{b}^{2}}} \cdot \frac{-1}{2} + \color{blue}{\frac{1}{3}} \cdot \frac{\sqrt{{b}^{2}} - b}{a} \]
          2. lower-fma.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{{b}^{2}}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
          4. pow2N/A

            \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{b \cdot b}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
          5. rem-sqrt-square-revN/A

            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
          6. lower-fabs.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
          8. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
          9. lower-/.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
          10. lower--.f64N/A

            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
          11. pow2N/A

            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{b \cdot b} - b}{a} \cdot \frac{1}{3}\right) \]
          12. rem-sqrt-square-revN/A

            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\left|b\right| - b}{a} \cdot \frac{1}{3}\right) \]
          13. lower-fabs.f6467.5

            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right) \]
        4. Applied rewrites67.5%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)} \]

        if -inf.0 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -4.99999999999999998e-306 or -0.0 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < 9.99999999999999961e225

        1. Initial program 52.9%

          \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
        2. Step-by-step derivation
          1. Applied rewrites52.9%

            \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]

          if -4.99999999999999998e-306 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -0.0

          1. Initial program 52.9%

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

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

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

              \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
            3. lower-/.f6434.6

              \[\leadsto \frac{c}{b} \cdot -0.5 \]
          4. Applied rewrites34.6%

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

        Alternative 3: 80.4% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c}{\left|b\right|}\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-1.5, a \cdot t\_0, \left|b\right|\right) - b}{3 \cdot a}\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{-3 \cdot \left(c \cdot a\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)\\ \end{array} \end{array} \]
        (FPCore (a b c)
         :precision binary64
         (let* ((t_0 (/ c (fabs b))))
           (if (<= b -3.5e-62)
             (/ (- (fma -1.5 (* a t_0) (fabs b)) b) (* 3.0 a))
             (if (<= b 6.6e-76)
               (/ (+ (- b) (sqrt (* -3.0 (* c a)))) (* 3.0 a))
               (fma t_0 -0.5 (* (/ (- (fabs b) b) a) 0.3333333333333333))))))
        double code(double a, double b, double c) {
        	double t_0 = c / fabs(b);
        	double tmp;
        	if (b <= -3.5e-62) {
        		tmp = (fma(-1.5, (a * t_0), fabs(b)) - b) / (3.0 * a);
        	} else if (b <= 6.6e-76) {
        		tmp = (-b + sqrt((-3.0 * (c * a)))) / (3.0 * a);
        	} else {
        		tmp = fma(t_0, -0.5, (((fabs(b) - b) / a) * 0.3333333333333333));
        	}
        	return tmp;
        }
        
        function code(a, b, c)
        	t_0 = Float64(c / abs(b))
        	tmp = 0.0
        	if (b <= -3.5e-62)
        		tmp = Float64(Float64(fma(-1.5, Float64(a * t_0), abs(b)) - b) / Float64(3.0 * a));
        	elseif (b <= 6.6e-76)
        		tmp = Float64(Float64(Float64(-b) + sqrt(Float64(-3.0 * Float64(c * a)))) / Float64(3.0 * a));
        	else
        		tmp = fma(t_0, -0.5, Float64(Float64(Float64(abs(b) - b) / a) * 0.3333333333333333));
        	end
        	return tmp
        end
        
        code[a_, b_, c_] := Block[{t$95$0 = N[(c / N[Abs[b], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e-62], N[(N[(N[(-1.5 * N[(a * t$95$0), $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.6e-76], N[(N[((-b) + N[Sqrt[N[(-3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * -0.5 + N[(N[(N[(N[Abs[b], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \frac{c}{\left|b\right|}\\
        \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(-1.5, a \cdot t\_0, \left|b\right|\right) - b}{3 \cdot a}\\
        
        \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\
        \;\;\;\;\frac{\left(-b\right) + \sqrt{-3 \cdot \left(c \cdot a\right)}}{3 \cdot a}\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(t\_0, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if b < -3.5000000000000001e-62

          1. Initial program 52.9%

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

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

              \[\leadsto \frac{\left(\sqrt{{b}^{2}} + \frac{-3}{2} \cdot \frac{a \cdot c}{\sqrt{{b}^{2}}}\right) - \color{blue}{b}}{3 \cdot a} \]
            2. +-commutativeN/A

              \[\leadsto \frac{\left(\frac{-3}{2} \cdot \frac{a \cdot c}{\sqrt{{b}^{2}}} + \sqrt{{b}^{2}}\right) - b}{3 \cdot a} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-3}{2}, \frac{a \cdot c}{\sqrt{{b}^{2}}}, \sqrt{{b}^{2}}\right) - b}{3 \cdot a} \]
            4. associate-/l*N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-3}{2}, a \cdot \frac{c}{\sqrt{{b}^{2}}}, \sqrt{{b}^{2}}\right) - b}{3 \cdot a} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-3}{2}, a \cdot \frac{c}{\sqrt{{b}^{2}}}, \sqrt{{b}^{2}}\right) - b}{3 \cdot a} \]
            6. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-3}{2}, a \cdot \frac{c}{\sqrt{{b}^{2}}}, \sqrt{{b}^{2}}\right) - b}{3 \cdot a} \]
            7. pow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-3}{2}, a \cdot \frac{c}{\sqrt{b \cdot b}}, \sqrt{{b}^{2}}\right) - b}{3 \cdot a} \]
            8. rem-sqrt-square-revN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-3}{2}, a \cdot \frac{c}{\left|b\right|}, \sqrt{{b}^{2}}\right) - b}{3 \cdot a} \]
            9. lower-fabs.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-3}{2}, a \cdot \frac{c}{\left|b\right|}, \sqrt{{b}^{2}}\right) - b}{3 \cdot a} \]
            10. pow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-3}{2}, a \cdot \frac{c}{\left|b\right|}, \sqrt{b \cdot b}\right) - b}{3 \cdot a} \]
            11. rem-sqrt-square-revN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-3}{2}, a \cdot \frac{c}{\left|b\right|}, \left|b\right|\right) - b}{3 \cdot a} \]
            12. lower-fabs.f6444.9

              \[\leadsto \frac{\mathsf{fma}\left(-1.5, a \cdot \frac{c}{\left|b\right|}, \left|b\right|\right) - b}{3 \cdot a} \]
          4. Applied rewrites44.9%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-1.5, a \cdot \frac{c}{\left|b\right|}, \left|b\right|\right) - b}}{3 \cdot a} \]

          if -3.5000000000000001e-62 < b < 6.59999999999999967e-76

          1. Initial program 52.9%

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

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

              \[\leadsto \frac{\left(-b\right) + \sqrt{-3 \cdot \color{blue}{\left(a \cdot c\right)}}}{3 \cdot a} \]
            2. *-commutativeN/A

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

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

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

          if 6.59999999999999967e-76 < b

          1. Initial program 52.9%

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

            \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{\sqrt{{b}^{2}}} + \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}} \]
          3. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{c}{\sqrt{{b}^{2}}} \cdot \frac{-1}{2} + \color{blue}{\frac{1}{3}} \cdot \frac{\sqrt{{b}^{2}} - b}{a} \]
            2. lower-fma.f64N/A

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

              \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{{b}^{2}}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
            4. pow2N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{b \cdot b}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
            5. rem-sqrt-square-revN/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
            6. lower-fabs.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
            8. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
            9. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
            10. lower--.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
            11. pow2N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{b \cdot b} - b}{a} \cdot \frac{1}{3}\right) \]
            12. rem-sqrt-square-revN/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\left|b\right| - b}{a} \cdot \frac{1}{3}\right) \]
            13. lower-fabs.f6467.5

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right) \]
          4. Applied rewrites67.5%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 4: 80.3% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)\\ \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{-3 \cdot \left(c \cdot a\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (a b c)
         :precision binary64
         (let* ((t_0
                 (fma
                  (/ c (fabs b))
                  -0.5
                  (* (/ (- (fabs b) b) a) 0.3333333333333333))))
           (if (<= b -3.5e-62)
             t_0
             (if (<= b 6.6e-76) (/ (+ (- b) (sqrt (* -3.0 (* c a)))) (* 3.0 a)) t_0))))
        double code(double a, double b, double c) {
        	double t_0 = fma((c / fabs(b)), -0.5, (((fabs(b) - b) / a) * 0.3333333333333333));
        	double tmp;
        	if (b <= -3.5e-62) {
        		tmp = t_0;
        	} else if (b <= 6.6e-76) {
        		tmp = (-b + sqrt((-3.0 * (c * a)))) / (3.0 * a);
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(a, b, c)
        	t_0 = fma(Float64(c / abs(b)), -0.5, Float64(Float64(Float64(abs(b) - b) / a) * 0.3333333333333333))
        	tmp = 0.0
        	if (b <= -3.5e-62)
        		tmp = t_0;
        	elseif (b <= 6.6e-76)
        		tmp = Float64(Float64(Float64(-b) + sqrt(Float64(-3.0 * Float64(c * a)))) / Float64(3.0 * a));
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        code[a_, b_, c_] := Block[{t$95$0 = N[(N[(c / N[Abs[b], $MachinePrecision]), $MachinePrecision] * -0.5 + N[(N[(N[(N[Abs[b], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e-62], t$95$0, If[LessEqual[b, 6.6e-76], N[(N[((-b) + N[Sqrt[N[(-3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], t$95$0]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)\\
        \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\
        \;\;\;\;\frac{\left(-b\right) + \sqrt{-3 \cdot \left(c \cdot a\right)}}{3 \cdot a}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if b < -3.5000000000000001e-62 or 6.59999999999999967e-76 < b

          1. Initial program 52.9%

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

            \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{\sqrt{{b}^{2}}} + \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}} \]
          3. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{c}{\sqrt{{b}^{2}}} \cdot \frac{-1}{2} + \color{blue}{\frac{1}{3}} \cdot \frac{\sqrt{{b}^{2}} - b}{a} \]
            2. lower-fma.f64N/A

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

              \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{{b}^{2}}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
            4. pow2N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{b \cdot b}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
            5. rem-sqrt-square-revN/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
            6. lower-fabs.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
            8. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
            9. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
            10. lower--.f64N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
            11. pow2N/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{b \cdot b} - b}{a} \cdot \frac{1}{3}\right) \]
            12. rem-sqrt-square-revN/A

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\left|b\right| - b}{a} \cdot \frac{1}{3}\right) \]
            13. lower-fabs.f6467.5

              \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right) \]
          4. Applied rewrites67.5%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)} \]

          if -3.5000000000000001e-62 < b < 6.59999999999999967e-76

          1. Initial program 52.9%

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

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

              \[\leadsto \frac{\left(-b\right) + \sqrt{-3 \cdot \color{blue}{\left(a \cdot c\right)}}}{3 \cdot a} \]
            2. *-commutativeN/A

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

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

            \[\leadsto \frac{\left(-b\right) + \sqrt{\color{blue}{-3 \cdot \left(c \cdot a\right)}}}{3 \cdot a} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 5: 80.3% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{-3 \cdot \left(c \cdot a\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
        (FPCore (a b c)
         :precision binary64
         (if (<= b -3.5e-62)
           (/ (/ (* -2.0 b) a) 3.0)
           (if (<= b 6.6e-76)
             (/ (+ (- b) (sqrt (* -3.0 (* c a)))) (* 3.0 a))
             (* (/ c b) -0.5))))
        double code(double a, double b, double c) {
        	double tmp;
        	if (b <= -3.5e-62) {
        		tmp = ((-2.0 * b) / a) / 3.0;
        	} else if (b <= 6.6e-76) {
        		tmp = (-b + sqrt((-3.0 * (c * a)))) / (3.0 * a);
        	} else {
        		tmp = (c / b) * -0.5;
        	}
        	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, c)
        use fmin_fmax_functions
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8), intent (in) :: c
            real(8) :: tmp
            if (b <= (-3.5d-62)) then
                tmp = (((-2.0d0) * b) / a) / 3.0d0
            else if (b <= 6.6d-76) then
                tmp = (-b + sqrt(((-3.0d0) * (c * a)))) / (3.0d0 * a)
            else
                tmp = (c / b) * (-0.5d0)
            end if
            code = tmp
        end function
        
        public static double code(double a, double b, double c) {
        	double tmp;
        	if (b <= -3.5e-62) {
        		tmp = ((-2.0 * b) / a) / 3.0;
        	} else if (b <= 6.6e-76) {
        		tmp = (-b + Math.sqrt((-3.0 * (c * a)))) / (3.0 * a);
        	} else {
        		tmp = (c / b) * -0.5;
        	}
        	return tmp;
        }
        
        def code(a, b, c):
        	tmp = 0
        	if b <= -3.5e-62:
        		tmp = ((-2.0 * b) / a) / 3.0
        	elif b <= 6.6e-76:
        		tmp = (-b + math.sqrt((-3.0 * (c * a)))) / (3.0 * a)
        	else:
        		tmp = (c / b) * -0.5
        	return tmp
        
        function code(a, b, c)
        	tmp = 0.0
        	if (b <= -3.5e-62)
        		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
        	elseif (b <= 6.6e-76)
        		tmp = Float64(Float64(Float64(-b) + sqrt(Float64(-3.0 * Float64(c * a)))) / Float64(3.0 * a));
        	else
        		tmp = Float64(Float64(c / b) * -0.5);
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, b, c)
        	tmp = 0.0;
        	if (b <= -3.5e-62)
        		tmp = ((-2.0 * b) / a) / 3.0;
        	elseif (b <= 6.6e-76)
        		tmp = (-b + sqrt((-3.0 * (c * a)))) / (3.0 * a);
        	else
        		tmp = (c / b) * -0.5;
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, b_, c_] := If[LessEqual[b, -3.5e-62], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 6.6e-76], N[(N[((-b) + N[Sqrt[N[(-3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\
        \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
        
        \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\
        \;\;\;\;\frac{\left(-b\right) + \sqrt{-3 \cdot \left(c \cdot a\right)}}{3 \cdot a}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{c}{b} \cdot -0.5\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if b < -3.5000000000000001e-62

          1. Initial program 52.9%

            \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
          2. Step-by-step derivation
            1. Applied rewrites52.9%

              \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]
            2. Step-by-step derivation
              1. lift-/.f64N/A

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

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

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

                \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{-3 \cdot a}, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3} \]
              5. lift-*.f64N/A

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

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

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

                \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{\color{blue}{a \cdot 3}} \]
              9. associate-/r*N/A

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

                \[\leadsto \color{blue}{\frac{\frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{a}}{3}} \]
            3. Applied rewrites52.9%

              \[\leadsto \color{blue}{\frac{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a}}{3}} \]
            4. Taylor expanded in b around -inf

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

                \[\leadsto \frac{\frac{-2 \cdot \color{blue}{b}}{a}}{3} \]
            6. Applied rewrites35.2%

              \[\leadsto \frac{\frac{\color{blue}{-2 \cdot b}}{a}}{3} \]

            if -3.5000000000000001e-62 < b < 6.59999999999999967e-76

            1. Initial program 52.9%

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

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

                \[\leadsto \frac{\left(-b\right) + \sqrt{-3 \cdot \color{blue}{\left(a \cdot c\right)}}}{3 \cdot a} \]
              2. *-commutativeN/A

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

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

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

            if 6.59999999999999967e-76 < b

            1. Initial program 52.9%

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

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

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

                \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
              3. lower-/.f6434.6

                \[\leadsto \frac{c}{b} \cdot -0.5 \]
            4. Applied rewrites34.6%

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

          Alternative 6: 79.9% accurate, 1.1× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\ \;\;\;\;\frac{\sqrt{\left(-3 \cdot a\right) \cdot c}}{a} \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
          (FPCore (a b c)
           :precision binary64
           (if (<= b -3.5e-62)
             (/ (/ (* -2.0 b) a) 3.0)
             (if (<= b 6.6e-76)
               (* (/ (sqrt (* (* -3.0 a) c)) a) 0.3333333333333333)
               (* (/ c b) -0.5))))
          double code(double a, double b, double c) {
          	double tmp;
          	if (b <= -3.5e-62) {
          		tmp = ((-2.0 * b) / a) / 3.0;
          	} else if (b <= 6.6e-76) {
          		tmp = (sqrt(((-3.0 * a) * c)) / a) * 0.3333333333333333;
          	} else {
          		tmp = (c / b) * -0.5;
          	}
          	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, c)
          use fmin_fmax_functions
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8), intent (in) :: c
              real(8) :: tmp
              if (b <= (-3.5d-62)) then
                  tmp = (((-2.0d0) * b) / a) / 3.0d0
              else if (b <= 6.6d-76) then
                  tmp = (sqrt((((-3.0d0) * a) * c)) / a) * 0.3333333333333333d0
              else
                  tmp = (c / b) * (-0.5d0)
              end if
              code = tmp
          end function
          
          public static double code(double a, double b, double c) {
          	double tmp;
          	if (b <= -3.5e-62) {
          		tmp = ((-2.0 * b) / a) / 3.0;
          	} else if (b <= 6.6e-76) {
          		tmp = (Math.sqrt(((-3.0 * a) * c)) / a) * 0.3333333333333333;
          	} else {
          		tmp = (c / b) * -0.5;
          	}
          	return tmp;
          }
          
          def code(a, b, c):
          	tmp = 0
          	if b <= -3.5e-62:
          		tmp = ((-2.0 * b) / a) / 3.0
          	elif b <= 6.6e-76:
          		tmp = (math.sqrt(((-3.0 * a) * c)) / a) * 0.3333333333333333
          	else:
          		tmp = (c / b) * -0.5
          	return tmp
          
          function code(a, b, c)
          	tmp = 0.0
          	if (b <= -3.5e-62)
          		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
          	elseif (b <= 6.6e-76)
          		tmp = Float64(Float64(sqrt(Float64(Float64(-3.0 * a) * c)) / a) * 0.3333333333333333);
          	else
          		tmp = Float64(Float64(c / b) * -0.5);
          	end
          	return tmp
          end
          
          function tmp_2 = code(a, b, c)
          	tmp = 0.0;
          	if (b <= -3.5e-62)
          		tmp = ((-2.0 * b) / a) / 3.0;
          	elseif (b <= 6.6e-76)
          		tmp = (sqrt(((-3.0 * a) * c)) / a) * 0.3333333333333333;
          	else
          		tmp = (c / b) * -0.5;
          	end
          	tmp_2 = tmp;
          end
          
          code[a_, b_, c_] := If[LessEqual[b, -3.5e-62], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 6.6e-76], N[(N[(N[Sqrt[N[(N[(-3.0 * a), $MachinePrecision] * c), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\
          \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
          
          \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\
          \;\;\;\;\frac{\sqrt{\left(-3 \cdot a\right) \cdot c}}{a} \cdot 0.3333333333333333\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{c}{b} \cdot -0.5\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if b < -3.5000000000000001e-62

            1. Initial program 52.9%

              \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
            2. Step-by-step derivation
              1. Applied rewrites52.9%

                \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]
              2. Step-by-step derivation
                1. lift-/.f64N/A

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

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

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

                  \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{-3 \cdot a}, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3} \]
                5. lift-*.f64N/A

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

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

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

                  \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{\color{blue}{a \cdot 3}} \]
                9. associate-/r*N/A

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

                  \[\leadsto \color{blue}{\frac{\frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{a}}{3}} \]
              3. Applied rewrites52.9%

                \[\leadsto \color{blue}{\frac{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a}}{3}} \]
              4. Taylor expanded in b around -inf

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

                  \[\leadsto \frac{\frac{-2 \cdot \color{blue}{b}}{a}}{3} \]
              6. Applied rewrites35.2%

                \[\leadsto \frac{\frac{\color{blue}{-2 \cdot b}}{a}}{3} \]

              if -3.5000000000000001e-62 < b < 6.59999999999999967e-76

              1. Initial program 52.9%

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

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

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

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

                  \[\leadsto \frac{\sqrt{\mathsf{neg}\left(3 \cdot \left(a \cdot c\right)\right)}}{a} \cdot \frac{1}{3} \]
                4. distribute-lft-neg-inN/A

                  \[\leadsto \frac{\sqrt{\left(\mathsf{neg}\left(3\right)\right) \cdot \left(a \cdot c\right)}}{a} \cdot \frac{1}{3} \]
                5. metadata-evalN/A

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

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

                  \[\leadsto \frac{\sqrt{-3 \cdot \left(a \cdot c\right)}}{a} \cdot \frac{1}{3} \]
                8. *-commutativeN/A

                  \[\leadsto \frac{\sqrt{-3 \cdot \left(c \cdot a\right)}}{a} \cdot \frac{1}{3} \]
                9. lower-*.f6429.6

                  \[\leadsto \frac{\sqrt{-3 \cdot \left(c \cdot a\right)}}{a} \cdot 0.3333333333333333 \]
              4. Applied rewrites29.6%

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

                  \[\leadsto \frac{\sqrt{-3 \cdot \left(c \cdot a\right)}}{a} \cdot \frac{1}{3} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{\sqrt{-3 \cdot \left(c \cdot a\right)}}{a} \cdot \frac{1}{3} \]
                3. *-commutativeN/A

                  \[\leadsto \frac{\sqrt{-3 \cdot \left(a \cdot c\right)}}{a} \cdot \frac{1}{3} \]
                4. associate-*l*N/A

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

                  \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c}}{a} \cdot \frac{1}{3} \]
                6. lift-*.f6429.6

                  \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c}}{a} \cdot 0.3333333333333333 \]
              6. Applied rewrites29.6%

                \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c}}{a} \cdot 0.3333333333333333 \]

              if 6.59999999999999967e-76 < b

              1. Initial program 52.9%

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

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

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

                  \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
                3. lower-/.f6434.6

                  \[\leadsto \frac{c}{b} \cdot -0.5 \]
              4. Applied rewrites34.6%

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

            Alternative 7: 79.9% accurate, 1.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\ \;\;\;\;\frac{\sqrt{-3 \cdot \left(c \cdot a\right)}}{a} \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
            (FPCore (a b c)
             :precision binary64
             (if (<= b -3.5e-62)
               (/ (/ (* -2.0 b) a) 3.0)
               (if (<= b 6.6e-76)
                 (* (/ (sqrt (* -3.0 (* c a))) a) 0.3333333333333333)
                 (* (/ c b) -0.5))))
            double code(double a, double b, double c) {
            	double tmp;
            	if (b <= -3.5e-62) {
            		tmp = ((-2.0 * b) / a) / 3.0;
            	} else if (b <= 6.6e-76) {
            		tmp = (sqrt((-3.0 * (c * a))) / a) * 0.3333333333333333;
            	} else {
            		tmp = (c / b) * -0.5;
            	}
            	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, c)
            use fmin_fmax_functions
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8), intent (in) :: c
                real(8) :: tmp
                if (b <= (-3.5d-62)) then
                    tmp = (((-2.0d0) * b) / a) / 3.0d0
                else if (b <= 6.6d-76) then
                    tmp = (sqrt(((-3.0d0) * (c * a))) / a) * 0.3333333333333333d0
                else
                    tmp = (c / b) * (-0.5d0)
                end if
                code = tmp
            end function
            
            public static double code(double a, double b, double c) {
            	double tmp;
            	if (b <= -3.5e-62) {
            		tmp = ((-2.0 * b) / a) / 3.0;
            	} else if (b <= 6.6e-76) {
            		tmp = (Math.sqrt((-3.0 * (c * a))) / a) * 0.3333333333333333;
            	} else {
            		tmp = (c / b) * -0.5;
            	}
            	return tmp;
            }
            
            def code(a, b, c):
            	tmp = 0
            	if b <= -3.5e-62:
            		tmp = ((-2.0 * b) / a) / 3.0
            	elif b <= 6.6e-76:
            		tmp = (math.sqrt((-3.0 * (c * a))) / a) * 0.3333333333333333
            	else:
            		tmp = (c / b) * -0.5
            	return tmp
            
            function code(a, b, c)
            	tmp = 0.0
            	if (b <= -3.5e-62)
            		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
            	elseif (b <= 6.6e-76)
            		tmp = Float64(Float64(sqrt(Float64(-3.0 * Float64(c * a))) / a) * 0.3333333333333333);
            	else
            		tmp = Float64(Float64(c / b) * -0.5);
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, b, c)
            	tmp = 0.0;
            	if (b <= -3.5e-62)
            		tmp = ((-2.0 * b) / a) / 3.0;
            	elseif (b <= 6.6e-76)
            		tmp = (sqrt((-3.0 * (c * a))) / a) * 0.3333333333333333;
            	else
            		tmp = (c / b) * -0.5;
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, b_, c_] := If[LessEqual[b, -3.5e-62], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 6.6e-76], N[(N[(N[Sqrt[N[(-3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\
            \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
            
            \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\
            \;\;\;\;\frac{\sqrt{-3 \cdot \left(c \cdot a\right)}}{a} \cdot 0.3333333333333333\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{c}{b} \cdot -0.5\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if b < -3.5000000000000001e-62

              1. Initial program 52.9%

                \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
              2. Step-by-step derivation
                1. Applied rewrites52.9%

                  \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]
                2. Step-by-step derivation
                  1. lift-/.f64N/A

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

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

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

                    \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{-3 \cdot a}, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3} \]
                  5. lift-*.f64N/A

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

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

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

                    \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{\color{blue}{a \cdot 3}} \]
                  9. associate-/r*N/A

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

                    \[\leadsto \color{blue}{\frac{\frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{a}}{3}} \]
                3. Applied rewrites52.9%

                  \[\leadsto \color{blue}{\frac{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a}}{3}} \]
                4. Taylor expanded in b around -inf

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

                    \[\leadsto \frac{\frac{-2 \cdot \color{blue}{b}}{a}}{3} \]
                6. Applied rewrites35.2%

                  \[\leadsto \frac{\frac{\color{blue}{-2 \cdot b}}{a}}{3} \]

                if -3.5000000000000001e-62 < b < 6.59999999999999967e-76

                1. Initial program 52.9%

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

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

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

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

                    \[\leadsto \frac{\sqrt{\mathsf{neg}\left(3 \cdot \left(a \cdot c\right)\right)}}{a} \cdot \frac{1}{3} \]
                  4. distribute-lft-neg-inN/A

                    \[\leadsto \frac{\sqrt{\left(\mathsf{neg}\left(3\right)\right) \cdot \left(a \cdot c\right)}}{a} \cdot \frac{1}{3} \]
                  5. metadata-evalN/A

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

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

                    \[\leadsto \frac{\sqrt{-3 \cdot \left(a \cdot c\right)}}{a} \cdot \frac{1}{3} \]
                  8. *-commutativeN/A

                    \[\leadsto \frac{\sqrt{-3 \cdot \left(c \cdot a\right)}}{a} \cdot \frac{1}{3} \]
                  9. lower-*.f6429.6

                    \[\leadsto \frac{\sqrt{-3 \cdot \left(c \cdot a\right)}}{a} \cdot 0.3333333333333333 \]
                4. Applied rewrites29.6%

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

                if 6.59999999999999967e-76 < b

                1. Initial program 52.9%

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

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

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

                    \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
                  3. lower-/.f6434.6

                    \[\leadsto \frac{c}{b} \cdot -0.5 \]
                4. Applied rewrites34.6%

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

              Alternative 8: 79.8% accurate, 1.1× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\ \;\;\;\;\left(-0.3333333333333333 \cdot c\right) \cdot \sqrt{\frac{-3}{c \cdot a}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
              (FPCore (a b c)
               :precision binary64
               (if (<= b -3.5e-62)
                 (/ (/ (* -2.0 b) a) 3.0)
                 (if (<= b 6.6e-76)
                   (* (* -0.3333333333333333 c) (sqrt (/ -3.0 (* c a))))
                   (* (/ c b) -0.5))))
              double code(double a, double b, double c) {
              	double tmp;
              	if (b <= -3.5e-62) {
              		tmp = ((-2.0 * b) / a) / 3.0;
              	} else if (b <= 6.6e-76) {
              		tmp = (-0.3333333333333333 * c) * sqrt((-3.0 / (c * a)));
              	} else {
              		tmp = (c / b) * -0.5;
              	}
              	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, c)
              use fmin_fmax_functions
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8), intent (in) :: c
                  real(8) :: tmp
                  if (b <= (-3.5d-62)) then
                      tmp = (((-2.0d0) * b) / a) / 3.0d0
                  else if (b <= 6.6d-76) then
                      tmp = ((-0.3333333333333333d0) * c) * sqrt(((-3.0d0) / (c * a)))
                  else
                      tmp = (c / b) * (-0.5d0)
                  end if
                  code = tmp
              end function
              
              public static double code(double a, double b, double c) {
              	double tmp;
              	if (b <= -3.5e-62) {
              		tmp = ((-2.0 * b) / a) / 3.0;
              	} else if (b <= 6.6e-76) {
              		tmp = (-0.3333333333333333 * c) * Math.sqrt((-3.0 / (c * a)));
              	} else {
              		tmp = (c / b) * -0.5;
              	}
              	return tmp;
              }
              
              def code(a, b, c):
              	tmp = 0
              	if b <= -3.5e-62:
              		tmp = ((-2.0 * b) / a) / 3.0
              	elif b <= 6.6e-76:
              		tmp = (-0.3333333333333333 * c) * math.sqrt((-3.0 / (c * a)))
              	else:
              		tmp = (c / b) * -0.5
              	return tmp
              
              function code(a, b, c)
              	tmp = 0.0
              	if (b <= -3.5e-62)
              		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
              	elseif (b <= 6.6e-76)
              		tmp = Float64(Float64(-0.3333333333333333 * c) * sqrt(Float64(-3.0 / Float64(c * a))));
              	else
              		tmp = Float64(Float64(c / b) * -0.5);
              	end
              	return tmp
              end
              
              function tmp_2 = code(a, b, c)
              	tmp = 0.0;
              	if (b <= -3.5e-62)
              		tmp = ((-2.0 * b) / a) / 3.0;
              	elseif (b <= 6.6e-76)
              		tmp = (-0.3333333333333333 * c) * sqrt((-3.0 / (c * a)));
              	else
              		tmp = (c / b) * -0.5;
              	end
              	tmp_2 = tmp;
              end
              
              code[a_, b_, c_] := If[LessEqual[b, -3.5e-62], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 6.6e-76], N[(N[(-0.3333333333333333 * c), $MachinePrecision] * N[Sqrt[N[(-3.0 / N[(c * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;b \leq -3.5 \cdot 10^{-62}:\\
              \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
              
              \mathbf{elif}\;b \leq 6.6 \cdot 10^{-76}:\\
              \;\;\;\;\left(-0.3333333333333333 \cdot c\right) \cdot \sqrt{\frac{-3}{c \cdot a}}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{c}{b} \cdot -0.5\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if b < -3.5000000000000001e-62

                1. Initial program 52.9%

                  \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                2. Step-by-step derivation
                  1. Applied rewrites52.9%

                    \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]
                  2. Step-by-step derivation
                    1. lift-/.f64N/A

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

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

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

                      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{-3 \cdot a}, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3} \]
                    5. lift-*.f64N/A

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

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

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

                      \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{\color{blue}{a \cdot 3}} \]
                    9. associate-/r*N/A

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

                      \[\leadsto \color{blue}{\frac{\frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{a}}{3}} \]
                  3. Applied rewrites52.9%

                    \[\leadsto \color{blue}{\frac{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a}}{3}} \]
                  4. Taylor expanded in b around -inf

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

                      \[\leadsto \frac{\frac{-2 \cdot \color{blue}{b}}{a}}{3} \]
                  6. Applied rewrites35.2%

                    \[\leadsto \frac{\frac{\color{blue}{-2 \cdot b}}{a}}{3} \]

                  if -3.5000000000000001e-62 < b < 6.59999999999999967e-76

                  1. Initial program 52.9%

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

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

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

                      \[\leadsto \sqrt{-3 \cdot \frac{c}{a}} \cdot \color{blue}{\frac{1}{3}} \]
                    3. rem-square-sqrtN/A

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

                      \[\leadsto \sqrt{\sqrt{-3 \cdot \frac{c}{a}} \cdot \sqrt{-3 \cdot \frac{c}{a}}} \cdot \frac{1}{3} \]
                    5. rem-square-sqrtN/A

                      \[\leadsto \sqrt{-3 \cdot \frac{c}{a}} \cdot \frac{1}{3} \]
                    6. *-commutativeN/A

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

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

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

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

                    \[\leadsto \frac{-1}{3} \cdot \color{blue}{\left(c \cdot \sqrt{\frac{-3}{a \cdot c}}\right)} \]
                  6. Step-by-step derivation
                    1. associate-*r*N/A

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

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

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

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

                      \[\leadsto \left(\frac{-1}{3} \cdot c\right) \cdot \sqrt{\frac{-3}{a \cdot c}} \]
                    6. *-commutativeN/A

                      \[\leadsto \left(\frac{-1}{3} \cdot c\right) \cdot \sqrt{\frac{-3}{c \cdot a}} \]
                    7. lift-*.f6428.2

                      \[\leadsto \left(-0.3333333333333333 \cdot c\right) \cdot \sqrt{\frac{-3}{c \cdot a}} \]
                  7. Applied rewrites28.2%

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

                  if 6.59999999999999967e-76 < b

                  1. Initial program 52.9%

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

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

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

                      \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
                    3. lower-/.f6434.6

                      \[\leadsto \frac{c}{b} \cdot -0.5 \]
                  4. Applied rewrites34.6%

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

                Alternative 9: 71.7% accurate, 1.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.1 \cdot 10^{-161}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{-169}:\\ \;\;\;\;\frac{-\sqrt{\frac{c}{a} \cdot -3}}{3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                (FPCore (a b c)
                 :precision binary64
                 (if (<= b -1.1e-161)
                   (/ (/ (* -2.0 b) a) 3.0)
                   (if (<= b 2.05e-169) (/ (- (sqrt (* (/ c a) -3.0))) 3.0) (* (/ c b) -0.5))))
                double code(double a, double b, double c) {
                	double tmp;
                	if (b <= -1.1e-161) {
                		tmp = ((-2.0 * b) / a) / 3.0;
                	} else if (b <= 2.05e-169) {
                		tmp = -sqrt(((c / a) * -3.0)) / 3.0;
                	} else {
                		tmp = (c / b) * -0.5;
                	}
                	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, c)
                use fmin_fmax_functions
                    real(8), intent (in) :: a
                    real(8), intent (in) :: b
                    real(8), intent (in) :: c
                    real(8) :: tmp
                    if (b <= (-1.1d-161)) then
                        tmp = (((-2.0d0) * b) / a) / 3.0d0
                    else if (b <= 2.05d-169) then
                        tmp = -sqrt(((c / a) * (-3.0d0))) / 3.0d0
                    else
                        tmp = (c / b) * (-0.5d0)
                    end if
                    code = tmp
                end function
                
                public static double code(double a, double b, double c) {
                	double tmp;
                	if (b <= -1.1e-161) {
                		tmp = ((-2.0 * b) / a) / 3.0;
                	} else if (b <= 2.05e-169) {
                		tmp = -Math.sqrt(((c / a) * -3.0)) / 3.0;
                	} else {
                		tmp = (c / b) * -0.5;
                	}
                	return tmp;
                }
                
                def code(a, b, c):
                	tmp = 0
                	if b <= -1.1e-161:
                		tmp = ((-2.0 * b) / a) / 3.0
                	elif b <= 2.05e-169:
                		tmp = -math.sqrt(((c / a) * -3.0)) / 3.0
                	else:
                		tmp = (c / b) * -0.5
                	return tmp
                
                function code(a, b, c)
                	tmp = 0.0
                	if (b <= -1.1e-161)
                		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
                	elseif (b <= 2.05e-169)
                		tmp = Float64(Float64(-sqrt(Float64(Float64(c / a) * -3.0))) / 3.0);
                	else
                		tmp = Float64(Float64(c / b) * -0.5);
                	end
                	return tmp
                end
                
                function tmp_2 = code(a, b, c)
                	tmp = 0.0;
                	if (b <= -1.1e-161)
                		tmp = ((-2.0 * b) / a) / 3.0;
                	elseif (b <= 2.05e-169)
                		tmp = -sqrt(((c / a) * -3.0)) / 3.0;
                	else
                		tmp = (c / b) * -0.5;
                	end
                	tmp_2 = tmp;
                end
                
                code[a_, b_, c_] := If[LessEqual[b, -1.1e-161], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 2.05e-169], N[((-N[Sqrt[N[(N[(c / a), $MachinePrecision] * -3.0), $MachinePrecision]], $MachinePrecision]) / 3.0), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;b \leq -1.1 \cdot 10^{-161}:\\
                \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
                
                \mathbf{elif}\;b \leq 2.05 \cdot 10^{-169}:\\
                \;\;\;\;\frac{-\sqrt{\frac{c}{a} \cdot -3}}{3}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{c}{b} \cdot -0.5\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if b < -1.10000000000000001e-161

                  1. Initial program 52.9%

                    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                  2. Step-by-step derivation
                    1. Applied rewrites52.9%

                      \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]
                    2. Step-by-step derivation
                      1. lift-/.f64N/A

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

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

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

                        \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{-3 \cdot a}, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3} \]
                      5. lift-*.f64N/A

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

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

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

                        \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{\color{blue}{a \cdot 3}} \]
                      9. associate-/r*N/A

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

                        \[\leadsto \color{blue}{\frac{\frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{a}}{3}} \]
                    3. Applied rewrites52.9%

                      \[\leadsto \color{blue}{\frac{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a}}{3}} \]
                    4. Taylor expanded in b around -inf

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

                        \[\leadsto \frac{\frac{-2 \cdot \color{blue}{b}}{a}}{3} \]
                    6. Applied rewrites35.2%

                      \[\leadsto \frac{\frac{\color{blue}{-2 \cdot b}}{a}}{3} \]

                    if -1.10000000000000001e-161 < b < 2.0499999999999999e-169

                    1. Initial program 52.9%

                      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                    2. Step-by-step derivation
                      1. Applied rewrites52.9%

                        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]
                      2. Step-by-step derivation
                        1. lift-/.f64N/A

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

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

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

                          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{-3 \cdot a}, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3} \]
                        5. lift-*.f64N/A

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

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

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

                          \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{\color{blue}{a \cdot 3}} \]
                        9. associate-/r*N/A

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

                          \[\leadsto \color{blue}{\frac{\frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{a}}{3}} \]
                      3. Applied rewrites52.9%

                        \[\leadsto \color{blue}{\frac{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a}}{3}} \]
                      4. Taylor expanded in a around -inf

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

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

                          \[\leadsto \frac{-\sqrt{-3 \cdot \frac{c}{a}}}{3} \]
                        3. associate-*r/N/A

                          \[\leadsto \frac{-\sqrt{\frac{-3 \cdot c}{a}}}{3} \]
                        4. *-commutativeN/A

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

                          \[\leadsto \frac{-\sqrt{\frac{c \cdot -3}{a}}}{3} \]
                        6. *-commutativeN/A

                          \[\leadsto \frac{-\sqrt{\frac{-3 \cdot c}{a}}}{3} \]
                        7. associate-*r/N/A

                          \[\leadsto \frac{-\sqrt{-3 \cdot \frac{c}{a}}}{3} \]
                        8. *-commutativeN/A

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

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

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

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

                      if 2.0499999999999999e-169 < b

                      1. Initial program 52.9%

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

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

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

                          \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
                        3. lower-/.f6434.6

                          \[\leadsto \frac{c}{b} \cdot -0.5 \]
                      4. Applied rewrites34.6%

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

                    Alternative 10: 71.7% accurate, 1.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.1 \cdot 10^{-161}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 2.05 \cdot 10^{-169}:\\ \;\;\;\;-0.3333333333333333 \cdot \sqrt{\frac{c}{a} \cdot -3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                    (FPCore (a b c)
                     :precision binary64
                     (if (<= b -1.1e-161)
                       (/ (/ (* -2.0 b) a) 3.0)
                       (if (<= b 2.05e-169)
                         (* -0.3333333333333333 (sqrt (* (/ c a) -3.0)))
                         (* (/ c b) -0.5))))
                    double code(double a, double b, double c) {
                    	double tmp;
                    	if (b <= -1.1e-161) {
                    		tmp = ((-2.0 * b) / a) / 3.0;
                    	} else if (b <= 2.05e-169) {
                    		tmp = -0.3333333333333333 * sqrt(((c / a) * -3.0));
                    	} else {
                    		tmp = (c / b) * -0.5;
                    	}
                    	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, c)
                    use fmin_fmax_functions
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: c
                        real(8) :: tmp
                        if (b <= (-1.1d-161)) then
                            tmp = (((-2.0d0) * b) / a) / 3.0d0
                        else if (b <= 2.05d-169) then
                            tmp = (-0.3333333333333333d0) * sqrt(((c / a) * (-3.0d0)))
                        else
                            tmp = (c / b) * (-0.5d0)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double a, double b, double c) {
                    	double tmp;
                    	if (b <= -1.1e-161) {
                    		tmp = ((-2.0 * b) / a) / 3.0;
                    	} else if (b <= 2.05e-169) {
                    		tmp = -0.3333333333333333 * Math.sqrt(((c / a) * -3.0));
                    	} else {
                    		tmp = (c / b) * -0.5;
                    	}
                    	return tmp;
                    }
                    
                    def code(a, b, c):
                    	tmp = 0
                    	if b <= -1.1e-161:
                    		tmp = ((-2.0 * b) / a) / 3.0
                    	elif b <= 2.05e-169:
                    		tmp = -0.3333333333333333 * math.sqrt(((c / a) * -3.0))
                    	else:
                    		tmp = (c / b) * -0.5
                    	return tmp
                    
                    function code(a, b, c)
                    	tmp = 0.0
                    	if (b <= -1.1e-161)
                    		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
                    	elseif (b <= 2.05e-169)
                    		tmp = Float64(-0.3333333333333333 * sqrt(Float64(Float64(c / a) * -3.0)));
                    	else
                    		tmp = Float64(Float64(c / b) * -0.5);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(a, b, c)
                    	tmp = 0.0;
                    	if (b <= -1.1e-161)
                    		tmp = ((-2.0 * b) / a) / 3.0;
                    	elseif (b <= 2.05e-169)
                    		tmp = -0.3333333333333333 * sqrt(((c / a) * -3.0));
                    	else
                    		tmp = (c / b) * -0.5;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[a_, b_, c_] := If[LessEqual[b, -1.1e-161], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 2.05e-169], N[(-0.3333333333333333 * N[Sqrt[N[(N[(c / a), $MachinePrecision] * -3.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;b \leq -1.1 \cdot 10^{-161}:\\
                    \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
                    
                    \mathbf{elif}\;b \leq 2.05 \cdot 10^{-169}:\\
                    \;\;\;\;-0.3333333333333333 \cdot \sqrt{\frac{c}{a} \cdot -3}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{c}{b} \cdot -0.5\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if b < -1.10000000000000001e-161

                      1. Initial program 52.9%

                        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                      2. Step-by-step derivation
                        1. Applied rewrites52.9%

                          \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]
                        2. Step-by-step derivation
                          1. lift-/.f64N/A

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

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

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

                            \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{-3 \cdot a}, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3} \]
                          5. lift-*.f64N/A

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

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

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

                            \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{\color{blue}{a \cdot 3}} \]
                          9. associate-/r*N/A

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

                            \[\leadsto \color{blue}{\frac{\frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{a}}{3}} \]
                        3. Applied rewrites52.9%

                          \[\leadsto \color{blue}{\frac{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a}}{3}} \]
                        4. Taylor expanded in b around -inf

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

                            \[\leadsto \frac{\frac{-2 \cdot \color{blue}{b}}{a}}{3} \]
                        6. Applied rewrites35.2%

                          \[\leadsto \frac{\frac{\color{blue}{-2 \cdot b}}{a}}{3} \]

                        if -1.10000000000000001e-161 < b < 2.0499999999999999e-169

                        1. Initial program 52.9%

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

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

                            \[\leadsto \frac{-1}{3} \cdot \color{blue}{\sqrt{-3 \cdot \frac{c}{a}}} \]
                          2. rem-square-sqrtN/A

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

                            \[\leadsto \frac{-1}{3} \cdot \sqrt{\sqrt{-3 \cdot \frac{c}{a}} \cdot \sqrt{-3 \cdot \frac{c}{a}}} \]
                          4. rem-square-sqrtN/A

                            \[\leadsto \frac{-1}{3} \cdot \sqrt{-3 \cdot \frac{c}{a}} \]
                          5. *-commutativeN/A

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

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

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

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

                        if 2.0499999999999999e-169 < b

                        1. Initial program 52.9%

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

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

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

                            \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
                          3. lower-/.f6434.6

                            \[\leadsto \frac{c}{b} \cdot -0.5 \]
                        4. Applied rewrites34.6%

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

                      Alternative 11: 67.4% accurate, 1.7× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.9 \cdot 10^{-308}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                      (FPCore (a b c)
                       :precision binary64
                       (if (<= b 2.9e-308) (/ (/ (* -2.0 b) a) 3.0) (* (/ c b) -0.5)))
                      double code(double a, double b, double c) {
                      	double tmp;
                      	if (b <= 2.9e-308) {
                      		tmp = ((-2.0 * b) / a) / 3.0;
                      	} else {
                      		tmp = (c / b) * -0.5;
                      	}
                      	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, c)
                      use fmin_fmax_functions
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          real(8), intent (in) :: c
                          real(8) :: tmp
                          if (b <= 2.9d-308) then
                              tmp = (((-2.0d0) * b) / a) / 3.0d0
                          else
                              tmp = (c / b) * (-0.5d0)
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double a, double b, double c) {
                      	double tmp;
                      	if (b <= 2.9e-308) {
                      		tmp = ((-2.0 * b) / a) / 3.0;
                      	} else {
                      		tmp = (c / b) * -0.5;
                      	}
                      	return tmp;
                      }
                      
                      def code(a, b, c):
                      	tmp = 0
                      	if b <= 2.9e-308:
                      		tmp = ((-2.0 * b) / a) / 3.0
                      	else:
                      		tmp = (c / b) * -0.5
                      	return tmp
                      
                      function code(a, b, c)
                      	tmp = 0.0
                      	if (b <= 2.9e-308)
                      		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
                      	else
                      		tmp = Float64(Float64(c / b) * -0.5);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(a, b, c)
                      	tmp = 0.0;
                      	if (b <= 2.9e-308)
                      		tmp = ((-2.0 * b) / a) / 3.0;
                      	else
                      		tmp = (c / b) * -0.5;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[a_, b_, c_] := If[LessEqual[b, 2.9e-308], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;b \leq 2.9 \cdot 10^{-308}:\\
                      \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{c}{b} \cdot -0.5\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if b < 2.9e-308

                        1. Initial program 52.9%

                          \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                        2. Step-by-step derivation
                          1. Applied rewrites52.9%

                            \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3}} \]
                          2. Step-by-step derivation
                            1. lift-/.f64N/A

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

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

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

                              \[\leadsto \frac{\sqrt{\mathsf{fma}\left(\color{blue}{-3 \cdot a}, c, b \cdot b\right)} + \left(-b\right)}{a \cdot 3} \]
                            5. lift-*.f64N/A

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

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

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

                              \[\leadsto \frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{\color{blue}{a \cdot 3}} \]
                            9. associate-/r*N/A

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

                              \[\leadsto \color{blue}{\frac{\frac{\sqrt{\left(-3 \cdot a\right) \cdot c + b \cdot b} + \left(\mathsf{neg}\left(b\right)\right)}{a}}{3}} \]
                          3. Applied rewrites52.9%

                            \[\leadsto \color{blue}{\frac{\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}{a}}{3}} \]
                          4. Taylor expanded in b around -inf

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

                              \[\leadsto \frac{\frac{-2 \cdot \color{blue}{b}}{a}}{3} \]
                          6. Applied rewrites35.2%

                            \[\leadsto \frac{\frac{\color{blue}{-2 \cdot b}}{a}}{3} \]

                          if 2.9e-308 < b

                          1. Initial program 52.9%

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

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

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

                              \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
                            3. lower-/.f6434.6

                              \[\leadsto \frac{c}{b} \cdot -0.5 \]
                          4. Applied rewrites34.6%

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

                        Alternative 12: 67.3% accurate, 1.7× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.9 \cdot 10^{-308}:\\ \;\;\;\;\frac{-2 \cdot b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                        (FPCore (a b c)
                         :precision binary64
                         (if (<= b 2.9e-308) (/ (* -2.0 b) (* 3.0 a)) (* (/ c b) -0.5)))
                        double code(double a, double b, double c) {
                        	double tmp;
                        	if (b <= 2.9e-308) {
                        		tmp = (-2.0 * b) / (3.0 * a);
                        	} else {
                        		tmp = (c / b) * -0.5;
                        	}
                        	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, c)
                        use fmin_fmax_functions
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8), intent (in) :: c
                            real(8) :: tmp
                            if (b <= 2.9d-308) then
                                tmp = ((-2.0d0) * b) / (3.0d0 * a)
                            else
                                tmp = (c / b) * (-0.5d0)
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double a, double b, double c) {
                        	double tmp;
                        	if (b <= 2.9e-308) {
                        		tmp = (-2.0 * b) / (3.0 * a);
                        	} else {
                        		tmp = (c / b) * -0.5;
                        	}
                        	return tmp;
                        }
                        
                        def code(a, b, c):
                        	tmp = 0
                        	if b <= 2.9e-308:
                        		tmp = (-2.0 * b) / (3.0 * a)
                        	else:
                        		tmp = (c / b) * -0.5
                        	return tmp
                        
                        function code(a, b, c)
                        	tmp = 0.0
                        	if (b <= 2.9e-308)
                        		tmp = Float64(Float64(-2.0 * b) / Float64(3.0 * a));
                        	else
                        		tmp = Float64(Float64(c / b) * -0.5);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(a, b, c)
                        	tmp = 0.0;
                        	if (b <= 2.9e-308)
                        		tmp = (-2.0 * b) / (3.0 * a);
                        	else
                        		tmp = (c / b) * -0.5;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[a_, b_, c_] := If[LessEqual[b, 2.9e-308], N[(N[(-2.0 * b), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;b \leq 2.9 \cdot 10^{-308}:\\
                        \;\;\;\;\frac{-2 \cdot b}{3 \cdot a}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{c}{b} \cdot -0.5\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if b < 2.9e-308

                          1. Initial program 52.9%

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

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

                              \[\leadsto \frac{-2 \cdot \color{blue}{b}}{3 \cdot a} \]
                          4. Applied rewrites35.2%

                            \[\leadsto \frac{\color{blue}{-2 \cdot b}}{3 \cdot a} \]

                          if 2.9e-308 < b

                          1. Initial program 52.9%

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

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

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

                              \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
                            3. lower-/.f6434.6

                              \[\leadsto \frac{c}{b} \cdot -0.5 \]
                          4. Applied rewrites34.6%

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

                        Alternative 13: 67.3% accurate, 2.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.9 \cdot 10^{-308}:\\ \;\;\;\;\frac{-0.6666666666666666 \cdot b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                        (FPCore (a b c)
                         :precision binary64
                         (if (<= b 2.9e-308) (/ (* -0.6666666666666666 b) a) (* (/ c b) -0.5)))
                        double code(double a, double b, double c) {
                        	double tmp;
                        	if (b <= 2.9e-308) {
                        		tmp = (-0.6666666666666666 * b) / a;
                        	} else {
                        		tmp = (c / b) * -0.5;
                        	}
                        	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, c)
                        use fmin_fmax_functions
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8), intent (in) :: c
                            real(8) :: tmp
                            if (b <= 2.9d-308) then
                                tmp = ((-0.6666666666666666d0) * b) / a
                            else
                                tmp = (c / b) * (-0.5d0)
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double a, double b, double c) {
                        	double tmp;
                        	if (b <= 2.9e-308) {
                        		tmp = (-0.6666666666666666 * b) / a;
                        	} else {
                        		tmp = (c / b) * -0.5;
                        	}
                        	return tmp;
                        }
                        
                        def code(a, b, c):
                        	tmp = 0
                        	if b <= 2.9e-308:
                        		tmp = (-0.6666666666666666 * b) / a
                        	else:
                        		tmp = (c / b) * -0.5
                        	return tmp
                        
                        function code(a, b, c)
                        	tmp = 0.0
                        	if (b <= 2.9e-308)
                        		tmp = Float64(Float64(-0.6666666666666666 * b) / a);
                        	else
                        		tmp = Float64(Float64(c / b) * -0.5);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(a, b, c)
                        	tmp = 0.0;
                        	if (b <= 2.9e-308)
                        		tmp = (-0.6666666666666666 * b) / a;
                        	else
                        		tmp = (c / b) * -0.5;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[a_, b_, c_] := If[LessEqual[b, 2.9e-308], N[(N[(-0.6666666666666666 * b), $MachinePrecision] / a), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;b \leq 2.9 \cdot 10^{-308}:\\
                        \;\;\;\;\frac{-0.6666666666666666 \cdot b}{a}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{c}{b} \cdot -0.5\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if b < 2.9e-308

                          1. Initial program 52.9%

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

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

                              \[\leadsto \frac{-2}{3} \cdot \color{blue}{\frac{b}{a}} \]
                            2. lower-/.f6435.2

                              \[\leadsto -0.6666666666666666 \cdot \frac{b}{\color{blue}{a}} \]
                          4. Applied rewrites35.2%

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

                              \[\leadsto \frac{-2}{3} \cdot \color{blue}{\frac{b}{a}} \]
                            2. lift-/.f64N/A

                              \[\leadsto \frac{-2}{3} \cdot \frac{b}{\color{blue}{a}} \]
                            3. associate-*r/N/A

                              \[\leadsto \frac{\frac{-2}{3} \cdot b}{\color{blue}{a}} \]
                            4. lower-/.f64N/A

                              \[\leadsto \frac{\frac{-2}{3} \cdot b}{\color{blue}{a}} \]
                            5. lower-*.f6435.2

                              \[\leadsto \frac{-0.6666666666666666 \cdot b}{a} \]
                          6. Applied rewrites35.2%

                            \[\leadsto \frac{-0.6666666666666666 \cdot b}{\color{blue}{a}} \]

                          if 2.9e-308 < b

                          1. Initial program 52.9%

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

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

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

                              \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
                            3. lower-/.f6434.6

                              \[\leadsto \frac{c}{b} \cdot -0.5 \]
                          4. Applied rewrites34.6%

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

                        Alternative 14: 67.3% accurate, 2.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.9 \cdot 10^{-308}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                        (FPCore (a b c)
                         :precision binary64
                         (if (<= b 2.9e-308) (* -0.6666666666666666 (/ b a)) (* (/ c b) -0.5)))
                        double code(double a, double b, double c) {
                        	double tmp;
                        	if (b <= 2.9e-308) {
                        		tmp = -0.6666666666666666 * (b / a);
                        	} else {
                        		tmp = (c / b) * -0.5;
                        	}
                        	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, c)
                        use fmin_fmax_functions
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8), intent (in) :: c
                            real(8) :: tmp
                            if (b <= 2.9d-308) then
                                tmp = (-0.6666666666666666d0) * (b / a)
                            else
                                tmp = (c / b) * (-0.5d0)
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double a, double b, double c) {
                        	double tmp;
                        	if (b <= 2.9e-308) {
                        		tmp = -0.6666666666666666 * (b / a);
                        	} else {
                        		tmp = (c / b) * -0.5;
                        	}
                        	return tmp;
                        }
                        
                        def code(a, b, c):
                        	tmp = 0
                        	if b <= 2.9e-308:
                        		tmp = -0.6666666666666666 * (b / a)
                        	else:
                        		tmp = (c / b) * -0.5
                        	return tmp
                        
                        function code(a, b, c)
                        	tmp = 0.0
                        	if (b <= 2.9e-308)
                        		tmp = Float64(-0.6666666666666666 * Float64(b / a));
                        	else
                        		tmp = Float64(Float64(c / b) * -0.5);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(a, b, c)
                        	tmp = 0.0;
                        	if (b <= 2.9e-308)
                        		tmp = -0.6666666666666666 * (b / a);
                        	else
                        		tmp = (c / b) * -0.5;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[a_, b_, c_] := If[LessEqual[b, 2.9e-308], N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;b \leq 2.9 \cdot 10^{-308}:\\
                        \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{c}{b} \cdot -0.5\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if b < 2.9e-308

                          1. Initial program 52.9%

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

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

                              \[\leadsto \frac{-2}{3} \cdot \color{blue}{\frac{b}{a}} \]
                            2. lower-/.f6435.2

                              \[\leadsto -0.6666666666666666 \cdot \frac{b}{\color{blue}{a}} \]
                          4. Applied rewrites35.2%

                            \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]

                          if 2.9e-308 < b

                          1. Initial program 52.9%

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

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

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

                              \[\leadsto \frac{c}{b} \cdot \color{blue}{\frac{-1}{2}} \]
                            3. lower-/.f6434.6

                              \[\leadsto \frac{c}{b} \cdot -0.5 \]
                          4. Applied rewrites34.6%

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

                        Alternative 15: 35.2% accurate, 3.3× speedup?

                        \[\begin{array}{l} \\ -0.6666666666666666 \cdot \frac{b}{a} \end{array} \]
                        (FPCore (a b c) :precision binary64 (* -0.6666666666666666 (/ b a)))
                        double code(double a, double b, double c) {
                        	return -0.6666666666666666 * (b / 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, c)
                        use fmin_fmax_functions
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8), intent (in) :: c
                            code = (-0.6666666666666666d0) * (b / a)
                        end function
                        
                        public static double code(double a, double b, double c) {
                        	return -0.6666666666666666 * (b / a);
                        }
                        
                        def code(a, b, c):
                        	return -0.6666666666666666 * (b / a)
                        
                        function code(a, b, c)
                        	return Float64(-0.6666666666666666 * Float64(b / a))
                        end
                        
                        function tmp = code(a, b, c)
                        	tmp = -0.6666666666666666 * (b / a);
                        end
                        
                        code[a_, b_, c_] := N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        -0.6666666666666666 \cdot \frac{b}{a}
                        \end{array}
                        
                        Derivation
                        1. Initial program 52.9%

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

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

                            \[\leadsto \frac{-2}{3} \cdot \color{blue}{\frac{b}{a}} \]
                          2. lower-/.f6435.2

                            \[\leadsto -0.6666666666666666 \cdot \frac{b}{\color{blue}{a}} \]
                        4. Applied rewrites35.2%

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

                        Alternative 16: 15.5% accurate, 3.3× speedup?

                        \[\begin{array}{l} \\ -0.3333333333333333 \cdot \frac{b}{a} \end{array} \]
                        (FPCore (a b c) :precision binary64 (* -0.3333333333333333 (/ b a)))
                        double code(double a, double b, double c) {
                        	return -0.3333333333333333 * (b / 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, c)
                        use fmin_fmax_functions
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8), intent (in) :: c
                            code = (-0.3333333333333333d0) * (b / a)
                        end function
                        
                        public static double code(double a, double b, double c) {
                        	return -0.3333333333333333 * (b / a);
                        }
                        
                        def code(a, b, c):
                        	return -0.3333333333333333 * (b / a)
                        
                        function code(a, b, c)
                        	return Float64(-0.3333333333333333 * Float64(b / a))
                        end
                        
                        function tmp = code(a, b, c)
                        	tmp = -0.3333333333333333 * (b / a);
                        end
                        
                        code[a_, b_, c_] := N[(-0.3333333333333333 * N[(b / a), $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        -0.3333333333333333 \cdot \frac{b}{a}
                        \end{array}
                        
                        Derivation
                        1. Initial program 52.9%

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

                          \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{\sqrt{{b}^{2}}} + \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}} \]
                        3. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \frac{c}{\sqrt{{b}^{2}}} \cdot \frac{-1}{2} + \color{blue}{\frac{1}{3}} \cdot \frac{\sqrt{{b}^{2}} - b}{a} \]
                          2. lower-fma.f64N/A

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

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{{b}^{2}}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
                          4. pow2N/A

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\sqrt{b \cdot b}}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
                          5. rem-sqrt-square-revN/A

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
                          6. lower-fabs.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{1}{3} \cdot \frac{\sqrt{{b}^{2}} - b}{a}\right) \]
                          7. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
                          8. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
                          9. lower-/.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
                          10. lower--.f64N/A

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{{b}^{2}} - b}{a} \cdot \frac{1}{3}\right) \]
                          11. pow2N/A

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\sqrt{b \cdot b} - b}{a} \cdot \frac{1}{3}\right) \]
                          12. rem-sqrt-square-revN/A

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, \frac{-1}{2}, \frac{\left|b\right| - b}{a} \cdot \frac{1}{3}\right) \]
                          13. lower-fabs.f6467.5

                            \[\leadsto \mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right) \]
                        4. Applied rewrites67.5%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{c}{\left|b\right|}, -0.5, \frac{\left|b\right| - b}{a} \cdot 0.3333333333333333\right)} \]
                        5. Taylor expanded in b around inf

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

                            \[\leadsto \frac{-1}{3} \cdot \frac{b}{\color{blue}{a}} \]
                          2. lift-/.f6415.5

                            \[\leadsto -0.3333333333333333 \cdot \frac{b}{a} \]
                        7. Applied rewrites15.5%

                          \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{b}{a}} \]
                        8. Add Preprocessing

                        Reproduce

                        ?
                        herbie shell --seed 2025139 
                        (FPCore (a b c)
                          :name "Cubic critical"
                          :precision binary64
                          (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))