quad2m (problem 3.2.1, negative)

Percentage Accurate: 52.1% → 85.8%
Time: 4.9s
Alternatives: 8
Speedup: N/A×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

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

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

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

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

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

Alternative 1: 85.8% accurate, N/A× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 7 \cdot 10^{+139}:\\ \;\;\;\;-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b\_2 + b\_2}{a}\\ \end{array} \end{array} \]
(FPCore (a b_2 c)
 :precision binary64
 (if (<= b_2 -1.26e-123)
   (* -0.5 (/ c b_2))
   (if (<= b_2 7e+139)
     (-
      (* -1.0 (/ b_2 a))
      (/ (pow (fma (pow b_2 1.0) (pow b_2 1.0) (* -1.0 (* c a))) 0.5) a))
     (* -1.0 (/ (+ b_2 b_2) a)))))
double code(double a, double b_2, double c) {
	double tmp;
	if (b_2 <= -1.26e-123) {
		tmp = -0.5 * (c / b_2);
	} else if (b_2 <= 7e+139) {
		tmp = (-1.0 * (b_2 / a)) - (pow(fma(pow(b_2, 1.0), pow(b_2, 1.0), (-1.0 * (c * a))), 0.5) / a);
	} else {
		tmp = -1.0 * ((b_2 + b_2) / a);
	}
	return tmp;
}
function code(a, b_2, c)
	tmp = 0.0
	if (b_2 <= -1.26e-123)
		tmp = Float64(-0.5 * Float64(c / b_2));
	elseif (b_2 <= 7e+139)
		tmp = Float64(Float64(-1.0 * Float64(b_2 / a)) - Float64((fma((b_2 ^ 1.0), (b_2 ^ 1.0), Float64(-1.0 * Float64(c * a))) ^ 0.5) / a));
	else
		tmp = Float64(-1.0 * Float64(Float64(b_2 + b_2) / a));
	end
	return tmp
