?

Average Error: 52.5 → 40.2
Time: 53.0s
Precision: binary64
Cost: 142668

?

\[\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{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_2 := {B}^{2} + C \cdot \left(A \cdot -4\right)\\ t_3 := -\frac{\sqrt{\left(2 \cdot \left(t_2 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_2}\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-206}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A + \left(C - t_0\right)\right)} \cdot \left(-\sqrt{2 \cdot t_1}\right)}{t_1}\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\mathsf{fma}\left(-0.5, \frac{B \cdot B}{A - C}, 2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\frac{1}{\sqrt{\frac{1}{\left(C + \left(A - t_0\right)\right) \cdot \left(F \cdot \frac{2}{t_1}\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \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 (hypot B (- A C)))
        (t_1 (fma B B (* A (* C -4.0))))
        (t_2 (+ (pow B 2.0) (* C (* A -4.0))))
        (t_3
         (-
          (/
           (sqrt
            (*
             (* 2.0 (* t_2 F))
             (- (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0))))))
           t_2))))
   (if (<= t_3 -1e-206)
     (/ (* (sqrt (* F (+ A (- C t_0)))) (- (sqrt (* 2.0 t_1)))) t_1)
     (if (<= t_3 0.0)
       (/
        (-
         (sqrt (* t_1 (* (fma -0.5 (/ (* B B) (- A C)) (* 2.0 C)) (* 2.0 F)))))
        t_1)
       (if (<= t_3 INFINITY)
         (/ 1.0 (sqrt (/ 1.0 (* (+ C (- A t_0)) (* F (/ 2.0 t_1))))))
         (sqrt (- (/ F A))))))))
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 = hypot(B, (A - C));
	double t_1 = fma(B, B, (A * (C * -4.0)));
	double t_2 = pow(B, 2.0) + (C * (A * -4.0));
	double t_3 = -(sqrt(((2.0 * (t_2 * F)) * ((A + C) - sqrt((pow(B, 2.0) + pow((A - C), 2.0)))))) / t_2);
	double tmp;
	if (t_3 <= -1e-206) {
		tmp = (sqrt((F * (A + (C - t_0)))) * -sqrt((2.0 * t_1))) / t_1;
	} else if (t_3 <= 0.0) {
		tmp = -sqrt((t_1 * (fma(-0.5, ((B * B) / (A - C)), (2.0 * C)) * (2.0 * F)))) / t_1;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = 1.0 / sqrt((1.0 / ((C + (A - t_0)) * (F * (2.0 / t_1)))));
	} else {
		tmp = sqrt(-(F / A));
	}
	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 = hypot(B, Float64(A - C))
	t_1 = fma(B, B, Float64(A * Float64(C * -4.0)))
	t_2 = Float64((B ^ 2.0) + Float64(C * Float64(A * -4.0)))
	t_3 = Float64(-Float64(sqrt(Float64(Float64(2.0 * Float64(t_2 * F)) * Float64(Float64(A + C) - sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0)))))) / t_2))
	tmp = 0.0
	if (t_3 <= -1e-206)
		tmp = Float64(Float64(sqrt(Float64(F * Float64(A + Float64(C - t_0)))) * Float64(-sqrt(Float64(2.0 * t_1)))) / t_1);
	elseif (t_3 <= 0.0)
		tmp = Float64(Float64(-sqrt(Float64(t_1 * Float64(fma(-0.5, Float64(Float64(B * B) / Float64(A - C)), Float64(2.0 * C)) * Float64(2.0 * F))))) / t_1);
	elseif (t_3 <= Inf)
		tmp = Float64(1.0 / sqrt(Float64(1.0 / Float64(Float64(C + Float64(A - t_0)) * Float64(F * Float64(2.0 / t_1))))));
	else
		tmp = sqrt(Float64(-Float64(F / A)));
	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[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$1 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[B, 2.0], $MachinePrecision] + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = (-N[(N[Sqrt[N[(N[(2.0 * N[(t$95$2 * 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$2), $MachinePrecision])}, If[LessEqual[t$95$3, -1e-206], N[(N[(N[Sqrt[N[(F * N[(A + N[(C - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(2.0 * t$95$1), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[((-N[Sqrt[N[(t$95$1 * N[(N[(-0.5 * N[(N[(B * B), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(1.0 / N[Sqrt[N[(1.0 / N[(N[(C + N[(A - t$95$0), $MachinePrecision]), $MachinePrecision] * N[(F * N[(2.0 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[(-N[(F / A), $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{hypot}\left(B, A - C\right)\\
t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
t_2 := {B}^{2} + C \cdot \left(A \cdot -4\right)\\
t_3 := -\frac{\sqrt{\left(2 \cdot \left(t_2 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}}{t_2}\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-206}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(A + \left(C - t_0\right)\right)} \cdot \left(-\sqrt{2 \cdot t_1}\right)}{t_1}\\

\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\mathsf{fma}\left(-0.5, \frac{B \cdot B}{A - C}, 2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{t_1}\\

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

\mathbf{else}:\\
\;\;\;\;\sqrt{-\frac{F}{A}}\\


\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.00000000000000003e-206

    1. Initial program 37.8

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

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

      \[ \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-rr21.9

      \[\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. Simplified21.9

      \[\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]21.9

      \[ \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 [=>]21.9

      \[ \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 [=>]21.9

      \[ \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.00000000000000003e-206 < (/.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 61.3

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

      \[\leadsto \color{blue}{\frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\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(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]
      Proof

      [Start]61.3

      \[ \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 B around 0 44.8

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

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

      [Start]44.8

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

      fma-def [=>]44.8

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

      unpow2 [=>]44.8

      \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(\mathsf{fma}\left(-0.5, \frac{\color{blue}{B \cdot B}}{A - C}, 2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\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 39.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. Simplified26.7

      \[\leadsto \color{blue}{\frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\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(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]
      Proof

      [Start]39.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. Applied egg-rr38.1

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

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

      [Start]38.1

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

      associate-/l* [=>]37.7

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

      associate-*r* [=>]37.7

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

      associate-*r* [=>]37.7

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

      +-commutative [=>]37.7

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

      associate--l+ [=>]37.7

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

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

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

      [Start]22.7

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

      *-commutative [=>]22.7

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

      associate-*r* [=>]22.7

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

      associate-*l* [<=]21.9

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

      *-commutative [=>]21.9

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

      +-commutative [=>]21.9

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

      associate--l+ [=>]21.9

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

      associate-*r* [=>]21.9

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

      unpow-1 [=>]21.9

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

      associate-*l/ [=>]21.9

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

      metadata-eval [=>]21.9

      \[ \frac{1}{\sqrt{\frac{1}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(\frac{\color{blue}{2}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \cdot F\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. Simplified63.2

      \[\leadsto \color{blue}{\frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\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(B, B, A \cdot \left(C \cdot -4\right)\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. Applied egg-rr63.6

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

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

      [Start]63.6

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

      associate-/l* [=>]63.6

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

      associate-*r* [=>]63.5

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

      associate-*r* [=>]63.5

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

      +-commutative [=>]63.5

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

      associate--l+ [=>]63.4

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

      \[\leadsto \sqrt{\color{blue}{-1 \cdot \frac{F}{A}}} \]
    6. Simplified57.3

      \[\leadsto \sqrt{\color{blue}{-\frac{F}{A}}} \]
      Proof

      [Start]57.3

      \[ \sqrt{-1 \cdot \frac{F}{A}} \]

      mul-1-neg [=>]57.3

      \[ \sqrt{\color{blue}{-\frac{F}{A}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification40.2

    \[\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^{-206}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\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(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(\mathsf{fma}\left(-0.5, \frac{B \cdot B}{A - C}, 2 \cdot C\right) \cdot \left(2 \cdot F\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 \infty:\\ \;\;\;\;\frac{1}{\sqrt{\frac{1}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(F \cdot \frac{2}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \end{array} \]

Alternatives

Alternative 1
Error43.2
Cost34516
\[\begin{array}{l} t_0 := -\sqrt{2}\\ 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 := \frac{\sqrt{2 \cdot t_2}}{t_2} \cdot \left(-\sqrt{F \cdot \left(\left(A + C\right) - t_1\right)}\right)\\ \mathbf{if}\;B \leq -5 \cdot 10^{+35}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq -1.45 \cdot 10^{-235}:\\ \;\;\;\;\sqrt{\left(A + \left(C - t_1\right)\right) \cdot \left(F \cdot t_2\right)} \cdot \frac{t_0}{t_2}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 3.15 \cdot 10^{-173}:\\ \;\;\;\;-\frac{\sqrt{t_2 \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(2, A, 0.5 \cdot \frac{B}{\frac{A}{B}}\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 8 \cdot 10^{+143}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{t_0}{B}\\ \end{array} \]
Alternative 2
Error43.9
Cost34452
\[\begin{array}{l} t_0 := \left(\mathsf{hypot}\left(B, A - C\right) - A\right) - C\\ t_1 := \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\\ t_2 := -4 \cdot \left(A \cdot C\right)\\ t_3 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_4 := \frac{-\sqrt{-2 \cdot \left(t_3 \cdot \left(F \cdot t_0\right)\right)}}{t_3}\\ \mathbf{if}\;B \leq -3.45 \cdot 10^{+118}:\\ \;\;\;\;\frac{t_1}{\frac{\mathsf{fma}\left(B, B, t_2\right)}{B \cdot \sqrt{2}}}\\ \mathbf{elif}\;B \leq -2.1 \cdot 10^{-238}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq 1.15 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 10^{-171}:\\ \;\;\;\;-\frac{\sqrt{t_3 \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(2, A, 0.5 \cdot \frac{B}{\frac{A}{B}}\right)\right)}}{t_3}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-82}:\\ \;\;\;\;\frac{\mathsf{hypot}\left(B, \sqrt{t_2}\right) \cdot \left(-\sqrt{\left(F \cdot -2\right) \cdot t_0}\right)}{t_3}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+95}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 3
Error43.9
Cost34384
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := \frac{\sqrt{2 \cdot t_0}}{t_0} \cdot \left(-\sqrt{F \cdot \left(\left(A + C\right) - \mathsf{hypot}\left(B, A - C\right)\right)}\right)\\ \mathbf{if}\;B \leq -1.42 \cdot 10^{-108}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-173}:\\ \;\;\;\;-\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 6.4 \cdot 10^{+142}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 4
Error43.6
Cost27984
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\\ t_2 := \frac{-\sqrt{-2 \cdot \left(t_0 \cdot \left(F \cdot \left(\left(\mathsf{hypot}\left(B, A - C\right) - A\right) - C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -3.45 \cdot 10^{+118}:\\ \;\;\;\;\frac{t_1}{\frac{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)}{B \cdot \sqrt{2}}}\\ \mathbf{elif}\;B \leq -6.6 \cdot 10^{-238}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 5.1 \cdot 10^{-225}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{+92}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 5
Error43.5
Cost27984
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := \mathsf{hypot}\left(B, A - C\right)\\ t_2 := \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\\ \mathbf{if}\;B \leq -3.45 \cdot 10^{+118}:\\ \;\;\;\;\frac{t_2}{\frac{\mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)}{B \cdot \sqrt{2}}}\\ \mathbf{elif}\;B \leq -3.2 \cdot 10^{-239}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(t_0 \cdot \left(F \cdot \left(\left(t_1 - A\right) - C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4.7 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{+93}:\\ \;\;\;\;\frac{-\sqrt{t_0 \cdot \left(\left(A + \left(C - t_1\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 6
Error46.0
Cost26884
\[\begin{array}{l} t_0 := -4 \cdot \left(A \cdot C\right)\\ t_1 := \sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)}\\ t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -13500000000000:\\ \;\;\;\;t_1 \cdot \frac{B \cdot \sqrt{2}}{\mathsf{fma}\left(B, B, t_0\right)}\\ \mathbf{elif}\;B \leq -8.2 \cdot 10^{-79}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right) \cdot \left(\left(\sqrt{{\left(A - C\right)}^{2} + B \cdot B} - C\right) - A\right)\right)}}{B \cdot B + t_0}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-148}:\\ \;\;\;\;\frac{-\sqrt{t_2 \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_2}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 7
Error46.4
Cost21832
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -8 \cdot 10^{+37}:\\ \;\;\;\;\sqrt{B \cdot F} \cdot \frac{B}{\frac{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}{\sqrt{2}}}\\ \mathbf{elif}\;B \leq -2.35 \cdot 10^{-79}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right) \cdot \left(\left(\sqrt{{\left(A - C\right)}^{2} + B \cdot B} - C\right) - A\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-149}:\\ \;\;\;\;\frac{-\sqrt{t_0 \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 8
Error46.9
Cost21132
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -4.2 \cdot 10^{-103}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{B \cdot B + A \cdot A}\right)}\\ \mathbf{elif}\;B \leq 8.4 \cdot 10^{-227}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 6.8 \cdot 10^{-149}:\\ \;\;\;\;\frac{-\sqrt{t_0 \cdot \left(\left(2 \cdot F\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 9
Error46.9
Cost20432
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -7 \cdot 10^{+15}:\\ \;\;\;\;\left(B \cdot \sqrt{2}\right) \cdot \frac{\sqrt{B \cdot F}}{B \cdot B}\\ \mathbf{elif}\;B \leq -8 \cdot 10^{-75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C - \sqrt{B \cdot B + A \cdot A}\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-227}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 5.8 \cdot 10^{-152}:\\ \;\;\;\;-\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(A + A\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 10
Error46.8
Cost20432
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -2900000:\\ \;\;\;\;\sqrt{B \cdot F} \cdot \frac{B}{\frac{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}{\sqrt{2}}}\\ \mathbf{elif}\;B \leq -3.95 \cdot 10^{-76}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C - \sqrt{B \cdot B + A \cdot A}\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 7.4 \cdot 10^{-150}:\\ \;\;\;\;-\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(A + A\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 11
Error47.0
Cost20300
\[\begin{array}{l} \mathbf{if}\;B \leq -4.1 \cdot 10^{-103}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{B \cdot B + A \cdot A}\right)}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-149}:\\ \;\;\;\;-\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(A + A\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(B, C\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 12
Error51.4
Cost15368
\[\begin{array}{l} t_0 := B \cdot \sqrt{2}\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -42:\\ \;\;\;\;t_0 \cdot \frac{\sqrt{B \cdot F}}{B \cdot B}\\ \mathbf{elif}\;B \leq -1.95 \cdot 10^{-76}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(A + \left(C - \sqrt{B \cdot B + A \cdot A}\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 3.3 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-51}:\\ \;\;\;\;-\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(A + A\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0 \cdot \left(-\sqrt{F \cdot \left(C - B\right)}\right)}{t_1}\\ \end{array} \]
Alternative 13
Error52.1
Cost14476
\[\begin{array}{l} t_0 := B \cdot \sqrt{2}\\ \mathbf{if}\;B \leq -8 \cdot 10^{-105}:\\ \;\;\;\;t_0 \cdot \frac{\sqrt{B \cdot F}}{B \cdot B}\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-171}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0 \cdot \left(-\sqrt{F \cdot \left(C - B\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \end{array} \]
Alternative 14
Error51.6
Cost14476
\[\begin{array}{l} t_0 := B \cdot \sqrt{2}\\ \mathbf{if}\;B \leq -7.8 \cdot 10^{-107}:\\ \;\;\;\;t_0 \cdot \frac{\sqrt{B \cdot F}}{B \cdot B}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-49}:\\ \;\;\;\;-\frac{\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(A + A\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0 \cdot \left(-\sqrt{F \cdot \left(C - B\right)}\right)}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \end{array} \]
Alternative 15
Error53.0
Cost14348
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -1.3 \cdot 10^{-106}:\\ \;\;\;\;\left(B \cdot \sqrt{2}\right) \cdot \frac{\sqrt{B \cdot F}}{B \cdot B}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 10^{-171}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 16
Error52.8
Cost13636
\[\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 -4.3 \cdot 10^{-107}:\\ \;\;\;\;\left(B \cdot \sqrt{2}\right) \cdot \frac{\sqrt{B \cdot F}}{B \cdot B}\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 2.25 \cdot 10^{-65}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + \left(A - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 17
Error54.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}\;B \leq -6.5 \cdot 10^{-78}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(A + \left(B + C\right)\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 5.8 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 2.65 \cdot 10^{-67}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + \left(A - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 18
Error53.6
Cost8717
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq -4.6 \cdot 10^{-47}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(A + \left(A + C\right)\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 -5.5 \cdot 10^{-291} \lor \neg \left(A \leq 2.15 \cdot 10^{+18}\right):\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 19
Error55.1
Cost8716
\[\begin{array}{l} t_0 := \sqrt{-\frac{F}{C}}\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -3.5 \cdot 10^{-78}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-58}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(A - \left(B - C\right)\right)\right)}}{t_1}\\ \end{array} \]
Alternative 20
Error54.1
Cost8716
\[\begin{array}{l} t_0 := F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -2.2 \cdot 10^{-77}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(A + \left(B + C\right)\right) \cdot t_0\right)}}{t_1}\\ \mathbf{elif}\;B \leq 2.65 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 1.85 \cdot 10^{-67}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot t_0\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(A - \left(B - C\right)\right)\right)}}{t_1}\\ \end{array} \]
Alternative 21
Error53.9
Cost7053
\[\begin{array}{l} \mathbf{if}\;A \leq -2.2 \cdot 10^{+96} \lor \neg \left(A \leq -4.1 \cdot 10^{-293}\right) \land A \leq 1.72 \cdot 10^{-9}:\\ \;\;\;\;\sqrt{-\frac{F}{C}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \end{array} \]
Alternative 22
Error62.4
Cost6656
\[-\sqrt{\frac{F}{A}} \]
Alternative 23
Error56.9
Cost6656
\[\sqrt{-\frac{F}{A}} \]
Alternative 24
Error63.3
Cost6592
\[\sqrt{\frac{F}{A}} \]

Error

Reproduce?

herbie shell --seed 2023057 
(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))))