Average Error: 51.9 → 40.6
Time: 49.6s
Precision: binary64
Cost: 149388
\[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
\[\begin{array}{l} t_0 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\ t_1 := \mathsf{hypot}\left(B, A - C\right)\\ t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_3 := {B}^{2} + C \cdot \left(A \cdot -4\right)\\ t_4 := \frac{-\sqrt{\left(2 \cdot \left(t_3 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_3}\\ \mathbf{if}\;t_4 \leq -1 \cdot 10^{-150}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \left(t_1 - C\right)\right)} \cdot \left(-\sqrt{2 \cdot t_2}\right)}{t_2}\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\frac{-\sqrt{t_0 \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}} + \left(A + A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_0}\\ \mathbf{elif}\;t_4 \leq \infty:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_2\right) \cdot \left(C + \left(A - t_1\right)\right)\right)}}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
(FPCore (A B C F)
 :precision binary64
 (/
  (-
   (sqrt
    (*
     (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F))
     (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
  (- (pow B 2.0) (* (* 4.0 A) C))))
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (fma A (* C -4.0) (* B B)))
        (t_1 (hypot B (- A C)))
        (t_2 (fma B B (* A (* C -4.0))))
        (t_3 (+ (pow B 2.0) (* C (* A -4.0))))
        (t_4
         (/
          (-
           (sqrt
            (*
             (* 2.0 (* t_3 F))
             (- (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
          t_3)))
   (if (<= t_4 -1e-150)
     (/ (* (sqrt (* F (- A (- t_1 C)))) (- (sqrt (* 2.0 t_2)))) t_2)
     (if (<= t_4 0.0)
       (/
        (-
         (sqrt
          (*
           t_0
           (*
            (+ (/ -0.5 (/ C (+ (* B B) (- (* A A) (pow (- A) 2.0))))) (+ A A))
            (* 2.0 F)))))
        t_0)
       (if (<= t_4 INFINITY)
         (- (/ (sqrt (* 2.0 (* (* F t_2) (+ C (- A t_1))))) t_2))
         (* (/ (- (sqrt 2.0)) B) (sqrt (* F (- A B)))))))))
double code(double A, double B, double C, double F) {
	return -sqrt(((2.0 * ((pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / (pow(B, 2.0) - ((4.0 * A) * C));
}
double code(double A, double B, double C, double F) {
	double t_0 = fma(A, (C * -4.0), (B * B));
	double t_1 = hypot(B, (A - C));
	double t_2 = fma(B, B, (A * (C * -4.0)));
	double t_3 = pow(B, 2.0) + (C * (A * -4.0));
	double t_4 = -sqrt(((2.0 * (t_3 * F)) * ((A + C) - sqrt((pow(B, 2.0) + pow((A - C), 2.0)))))) / t_3;
	double tmp;
	if (t_4 <= -1e-150) {
		tmp = (sqrt((F * (A - (t_1 - C)))) * -sqrt((2.0 * t_2))) / t_2;
	} else if (t_4 <= 0.0) {
		tmp = -sqrt((t_0 * (((-0.5 / (C / ((B * B) + ((A * A) - pow(-A, 2.0))))) + (A + A)) * (2.0 * F)))) / t_0;
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = -(sqrt((2.0 * ((F * t_2) * (C + (A - t_1))))) / t_2);
	} else {
		tmp = (-sqrt(2.0) / B) * sqrt((F * (A - B)));
	}
	return tmp;
}
function code(A, B, C, F)
	return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)))
end
function code(A, B, C, F)
	t_0 = fma(A, Float64(C * -4.0), Float64(B * B))
	t_1 = hypot(B, Float64(A - C))
	t_2 = fma(B, B, Float64(A * Float64(C * -4.0)))
	t_3 = Float64((B ^ 2.0) + Float64(C * Float64(A * -4.0)))
	t_4 = Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_3 * F)) * Float64(Float64(A + C) - sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0))))))) / t_3)
	tmp = 0.0
	if (t_4 <= -1e-150)
		tmp = Float64(Float64(sqrt(Float64(F * Float64(A - Float64(t_1 - C)))) * Float64(-sqrt(Float64(2.0 * t_2)))) / t_2);
	elseif (t_4 <= 0.0)
		tmp = Float64(Float64(-sqrt(Float64(t_0 * Float64(Float64(Float64(-0.5 / Float64(C / Float64(Float64(B * B) + Float64(Float64(A * A) - (Float64(-A) ^ 2.0))))) + Float64(A + A)) * Float64(2.0 * F))))) / t_0);
	elseif (t_4 <= Inf)
		tmp = Float64(-Float64(sqrt(Float64(2.0 * Float64(Float64(F * t_2) * Float64(C + Float64(A - t_1))))) / t_2));
	else
		tmp = Float64(Float64(Float64(-sqrt(2.0)) / B) * sqrt(Float64(F * Float64(A - B))));
	end
	return tmp
