?

Average Error: 52.7 → 35.6
Time: 54.3s
Precision: binary64
Cost: 155660

?

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

\mathbf{elif}\;t_3 \leq 5 \cdot 10^{-90}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B}{\frac{A}{B}}\right)\right)\right)}}{t_0}\\

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

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


\end{array}

Error?

Derivation?

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

    1. Initial program 38.2

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 -4e-205 < (/.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.00000000000000019e-90

    1. Initial program 58.7

      \[\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.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]58.7

      \[ \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 -inf 44.3

      \[\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 C + -0.5 \cdot \frac{{B}^{2}}{A}\right)}\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \]
    4. Simplified44.3

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

      [Start]44.3

      \[ \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 C + -0.5 \cdot \frac{{B}^{2}}{A}\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \]

      fma-def [=>]44.3

      \[ \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, C, -0.5 \cdot \frac{{B}^{2}}{A}\right)}\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \]

      unpow2 [=>]44.3

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

      associate-/l* [=>]44.3

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

    if 5.00000000000000019e-90 < (/.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 43.2

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

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

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

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

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

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

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

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

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

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

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

      \[ \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. Taylor expanded in C around inf 19.5

      \[\leadsto \frac{-\sqrt{\color{blue}{-4 \cdot \left(A \cdot \left(C \cdot F\right)\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)} \]
    6. Simplified12.9

      \[\leadsto \frac{-\sqrt{\color{blue}{F \cdot \left(-4 \cdot \left(A \cdot C\right)\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]19.5

      \[ \frac{-\sqrt{-4 \cdot \left(A \cdot \left(C \cdot F\right)\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)} \]

      associate-*r* [=>]12.9

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

      associate-*l* [<=]12.9

      \[ \frac{-\sqrt{\color{blue}{\left(-4 \cdot \left(A \cdot C\right)\right) \cdot F}} \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)} \]

      *-commutative [<=]12.9

      \[ \frac{-\sqrt{\left(-4 \cdot \color{blue}{\left(C \cdot A\right)}\right) \cdot F} \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)} \]

      *-commutative [<=]12.9

      \[ \frac{-\sqrt{\color{blue}{F \cdot \left(-4 \cdot \left(C \cdot A\right)\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)} \]

      *-commutative [=>]12.9

      \[ \frac{-\sqrt{F \cdot \left(-4 \cdot \color{blue}{\left(A \cdot C\right)}\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)} \]
    7. Applied egg-rr7.3

      \[\leadsto \frac{-\color{blue}{\left(\sqrt{F \cdot -4} \cdot \sqrt{A \cdot C}\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 +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)))

    1. Initial program 64.0

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

      \[\leadsto \color{blue}{\frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(\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]64.0

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

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

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

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

      [Start]63.9

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

      associate-*r* [=>]63.9

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

      associate-*r/ [=>]63.9

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

      mul-1-neg [=>]63.9

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

      unpow2 [=>]63.9

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

      fma-def [=>]63.9

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

      unpow2 [=>]63.9

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

      unpow2 [=>]63.9

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

      unpow2 [=>]63.9

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

      *-commutative [=>]63.9

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

      unpow2 [=>]63.9

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)} \]
    7. Simplified53.4

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

      [Start]53.4

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

      mul-1-neg [=>]53.4

      \[ \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]

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

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

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

Alternatives

Alternative 1
Error42.1
Cost34252
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)\\ t_2 := \frac{\sqrt{F \cdot t_1}}{t_1} \cdot \left(-\sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\right)\\ \mathbf{if}\;B \leq -6.6 \cdot 10^{-179}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-108}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B}{\frac{A}{B}}\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 5.8 \cdot 10^{+90}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 2
Error42.1
Cost34252
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_2 := \frac{\sqrt{F \cdot t_1} \cdot \left(-\sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\right)}{t_1}\\ \mathbf{if}\;B \leq -7.4 \cdot 10^{-180}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-108}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B}{\frac{A}{B}}\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{+88}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 3
Error44.9
Cost28048
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -8 \cdot 10^{-179}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + \left(C + t_0\right)\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -5.2 \cdot 10^{-283}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 6.6 \cdot 10^{-297}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 0.0021:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \mathsf{fma}\left(2, C, -0.5 \cdot \frac{B}{\frac{A}{B}}\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{+90}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 4
Error46.5
Cost27732
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_2 := \frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -6.2 \cdot 10^{-10}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + B \cdot B}\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -7.5 \cdot 10^{-283}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 7.5 \cdot 10^{-297}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 0.0021:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{+90}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 5
Error44.6
Cost27732
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \frac{\sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ t_2 := \frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -2.2 \cdot 10^{-11}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.1 \cdot 10^{-282}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-297}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 0.0031:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{+90}:\\ \;\;\;\;-t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 6
Error44.9
Cost27732
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_2 := \frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{if}\;B \leq -2.3 \cdot 10^{-179}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + \left(C + t_0\right)\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -4.6 \cdot 10^{-283}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 7.5 \cdot 10^{-297}:\\ \;\;\;\;\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:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{+90}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 7
Error47.3
Cost21700
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_2 := \frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -2.2 \cdot 10^{-10}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + B \cdot B}\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -1.45 \cdot 10^{-281}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-297}:\\ \;\;\;\;\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 \cdot 10^{-20}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 8
Error47.6
Cost21264
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -6.2 \cdot 10^{-13}:\\ \;\;\;\;\frac{-\sqrt{{\left(B \cdot \sqrt[3]{F}\right)}^{3} \cdot -2}}{B \cdot B}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-282}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-297}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 9
Error47.3
Cost21132
\[\begin{array}{l} t_0 := C \cdot \left(A \cdot -4\right)\\ t_1 := \mathsf{fma}\left(B, B, t_0\right)\\ t_2 := \frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right) \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -2.3 \cdot 10^{-10}:\\ \;\;\;\;\frac{-\sqrt{{\left(B \cdot \sqrt[3]{F}\right)}^{3} \cdot -2}}{B \cdot B}\\ \mathbf{elif}\;B \leq -1.55 \cdot 10^{-276}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 6.6 \cdot 10^{-297}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 3 \cdot 10^{+90}:\\ \;\;\;\;\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 10
Error47.3
Cost20300
\[\begin{array}{l} \mathbf{if}\;B \leq -2.2 \cdot 10^{-10}:\\ \;\;\;\;\frac{-\sqrt{{\left(B \cdot \sqrt[3]{F}\right)}^{3} \cdot -2}}{B \cdot B}\\ \mathbf{elif}\;B \leq 1.7 \cdot 10^{-73}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right) \cdot \left(B \cdot B - \left(4 \cdot A\right) \cdot C\right)\right)}}{C \cdot \left(A \cdot -4\right)}\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{+90}:\\ \;\;\;\;\sqrt{F \cdot \left(A + \mathsf{hypot}\left(B, A\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 11
Error49.0
Cost14532
\[\begin{array}{l} t_0 := C \cdot \left(A \cdot -4\right)\\ \mathbf{if}\;B \leq 1.55 \cdot 10^{-43}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \end{array} \]
Alternative 12
Error49.9
Cost13448
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq -3.5 \cdot 10^{-38}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}\\ \mathbf{elif}\;C \leq 1.05 \cdot 10^{-40}:\\ \;\;\;\;\sqrt{2} \cdot \left(-\sqrt{\frac{F}{B}}\right)\\ \mathbf{elif}\;C \leq 1.55 \cdot 10^{+125}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)}}{C \cdot \left(A \cdot -4\right)}\\ \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 13
Error51.5
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq 7.5 \cdot 10^{-151}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}\\ \mathbf{elif}\;C \leq 2.05 \cdot 10^{+125}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)}}{C \cdot \left(A \cdot -4\right)}\\ \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 14
Error53.2
Cost7748
\[\begin{array}{l} \mathbf{if}\;C \leq 7.5 \cdot 10^{-151}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}}{4 \cdot \left(A \cdot C\right) - B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)}}{C \cdot \left(A \cdot -4\right)}\\ \end{array} \]
Alternative 15
Error55.6
Cost7684
\[\begin{array}{l} t_0 := C \cdot \left(A \cdot -4\right)\\ \mathbf{if}\;A \leq 3.1 \cdot 10^{-203}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 16
Error58.4
Cost7552
\[\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)}}{C \cdot \left(A \cdot -4\right)} \]
Alternative 17
Error62.9
Cost7296
\[\frac{-\sqrt{-16 \cdot \left(A \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{B \cdot B} \]
Alternative 18
Error61.9
Cost6848
\[\sqrt{C \cdot F} \cdot \frac{-2}{B} \]

Error

Reproduce?

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