?

Average Error: 52.6 → 33.3
Time: 54.6s
Precision: binary64
Cost: 155788

?

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

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

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\frac{t_2 \cdot \left(-\sqrt{F \cdot t_0}\right)}{t_0}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(C, B\right)} \cdot \left(-\sqrt{F}\right)\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.00000000000000008e-217

    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.0

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

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

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

      [Start]23.9

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

      *-commutative [<=]23.9

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

      *-commutative [=>]23.9

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

      *-commutative [=>]23.9

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

      associate-+r+ [=>]24.3

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

      +-commutative [=>]24.3

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

      associate-+l+ [=>]23.8

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

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

    if -1.00000000000000008e-217 < (/.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.5

      \[\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. Simplified60.0

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

      [Start]61.5

      \[ \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 45.6

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

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

      [Start]45.6

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

      fma-def [=>]45.6

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

      unpow2 [=>]45.6

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

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

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

      [Start]40.4

      \[ \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-rr12.2

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

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

      [Start]12.2

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

      *-commutative [<=]12.2

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

      *-commutative [=>]12.2

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

      *-commutative [=>]12.2

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

      associate-+r+ [=>]12.2

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

      +-commutative [=>]12.2

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

      associate-+l+ [=>]12.2

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

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

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

      [Start]63.6

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

      associate-*r* [=>]63.6

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

      associate-*r/ [=>]63.6

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

      mul-1-neg [=>]63.6

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

      *-commutative [=>]63.6

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

      +-commutative [=>]63.6

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

      unpow2 [=>]63.6

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

      unpow2 [=>]63.6

      \[ \frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)} \]
    5. Applied egg-rr63.6

      \[\leadsto \frac{-\sqrt{2}}{B} \cdot \color{blue}{\left(\sqrt{C + \sqrt{C \cdot C + B \cdot B}} \cdot \sqrt{F}\right)} \]
    6. Simplified47.3

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

      [Start]63.6

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

      hypot-def [=>]47.3

      \[ \frac{-\sqrt{2}}{B} \cdot \left(\sqrt{C + \color{blue}{\mathsf{hypot}\left(C, B\right)}} \cdot \sqrt{F}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification33.3

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

Alternatives

Alternative 1
Error36.5
Cost34120
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ \mathbf{if}\;B \leq -6.8 \cdot 10^{+77}:\\ \;\;\;\;\left(B \cdot \sqrt{F}\right) \cdot \frac{\sqrt{2 \cdot \left(A + \left(C + t_0\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 3.8 \cdot 10^{+78}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)} \cdot \left(-\sqrt{F \cdot t_1}\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(C, B\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \]
Alternative 2
Error36.5
Cost27976
\[\begin{array}{l} t_0 := A \cdot \left(C \cdot -4\right)\\ t_1 := \frac{\sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{\mathsf{fma}\left(B, B, t_0\right)}\\ \mathbf{if}\;B \leq -1.65 \cdot 10^{+60}:\\ \;\;\;\;\left(B \cdot \sqrt{F}\right) \cdot t_1\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{+79}:\\ \;\;\;\;t_1 \cdot \left(-\sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_0}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(C, B\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \]
Alternative 3
Error36.5
Cost27976
\[\begin{array}{l} t_0 := A \cdot \left(C \cdot -4\right)\\ t_1 := \mathsf{fma}\left(B, B, t_0\right)\\ t_2 := \sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ \mathbf{if}\;B \leq -2.5 \cdot 10^{+57}:\\ \;\;\;\;\left(B \cdot \sqrt{F}\right) \cdot \frac{t_2}{t_1}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+78}:\\ \;\;\;\;\frac{t_2 \cdot \sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_0}}{-t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(C, B\right)} \cdot \left(-\sqrt{F}\right)\right)\\ \end{array} \]
Alternative 4
Error39.4
Cost27732
\[\begin{array}{l} t_0 := -\sqrt{F}\\ t_1 := \sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ t_2 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -3.7 \cdot 10^{-63}:\\ \;\;\;\;\frac{t_1 \cdot \left(B \cdot \sqrt{F}\right)}{B \cdot B}\\ \mathbf{elif}\;B \leq 10^{-131}:\\ \;\;\;\;\frac{t_1 \cdot \left(-\sqrt{F \cdot \left(-4 \cdot \left(A \cdot C\right)\right)}\right)}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-57}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-20}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{+115}:\\ \;\;\;\;\frac{t_1 \cdot \left(B \cdot t_0\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(C, B\right)} \cdot t_0\right)\\ \end{array} \]
Alternative 5
Error39.0
Cost27732
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \mathsf{hypot}\left(B, A - C\right)\\ t_2 := -\sqrt{F}\\ t_3 := A \cdot \left(C \cdot -4\right)\\ t_4 := \sqrt{2 \cdot \left(C + \left(A + t_1\right)\right)}\\ \mathbf{if}\;B \leq -5.2 \cdot 10^{-63}:\\ \;\;\;\;\left(B \cdot \sqrt{F}\right) \cdot \frac{\sqrt{2 \cdot \left(A + \left(C + t_1\right)\right)}}{\mathsf{fma}\left(B, B, t_3\right)}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-133}:\\ \;\;\;\;\frac{t_4 \cdot \left(-\sqrt{F \cdot \left(-4 \cdot \left(A \cdot C\right)\right)}\right)}{t_3}\\ \mathbf{elif}\;B \leq 1.22 \cdot 10^{-57}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 6.6 \cdot 10^{-20}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{+123}:\\ \;\;\;\;\frac{t_4 \cdot \left(B \cdot t_2\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(C, B\right)} \cdot t_2\right)\\ \end{array} \]
Alternative 6
Error39.4
Cost26964
\[\begin{array}{l} t_0 := -\sqrt{F}\\ t_1 := \sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ t_2 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -2.3 \cdot 10^{-73}:\\ \;\;\;\;\frac{t_1 \cdot \left(B \cdot \sqrt{F}\right)}{B \cdot B}\\ \mathbf{elif}\;B \leq 1.26 \cdot 10^{-132}:\\ \;\;\;\;\frac{t_1 \cdot \left(-\sqrt{F \cdot \left(-4 \cdot \left(A \cdot C\right)\right)}\right)}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-56}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-19}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{+115}:\\ \;\;\;\;\frac{t_1 \cdot \left(B \cdot t_0\right)}{B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{C + \mathsf{hypot}\left(C, B\right)} \cdot t_0\right)\\ \end{array} \]
Alternative 7
Error43.3
Cost21396
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ t_2 := \frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -1.7:\\ \;\;\;\;\frac{t_1 \cdot \left(B \cdot \sqrt{F}\right)}{B \cdot B}\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{-283}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{-112}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-55}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{-19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2.85 \cdot 10^{+127}:\\ \;\;\;\;\frac{t_1 \cdot \left(B \cdot \left(-\sqrt{F}\right)\right)}{B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 8
Error42.1
Cost21264
\[\begin{array}{l} t_0 := \sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -1 \cdot 10^{-77}:\\ \;\;\;\;\frac{t_0 \cdot \left(B \cdot \sqrt{F}\right)}{B \cdot B}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{-134}:\\ \;\;\;\;\frac{t_0 \cdot \left(-\sqrt{F \cdot \left(-4 \cdot \left(A \cdot C\right)\right)}\right)}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-56}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{-19}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{+127}:\\ \;\;\;\;\frac{t_0 \cdot \left(B \cdot \left(-\sqrt{F}\right)\right)}{B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 9
Error43.4
Cost21132
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ \mathbf{if}\;B \leq -2.6:\\ \;\;\;\;\frac{t_1 \cdot \left(B \cdot \sqrt{F}\right)}{B \cdot B}\\ \mathbf{elif}\;B \leq 3 \cdot 10^{-293}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 5.8 \cdot 10^{-20}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{+127}:\\ \;\;\;\;\frac{t_1 \cdot \left(B \cdot \left(-\sqrt{F}\right)\right)}{B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 10
Error42.9
Cost20812
\[\begin{array}{l} t_0 := \sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ \mathbf{if}\;B \leq -2.8:\\ \;\;\;\;\frac{t_0 \cdot \left(B \cdot \sqrt{F}\right)}{B \cdot B}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-136}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 2.85 \cdot 10^{+127}:\\ \;\;\;\;\frac{t_0 \cdot \left(B \cdot \left(-\sqrt{F}\right)\right)}{B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 11
Error44.5
Cost20680
\[\begin{array}{l} \mathbf{if}\;B \leq 3.7 \cdot 10^{-137}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 3.9 \cdot 10^{+126}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(B \cdot \left(-\sqrt{F}\right)\right)}{B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 12
Error50.8
Cost15380
\[\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)\\ t_2 := \frac{\sqrt{A + \left(A + C\right)} \cdot \left(-\sqrt{-2 \cdot t_0}\right)}{t_1}\\ \mathbf{if}\;B \leq -9600:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -1 \cdot 10^{-69}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(B - \left(A + C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -5.2 \cdot 10^{-112}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(\left(\left(C - A\right) + \frac{B \cdot B}{C} \cdot 0.5\right) - \left(A + C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{-163}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\right)\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{-101}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 13
Error47.2
Cost15308
\[\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}\;A \leq -1.55 \cdot 10^{+56}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\right)\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{elif}\;A \leq -7.8 \cdot 10^{-130}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_1}\\ \mathbf{elif}\;A \leq 4.05 \cdot 10^{+99}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot t_0\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{A + \left(A + C\right)} \cdot \left(-\sqrt{-2 \cdot t_0}\right)}{t_1}\\ \end{array} \]
Alternative 14
Error50.0
Cost14480
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\\ t_2 := \frac{-\sqrt{\left(A \cdot -16\right) \cdot \left(F \cdot \left(C \cdot C\right)\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{if}\;B \leq -1.15 \cdot 10^{-79}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(B - \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 9.8 \cdot 10^{-163}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-106}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + C\right)\right) - A \cdot t_1\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-53}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 15
Error54.2
Cost14040
\[\begin{array}{l} t_0 := \sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq -8.6 \cdot 10^{+27}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.4 \cdot 10^{-123}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_1}\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{-153}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq -1.46 \cdot 10^{-297}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(C + \left(A + C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq 2.55 \cdot 10^{+88}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 3.3 \cdot 10^{+257}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + C\right)\right) - A \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{F} \cdot \sqrt{A}\right) \cdot \frac{-2}{B}\\ \end{array} \]
Alternative 16
Error50.1
Cost13448
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -8.6 \cdot 10^{-80}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right) \cdot \left(B - \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4.6 \cdot 10^{-145}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 17
Error53.4
Cost8712
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\\ \mathbf{if}\;C \leq -6.4 \cdot 10^{-43}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{elif}\;C \leq 5.5 \cdot 10^{-129}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot t_1\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A - C\right) - \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 18
Error55.7
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq -4.4 \cdot 10^{-132}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.52 \cdot 10^{-7}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\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}\\ \end{array} \]
Alternative 19
Error53.4
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq -7.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{elif}\;C \leq 8.6 \cdot 10^{-129}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 20
Error55.8
Cost8452
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq -1.65 \cdot 10^{-42}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\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}\\ \end{array} \]
Alternative 21
Error57.2
Cost8196
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq 2.1 \cdot 10^{+83}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(4 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C + 2 \cdot A\right)\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 22
Error56.7
Cost8196
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq -2.1 \cdot 10^{-28}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 23
Error57.9
Cost7940
\[\begin{array}{l} \mathbf{if}\;A \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;-\sqrt{\left(F \cdot \left(C + 2 \cdot A\right)\right) \cdot \frac{2}{B \cdot B}}\\ \end{array} \]
Alternative 24
Error61.2
Cost7428
\[\begin{array}{l} \mathbf{if}\;B \leq -4.8 \cdot 10^{-49}:\\ \;\;\;\;-\sqrt{\left(F \cdot \left(C + 2 \cdot A\right)\right) \cdot \frac{2}{B \cdot B}}\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{+290}:\\ \;\;\;\;\frac{-2}{B} \cdot \sqrt{A \cdot F}\\ \mathbf{else}:\\ \;\;\;\;\frac{-2}{B} \cdot \sqrt{C \cdot F}\\ \end{array} \]
Alternative 25
Error62.0
Cost6848
\[\frac{-2}{B} \cdot \sqrt{A \cdot F} \]

Error

Reproduce?

herbie shell --seed 2023187 
(FPCore (A B C F)
  :name "ABCF->ab-angle a"
  :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))))