end
code[A_, B_, C_, F_] := N[((-N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(A * N[(C * -4.0), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$2 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[B, 2.0], $MachinePrecision] + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$3 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$3), $MachinePrecision]}, If[LessEqual[t$95$4, -1e-150], N[(N[(N[Sqrt[N[(F * N[(A - N[(t$95$1 - C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(2.0 * t$95$2), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[((-N[Sqrt[N[(t$95$0 * N[(N[(N[(-0.5 / N[(C / N[(N[(B * B), $MachinePrecision] + N[(N[(A * A), $MachinePrecision] - N[Power[(-A), 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(A + A), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[t$95$4, Infinity], (-N[(N[Sqrt[N[(2.0 * N[(N[(F * t$95$2), $MachinePrecision] * N[(C + N[(A - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision]), N[(N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $MachinePrecision] * N[Sqrt[N[(F * N[(A - B), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\begin{array}{l}
t_0 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\
t_1 := \mathsf{hypot}\left(B, A - C\right)\\
t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
t_3 := {B}^{2} + C \cdot \left(A \cdot -4\right)\\
t_4 := \frac{-\sqrt{\left(2 \cdot \left(t_3 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_3}\\
\mathbf{if}\;t_4 \leq -1 \cdot 10^{-150}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(A - \left(t_1 - C\right)\right)} \cdot \left(-\sqrt{2 \cdot t_2}\right)}{t_2}\\

\mathbf{elif}\;t_4 \leq 0:\\
\;\;\;\;\frac{-\sqrt{t_0 \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}} + \left(A + A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_0}\\

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_2\right) \cdot \left(C + \left(A - t_1\right)\right)\right)}}{t_2}\\

\mathbf{else}:\\
\;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\


\end{array}

Error

Derivation

  1. Split input into 4 regimes
  2. if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -1.00000000000000001e-150

    1. Initial program 38.0

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified32.5

      \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}} \]
      Proof

      [Start]38.0

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Applied egg-rr22.5

      \[\leadsto \frac{-\color{blue}{\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]
    4. Simplified22.5

      \[\leadsto \frac{-\color{blue}{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]
      Proof

      [Start]22.5

      \[ \frac{-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \cdot \sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

      *-commutative [=>]22.5

      \[ \frac{-\color{blue}{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

      *-commutative [=>]22.5

      \[ \frac{-\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \color{blue}{\left(C \cdot -4\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

    if -1.00000000000000001e-150 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < 0.0

    1. Initial program 55.1

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified51.9

      \[\leadsto \color{blue}{\frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}} \]
      Proof

      [Start]55.1

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Taylor expanded in C around inf 46.1

      \[\leadsto \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\color{blue}{\left(\left(A + -0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C}\right) - -1 \cdot A\right)} \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]
    4. Simplified46.2

      \[\leadsto \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\color{blue}{\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}} + \left(A - \left(-A\right)\right)\right)} \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]
      Proof

      [Start]46.1

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\left(A + -0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C}\right) - -1 \cdot A\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

      +-commutative [=>]46.1

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\color{blue}{\left(-0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C} + A\right)} - -1 \cdot A\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

      associate--l+ [=>]46.1

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\color{blue}{\left(-0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C} + \left(A - -1 \cdot A\right)\right)} \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

      associate-*r/ [=>]46.1

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\color{blue}{\frac{-0.5 \cdot \left(\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}\right)}{C}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

      associate-/l* [=>]46.1

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\color{blue}{\frac{-0.5}{\frac{C}{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

      associate--l+ [=>]46.2

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{\color{blue}{{B}^{2} + \left({A}^{2} - {\left(-1 \cdot A\right)}^{2}\right)}}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

      unpow2 [=>]46.2

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{\color{blue}{B \cdot B} + \left({A}^{2} - {\left(-1 \cdot A\right)}^{2}\right)}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

      unpow2 [=>]46.2

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(\color{blue}{A \cdot A} - {\left(-1 \cdot A\right)}^{2}\right)}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

      mul-1-neg [=>]46.2

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\color{blue}{\left(-A\right)}}^{2}\right)}} + \left(A - -1 \cdot A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

      mul-1-neg [=>]46.2

      \[ \frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}} + \left(A - \color{blue}{\left(-A\right)}\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)} \]

    if 0.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0

    1. Initial program 37.2

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified26.5

      \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(F \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}} \]
      Proof

      [Start]37.2

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Applied egg-rr24.8

      \[\leadsto \frac{-\sqrt{2 \cdot \color{blue}{\left(\left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right) \cdot C + \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right) \cdot \left(-\left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]
    4. Simplified24.8

      \[\leadsto \frac{-\sqrt{2 \cdot \color{blue}{\left(\left(F \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot \left(C + \left(-\left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]
      Proof

      [Start]24.8

      \[ \frac{-\sqrt{2 \cdot \left(\left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right) \cdot C + \left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right) \cdot \left(-\left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

      distribute-lft-out [=>]24.8

      \[ \frac{-\sqrt{2 \cdot \color{blue}{\left(\left(\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot F\right) \cdot \left(C + \left(-\left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

      *-commutative [=>]24.8

      \[ \frac{-\sqrt{2 \cdot \left(\color{blue}{\left(F \cdot \mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)\right)} \cdot \left(C + \left(-\left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

      *-commutative [=>]24.8

      \[ \frac{-\sqrt{2 \cdot \left(\left(F \cdot \mathsf{fma}\left(B, B, A \cdot \color{blue}{\left(C \cdot -4\right)}\right)\right) \cdot \left(C + \left(-\left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

    if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)))

    1. Initial program 64.0

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified64.0

      \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C - \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      Proof

      [Start]64.0

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Taylor expanded in A around 0 63.9

      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C - \color{blue}{\sqrt{{B}^{2} + {C}^{2}}}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Simplified63.9

      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C - \color{blue}{\sqrt{B \cdot B + C \cdot C}}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
      Proof

      [Start]63.9

      \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C - \sqrt{{B}^{2} + {C}^{2}}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

      unpow2 [=>]63.9

      \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C - \sqrt{\color{blue}{B \cdot B} + {C}^{2}}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]

      unpow2 [=>]63.9

      \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A + \left(C - \sqrt{B \cdot B + \color{blue}{C \cdot C}}\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Taylor expanded in C around 0 55.2

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\right)} \]
    6. Simplified55.2

      \[\leadsto \color{blue}{\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}} \]
      Proof

      [Start]55.2

      \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\right) \]

      associate-*r* [=>]55.2

      \[ \color{blue}{\left(-1 \cdot \frac{\sqrt{2}}{B}\right) \cdot \sqrt{F \cdot \left(A - B\right)}} \]

      associate-*r/ [=>]55.2

      \[ \color{blue}{\frac{-1 \cdot \sqrt{2}}{B}} \cdot \sqrt{F \cdot \left(A - B\right)} \]

      mul-1-neg [=>]55.2

      \[ \frac{\color{blue}{-\sqrt{2}}}{B} \cdot \sqrt{F \cdot \left(A - B\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification40.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} + C \cdot \left(A \cdot -4\right)\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} + C \cdot \left(A \cdot -4\right)} \leq -1 \cdot 10^{-150}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right)} \cdot \left(-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} + C \cdot \left(A \cdot -4\right)\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} + C \cdot \left(A \cdot -4\right)} \leq 0:\\ \;\;\;\;\frac{-\sqrt{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right) \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}} + \left(A + A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{elif}\;\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} + C \cdot \left(A \cdot -4\right)\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{{B}^{2} + C \cdot \left(A \cdot -4\right)} \leq \infty:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error44.3
Cost33988
\[\begin{array}{l} t_0 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\ t_1 := \mathsf{hypot}\left(B, A - C\right)\\ t_2 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -3.8 \cdot 10^{-123}:\\ \;\;\;\;\frac{\sqrt{2 \cdot t_2}}{t_2} \cdot \left(-\sqrt{F \cdot \left(\left(A + C\right) - t_1\right)}\right)\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{-271}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(2, A, 0.5 \cdot \frac{B}{\frac{A}{B}}\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 3.3 \cdot 10^{-123}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right) \cdot \left(C - \mathsf{fma}\left(-1, C, \frac{0.5}{\frac{A - C}{B \cdot B}}\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{+100}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(\left(A - \left(t_1 - C\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
Alternative 2
Error45.2
Cost28688
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\ t_2 := C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\\ \mathbf{if}\;B \leq -5.6 \cdot 10^{-210}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot t_2\right)}}{t_0}\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-271}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-69}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right) \cdot \left(C - \mathsf{fma}\left(-1, C, \frac{0.5}{\frac{A - C}{B \cdot B}}\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{-42}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(\frac{-0.5}{\frac{C}{B \cdot B + \left(A \cdot A - {\left(-A\right)}^{2}\right)}} + \left(A + A\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{+100}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot t_2\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
Alternative 3
Error44.4
Cost27852
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\ t_2 := -\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -1.36 \cdot 10^{-211}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 3 \cdot 10^{-275}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.35 \cdot 10^{+100}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
Alternative 4
Error44.5
Cost27588
\[\begin{array}{l} t_0 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\ t_1 := \mathsf{hypot}\left(B, A - C\right)\\ t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -9.8 \cdot 10^{-210}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(C + \left(A - t_1\right)\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-268}:\\ \;\;\;\;\frac{-\sqrt{t_0 \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{+106}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(\left(t_1 - C\right) - A\right) \cdot \left(\left(\left(4 \cdot A\right) \cdot C\right) \cdot F - F \cdot \left(B \cdot B\right)\right)\right)} \cdot \frac{1}{-t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
Alternative 5
Error44.5
Cost27588
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right) - C\\ t_1 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\ \mathbf{if}\;B \leq -3.9 \cdot 10^{-209}:\\ \;\;\;\;-\frac{\sqrt{t_1 \cdot \left(\left(A - t_0\right) \cdot \left(2 \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-269}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{+100}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(t_0 - A\right) \cdot \left(\left(\left(4 \cdot A\right) \cdot C\right) \cdot F - F \cdot \left(B \cdot B\right)\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
Alternative 6
Error44.5
Cost21836
\[\begin{array}{l} t_0 := \sqrt{2 \cdot \left(\left(\left(\mathsf{hypot}\left(B, A - C\right) - C\right) - A\right) \cdot \left(\left(\left(4 \cdot A\right) \cdot C\right) \cdot F - F \cdot \left(B \cdot B\right)\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ t_1 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\ \mathbf{if}\;B \leq -3.2 \cdot 10^{-210}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-270}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+105}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
Alternative 7
Error48.4
Cost21000
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)\\ \mathbf{if}\;C \leq -3.6 \cdot 10^{-35}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(\left(A - C\right) - C\right) - A\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 3.3 \cdot 10^{-76}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(\left(\sqrt{B \cdot B + A \cdot A} - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_1}\\ \end{array} \]
Alternative 8
Error51.2
Cost16028
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ t_2 := F \cdot t_0\\ t_3 := \sqrt{B \cdot B + C \cdot C}\\ \mathbf{if}\;A \leq -2.3 \cdot 10^{-30}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(\left(\sqrt{B \cdot B + A \cdot A} - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -4 \cdot 10^{-87}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{elif}\;A \leq -6.2 \cdot 10^{-102}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -1.15 \cdot 10^{-263}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 6.5 \cdot 10^{-304}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(B \cdot \left(B \cdot F\right)\right) \cdot \left(\left(t_3 - C\right) - A\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.9 \cdot 10^{-184}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.6 \cdot 10^{-94}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C - t_3\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(4 \cdot \left(\left(A \cdot C\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \end{array} \]
Alternative 9
Error51.5
Cost15236
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \mathbf{if}\;A \leq -1.15 \cdot 10^{-35}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(\left(\sqrt{B \cdot B + A \cdot A} - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -2.5 \cdot 10^{-88}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{elif}\;A \leq -3.45 \cdot 10^{-102}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq -7.4 \cdot 10^{-264}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 3.2 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(4 \cdot \left(\left(A \cdot C\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \end{array} \]
Alternative 10
Error51.8
Cost14740
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ t_2 := F \cdot t_0\\ \mathbf{if}\;A \leq -4 \cdot 10^{-102}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(t_2 \cdot \left(\left(\left(C - A\right) - C\right) - A\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -1.15 \cdot 10^{-263}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.42 \cdot 10^{-188}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 2.15 \cdot 10^{-98}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{-19}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \end{array} \]
Alternative 11
Error48.8
Cost14476
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -3.2 \cdot 10^{-74}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -3.2 \cdot 10^{-212}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(4 \cdot \left(\left(A \cdot C\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 5.1 \cdot 10^{-55}:\\ \;\;\;\;-\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
Alternative 12
Error49.2
Cost14344
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -8.8 \cdot 10^{-113}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{-50}:\\ \;\;\;\;-\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
Alternative 13
Error54.5
Cost14233
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ t_2 := F \cdot t_0\\ \mathbf{if}\;A \leq -6.5 \cdot 10^{-103}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(t_2 \cdot \left(\left(\left(C - A\right) - C\right) - A\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -8.5 \cdot 10^{-264}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{-181}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{-99}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-19} \lor \neg \left(A \leq 1.7 \cdot 10^{+144}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(t_2 \cdot \left(\left(\left(A - C\right) - C\right) - A\right)\right)}}{t_0}\\ \end{array} \]
Alternative 14
Error50.2
Cost14216
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -4.2 \cdot 10^{-113}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-53}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{\mathsf{fma}\left(A, C \cdot -4, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - B\right)}\\ \end{array} \]
Alternative 15
Error55.2
Cost8844
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -2.35 \cdot 10^{-52}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -4.6 \cdot 10^{-264}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 6.5 \cdot 10^{-224}:\\ \;\;\;\;\frac{B}{\frac{A \cdot \left(4 \cdot C\right) - B \cdot B}{\sqrt{\left(2 \cdot F\right) \cdot \left(A - B\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(t_1 \cdot \left(\left(\left(A - C\right) - C\right) - A\right)\right)}}{t_0}\\ \end{array} \]
Alternative 16
Error55.1
Cost8844
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -4.8 \cdot 10^{-101}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(t_1 \cdot \left(\left(\left(C - A\right) - C\right) - A\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -3.65 \cdot 10^{-264}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 9.2 \cdot 10^{-223}:\\ \;\;\;\;\frac{B}{\frac{A \cdot \left(4 \cdot C\right) - B \cdot B}{\sqrt{\left(2 \cdot F\right) \cdot \left(A - B\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(t_1 \cdot \left(\left(\left(A - C\right) - C\right) - A\right)\right)}}{t_0}\\ \end{array} \]
Alternative 17
Error53.9
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -2.45 \cdot 10^{-113}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-59}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{B}{\frac{A \cdot \left(4 \cdot C\right) - B \cdot B}{\sqrt{\left(2 \cdot F\right) \cdot \left(A - B\right)}}}\\ \end{array} \]
Alternative 18
Error53.7
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -6 \cdot 10^{-113}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-59}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{B}{\frac{A \cdot \left(4 \cdot C\right) - B \cdot B}{\sqrt{\left(2 \cdot F\right) \cdot \left(A - B\right)}}}\\ \end{array} \]
Alternative 19
Error58.0
Cost8452
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq -2.9 \cdot 10^{+196}:\\ \;\;\;\;-2 \cdot \sqrt{\frac{F}{B \cdot \frac{B}{C}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C - B\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 20
Error55.6
Cost8452
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 1.65 \cdot 10^{-60}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{B}{\frac{A \cdot \left(4 \cdot C\right) - B \cdot B}{\sqrt{\left(2 \cdot F\right) \cdot \left(A - B\right)}}}\\ \end{array} \]
Alternative 21
Error57.5
Cost7748
\[\begin{array}{l} \mathbf{if}\;C \leq -3.2 \cdot 10^{+82}:\\ \;\;\;\;-2 \cdot \sqrt{\frac{F}{B \cdot \frac{B}{C}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{B}{\frac{A \cdot \left(4 \cdot C\right) - B \cdot B}{\sqrt{\left(2 \cdot F\right) \cdot \left(A - B\right)}}}\\ \end{array} \]
Alternative 22
Error60.5
Cost6976
\[-2 \cdot \sqrt{\frac{C}{B} \cdot \frac{F}{B}} \]
Alternative 23
Error60.4
Cost6976
\[-2 \cdot \sqrt{\frac{F}{B \cdot \frac{B}{C}}} \]
Alternative 24
Error62.0
Cost6848
\[-2 \cdot \frac{\sqrt{C \cdot F}}{B} \]
Alternative 25
Error62.8
Cost6784
\[\frac{-\sqrt{C \cdot F}}{B} \]

Error

Reproduce

herbie shell --seed 2023017 
(FPCore (A B C F)
  :name "ABCF->ab-angle b"
  :precision binary64
  (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))