Cubic critical

Percentage Accurate: 52.9% → 85.7%
Time: 3.7s
Alternatives: 17
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 17 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: 85.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+134}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5.2e+134)
   (/ (/ (* -2.0 b) a) 3.0)
   (if (<= b 7.8e-48)
     (- (/ (sqrt (fma (* -3.0 a) c (* b b))) (* 3.0 a)) (/ b (* 3.0 a)))
     (* (/ c b) -0.5))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5.2e+134) {
		tmp = ((-2.0 * b) / a) / 3.0;
	} else if (b <= 7.8e-48) {
		tmp = (sqrt(fma((-3.0 * a), c, (b * b))) / (3.0 * a)) - (b / (3.0 * a));
	} else {
		tmp = (c / b) * -0.5;
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -5.2e+134)
		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
	elseif (b <= 7.8e-48)
		tmp = Float64(Float64(sqrt(fma(Float64(-3.0 * a), c, Float64(b * b))) / Float64(3.0 * a)) - Float64(b / Float64(3.0 * a)));
	else
		tmp = Float64(Float64(c / b) * -0.5);
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -5.2e+134], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 7.8e-48], N[(N[(N[Sqrt[N[(N[(-3.0 * a), $MachinePrecision] * c + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision] - N[(b / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+134}:\\
\;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\

\mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)}}{3 \cdot a} - \frac{b}{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 < -5.2000000000000003e134

    1. Initial program 47.3%

      \[\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 rewrites47.4%

        \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
        2. 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} \]
        3. 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} \]
        4. 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} \]
        5. 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} \]
        6. 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} \]
        7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
        16. lower-*.f6447.3

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\frac{-2 \cdot b}{a}}}{3} \]
        6. associate-*l*96.1

          \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
        7. *-commutative96.1

          \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
      8. Applied rewrites96.1%

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

      if -5.2000000000000003e134 < b < 7.800000000000001e-48

      1. Initial program 80.4%

        \[\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 rewrites80.4%

          \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
          2. 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} \]
          3. 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} \]
          4. 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} \]
          5. 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} \]
          6. 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} \]
          7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
          16. lower-*.f6480.4

            \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
        3. Applied rewrites80.4%

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

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

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

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

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

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

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

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

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

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

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

        if 7.800000000000001e-48 < b

        1. Initial program 16.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 \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-/.f6487.7

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

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

      Alternative 2: 85.7% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+134}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot -3\right) \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
      (FPCore (a b c)
       :precision binary64
       (if (<= b -5.2e+134)
         (/ (/ (* -2.0 b) a) 3.0)
         (if (<= b 7.8e-48)
           (/ (- (sqrt (fma b b (* (* a -3.0) c))) b) (* a 3.0))
           (* (/ c b) -0.5))))
      double code(double a, double b, double c) {
      	double tmp;
      	if (b <= -5.2e+134) {
      		tmp = ((-2.0 * b) / a) / 3.0;
      	} else if (b <= 7.8e-48) {
      		tmp = (sqrt(fma(b, b, ((a * -3.0) * c))) - b) / (a * 3.0);
      	} else {
      		tmp = (c / b) * -0.5;
      	}
      	return tmp;
      }
      
      function code(a, b, c)
      	tmp = 0.0
      	if (b <= -5.2e+134)
      		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
      	elseif (b <= 7.8e-48)
      		tmp = Float64(Float64(sqrt(fma(b, b, Float64(Float64(a * -3.0) * c))) - b) / Float64(a * 3.0));
      	else
      		tmp = Float64(Float64(c / b) * -0.5);
      	end
      	return tmp
      end
      
      code[a_, b_, c_] := If[LessEqual[b, -5.2e+134], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 7.8e-48], N[(N[(N[Sqrt[N[(b * b + N[(N[(a * -3.0), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;b \leq -5.2 \cdot 10^{+134}:\\
      \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
      
      \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\
      \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, \left(a \cdot -3\right) \cdot c\right)} - b}{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 < -5.2000000000000003e134

        1. Initial program 47.3%

          \[\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 rewrites47.4%

            \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
            2. 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} \]
            3. 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} \]
            4. 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} \]
            5. 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} \]
            6. 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} \]
            7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
            16. lower-*.f6447.3

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\frac{-2 \cdot b}{a}}}{3} \]
            6. associate-*l*96.1

              \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
            7. *-commutative96.1

              \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
          8. Applied rewrites96.1%

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

          if -5.2000000000000003e134 < b < 7.800000000000001e-48

          1. Initial program 80.4%

            \[\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 rewrites80.4%

              \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
              2. 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} \]
              3. 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} \]
              4. 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} \]
              5. 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} \]
              6. 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} \]
              7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
              16. lower-*.f6480.4

                \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
            3. Applied rewrites80.4%

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

            if 7.800000000000001e-48 < b

            1. Initial program 16.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 \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-/.f6487.7

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

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

          Alternative 3: 85.7% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+134}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
          (FPCore (a b c)
           :precision binary64
           (if (<= b -5.2e+134)
             (/ (/ (* -2.0 b) a) 3.0)
             (if (<= b 7.8e-48)
               (/ (- (sqrt (fma b b (* a (* c -3.0)))) b) (* a 3.0))
               (* (/ c b) -0.5))))
          double code(double a, double b, double c) {
          	double tmp;
          	if (b <= -5.2e+134) {
          		tmp = ((-2.0 * b) / a) / 3.0;
          	} else if (b <= 7.8e-48) {
          		tmp = (sqrt(fma(b, b, (a * (c * -3.0)))) - b) / (a * 3.0);
          	} else {
          		tmp = (c / b) * -0.5;
          	}
          	return tmp;
          }
          
          function code(a, b, c)
          	tmp = 0.0
          	if (b <= -5.2e+134)
          		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
          	elseif (b <= 7.8e-48)
          		tmp = Float64(Float64(sqrt(fma(b, b, Float64(a * Float64(c * -3.0)))) - b) / Float64(a * 3.0));
          	else
          		tmp = Float64(Float64(c / b) * -0.5);
          	end
          	return tmp
          end
          
          code[a_, b_, c_] := If[LessEqual[b, -5.2e+134], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 7.8e-48], N[(N[(N[Sqrt[N[(b * b + N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;b \leq -5.2 \cdot 10^{+134}:\\
          \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
          
          \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\
          \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(c \cdot -3\right)\right)} - b}{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 < -5.2000000000000003e134

            1. Initial program 47.3%

              \[\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 rewrites47.4%

                \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                2. 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} \]
                3. 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} \]
                4. 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} \]
                5. 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} \]
                6. 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} \]
                7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                16. lower-*.f6447.3

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\color{blue}{\frac{-2 \cdot b}{a}}}{3} \]
                6. associate-*l*96.1

                  \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                7. *-commutative96.1

                  \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
              8. Applied rewrites96.1%

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

              if -5.2000000000000003e134 < b < 7.800000000000001e-48

              1. Initial program 80.4%

                \[\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 rewrites80.4%

                  \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                  2. 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} \]
                  3. 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} \]
                  4. 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} \]
                  5. 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} \]
                  6. 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} \]
                  7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                  16. lower-*.f6480.4

                    \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                3. Applied rewrites80.4%

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

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

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

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

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

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

                    \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, a \cdot \color{blue}{\left(c \cdot -3\right)}\right)} - b}{a \cdot 3} \]
                5. Applied rewrites80.3%

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

                if 7.800000000000001e-48 < b

                1. Initial program 16.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 \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-/.f6487.7

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

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

              Alternative 4: 80.1% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{-14}:\\ \;\;\;\;\left(\frac{c}{b \cdot b} \cdot 0.5 - \frac{0.6666666666666666}{a}\right) \cdot b\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{\sqrt{\left(a \cdot -3\right) \cdot c} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
              (FPCore (a b c)
               :precision binary64
               (if (<= b -7e-14)
                 (* (- (* (/ c (* b b)) 0.5) (/ 0.6666666666666666 a)) b)
                 (if (<= b 7.8e-48)
                   (/ (- (sqrt (* (* a -3.0) c)) b) (* a 3.0))
                   (* (/ c b) -0.5))))
              double code(double a, double b, double c) {
              	double tmp;
              	if (b <= -7e-14) {
              		tmp = (((c / (b * b)) * 0.5) - (0.6666666666666666 / a)) * b;
              	} else if (b <= 7.8e-48) {
              		tmp = (sqrt(((a * -3.0) * c)) - 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 <= (-7d-14)) then
                      tmp = (((c / (b * b)) * 0.5d0) - (0.6666666666666666d0 / a)) * b
                  else if (b <= 7.8d-48) then
                      tmp = (sqrt(((a * (-3.0d0)) * c)) - 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 <= -7e-14) {
              		tmp = (((c / (b * b)) * 0.5) - (0.6666666666666666 / a)) * b;
              	} else if (b <= 7.8e-48) {
              		tmp = (Math.sqrt(((a * -3.0) * c)) - b) / (a * 3.0);
              	} else {
              		tmp = (c / b) * -0.5;
              	}
              	return tmp;
              }
              
              def code(a, b, c):
              	tmp = 0
              	if b <= -7e-14:
              		tmp = (((c / (b * b)) * 0.5) - (0.6666666666666666 / a)) * b
              	elif b <= 7.8e-48:
              		tmp = (math.sqrt(((a * -3.0) * c)) - b) / (a * 3.0)
              	else:
              		tmp = (c / b) * -0.5
              	return tmp
              
              function code(a, b, c)
              	tmp = 0.0
              	if (b <= -7e-14)
              		tmp = Float64(Float64(Float64(Float64(c / Float64(b * b)) * 0.5) - Float64(0.6666666666666666 / a)) * b);
              	elseif (b <= 7.8e-48)
              		tmp = Float64(Float64(sqrt(Float64(Float64(a * -3.0) * c)) - b) / Float64(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 <= -7e-14)
              		tmp = (((c / (b * b)) * 0.5) - (0.6666666666666666 / a)) * b;
              	elseif (b <= 7.8e-48)
              		tmp = (sqrt(((a * -3.0) * c)) - b) / (a * 3.0);
              	else
              		tmp = (c / b) * -0.5;
              	end
              	tmp_2 = tmp;
              end
              
              code[a_, b_, c_] := If[LessEqual[b, -7e-14], N[(N[(N[(N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] - N[(0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 7.8e-48], N[(N[(N[Sqrt[N[(N[(a * -3.0), $MachinePrecision] * c), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;b \leq -7 \cdot 10^{-14}:\\
              \;\;\;\;\left(\frac{c}{b \cdot b} \cdot 0.5 - \frac{0.6666666666666666}{a}\right) \cdot b\\
              
              \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\
              \;\;\;\;\frac{\sqrt{\left(a \cdot -3\right) \cdot c} - b}{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 < -7.0000000000000005e-14

                1. Initial program 66.6%

                  \[\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}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
                3. Step-by-step derivation
                  1. associate-*r*N/A

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

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

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

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

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

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

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

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

                    \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                  10. associate-*r/N/A

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

                    \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{\frac{2}{3}}{a}\right) \]
                  12. lower-/.f6490.7

                    \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, -0.5, \frac{0.6666666666666666}{a}\right) \]
                4. Applied rewrites90.7%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\frac{c}{b \cdot b} \cdot \frac{1}{2} - \frac{2}{3} \cdot \frac{1}{a}\right) \cdot b \]
                  9. associate-*r/N/A

                    \[\leadsto \left(\frac{c}{b \cdot b} \cdot \frac{1}{2} - \frac{\frac{2}{3} \cdot 1}{a}\right) \cdot b \]
                  10. metadata-evalN/A

                    \[\leadsto \left(\frac{c}{b \cdot b} \cdot \frac{1}{2} - \frac{\frac{2}{3}}{a}\right) \cdot b \]
                  11. lift-/.f6490.7

                    \[\leadsto \left(\frac{c}{b \cdot b} \cdot 0.5 - \frac{0.6666666666666666}{a}\right) \cdot b \]
                7. Applied rewrites90.7%

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

                if -7.0000000000000005e-14 < b < 7.800000000000001e-48

                1. Initial program 75.5%

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

                    \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                    2. 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} \]
                    3. 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} \]
                    4. 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} \]
                    5. 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} \]
                    6. 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} \]
                    7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                    16. lower-*.f6475.5

                      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                  3. Applied rewrites75.5%

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

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

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

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

                      \[\leadsto \frac{\sqrt{\left(c \cdot a\right) \cdot -3} - b}{a \cdot 3} \]
                    4. lift-*.f6462.8

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{\sqrt{\left(a \cdot -3\right) \cdot c} - b}{a \cdot 3} \]
                  8. Applied rewrites63.0%

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

                  if 7.800000000000001e-48 < b

                  1. Initial program 16.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 \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-/.f6487.7

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

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

                Alternative 5: 80.1% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{-14}:\\ \;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{a} \cdot -0.6666666666666666\right)\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{\sqrt{\left(a \cdot -3\right) \cdot c} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                (FPCore (a b c)
                 :precision binary64
                 (if (<= b -7e-14)
                   (fma 0.5 (/ c b) (* (/ b a) -0.6666666666666666))
                   (if (<= b 7.8e-48)
                     (/ (- (sqrt (* (* a -3.0) c)) b) (* a 3.0))
                     (* (/ c b) -0.5))))
                double code(double a, double b, double c) {
                	double tmp;
                	if (b <= -7e-14) {
                		tmp = fma(0.5, (c / b), ((b / a) * -0.6666666666666666));
                	} else if (b <= 7.8e-48) {
                		tmp = (sqrt(((a * -3.0) * c)) - b) / (a * 3.0);
                	} else {
                		tmp = (c / b) * -0.5;
                	}
                	return tmp;
                }
                
                function code(a, b, c)
                	tmp = 0.0
                	if (b <= -7e-14)
                		tmp = fma(0.5, Float64(c / b), Float64(Float64(b / a) * -0.6666666666666666));
                	elseif (b <= 7.8e-48)
                		tmp = Float64(Float64(sqrt(Float64(Float64(a * -3.0) * c)) - b) / Float64(a * 3.0));
                	else
                		tmp = Float64(Float64(c / b) * -0.5);
                	end
                	return tmp
                end
                
                code[a_, b_, c_] := If[LessEqual[b, -7e-14], N[(0.5 * N[(c / b), $MachinePrecision] + N[(N[(b / a), $MachinePrecision] * -0.6666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.8e-48], N[(N[(N[Sqrt[N[(N[(a * -3.0), $MachinePrecision] * c), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;b \leq -7 \cdot 10^{-14}:\\
                \;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{a} \cdot -0.6666666666666666\right)\\
                
                \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\
                \;\;\;\;\frac{\sqrt{\left(a \cdot -3\right) \cdot c} - b}{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 < -7.0000000000000005e-14

                  1. Initial program 66.6%

                    \[\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}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
                  3. Step-by-step derivation
                    1. associate-*r*N/A

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

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

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

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

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

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

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

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

                      \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                    10. associate-*r/N/A

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

                      \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{\frac{2}{3}}{a}\right) \]
                    12. lower-/.f6490.7

                      \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, -0.5, \frac{0.6666666666666666}{a}\right) \]
                  4. Applied rewrites90.7%

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{c}{b}, \frac{b}{a} \cdot \frac{-2}{3}\right) \]
                    6. lift-/.f6490.8

                      \[\leadsto \mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{a} \cdot -0.6666666666666666\right) \]
                  7. Applied rewrites90.8%

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

                  if -7.0000000000000005e-14 < b < 7.800000000000001e-48

                  1. Initial program 75.5%

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

                      \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                      2. 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} \]
                      3. 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} \]
                      4. 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} \]
                      5. 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} \]
                      6. 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} \]
                      7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                      16. lower-*.f6475.5

                        \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                    3. Applied rewrites75.5%

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

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

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

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

                        \[\leadsto \frac{\sqrt{\left(c \cdot a\right) \cdot -3} - b}{a \cdot 3} \]
                      4. lift-*.f6462.8

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{\sqrt{\left(a \cdot -3\right) \cdot c} - b}{a \cdot 3} \]
                    8. Applied rewrites63.0%

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

                    if 7.800000000000001e-48 < b

                    1. Initial program 16.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 \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-/.f6487.7

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

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

                  Alternative 6: 79.5% accurate, 1.1× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{-14}:\\ \;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{a} \cdot -0.6666666666666666\right)\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{\sqrt{\left(a \cdot -3\right) \cdot c}}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                  (FPCore (a b c)
                   :precision binary64
                   (if (<= b -7e-14)
                     (fma 0.5 (/ c b) (* (/ b a) -0.6666666666666666))
                     (if (<= b 7.8e-48) (/ (sqrt (* (* a -3.0) c)) (* a 3.0)) (* (/ c b) -0.5))))
                  double code(double a, double b, double c) {
                  	double tmp;
                  	if (b <= -7e-14) {
                  		tmp = fma(0.5, (c / b), ((b / a) * -0.6666666666666666));
                  	} else if (b <= 7.8e-48) {
                  		tmp = sqrt(((a * -3.0) * c)) / (a * 3.0);
                  	} else {
                  		tmp = (c / b) * -0.5;
                  	}
                  	return tmp;
                  }
                  
                  function code(a, b, c)
                  	tmp = 0.0
                  	if (b <= -7e-14)
                  		tmp = fma(0.5, Float64(c / b), Float64(Float64(b / a) * -0.6666666666666666));
                  	elseif (b <= 7.8e-48)
                  		tmp = Float64(sqrt(Float64(Float64(a * -3.0) * c)) / Float64(a * 3.0));
                  	else
                  		tmp = Float64(Float64(c / b) * -0.5);
                  	end
                  	return tmp
                  end
                  
                  code[a_, b_, c_] := If[LessEqual[b, -7e-14], N[(0.5 * N[(c / b), $MachinePrecision] + N[(N[(b / a), $MachinePrecision] * -0.6666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.8e-48], N[(N[Sqrt[N[(N[(a * -3.0), $MachinePrecision] * c), $MachinePrecision]], $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;b \leq -7 \cdot 10^{-14}:\\
                  \;\;\;\;\mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{a} \cdot -0.6666666666666666\right)\\
                  
                  \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\
                  \;\;\;\;\frac{\sqrt{\left(a \cdot -3\right) \cdot 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 < -7.0000000000000005e-14

                    1. Initial program 66.6%

                      \[\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}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
                    3. Step-by-step derivation
                      1. associate-*r*N/A

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

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

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

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

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

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

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

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

                        \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                      10. associate-*r/N/A

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

                        \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{\frac{2}{3}}{a}\right) \]
                      12. lower-/.f6490.7

                        \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, -0.5, \frac{0.6666666666666666}{a}\right) \]
                    4. Applied rewrites90.7%

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{1}{2}, \frac{c}{b}, \frac{b}{a} \cdot \frac{-2}{3}\right) \]
                      6. lift-/.f6490.8

                        \[\leadsto \mathsf{fma}\left(0.5, \frac{c}{b}, \frac{b}{a} \cdot -0.6666666666666666\right) \]
                    7. Applied rewrites90.8%

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

                    if -7.0000000000000005e-14 < b < 7.800000000000001e-48

                    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

                      if 7.800000000000001e-48 < b

                      1. Initial program 16.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 \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-/.f6487.7

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

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

                    Alternative 7: 79.4% accurate, 1.1× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{-14}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{\sqrt{\left(a \cdot -3\right) \cdot c}}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                    (FPCore (a b c)
                     :precision binary64
                     (if (<= b -7e-14)
                       (/ (/ (* -2.0 b) a) 3.0)
                       (if (<= b 7.8e-48) (/ (sqrt (* (* a -3.0) c)) (* a 3.0)) (* (/ c b) -0.5))))
                    double code(double a, double b, double c) {
                    	double tmp;
                    	if (b <= -7e-14) {
                    		tmp = ((-2.0 * b) / a) / 3.0;
                    	} else if (b <= 7.8e-48) {
                    		tmp = sqrt(((a * -3.0) * 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 <= (-7d-14)) then
                            tmp = (((-2.0d0) * b) / a) / 3.0d0
                        else if (b <= 7.8d-48) then
                            tmp = sqrt(((a * (-3.0d0)) * 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 <= -7e-14) {
                    		tmp = ((-2.0 * b) / a) / 3.0;
                    	} else if (b <= 7.8e-48) {
                    		tmp = Math.sqrt(((a * -3.0) * c)) / (a * 3.0);
                    	} else {
                    		tmp = (c / b) * -0.5;
                    	}
                    	return tmp;
                    }
                    
                    def code(a, b, c):
                    	tmp = 0
                    	if b <= -7e-14:
                    		tmp = ((-2.0 * b) / a) / 3.0
                    	elif b <= 7.8e-48:
                    		tmp = math.sqrt(((a * -3.0) * c)) / (a * 3.0)
                    	else:
                    		tmp = (c / b) * -0.5
                    	return tmp
                    
                    function code(a, b, c)
                    	tmp = 0.0
                    	if (b <= -7e-14)
                    		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
                    	elseif (b <= 7.8e-48)
                    		tmp = Float64(sqrt(Float64(Float64(a * -3.0) * c)) / Float64(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 <= -7e-14)
                    		tmp = ((-2.0 * b) / a) / 3.0;
                    	elseif (b <= 7.8e-48)
                    		tmp = sqrt(((a * -3.0) * c)) / (a * 3.0);
                    	else
                    		tmp = (c / b) * -0.5;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[a_, b_, c_] := If[LessEqual[b, -7e-14], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 7.8e-48], N[(N[Sqrt[N[(N[(a * -3.0), $MachinePrecision] * c), $MachinePrecision]], $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;b \leq -7 \cdot 10^{-14}:\\
                    \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
                    
                    \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\
                    \;\;\;\;\frac{\sqrt{\left(a \cdot -3\right) \cdot 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 < -7.0000000000000005e-14

                      1. Initial program 66.6%

                        \[\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 rewrites66.6%

                          \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                          2. 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} \]
                          3. 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} \]
                          4. 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} \]
                          5. 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} \]
                          6. 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} \]
                          7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                          16. lower-*.f6466.6

                            \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                        3. Applied rewrites66.6%

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{\color{blue}{\frac{-2 \cdot b}{a}}}{3} \]
                          6. associate-*l*90.4

                            \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                          7. *-commutative90.4

                            \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                        8. Applied rewrites90.4%

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

                        if -7.0000000000000005e-14 < b < 7.800000000000001e-48

                        1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

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

                          if 7.800000000000001e-48 < b

                          1. Initial program 16.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 \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-/.f6487.7

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

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

                        Alternative 8: 79.3% accurate, 1.1× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -7 \cdot 10^{-14}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\ \;\;\;\;\frac{\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 -7e-14)
                           (/ (/ (* -2.0 b) a) 3.0)
                           (if (<= b 7.8e-48) (/ (sqrt (* -3.0 (* c a))) (* 3.0 a)) (* (/ c b) -0.5))))
                        double code(double a, double b, double c) {
                        	double tmp;
                        	if (b <= -7e-14) {
                        		tmp = ((-2.0 * b) / a) / 3.0;
                        	} else if (b <= 7.8e-48) {
                        		tmp = 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 <= (-7d-14)) then
                                tmp = (((-2.0d0) * b) / a) / 3.0d0
                            else if (b <= 7.8d-48) then
                                tmp = 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 <= -7e-14) {
                        		tmp = ((-2.0 * b) / a) / 3.0;
                        	} else if (b <= 7.8e-48) {
                        		tmp = 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 <= -7e-14:
                        		tmp = ((-2.0 * b) / a) / 3.0
                        	elif b <= 7.8e-48:
                        		tmp = 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 <= -7e-14)
                        		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
                        	elseif (b <= 7.8e-48)
                        		tmp = Float64(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 <= -7e-14)
                        		tmp = ((-2.0 * b) / a) / 3.0;
                        	elseif (b <= 7.8e-48)
                        		tmp = 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, -7e-14], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 7.8e-48], N[(N[Sqrt[N[(-3.0 * N[(c * a), $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 -7 \cdot 10^{-14}:\\
                        \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
                        
                        \mathbf{elif}\;b \leq 7.8 \cdot 10^{-48}:\\
                        \;\;\;\;\frac{\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 < -7.0000000000000005e-14

                          1. Initial program 66.6%

                            \[\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 rewrites66.6%

                              \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                              2. 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} \]
                              3. 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} \]
                              4. 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} \]
                              5. 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} \]
                              6. 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} \]
                              7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                              16. lower-*.f6466.6

                                \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                            3. Applied rewrites66.6%

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{\color{blue}{\frac{-2 \cdot b}{a}}}{3} \]
                              6. associate-*l*90.4

                                \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                              7. *-commutative90.4

                                \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                            8. Applied rewrites90.4%

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

                            if -7.0000000000000005e-14 < b < 7.800000000000001e-48

                            1. Initial program 75.5%

                              \[\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{\color{blue}{\sqrt{a \cdot c} \cdot \sqrt{-3}}}{3 \cdot a} \]
                            3. Step-by-step derivation
                              1. sqrt-unprodN/A

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

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

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

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

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

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

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

                            if 7.800000000000001e-48 < b

                            1. Initial program 16.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 \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-/.f6487.7

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

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

                          Alternative 9: 70.7% accurate, 1.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.3 \cdot 10^{-102}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{-259}:\\ \;\;\;\;\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 -3.3e-102)
                             (/ (/ (* -2.0 b) a) 3.0)
                             (if (<= b 2.25e-259) (/ (sqrt (* (/ c a) -3.0)) 3.0) (* (/ c b) -0.5))))
                          double code(double a, double b, double c) {
                          	double tmp;
                          	if (b <= -3.3e-102) {
                          		tmp = ((-2.0 * b) / a) / 3.0;
                          	} else if (b <= 2.25e-259) {
                          		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 <= (-3.3d-102)) then
                                  tmp = (((-2.0d0) * b) / a) / 3.0d0
                              else if (b <= 2.25d-259) 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 <= -3.3e-102) {
                          		tmp = ((-2.0 * b) / a) / 3.0;
                          	} else if (b <= 2.25e-259) {
                          		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 <= -3.3e-102:
                          		tmp = ((-2.0 * b) / a) / 3.0
                          	elif b <= 2.25e-259:
                          		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 <= -3.3e-102)
                          		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
                          	elseif (b <= 2.25e-259)
                          		tmp = 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 <= -3.3e-102)
                          		tmp = ((-2.0 * b) / a) / 3.0;
                          	elseif (b <= 2.25e-259)
                          		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, -3.3e-102], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 2.25e-259], 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 -3.3 \cdot 10^{-102}:\\
                          \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
                          
                          \mathbf{elif}\;b \leq 2.25 \cdot 10^{-259}:\\
                          \;\;\;\;\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 < -3.3e-102

                            1. Initial program 70.6%

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

                                \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                                2. 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} \]
                                3. 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} \]
                                4. 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} \]
                                5. 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} \]
                                6. 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} \]
                                7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                                16. lower-*.f6470.6

                                  \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                              3. Applied rewrites70.6%

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{\color{blue}{\frac{-2 \cdot b}{a}}}{3} \]
                                6. associate-*l*84.3

                                  \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                                7. *-commutative84.3

                                  \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                              8. Applied rewrites84.3%

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

                              if -3.3e-102 < b < 2.24999999999999987e-259

                              1. Initial program 78.5%

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

                                  \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                                  2. 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} \]
                                  3. 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} \]
                                  4. 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} \]
                                  5. 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} \]
                                  6. 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} \]
                                  7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                                  16. lower-*.f6478.5

                                    \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                                3. Applied rewrites78.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{\sqrt{\frac{c}{a} \cdot -3}}{3} \]
                                  4. lower-/.f6433.9

                                    \[\leadsto \frac{\sqrt{\frac{c}{a} \cdot -3}}{3} \]
                                8. Applied rewrites33.9%

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

                                if 2.24999999999999987e-259 < b

                                1. Initial program 29.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 \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-/.f6471.6

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

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

                              Alternative 10: 70.7% accurate, 1.2× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.3 \cdot 10^{-102}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 2.25 \cdot 10^{-259}:\\ \;\;\;\;\sqrt{\frac{c}{a} \cdot -3} \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                              (FPCore (a b c)
                               :precision binary64
                               (if (<= b -3.3e-102)
                                 (/ (/ (* -2.0 b) a) 3.0)
                                 (if (<= b 2.25e-259)
                                   (* (sqrt (* (/ c a) -3.0)) 0.3333333333333333)
                                   (* (/ c b) -0.5))))
                              double code(double a, double b, double c) {
                              	double tmp;
                              	if (b <= -3.3e-102) {
                              		tmp = ((-2.0 * b) / a) / 3.0;
                              	} else if (b <= 2.25e-259) {
                              		tmp = sqrt(((c / a) * -3.0)) * 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.3d-102)) then
                                      tmp = (((-2.0d0) * b) / a) / 3.0d0
                                  else if (b <= 2.25d-259) then
                                      tmp = sqrt(((c / a) * (-3.0d0))) * 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.3e-102) {
                              		tmp = ((-2.0 * b) / a) / 3.0;
                              	} else if (b <= 2.25e-259) {
                              		tmp = Math.sqrt(((c / a) * -3.0)) * 0.3333333333333333;
                              	} else {
                              		tmp = (c / b) * -0.5;
                              	}
                              	return tmp;
                              }
                              
                              def code(a, b, c):
                              	tmp = 0
                              	if b <= -3.3e-102:
                              		tmp = ((-2.0 * b) / a) / 3.0
                              	elif b <= 2.25e-259:
                              		tmp = math.sqrt(((c / a) * -3.0)) * 0.3333333333333333
                              	else:
                              		tmp = (c / b) * -0.5
                              	return tmp
                              
                              function code(a, b, c)
                              	tmp = 0.0
                              	if (b <= -3.3e-102)
                              		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
                              	elseif (b <= 2.25e-259)
                              		tmp = Float64(sqrt(Float64(Float64(c / a) * -3.0)) * 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.3e-102)
                              		tmp = ((-2.0 * b) / a) / 3.0;
                              	elseif (b <= 2.25e-259)
                              		tmp = sqrt(((c / a) * -3.0)) * 0.3333333333333333;
                              	else
                              		tmp = (c / b) * -0.5;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[a_, b_, c_] := If[LessEqual[b, -3.3e-102], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 2.25e-259], N[(N[Sqrt[N[(N[(c / a), $MachinePrecision] * -3.0), $MachinePrecision]], $MachinePrecision] * 0.3333333333333333), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;b \leq -3.3 \cdot 10^{-102}:\\
                              \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
                              
                              \mathbf{elif}\;b \leq 2.25 \cdot 10^{-259}:\\
                              \;\;\;\;\sqrt{\frac{c}{a} \cdot -3} \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.3e-102

                                1. Initial program 70.6%

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

                                    \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                                    2. 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} \]
                                    3. 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} \]
                                    4. 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} \]
                                    5. 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} \]
                                    6. 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} \]
                                    7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                                    16. lower-*.f6470.6

                                      \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                                  3. Applied rewrites70.6%

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{\color{blue}{\frac{-2 \cdot b}{a}}}{3} \]
                                    6. associate-*l*84.3

                                      \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                                    7. *-commutative84.3

                                      \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                                  8. Applied rewrites84.3%

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

                                  if -3.3e-102 < b < 2.24999999999999987e-259

                                  1. Initial program 78.5%

                                    \[\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 \left(\sqrt{\frac{c}{a}} \cdot \sqrt{-3}\right)} \]
                                  3. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \left(\sqrt{\frac{c}{a}} \cdot \sqrt{-3}\right) \cdot \color{blue}{\frac{1}{3}} \]
                                    2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

                                  if 2.24999999999999987e-259 < b

                                  1. Initial program 29.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 \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-/.f6471.6

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

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

                                Alternative 11: 70.6% accurate, 1.2× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.5 \cdot 10^{-243}:\\ \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\ \mathbf{elif}\;b \leq 8 \cdot 10^{-218}:\\ \;\;\;\;\sqrt{\frac{c}{a} \cdot -3} \cdot -0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;\frac{c}{b} \cdot -0.5\\ \end{array} \end{array} \]
                                (FPCore (a b c)
                                 :precision binary64
                                 (if (<= b -4.5e-243)
                                   (/ (/ (* -2.0 b) a) 3.0)
                                   (if (<= b 8e-218)
                                     (* (sqrt (* (/ c a) -3.0)) -0.3333333333333333)
                                     (* (/ c b) -0.5))))
                                double code(double a, double b, double c) {
                                	double tmp;
                                	if (b <= -4.5e-243) {
                                		tmp = ((-2.0 * b) / a) / 3.0;
                                	} else if (b <= 8e-218) {
                                		tmp = sqrt(((c / a) * -3.0)) * -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 <= (-4.5d-243)) then
                                        tmp = (((-2.0d0) * b) / a) / 3.0d0
                                    else if (b <= 8d-218) then
                                        tmp = sqrt(((c / a) * (-3.0d0))) * (-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 <= -4.5e-243) {
                                		tmp = ((-2.0 * b) / a) / 3.0;
                                	} else if (b <= 8e-218) {
                                		tmp = Math.sqrt(((c / a) * -3.0)) * -0.3333333333333333;
                                	} else {
                                		tmp = (c / b) * -0.5;
                                	}
                                	return tmp;
                                }
                                
                                def code(a, b, c):
                                	tmp = 0
                                	if b <= -4.5e-243:
                                		tmp = ((-2.0 * b) / a) / 3.0
                                	elif b <= 8e-218:
                                		tmp = math.sqrt(((c / a) * -3.0)) * -0.3333333333333333
                                	else:
                                		tmp = (c / b) * -0.5
                                	return tmp
                                
                                function code(a, b, c)
                                	tmp = 0.0
                                	if (b <= -4.5e-243)
                                		tmp = Float64(Float64(Float64(-2.0 * b) / a) / 3.0);
                                	elseif (b <= 8e-218)
                                		tmp = Float64(sqrt(Float64(Float64(c / a) * -3.0)) * -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 <= -4.5e-243)
                                		tmp = ((-2.0 * b) / a) / 3.0;
                                	elseif (b <= 8e-218)
                                		tmp = sqrt(((c / a) * -3.0)) * -0.3333333333333333;
                                	else
                                		tmp = (c / b) * -0.5;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[a_, b_, c_] := If[LessEqual[b, -4.5e-243], N[(N[(N[(-2.0 * b), $MachinePrecision] / a), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[b, 8e-218], N[(N[Sqrt[N[(N[(c / a), $MachinePrecision] * -3.0), $MachinePrecision]], $MachinePrecision] * -0.3333333333333333), $MachinePrecision], N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;b \leq -4.5 \cdot 10^{-243}:\\
                                \;\;\;\;\frac{\frac{-2 \cdot b}{a}}{3}\\
                                
                                \mathbf{elif}\;b \leq 8 \cdot 10^{-218}:\\
                                \;\;\;\;\sqrt{\frac{c}{a} \cdot -3} \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 < -4.50000000000000017e-243

                                  1. Initial program 72.6%

                                    \[\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 rewrites72.6%

                                      \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                                      2. 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} \]
                                      3. 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} \]
                                      4. 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} \]
                                      5. 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} \]
                                      6. 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} \]
                                      7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                                      16. lower-*.f6472.6

                                        \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                                    3. Applied rewrites72.6%

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{\color{blue}{\frac{-2 \cdot b}{a}}}{3} \]
                                      6. associate-*l*72.4

                                        \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                                      7. *-commutative72.4

                                        \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                                    8. Applied rewrites72.4%

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

                                    if -4.50000000000000017e-243 < b < 8.0000000000000003e-218

                                    1. Initial program 75.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 \left(\sqrt{\frac{c}{a}} \cdot \left(\sqrt{-1} \cdot \sqrt{3}\right)\right)} \]
                                    3. Step-by-step derivation
                                      1. *-commutativeN/A

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

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

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

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

                                        \[\leadsto \sqrt{\frac{c}{a} \cdot -3} \cdot \frac{-1}{3} \]
                                      6. lower-sqrt.f64N/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-/.f6439.5

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

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

                                    if 8.0000000000000003e-218 < b

                                    1. Initial program 27.7%

                                      \[\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 \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-/.f6474.4

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

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

                                  Alternative 12: 67.9% accurate, 1.7× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 7.6 \cdot 10^{-290}:\\ \;\;\;\;\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 7.6e-290) (/ (/ (* -2.0 b) a) 3.0) (* (/ c b) -0.5)))
                                  double code(double a, double b, double c) {
                                  	double tmp;
                                  	if (b <= 7.6e-290) {
                                  		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 <= 7.6d-290) 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 <= 7.6e-290) {
                                  		tmp = ((-2.0 * b) / a) / 3.0;
                                  	} else {
                                  		tmp = (c / b) * -0.5;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(a, b, c):
                                  	tmp = 0
                                  	if b <= 7.6e-290:
                                  		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 <= 7.6e-290)
                                  		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 <= 7.6e-290)
                                  		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, 7.6e-290], 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 7.6 \cdot 10^{-290}:\\
                                  \;\;\;\;\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 < 7.5999999999999995e-290

                                    1. Initial program 72.7%

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

                                        \[\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 \frac{\color{blue}{\sqrt{\mathsf{fma}\left(-3 \cdot a, c, b \cdot b\right)} + \left(-b\right)}}{a \cdot 3} \]
                                        2. 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} \]
                                        3. 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} \]
                                        4. 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} \]
                                        5. 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} \]
                                        6. 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} \]
                                        7. negate-sub-reverseN/A

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                                        16. lower-*.f6472.7

                                          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(b, b, \color{blue}{\left(a \cdot -3\right)} \cdot c\right)} - b}{a \cdot 3} \]
                                      3. Applied rewrites72.7%

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{\color{blue}{\frac{-2 \cdot b}{a}}}{3} \]
                                        6. associate-*l*66.6

                                          \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                                        7. *-commutative66.6

                                          \[\leadsto \frac{\frac{-2 \cdot b}{a}}{3} \]
                                      8. Applied rewrites66.6%

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

                                      if 7.5999999999999995e-290 < b

                                      1. Initial program 31.6%

                                        \[\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 \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-/.f6469.3

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

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

                                    Alternative 13: 67.9% accurate, 1.7× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 7.6 \cdot 10^{-290}:\\ \;\;\;\;\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 7.6e-290) (/ (* -2.0 b) (* 3.0 a)) (* (/ c b) -0.5)))
                                    double code(double a, double b, double c) {
                                    	double tmp;
                                    	if (b <= 7.6e-290) {
                                    		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 <= 7.6d-290) 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 <= 7.6e-290) {
                                    		tmp = (-2.0 * b) / (3.0 * a);
                                    	} else {
                                    		tmp = (c / b) * -0.5;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(a, b, c):
                                    	tmp = 0
                                    	if b <= 7.6e-290:
                                    		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 <= 7.6e-290)
                                    		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 <= 7.6e-290)
                                    		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, 7.6e-290], 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 7.6 \cdot 10^{-290}:\\
                                    \;\;\;\;\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 < 7.5999999999999995e-290

                                      1. Initial program 72.7%

                                        \[\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-*.f6466.6

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

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

                                      if 7.5999999999999995e-290 < b

                                      1. Initial program 31.6%

                                        \[\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 \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-/.f6469.3

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

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

                                    Alternative 14: 67.9% accurate, 2.0× speedup?

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

                                      1. Initial program 72.7%

                                        \[\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}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
                                      3. Step-by-step derivation
                                        1. associate-*r*N/A

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                        10. associate-*r/N/A

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

                                          \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{\frac{2}{3}}{a}\right) \]
                                        12. lower-/.f6465.6

                                          \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, -0.5, \frac{0.6666666666666666}{a}\right) \]
                                      4. Applied rewrites65.6%

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

                                        \[\leadsto \left(-b\right) \cdot \frac{\frac{2}{3}}{\color{blue}{a}} \]
                                      6. Step-by-step derivation
                                        1. lift-/.f6466.6

                                          \[\leadsto \left(-b\right) \cdot \frac{0.6666666666666666}{a} \]
                                      7. Applied rewrites66.6%

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

                                      if 7.5999999999999995e-290 < b

                                      1. Initial program 31.6%

                                        \[\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 \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-/.f6469.3

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

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

                                    Alternative 15: 67.9% accurate, 2.2× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 7.6 \cdot 10^{-290}:\\ \;\;\;\;-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 7.6e-290) (* -0.6666666666666666 (/ b a)) (* (/ c b) -0.5)))
                                    double code(double a, double b, double c) {
                                    	double tmp;
                                    	if (b <= 7.6e-290) {
                                    		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 <= 7.6d-290) 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 <= 7.6e-290) {
                                    		tmp = -0.6666666666666666 * (b / a);
                                    	} else {
                                    		tmp = (c / b) * -0.5;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(a, b, c):
                                    	tmp = 0
                                    	if b <= 7.6e-290:
                                    		tmp = -0.6666666666666666 * (b / a)
                                    	else:
                                    		tmp = (c / b) * -0.5
                                    	return tmp
                                    
                                    function code(a, b, c)
                                    	tmp = 0.0
                                    	if (b <= 7.6e-290)
                                    		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 <= 7.6e-290)
                                    		tmp = -0.6666666666666666 * (b / a);
                                    	else
                                    		tmp = (c / b) * -0.5;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[a_, b_, c_] := If[LessEqual[b, 7.6e-290], 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 7.6 \cdot 10^{-290}:\\
                                    \;\;\;\;-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 < 7.5999999999999995e-290

                                      1. Initial program 72.7%

                                        \[\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-/.f6466.6

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

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

                                      if 7.5999999999999995e-290 < b

                                      1. Initial program 31.6%

                                        \[\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 \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-/.f6469.3

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

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

                                    Alternative 16: 43.6% accurate, 2.2× speedup?

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

                                      1. Initial program 69.6%

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

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

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

                                      if 8.1999999999999998e-4 < b

                                      1. Initial program 14.7%

                                        \[\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}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
                                      3. Step-by-step derivation
                                        1. associate-*r*N/A

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                        10. associate-*r/N/A

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

                                          \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{\frac{2}{3}}{a}\right) \]
                                        12. lower-/.f642.6

                                          \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, -0.5, \frac{0.6666666666666666}{a}\right) \]
                                      4. Applied rewrites2.6%

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

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

                                          \[\leadsto \frac{1}{2} \cdot \frac{c}{\color{blue}{b}} \]
                                        2. lower-/.f6428.0

                                          \[\leadsto 0.5 \cdot \frac{c}{b} \]
                                      7. Applied rewrites28.0%

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

                                    Alternative 17: 10.7% accurate, 3.3× speedup?

                                    \[\begin{array}{l} \\ 0.5 \cdot \frac{c}{b} \end{array} \]
                                    (FPCore (a b c) :precision binary64 (* 0.5 (/ c b)))
                                    double code(double a, double b, double c) {
                                    	return 0.5 * (c / b);
                                    }
                                    
                                    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.5d0 * (c / b)
                                    end function
                                    
                                    public static double code(double a, double b, double c) {
                                    	return 0.5 * (c / b);
                                    }
                                    
                                    def code(a, b, c):
                                    	return 0.5 * (c / b)
                                    
                                    function code(a, b, c)
                                    	return Float64(0.5 * Float64(c / b))
                                    end
                                    
                                    function tmp = code(a, b, c)
                                    	tmp = 0.5 * (c / b);
                                    end
                                    
                                    code[a_, b_, c_] := N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    0.5 \cdot \frac{c}{b}
                                    \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}{-1 \cdot \left(b \cdot \left(\frac{-1}{2} \cdot \frac{c}{{b}^{2}} + \frac{2}{3} \cdot \frac{1}{a}\right)\right)} \]
                                    3. Step-by-step derivation
                                      1. associate-*r*N/A

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

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

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

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

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

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

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

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

                                        \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{2}{3} \cdot \frac{1}{a}\right) \]
                                      10. associate-*r/N/A

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

                                        \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, \frac{-1}{2}, \frac{\frac{2}{3}}{a}\right) \]
                                      12. lower-/.f6435.1

                                        \[\leadsto \left(-b\right) \cdot \mathsf{fma}\left(\frac{c}{b \cdot b}, -0.5, \frac{0.6666666666666666}{a}\right) \]
                                    4. Applied rewrites35.1%

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

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

                                        \[\leadsto \frac{1}{2} \cdot \frac{c}{\color{blue}{b}} \]
                                      2. lower-/.f6410.7

                                        \[\leadsto 0.5 \cdot \frac{c}{b} \]
                                    7. Applied rewrites10.7%

                                      \[\leadsto 0.5 \cdot \color{blue}{\frac{c}{b}} \]
                                    8. Add Preprocessing

                                    Reproduce

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