Average Error: 52.4 → 40.5
Time: 1.4min
Precision: binary64
\[\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 := C \cdot \left(A \cdot -4\right)\\ t_1 := \mathsf{fma}\left(B, B, t_0\right)\\ t_2 := {B}^{2} + t_0\\ 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}\\ t_4 := \mathsf{hypot}\left(B, A - C\right)\\ t_5 := \left(2 \cdot F\right) \cdot \left(A + \left(C - t_4\right)\right)\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\frac{{\left({t_5}^{0.25}\right)}^{2} \cdot \left(-\mathsf{hypot}\left(B, \sqrt{t_0}\right)\right)}{t_1}\\ \mathbf{elif}\;t_3 \leq -1.4924876823199194 \cdot 10^{-182}:\\ \;\;\;\;{\left(\frac{t_1}{-\sqrt{\left(F \cdot \left({B}^{2} + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(2 \cdot \left(\left(A + C\right) - t_4\right)\right)}}\right)}^{-1}\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;{\left(\frac{-\sqrt{\frac{A \cdot -2}{F}}}{\sqrt{2}}\right)}^{-1}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\frac{-\sqrt{t_5 \cdot t_1}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \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 (* C (* A -4.0)))
        (t_1 (fma B B t_0))
        (t_2 (+ (pow B 2.0) t_0))
        (t_3
         (/
          (-
           (sqrt
            (*
             (* 2.0 (* t_2 F))
             (- (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
          t_2))
        (t_4 (hypot B (- A C)))
        (t_5 (* (* 2.0 F) (+ A (- C t_4)))))
   (if (<= t_3 (- INFINITY))
     (/ (* (pow (pow t_5 0.25) 2.0) (- (hypot B (sqrt t_0)))) t_1)
     (if (<= t_3 -1.4924876823199194e-182)
       (pow
        (/
         t_1
         (-
          (sqrt
           (*
            (* F (+ (pow B 2.0) (* -4.0 (* A C))))
            (* 2.0 (- (+ A C) t_4))))))
        -1.0)
       (if (<= t_3 0.0)
         (pow (/ (- (sqrt (/ (* A -2.0) F))) (sqrt 2.0)) -1.0)
         (if (<= t_3 INFINITY)
           (/ (- (sqrt (* t_5 t_1))) t_1)
           (* (sqrt (* F (- C (hypot C B)))) (/ (- (sqrt 2.0)) 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 = C * (A * -4.0);
	double t_1 = fma(B, B, t_0);
	double t_2 = pow(B, 2.0) + t_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 t_4 = hypot(B, (A - C));
	double t_5 = (2.0 * F) * (A + (C - t_4));
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = (pow(pow(t_5, 0.25), 2.0) * -hypot(B, sqrt(t_0))) / t_1;
	} else if (t_3 <= -1.4924876823199194e-182) {
		tmp = pow((t_1 / -sqrt(((F * (pow(B, 2.0) + (-4.0 * (A * C)))) * (2.0 * ((A + C) - t_4))))), -1.0);
	} else if (t_3 <= 0.0) {
		tmp = pow((-sqrt(((A * -2.0) / F)) / sqrt(2.0)), -1.0);
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = -sqrt((t_5 * t_1)) / t_1;
	} else {
		tmp = sqrt((F * (C - hypot(C, B)))) * (-sqrt(2.0) / 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(C * Float64(A * -4.0))
	t_1 = fma(B, B, t_0)
	t_2 = Float64((B ^ 2.0) + t_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)
	t_4 = hypot(B, Float64(A - C))
	t_5 = Float64(Float64(2.0 * F) * Float64(A + Float64(C - t_4)))
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = Float64(Float64(((t_5 ^ 0.25) ^ 2.0) * Float64(-hypot(B, sqrt(t_0)))) / t_1);
	elseif (t_3 <= -1.4924876823199194e-182)
		tmp = Float64(t_1 / Float64(-sqrt(Float64(Float64(F * Float64((B ^ 2.0) + Float64(-4.0 * Float64(A * C)))) * Float64(2.0 * Float64(Float64(A + C) - t_4)))))) ^ -1.0;
	elseif (t_3 <= 0.0)
		tmp = Float64(Float64(-sqrt(Float64(Float64(A * -2.0) / F))) / sqrt(2.0)) ^ -1.0;
	elseif (t_3 <= Inf)
		tmp = Float64(Float64(-sqrt(Float64(t_5 * t_1))) / t_1);
	else
		tmp = Float64(sqrt(Float64(F * Float64(C - hypot(C, B)))) * Float64(Float64(-sqrt(2.0)) / 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[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * B + t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[B, 2.0], $MachinePrecision] + t$95$0), $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]}, Block[{t$95$4 = N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$5 = N[(N[(2.0 * F), $MachinePrecision] * N[(A + N[(C - t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(N[Power[N[Power[t$95$5, 0.25], $MachinePrecision], 2.0], $MachinePrecision] * (-N[Sqrt[B ^ 2 + N[Sqrt[t$95$0], $MachinePrecision] ^ 2], $MachinePrecision])), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, -1.4924876823199194e-182], N[Power[N[(t$95$1 / (-N[Sqrt[N[(N[(F * N[(N[Power[B, 2.0], $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(A + C), $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], -1.0], $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[Power[N[((-N[Sqrt[N[(N[(A * -2.0), $MachinePrecision] / F), $MachinePrecision]], $MachinePrecision]) / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[((-N[Sqrt[N[(t$95$5 * t$95$1), $MachinePrecision]], $MachinePrecision]) / t$95$1), $MachinePrecision], N[(N[Sqrt[N[(F * N[(C - N[Sqrt[C ^ 2 + B ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-N[Sqrt[2.0], $MachinePrecision]) / B), $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 := C \cdot \left(A \cdot -4\right)\\
t_1 := \mathsf{fma}\left(B, B, t_0\right)\\
t_2 := {B}^{2} + t_0\\
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}\\
t_4 := \mathsf{hypot}\left(B, A - C\right)\\
t_5 := \left(2 \cdot F\right) \cdot \left(A + \left(C - t_4\right)\right)\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;\frac{{\left({t_5}^{0.25}\right)}^{2} \cdot \left(-\mathsf{hypot}\left(B, \sqrt{t_0}\right)\right)}{t_1}\\

\mathbf{elif}\;t_3 \leq -1.4924876823199194 \cdot 10^{-182}:\\
\;\;\;\;{\left(\frac{t_1}{-\sqrt{\left(F \cdot \left({B}^{2} + -4 \cdot \left(A \cdot C\right)\right)\right) \cdot \left(2 \cdot \left(\left(A + C\right) - t_4\right)\right)}}\right)}^{-1}\\

\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;{\left(\frac{-\sqrt{\frac{A \cdot -2}{F}}}{\sqrt{2}}\right)}^{-1}\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\frac{-\sqrt{t_5 \cdot t_1}}{t_1}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\


\end{array}

Error

Bits error versus A

Bits error versus B

Bits error versus C

Bits error versus F

Derivation

  1. Split input into 5 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))) < -inf.0

    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. Simplified53.3

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

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

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

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

    1. Initial program 1.6

      \[\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. Simplified1.6

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

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

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

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

    if -1.492487682319919e-182 < (/.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 59.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. Simplified57.2

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

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

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

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

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

    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 36.9

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

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

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

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

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

    1. Initial program 64.0

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

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

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

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

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

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

Reproduce

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