end
code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -1.26e-123], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 7e+139], N[(N[(-1.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision] - N[(N[Power[N[(N[Power[b$95$2, 1.0], $MachinePrecision] * N[Power[b$95$2, 1.0], $MachinePrecision] + N[(-1.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(b$95$2 + b$95$2), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\

\mathbf{elif}\;b\_2 \leq 7 \cdot 10^{+139}:\\
\;\;\;\;-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}\\

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


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

    1. Initial program 15.5%

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

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

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

        \[\leadsto -0.5 \cdot \frac{c}{\color{blue}{b\_2}} \]
    5. Applied rewrites84.9%

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

    if -1.26000000000000005e-123 < b_2 < 6.99999999999999957e139

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-1 \cdot b\_2}}{a} - \frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
      10. associate-*r/N/A

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

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

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

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

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

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

    if 6.99999999999999957e139 < b_2

    1. Initial program 44.4%

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

      \[\leadsto \frac{\left(-b\_2\right) - \color{blue}{b\_2}}{a} \]
    4. Step-by-step derivation
      1. Applied rewrites98.1%

        \[\leadsto \frac{\left(-b\_2\right) - \color{blue}{b\_2}}{a} \]
    5. Recombined 3 regimes into one program.
    6. Final simplification86.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 7 \cdot 10^{+139}:\\ \;\;\;\;-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \frac{b\_2 + b\_2}{a}\\ \end{array} \]
    7. Add Preprocessing

    Alternative 2: 85.7% accurate, N/A× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 7 \cdot 10^{+139}:\\ \;\;\;\;-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right)\\ \end{array} \end{array} \]
    (FPCore (a b_2 c)
     :precision binary64
     (if (<= b_2 -1.26e-123)
       (* -0.5 (/ c b_2))
       (if (<= b_2 7e+139)
         (-
          (* -1.0 (/ b_2 a))
          (/ (pow (fma (pow b_2 1.0) (pow b_2 1.0) (* -1.0 (* c a))) 0.5) a))
         (fma (/ c b_2) 0.5 (* (/ b_2 a) -2.0)))))
    double code(double a, double b_2, double c) {
    	double tmp;
    	if (b_2 <= -1.26e-123) {
    		tmp = -0.5 * (c / b_2);
    	} else if (b_2 <= 7e+139) {
    		tmp = (-1.0 * (b_2 / a)) - (pow(fma(pow(b_2, 1.0), pow(b_2, 1.0), (-1.0 * (c * a))), 0.5) / a);
    	} else {
    		tmp = fma((c / b_2), 0.5, ((b_2 / a) * -2.0));
    	}
    	return tmp;
    }
    
    function code(a, b_2, c)
    	tmp = 0.0
    	if (b_2 <= -1.26e-123)
    		tmp = Float64(-0.5 * Float64(c / b_2));
    	elseif (b_2 <= 7e+139)
    		tmp = Float64(Float64(-1.0 * Float64(b_2 / a)) - Float64((fma((b_2 ^ 1.0), (b_2 ^ 1.0), Float64(-1.0 * Float64(c * a))) ^ 0.5) / a));
    	else
    		tmp = fma(Float64(c / b_2), 0.5, Float64(Float64(b_2 / a) * -2.0));
    	end
    	return tmp
    end
    
    code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -1.26e-123], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 7e+139], N[(N[(-1.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision] - N[(N[Power[N[(N[Power[b$95$2, 1.0], $MachinePrecision] * N[Power[b$95$2, 1.0], $MachinePrecision] + N[(-1.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(c / b$95$2), $MachinePrecision] * 0.5 + N[(N[(b$95$2 / a), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\
    \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\
    
    \mathbf{elif}\;b\_2 \leq 7 \cdot 10^{+139}:\\
    \;\;\;\;-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b_2 < -1.26000000000000005e-123

      1. Initial program 15.5%

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

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

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

          \[\leadsto -0.5 \cdot \frac{c}{\color{blue}{b\_2}} \]
      5. Applied rewrites84.9%

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

      if -1.26000000000000005e-123 < b_2 < 6.99999999999999957e139

      1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 \cdot b\_2}}{a} - \frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
        10. associate-*r/N/A

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

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

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

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

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

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

      if 6.99999999999999957e139 < b_2

      1. Initial program 44.4%

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right) \]
      5. Applied rewrites98.1%

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

    Alternative 3: 85.7% accurate, N/A× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 6.5 \cdot 10^{+139}:\\ \;\;\;\;-1 \cdot \frac{b\_2}{a} - {a}^{-1} \cdot {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right)\\ \end{array} \end{array} \]
    (FPCore (a b_2 c)
     :precision binary64
     (if (<= b_2 -1.26e-123)
       (* -0.5 (/ c b_2))
       (if (<= b_2 6.5e+139)
         (-
          (* -1.0 (/ b_2 a))
          (* (pow a -1.0) (pow (fma -1.0 (* a c) (* b_2 b_2)) 0.5)))
         (fma (/ c b_2) 0.5 (* (/ b_2 a) -2.0)))))
    double code(double a, double b_2, double c) {
    	double tmp;
    	if (b_2 <= -1.26e-123) {
    		tmp = -0.5 * (c / b_2);
    	} else if (b_2 <= 6.5e+139) {
    		tmp = (-1.0 * (b_2 / a)) - (pow(a, -1.0) * pow(fma(-1.0, (a * c), (b_2 * b_2)), 0.5));
    	} else {
    		tmp = fma((c / b_2), 0.5, ((b_2 / a) * -2.0));
    	}
    	return tmp;
    }
    
    function code(a, b_2, c)
    	tmp = 0.0
    	if (b_2 <= -1.26e-123)
    		tmp = Float64(-0.5 * Float64(c / b_2));
    	elseif (b_2 <= 6.5e+139)
    		tmp = Float64(Float64(-1.0 * Float64(b_2 / a)) - Float64((a ^ -1.0) * (fma(-1.0, Float64(a * c), Float64(b_2 * b_2)) ^ 0.5)));
    	else
    		tmp = fma(Float64(c / b_2), 0.5, Float64(Float64(b_2 / a) * -2.0));
    	end
    	return tmp
    end
    
    code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -1.26e-123], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 6.5e+139], N[(N[(-1.0 * N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision] - N[(N[Power[a, -1.0], $MachinePrecision] * N[Power[N[(-1.0 * N[(a * c), $MachinePrecision] + N[(b$95$2 * b$95$2), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c / b$95$2), $MachinePrecision] * 0.5 + N[(N[(b$95$2 / a), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\
    \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\
    
    \mathbf{elif}\;b\_2 \leq 6.5 \cdot 10^{+139}:\\
    \;\;\;\;-1 \cdot \frac{b\_2}{a} - {a}^{-1} \cdot {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b_2 < -1.26000000000000005e-123

      1. Initial program 15.5%

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

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

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

          \[\leadsto -0.5 \cdot \frac{c}{\color{blue}{b\_2}} \]
      5. Applied rewrites84.9%

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

      if -1.26000000000000005e-123 < b_2 < 6.5000000000000003e139

      1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 \cdot b\_2}}{a} - \frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
        10. associate-*r/N/A

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}} \]
      5. Step-by-step derivation
        1. lift-pow.f64N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{{\left({b\_2}^{1} \cdot {b\_2}^{1} + \color{blue}{-1 \cdot \left(c \cdot a\right)}\right)}^{\frac{1}{2}}}{a} \]
        7. sqr-powN/A

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot {\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}}}{a} \]
      6. Applied rewrites83.6%

        \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25} \cdot {\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25}}}{a} \]
      7. Taylor expanded in b_2 around 0

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{1}{a} \cdot \color{blue}{\sqrt{-1 \cdot \left(a \cdot c\right) + {\left(\left|b\_2\right|\right)}^{2}}} \]
        2. inv-powN/A

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - {a}^{-1} \cdot \sqrt{\color{blue}{-1 \cdot \left(a \cdot c\right) + {\left(\left|b\_2\right|\right)}^{2}}} \]
        4. pow1/2N/A

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - {a}^{-1} \cdot {\left(-1 \cdot \left(a \cdot c\right) + \left|b\_2\right| \cdot \left|b\_2\right|\right)}^{\frac{1}{2}} \]
        6. sqr-abs-revN/A

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

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

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - {a}^{-1} \cdot {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{\frac{1}{2}} \]
        10. lift-*.f6483.7

          \[\leadsto -1 \cdot \frac{b\_2}{a} - {a}^{-1} \cdot {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5} \]
      9. Applied rewrites83.7%

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

      if 6.5000000000000003e139 < b_2

      1. Initial program 44.4%

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right) \]
      5. Applied rewrites98.1%

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

    Alternative 4: 77.7% accurate, N/A× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 6 \cdot 10^{+136}:\\ \;\;\;\;\left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right)\\ \end{array} \end{array} \]
    (FPCore (a b_2 c)
     :precision binary64
     (if (<= b_2 -1.26e-123)
       (* -0.5 (/ c b_2))
       (if (<= b_2 6e+136)
         (*
          (* -1.0 b_2)
          (fma
           (pow (* a b_2) -1.0)
           (pow (fma -1.0 (* a c) (* b_2 b_2)) 0.5)
           (pow a -1.0)))
         (fma (/ c b_2) 0.5 (* (/ b_2 a) -2.0)))))
    double code(double a, double b_2, double c) {
    	double tmp;
    	if (b_2 <= -1.26e-123) {
    		tmp = -0.5 * (c / b_2);
    	} else if (b_2 <= 6e+136) {
    		tmp = (-1.0 * b_2) * fma(pow((a * b_2), -1.0), pow(fma(-1.0, (a * c), (b_2 * b_2)), 0.5), pow(a, -1.0));
    	} else {
    		tmp = fma((c / b_2), 0.5, ((b_2 / a) * -2.0));
    	}
    	return tmp;
    }
    
    function code(a, b_2, c)
    	tmp = 0.0
    	if (b_2 <= -1.26e-123)
    		tmp = Float64(-0.5 * Float64(c / b_2));
    	elseif (b_2 <= 6e+136)
    		tmp = Float64(Float64(-1.0 * b_2) * fma((Float64(a * b_2) ^ -1.0), (fma(-1.0, Float64(a * c), Float64(b_2 * b_2)) ^ 0.5), (a ^ -1.0)));
    	else
    		tmp = fma(Float64(c / b_2), 0.5, Float64(Float64(b_2 / a) * -2.0));
    	end
    	return tmp
    end
    
    code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -1.26e-123], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 6e+136], N[(N[(-1.0 * b$95$2), $MachinePrecision] * N[(N[Power[N[(a * b$95$2), $MachinePrecision], -1.0], $MachinePrecision] * N[Power[N[(-1.0 * N[(a * c), $MachinePrecision] + N[(b$95$2 * b$95$2), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] + N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c / b$95$2), $MachinePrecision] * 0.5 + N[(N[(b$95$2 / a), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\
    \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\
    
    \mathbf{elif}\;b\_2 \leq 6 \cdot 10^{+136}:\\
    \;\;\;\;\left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b_2 < -1.26000000000000005e-123

      1. Initial program 15.5%

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

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

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

          \[\leadsto -0.5 \cdot \frac{c}{\color{blue}{b\_2}} \]
      5. Applied rewrites84.9%

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

      if -1.26000000000000005e-123 < b_2 < 5.99999999999999958e136

      1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 \cdot b\_2}}{a} - \frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
        10. associate-*r/N/A

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}} \]
      5. Step-by-step derivation
        1. lift-pow.f64N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{{\left({b\_2}^{1} \cdot {b\_2}^{1} + \color{blue}{-1 \cdot \left(c \cdot a\right)}\right)}^{\frac{1}{2}}}{a} \]
        7. sqr-powN/A

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot {\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}}}{a} \]
      6. Applied rewrites83.6%

        \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25} \cdot {\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25}}}{a} \]
      7. Taylor expanded in b_2 around -inf

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

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

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

          \[\leadsto -1 \cdot \left(b\_2 \cdot \mathsf{fma}\left(\frac{1}{a \cdot b\_2}, \color{blue}{\sqrt{-1 \cdot \left(a \cdot c\right) + {\left(\left|b\_2\right|\right)}^{2}}}, \frac{1}{a}\right)\right) \]
      9. Applied rewrites63.8%

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

      if 5.99999999999999958e136 < b_2

      1. Initial program 44.4%

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right) \]
      5. Applied rewrites98.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification78.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 6 \cdot 10^{+136}:\\ \;\;\;\;\left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2}, 0.5, \frac{b\_2}{a} \cdot -2\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 77.7% accurate, N/A× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 6 \cdot 10^{+136}:\\ \;\;\;\;\left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2 \cdot b\_2}, 0.5, -2 \cdot {a}^{-1}\right) \cdot b\_2\\ \end{array} \end{array} \]
    (FPCore (a b_2 c)
     :precision binary64
     (if (<= b_2 -1.26e-123)
       (* -0.5 (/ c b_2))
       (if (<= b_2 6e+136)
         (*
          (* -1.0 b_2)
          (fma
           (pow (* a b_2) -1.0)
           (pow (fma -1.0 (* a c) (* b_2 b_2)) 0.5)
           (pow a -1.0)))
         (* (fma (/ c (* b_2 b_2)) 0.5 (* -2.0 (pow a -1.0))) b_2))))
    double code(double a, double b_2, double c) {
    	double tmp;
    	if (b_2 <= -1.26e-123) {
    		tmp = -0.5 * (c / b_2);
    	} else if (b_2 <= 6e+136) {
    		tmp = (-1.0 * b_2) * fma(pow((a * b_2), -1.0), pow(fma(-1.0, (a * c), (b_2 * b_2)), 0.5), pow(a, -1.0));
    	} else {
    		tmp = fma((c / (b_2 * b_2)), 0.5, (-2.0 * pow(a, -1.0))) * b_2;
    	}
    	return tmp;
    }
    
    function code(a, b_2, c)
    	tmp = 0.0
    	if (b_2 <= -1.26e-123)
    		tmp = Float64(-0.5 * Float64(c / b_2));
    	elseif (b_2 <= 6e+136)
    		tmp = Float64(Float64(-1.0 * b_2) * fma((Float64(a * b_2) ^ -1.0), (fma(-1.0, Float64(a * c), Float64(b_2 * b_2)) ^ 0.5), (a ^ -1.0)));
    	else
    		tmp = Float64(fma(Float64(c / Float64(b_2 * b_2)), 0.5, Float64(-2.0 * (a ^ -1.0))) * b_2);
    	end
    	return tmp
    end
    
    code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -1.26e-123], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 6e+136], N[(N[(-1.0 * b$95$2), $MachinePrecision] * N[(N[Power[N[(a * b$95$2), $MachinePrecision], -1.0], $MachinePrecision] * N[Power[N[(-1.0 * N[(a * c), $MachinePrecision] + N[(b$95$2 * b$95$2), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] + N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(c / N[(b$95$2 * b$95$2), $MachinePrecision]), $MachinePrecision] * 0.5 + N[(-2.0 * N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$2), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\
    \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\
    
    \mathbf{elif}\;b\_2 \leq 6 \cdot 10^{+136}:\\
    \;\;\;\;\left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2 \cdot b\_2}, 0.5, -2 \cdot {a}^{-1}\right) \cdot b\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b_2 < -1.26000000000000005e-123

      1. Initial program 15.5%

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

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

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

          \[\leadsto -0.5 \cdot \frac{c}{\color{blue}{b\_2}} \]
      5. Applied rewrites84.9%

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

      if -1.26000000000000005e-123 < b_2 < 5.99999999999999958e136

      1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 \cdot b\_2}}{a} - \frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
        10. associate-*r/N/A

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}} \]
      5. Step-by-step derivation
        1. lift-pow.f64N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{{\left({b\_2}^{1} \cdot {b\_2}^{1} + \color{blue}{-1 \cdot \left(c \cdot a\right)}\right)}^{\frac{1}{2}}}{a} \]
        7. sqr-powN/A

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot {\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}}}{a} \]
      6. Applied rewrites83.6%

        \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25} \cdot {\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25}}}{a} \]
      7. Taylor expanded in b_2 around -inf

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

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

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

          \[\leadsto -1 \cdot \left(b\_2 \cdot \mathsf{fma}\left(\frac{1}{a \cdot b\_2}, \color{blue}{\sqrt{-1 \cdot \left(a \cdot c\right) + {\left(\left|b\_2\right|\right)}^{2}}}, \frac{1}{a}\right)\right) \]
      9. Applied rewrites63.8%

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

      if 5.99999999999999958e136 < b_2

      1. Initial program 44.4%

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

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

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

          \[\leadsto \left(\frac{1}{2} \cdot \frac{c}{{b\_2}^{2}} - 2 \cdot \frac{1}{a}\right) \cdot \color{blue}{b\_2} \]
        3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{c}{b\_2 \cdot b\_2}, \frac{1}{2}, -2 \cdot {a}^{-1}\right) \cdot b\_2 \]
        12. lower-pow.f6497.8

          \[\leadsto \mathsf{fma}\left(\frac{c}{b\_2 \cdot b\_2}, 0.5, -2 \cdot {a}^{-1}\right) \cdot b\_2 \]
      5. Applied rewrites97.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{c}{b\_2 \cdot b\_2}, 0.5, -2 \cdot {a}^{-1}\right) \cdot b\_2} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification78.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{elif}\;b\_2 \leq 6 \cdot 10^{+136}:\\ \;\;\;\;\left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{c}{b\_2 \cdot b\_2}, 0.5, -2 \cdot {a}^{-1}\right) \cdot b\_2\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 68.0% accurate, N/A× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\\ \end{array} \end{array} \]
    (FPCore (a b_2 c)
     :precision binary64
     (if (<= b_2 -1.26e-123)
       (* -0.5 (/ c b_2))
       (*
        (* -1.0 b_2)
        (fma
         (pow (* a b_2) -1.0)
         (pow (fma -1.0 (* a c) (* b_2 b_2)) 0.5)
         (pow a -1.0)))))
    double code(double a, double b_2, double c) {
    	double tmp;
    	if (b_2 <= -1.26e-123) {
    		tmp = -0.5 * (c / b_2);
    	} else {
    		tmp = (-1.0 * b_2) * fma(pow((a * b_2), -1.0), pow(fma(-1.0, (a * c), (b_2 * b_2)), 0.5), pow(a, -1.0));
    	}
    	return tmp;
    }
    
    function code(a, b_2, c)
    	tmp = 0.0
    	if (b_2 <= -1.26e-123)
    		tmp = Float64(-0.5 * Float64(c / b_2));
    	else
    		tmp = Float64(Float64(-1.0 * b_2) * fma((Float64(a * b_2) ^ -1.0), (fma(-1.0, Float64(a * c), Float64(b_2 * b_2)) ^ 0.5), (a ^ -1.0)));
    	end
    	return tmp
    end
    
    code[a_, b$95$2_, c_] := If[LessEqual[b$95$2, -1.26e-123], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * b$95$2), $MachinePrecision] * N[(N[Power[N[(a * b$95$2), $MachinePrecision], -1.0], $MachinePrecision] * N[Power[N[(-1.0 * N[(a * c), $MachinePrecision] + N[(b$95$2 * b$95$2), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] + N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\
    \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b_2 < -1.26000000000000005e-123

      1. Initial program 15.5%

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

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

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

          \[\leadsto -0.5 \cdot \frac{c}{\color{blue}{b\_2}} \]
      5. Applied rewrites84.9%

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

      if -1.26000000000000005e-123 < b_2

      1. Initial program 72.2%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{-1 \cdot b\_2}}{a} - \frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
        10. associate-*r/N/A

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

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}} \]
      5. Step-by-step derivation
        1. lift-pow.f64N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{{\left({b\_2}^{1} \cdot {b\_2}^{1} + \color{blue}{-1 \cdot \left(c \cdot a\right)}\right)}^{\frac{1}{2}}}{a} \]
        7. sqr-powN/A

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

          \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot {\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}}}{a} \]
      6. Applied rewrites72.1%

        \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25} \cdot {\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25}}}{a} \]
      7. Taylor expanded in b_2 around -inf

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

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

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

          \[\leadsto -1 \cdot \left(b\_2 \cdot \mathsf{fma}\left(\frac{1}{a \cdot b\_2}, \color{blue}{\sqrt{-1 \cdot \left(a \cdot c\right) + {\left(\left|b\_2\right|\right)}^{2}}}, \frac{1}{a}\right)\right) \]
      9. Applied rewrites57.8%

        \[\leadsto \color{blue}{-1 \cdot \left(b\_2 \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification68.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b\_2 \leq -1.26 \cdot 10^{-123}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b\_2}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 7: 41.0% accurate, N/A× speedup?

    \[\begin{array}{l} \\ \left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right) \end{array} \]
    (FPCore (a b_2 c)
     :precision binary64
     (*
      (* -1.0 b_2)
      (fma
       (pow (* a b_2) -1.0)
       (pow (fma -1.0 (* a c) (* b_2 b_2)) 0.5)
       (pow a -1.0))))
    double code(double a, double b_2, double c) {
    	return (-1.0 * b_2) * fma(pow((a * b_2), -1.0), pow(fma(-1.0, (a * c), (b_2 * b_2)), 0.5), pow(a, -1.0));
    }
    
    function code(a, b_2, c)
    	return Float64(Float64(-1.0 * b_2) * fma((Float64(a * b_2) ^ -1.0), (fma(-1.0, Float64(a * c), Float64(b_2 * b_2)) ^ 0.5), (a ^ -1.0)))
    end
    
    code[a_, b$95$2_, c_] := N[(N[(-1.0 * b$95$2), $MachinePrecision] * N[(N[Power[N[(a * b$95$2), $MachinePrecision], -1.0], $MachinePrecision] * N[Power[N[(-1.0 * N[(a * c), $MachinePrecision] + N[(b$95$2 * b$95$2), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] + N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)
    \end{array}
    
    Derivation
    1. Initial program 49.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-1 \cdot b\_2}}{a} - \frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
      10. associate-*r/N/A

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}} \]
    5. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{{\left({b\_2}^{1} \cdot {b\_2}^{1} + \color{blue}{-1 \cdot \left(c \cdot a\right)}\right)}^{\frac{1}{2}}}{a} \]
      7. sqr-powN/A

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

        \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot {\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}}}{a} \]
    6. Applied rewrites48.0%

      \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25} \cdot {\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25}}}{a} \]
    7. Taylor expanded in b_2 around -inf

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

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

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

        \[\leadsto -1 \cdot \left(b\_2 \cdot \mathsf{fma}\left(\frac{1}{a \cdot b\_2}, \color{blue}{\sqrt{-1 \cdot \left(a \cdot c\right) + {\left(\left|b\_2\right|\right)}^{2}}}, \frac{1}{a}\right)\right) \]
    9. Applied rewrites39.2%

      \[\leadsto \color{blue}{-1 \cdot \left(b\_2 \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\right)} \]
    10. Final simplification39.2%

      \[\leadsto \left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right) \]
    11. Add Preprocessing

    Alternative 8: 5.7% accurate, N/A× speedup?

    \[\begin{array}{l} \\ \left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, b\_2 \cdot \left(-1 - \mathsf{fma}\left(-0.5, \frac{a \cdot c}{b\_2 \cdot b\_2}, \mathsf{fma}\left(-0.125, \frac{{\left(a \cdot c\right)}^{2}}{{b\_2}^{4}}, -0.0625 \cdot \frac{{\left(a \cdot c\right)}^{3}}{{b\_2}^{6}}\right)\right)\right), {a}^{-1}\right) \end{array} \]
    (FPCore (a b_2 c)
     :precision binary64
     (*
      (* -1.0 b_2)
      (fma
       (pow (* a b_2) -1.0)
       (*
        b_2
        (-
         -1.0
         (fma
          -0.5
          (/ (* a c) (* b_2 b_2))
          (fma
           -0.125
           (/ (pow (* a c) 2.0) (pow b_2 4.0))
           (* -0.0625 (/ (pow (* a c) 3.0) (pow b_2 6.0)))))))
       (pow a -1.0))))
    double code(double a, double b_2, double c) {
    	return (-1.0 * b_2) * fma(pow((a * b_2), -1.0), (b_2 * (-1.0 - fma(-0.5, ((a * c) / (b_2 * b_2)), fma(-0.125, (pow((a * c), 2.0) / pow(b_2, 4.0)), (-0.0625 * (pow((a * c), 3.0) / pow(b_2, 6.0))))))), pow(a, -1.0));
    }
    
    function code(a, b_2, c)
    	return Float64(Float64(-1.0 * b_2) * fma((Float64(a * b_2) ^ -1.0), Float64(b_2 * Float64(-1.0 - fma(-0.5, Float64(Float64(a * c) / Float64(b_2 * b_2)), fma(-0.125, Float64((Float64(a * c) ^ 2.0) / (b_2 ^ 4.0)), Float64(-0.0625 * Float64((Float64(a * c) ^ 3.0) / (b_2 ^ 6.0))))))), (a ^ -1.0)))
    end
    
    code[a_, b$95$2_, c_] := N[(N[(-1.0 * b$95$2), $MachinePrecision] * N[(N[Power[N[(a * b$95$2), $MachinePrecision], -1.0], $MachinePrecision] * N[(b$95$2 * N[(-1.0 - N[(-0.5 * N[(N[(a * c), $MachinePrecision] / N[(b$95$2 * b$95$2), $MachinePrecision]), $MachinePrecision] + N[(-0.125 * N[(N[Power[N[(a * c), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[b$95$2, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.0625 * N[(N[Power[N[(a * c), $MachinePrecision], 3.0], $MachinePrecision] / N[Power[b$95$2, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[a, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, b\_2 \cdot \left(-1 - \mathsf{fma}\left(-0.5, \frac{a \cdot c}{b\_2 \cdot b\_2}, \mathsf{fma}\left(-0.125, \frac{{\left(a \cdot c\right)}^{2}}{{b\_2}^{4}}, -0.0625 \cdot \frac{{\left(a \cdot c\right)}^{3}}{{b\_2}^{6}}\right)\right)\right), {a}^{-1}\right)
    \end{array}
    
    Derivation
    1. Initial program 49.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{-1 \cdot b\_2}}{a} - \frac{\sqrt{b\_2 \cdot b\_2 - a \cdot c}}{a} \]
      10. associate-*r/N/A

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{b\_2}{a} - \frac{{\left(\mathsf{fma}\left({b\_2}^{1}, {b\_2}^{1}, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{a}} \]
    5. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{{\left({b\_2}^{1} \cdot {b\_2}^{1} + \color{blue}{-1 \cdot \left(c \cdot a\right)}\right)}^{\frac{1}{2}}}{a} \]
      7. sqr-powN/A

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

        \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot {\left({b\_2}^{1} \cdot {b\_2}^{1} + -1 \cdot \left(c \cdot a\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}}}{a} \]
    6. Applied rewrites48.0%

      \[\leadsto -1 \cdot \frac{b\_2}{a} - \frac{\color{blue}{{\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25} \cdot {\left(\mathsf{fma}\left(\left|b\_2\right|, \left|b\_2\right|, -1 \cdot \left(c \cdot a\right)\right)\right)}^{0.25}}}{a} \]
    7. Taylor expanded in b_2 around -inf

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

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

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

        \[\leadsto -1 \cdot \left(b\_2 \cdot \mathsf{fma}\left(\frac{1}{a \cdot b\_2}, \color{blue}{\sqrt{-1 \cdot \left(a \cdot c\right) + {\left(\left|b\_2\right|\right)}^{2}}}, \frac{1}{a}\right)\right) \]
    9. Applied rewrites39.2%

      \[\leadsto \color{blue}{-1 \cdot \left(b\_2 \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, {\left(\mathsf{fma}\left(-1, a \cdot c, b\_2 \cdot b\_2\right)\right)}^{0.5}, {a}^{-1}\right)\right)} \]
    10. Taylor expanded in b_2 around -inf

      \[\leadsto -1 \cdot \left(b\_2 \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, -1 \cdot \color{blue}{\left(b\_2 \cdot \left(1 + \left(\frac{-1}{2} \cdot \frac{a \cdot c}{{b\_2}^{2}} + \left(\frac{-1}{8} \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b\_2}^{4}} + \frac{-1}{16} \cdot \frac{{a}^{3} \cdot {c}^{3}}{{b\_2}^{6}}\right)\right)\right)\right)}, {a}^{-1}\right)\right) \]
    11. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

        \[\leadsto -1 \cdot \left(b\_2 \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, -1 \cdot \left(b\_2 \cdot \left(1 + \mathsf{fma}\left(\frac{-1}{2}, \frac{a \cdot c}{\color{blue}{{b\_2}^{2}}}, \frac{-1}{8} \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b\_2}^{4}} + \frac{-1}{16} \cdot \frac{{a}^{3} \cdot {c}^{3}}{{b\_2}^{6}}\right)\right)\right), {a}^{-1}\right)\right) \]
    12. Applied rewrites7.0%

      \[\leadsto -1 \cdot \left(b\_2 \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, -1 \cdot \color{blue}{\left(b\_2 \cdot \left(1 + \mathsf{fma}\left(-0.5, \frac{a \cdot c}{b\_2 \cdot b\_2}, \mathsf{fma}\left(-0.125, \frac{{\left(a \cdot c\right)}^{2}}{{b\_2}^{4}}, -0.0625 \cdot \frac{{\left(a \cdot c\right)}^{3}}{{b\_2}^{6}}\right)\right)\right)\right)}, {a}^{-1}\right)\right) \]
    13. Final simplification7.0%

      \[\leadsto \left(-1 \cdot b\_2\right) \cdot \mathsf{fma}\left({\left(a \cdot b\_2\right)}^{-1}, b\_2 \cdot \left(-1 - \mathsf{fma}\left(-0.5, \frac{a \cdot c}{b\_2 \cdot b\_2}, \mathsf{fma}\left(-0.125, \frac{{\left(a \cdot c\right)}^{2}}{{b\_2}^{4}}, -0.0625 \cdot \frac{{\left(a \cdot c\right)}^{3}}{{b\_2}^{6}}\right)\right)\right), {a}^{-1}\right) \]
    14. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2025064 
    (FPCore (a b_2 c)
      :name "quad2m (problem 3.2.1, negative)"
      :precision binary64
      :herbie-expected 10
    
      :alt
      (! :herbie-platform c (let ((sqtD (let ((x (* (sqrt (fabs a)) (sqrt (fabs c))))) (if (== (copysign a c) a) (* (sqrt (- (fabs b_2) x)) (sqrt (+ (fabs b_2) x))) (hypot b_2 x))))) (if (< b_2 0) (/ c (- sqtD b_2)) (/ (+ b_2 sqtD) (- a)))))
    
      (/ (- (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))