?

Average Error: 81.4% → 52.07%
Time: 1.1min
Precision: binary64
Cost: 149516

?

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

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

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

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

    1. Initial program 58.31

      \[\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. Simplified49.31

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

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

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

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

    if -5.0000000000000002e-219 < (/.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))) < 9.9999999999999999e51

    1. Initial program 86.95

      \[\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. Simplified86.96

      \[\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(\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      Proof

      [Start]86.95

      \[ \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-rr87.65

      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{hypot}\left(B, A - C\right)\right)\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Taylor expanded in C around -inf 69.15

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

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

      [Start]69.15

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

      fma-def [=>]69.15

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

      unpow2 [=>]69.15

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

      associate-/l* [=>]69.15

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

    if 9.9999999999999999e51 < (/.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 72.87

      \[\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. Simplified72.87

      \[\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(\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      Proof

      [Start]72.87

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

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

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

      [Start]22.34

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

      *-commutative [=>]22.34

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

      *-commutative [=>]22.34

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

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

      \[\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(\left(A + C\right) + \sqrt{B \cdot B + {\left(A - C\right)}^{2}}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}} \]
      Proof

      [Start]100

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

      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\left(A + C\right) + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{hypot}\left(B, A - C\right)\right)\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Taylor expanded in B around inf 98.96

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

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

      [Start]98.96

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

      *-commutative [=>]98.96

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

      unpow2 [=>]98.96

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

      associate-*l* [=>]98.9

      \[ \frac{-\sqrt{2 \cdot \left(\color{blue}{\left(B \cdot \left(B \cdot F\right)\right)} \cdot \left(\left(A + C\right) + \mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    6. Taylor expanded in A around 0 99.35

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

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

      [Start]99.35

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

      mul-1-neg [=>]99.35

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

      distribute-rgt-neg-in [=>]99.35

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

      *-commutative [=>]99.35

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

      +-commutative [=>]99.35

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

      unpow2 [=>]99.35

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

      unpow2 [=>]99.35

      \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(C + \sqrt{C \cdot C + \color{blue}{B \cdot B}}\right)}\right) \]
    8. Applied egg-rr72.78

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

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

Alternatives

Alternative 1
Error67.05%
Cost34780
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ t_2 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_3 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_4 := -4 \cdot \left(A \cdot C\right)\\ t_5 := \sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_4\right)\right)}\\ t_6 := B \cdot B + t_4\\ \mathbf{if}\;A \leq -2.8 \cdot 10^{+114}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(F \cdot \mathsf{fma}\left(2, C, \frac{\left(B \cdot B\right) \cdot -0.5}{A}\right)\right)\right)}}{t_3}\\ \mathbf{elif}\;A \leq -3 \cdot 10^{-189}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C + \left(A + t_0\right)\right)} \cdot \left(-\sqrt{2 \cdot t_3}\right)}{t_3}\\ \mathbf{elif}\;A \leq 1.26 \cdot 10^{-303}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.92 \cdot 10^{-143}:\\ \;\;\;\;\frac{t_5 \cdot \left(-\sqrt{A + \left(C + t_0\right)}\right)}{t_6}\\ \mathbf{elif}\;A \leq 9.2 \cdot 10^{-71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 4.6 \cdot 10^{-11}:\\ \;\;\;\;\frac{t_5 \cdot \left(-\sqrt{\mathsf{fma}\left(2, A, -0.5 \cdot \frac{B \cdot B}{C}\right)}\right)}{t_6}\\ \mathbf{elif}\;A \leq 9 \cdot 10^{+83}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(2 \cdot A\right)} \cdot \left(\sqrt{t_2} \cdot \left(-\sqrt{F}\right)\right)}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)} \cdot \left(-\sqrt{F \cdot t_2}\right)}{t_2}\\ \end{array} \]
Alternative 2
Error67.07%
Cost34460
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ t_2 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_3 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_4 := -4 \cdot \left(A \cdot C\right)\\ t_5 := \sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_4\right)\right)}\\ t_6 := B \cdot B + t_4\\ t_7 := \frac{t_5 \cdot \left(-\sqrt{A + \left(C + t_0\right)}\right)}{t_6}\\ \mathbf{if}\;A \leq -2.8 \cdot 10^{+114}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(F \cdot \mathsf{fma}\left(2, C, \frac{\left(B \cdot B\right) \cdot -0.5}{A}\right)\right)\right)}}{t_3}\\ \mathbf{elif}\;A \leq -3.05 \cdot 10^{-189}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C + \left(A + t_0\right)\right)} \cdot \left(-\sqrt{2 \cdot t_3}\right)}{t_3}\\ \mathbf{elif}\;A \leq -1.5 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 1.95 \cdot 10^{-143}:\\ \;\;\;\;t_7\\ \mathbf{elif}\;A \leq 2.1 \cdot 10^{-71}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;A \leq 4.3 \cdot 10^{-11}:\\ \;\;\;\;\frac{t_5 \cdot \left(-\sqrt{\mathsf{fma}\left(2, A, -0.5 \cdot \frac{B \cdot B}{C}\right)}\right)}{t_6}\\ \mathbf{elif}\;A \leq 9.5 \cdot 10^{+86}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(2 \cdot A\right)} \cdot \left(\sqrt{t_2} \cdot \left(-\sqrt{F}\right)\right)}{t_2}\\ \mathbf{else}:\\ \;\;\;\;t_7\\ \end{array} \]
Alternative 3
Error55.78%
Cost33540
\[\begin{array}{l} t_0 := -4 \cdot \left(A \cdot C\right)\\ t_1 := \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\\ \mathbf{if}\;B \leq -1.8 \cdot 10^{+61}:\\ \;\;\;\;\sqrt{2} \cdot \frac{B \cdot \sqrt{F}}{\frac{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}{t_1}}\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{+73}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_0\right)\right)} \cdot \left(-t_1\right)}{B \cdot B + t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ \end{array} \]
Alternative 4
Error58.13%
Cost27980
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := -4 \cdot \left(A \cdot C\right)\\ t_2 := B \cdot B + t_1\\ t_3 := \sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_1\right)\right)}\\ \mathbf{if}\;B \leq -6.8 \cdot 10^{-12}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq -2.05 \cdot 10^{-66}:\\ \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{\mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)}\right)}{t_2}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+73}:\\ \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{A + \left(C + t_0\right)}\right)}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ \end{array} \]
Alternative 5
Error58.24%
Cost27716
\[\begin{array}{l} t_0 := -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 3.5 \cdot 10^{+73}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_0\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B + t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ \end{array} \]
Alternative 6
Error62.57%
Cost27340
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := A + \mathsf{hypot}\left(B, A\right)\\ \mathbf{if}\;B \leq -2.8 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{F \cdot t_1} \cdot \frac{B}{\frac{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}{\sqrt{2}}}\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{-73}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{+115}:\\ \;\;\;\;\frac{\left(B \cdot \sqrt{2}\right) \cdot \left(\sqrt{t_1} \cdot \left(-\sqrt{F}\right)\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ \end{array} \]
Alternative 7
Error60.71%
Cost27340
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -4.4 \cdot 10^{-56}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-72}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + t_0\right)}\right)}{t_1}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{+108}:\\ \;\;\;\;\frac{\left(B \cdot \sqrt{2}\right) \cdot \left(\sqrt{A + \mathsf{hypot}\left(B, A\right)} \cdot \left(-\sqrt{F}\right)\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ \end{array} \]
Alternative 8
Error61.95%
Cost26884
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -3.2 \cdot 10^{-25}:\\ \;\;\;\;B \cdot \left(\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)} \cdot \frac{\sqrt{2}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{-122}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{+29}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ \end{array} \]
Alternative 9
Error61.6%
Cost26884
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -3.7 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)} \cdot \frac{B}{\frac{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}{\sqrt{2}}}\\ \mathbf{elif}\;B \leq 9.4 \cdot 10^{-119}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{+34}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ \end{array} \]
Alternative 10
Error62.38%
Cost26700
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -1.25 \cdot 10^{-58}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{-124}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 1.05 \cdot 10^{+35}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(\sqrt{F} \cdot \left(-\sqrt{C + \mathsf{hypot}\left(C, B\right)}\right)\right)\\ \end{array} \]
Alternative 11
Error70.63%
Cost21392
\[\begin{array}{l} t_0 := -4 \cdot \left(A \cdot C\right)\\ t_1 := B \cdot B + t_0\\ t_2 := F \cdot t_1\\ t_3 := \frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{if}\;A \leq -3.5 \cdot 10^{+77}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq -3 \cdot 10^{-189}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq -7.5 \cdot 10^{-307}:\\ \;\;\;\;\sqrt{F \cdot \left(A + \mathsf{fma}\left(0.5, \frac{A}{\frac{B}{A}}, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{elif}\;A \leq 2.9 \cdot 10^{-147}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_0\right)\right)} \cdot \left(-\sqrt{2 \cdot A}\right)}{t_1}\\ \end{array} \]
Alternative 12
Error70.58%
Cost21136
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_2 := F \cdot t_0\\ t_3 := \frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -2.1 \cdot 10^{-59}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq -2.2 \cdot 10^{-182}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\mathsf{fma}\left(2, A, -0.5 \cdot \frac{B}{\frac{C}{B}}\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 -1.42 \cdot 10^{-220}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(2 \cdot C\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.32 \cdot 10^{-285}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(4 \cdot \left(A \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 3.7 \cdot 10^{-199}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B \cdot B}{A}\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{+33}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \end{array} \]
Alternative 13
Error70.72%
Cost21136
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ t_2 := \frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -2.05 \cdot 10^{-59}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -2.1 \cdot 10^{-179}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\mathsf{fma}\left(2, A, -0.5 \cdot \frac{B}{\frac{C}{B}}\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 -2.35 \cdot 10^{-213}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -4.2 \cdot 10^{-301}:\\ \;\;\;\;\frac{\sqrt{-4 \cdot \left(A \cdot \left(C \cdot F\right)\right)} \cdot \left(-\sqrt{2 \cdot \left(2 \cdot A\right)}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{+37}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \end{array} \]
Alternative 14
Error70.39%
Cost15308
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -2.1 \cdot 10^{-59}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.25 \cdot 10^{-179}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\mathsf{fma}\left(2, A, -0.5 \cdot \frac{B}{\frac{C}{B}}\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 4 \cdot 10^{+36}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \end{array} \]
Alternative 15
Error69.82%
Cost15044
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq 4.6 \cdot 10^{+35}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \end{array} \]
Alternative 16
Error74.77%
Cost14660
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -2 \cdot 10^{-59}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right) \cdot \left(B \cdot \left(B \cdot F\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{+72}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \end{array} \]
Alternative 17
Error75.89%
Cost13576
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -2.1 \cdot 10^{-10}:\\ \;\;\;\;\frac{-\sqrt{\left(B \cdot \left(B \cdot \left(B \cdot F\right)\right)\right) \cdot -2}}{t_0}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{+72}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{B \cdot F}\right)\\ \end{array} \]
Alternative 18
Error75.26%
Cost13448
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -8 \cdot 10^{-11}:\\ \;\;\;\;\frac{-\sqrt{\left(B \cdot \left(B \cdot \left(B \cdot F\right)\right)\right) \cdot -2}}{t_0}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{+72}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 19
Error79.13%
Cost8588
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ t_2 := \frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)}}{t_0}\\ \mathbf{if}\;A \leq -7.5 \cdot 10^{-145}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq -3.5 \cdot 10^{-252}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(B \cdot \left(B \cdot \left(B \cdot F\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 2.6 \cdot 10^{-159}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \end{array} \]
Alternative 20
Error79.07%
Cost8588
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ t_2 := \frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot C\right)\right)}}{t_0}\\ \mathbf{if}\;A \leq -5.7 \cdot 10^{-123}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq -8.4 \cdot 10^{-255}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 4 \cdot 10^{-162}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \end{array} \]
Alternative 21
Error82.85%
Cost8456
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := B \cdot \left(B \cdot \left(B \cdot F\right)\right)\\ \mathbf{if}\;B \leq -1.15 \cdot 10^{-10}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot -2}}{t_0}\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{+72}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot t_1}}{t_0}\\ \end{array} \]
Alternative 22
Error85.7%
Cost8072
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := B \cdot \left(B \cdot \left(B \cdot F\right)\right)\\ \mathbf{if}\;B \leq -3.7 \cdot 10^{-36}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot -2}}{t_0}\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-67}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot t_1}}{t_0}\\ \end{array} \]
Alternative 23
Error93.6%
Cost7812
\[\begin{array}{l} \mathbf{if}\;A \leq 1.25 \cdot 10^{-215}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(B \cdot \left(B \cdot \left(B \cdot F\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \end{array} \]
Alternative 24
Error89.6%
Cost7812
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := B \cdot \left(B \cdot \left(B \cdot F\right)\right)\\ \mathbf{if}\;B \leq -1.08 \cdot 10^{-124}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot -2}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot t_1}}{t_0}\\ \end{array} \]
Alternative 25
Error95.09%
Cost7108
\[\begin{array}{l} t_0 := \sqrt{A \cdot F}\\ \mathbf{if}\;B \leq -2 \cdot 10^{-276}:\\ \;\;\;\;2 \cdot \frac{t_0}{B}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \left(t_0 \cdot \frac{1}{B}\right)\\ \end{array} \]
Alternative 26
Error95.09%
Cost6980
\[\begin{array}{l} t_0 := \frac{\sqrt{A \cdot F}}{B}\\ \mathbf{if}\;B \leq -2 \cdot 10^{-276}:\\ \;\;\;\;2 \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot t_0\\ \end{array} \]
Alternative 27
Error96.84%
Cost6848
\[-2 \cdot \frac{\sqrt{A \cdot F}}{B} \]

Error

Reproduce?

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