?

Average Error: 52.4 → 38.8
Time: 50.8s
Precision: binary64
Cost: 27992

?

\[\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 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_2 := \mathsf{hypot}\left(B, A - C\right)\\ t_3 := \sqrt{A + \left(C + t_2\right)}\\ t_4 := -\sqrt{2}\\ t_5 := \frac{t_3 \cdot \left(\sqrt{F} \cdot \left(B \cdot t_4\right)\right)}{t_0}\\ \mathbf{if}\;B \leq -2.15 \cdot 10^{+130}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq -1.95 \cdot 10^{-72}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(t_2 + \left(C + A\right)\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-145}:\\ \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(C \cdot A\right)\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 1.56 \cdot 10^{-114}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-49}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(t_1 \cdot \left(F \cdot \left(\left(\frac{\left(B \cdot B\right) \cdot 0.5}{C} - A\right) - A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 7.5 \cdot 10^{+151}:\\ \;\;\;\;t_5\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot t_4\\ \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) (* B B)))
        (t_1 (fma B B (* C (* A -4.0))))
        (t_2 (hypot B (- A C)))
        (t_3 (sqrt (+ A (+ C t_2))))
        (t_4 (- (sqrt 2.0)))
        (t_5 (/ (* t_3 (* (sqrt F) (* B t_4))) t_0)))
   (if (<= B -2.15e+130)
     (* (/ (sqrt 2.0) B) (sqrt (* (- C B) F)))
     (if (<= B -1.95e-72)
       (/
        (* (sqrt (* 2.0 (+ t_2 (+ C A)))) (* B (sqrt F)))
        (fma -4.0 (* C A) (* B B)))
       (if (<= B 5.6e-145)
         (/ (* t_3 (- (sqrt (* -2.0 (* 4.0 (* F (* C A))))))) t_0)
         (if (<= B 1.56e-114)
           t_5
           (if (<= B 5e-49)
             (-
              (/
               (sqrt (* -2.0 (* t_1 (* F (- (- (/ (* (* B B) 0.5) C) A) A)))))
               t_1))
             (if (<= B 7.5e+151) t_5 (* (sqrt (/ F B)) t_4)))))))))
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) + (B * B);
	double t_1 = fma(B, B, (C * (A * -4.0)));
	double t_2 = hypot(B, (A - C));
	double t_3 = sqrt((A + (C + t_2)));
	double t_4 = -sqrt(2.0);
	double t_5 = (t_3 * (sqrt(F) * (B * t_4))) / t_0;
	double tmp;
	if (B <= -2.15e+130) {
		tmp = (sqrt(2.0) / B) * sqrt(((C - B) * F));
	} else if (B <= -1.95e-72) {
		tmp = (sqrt((2.0 * (t_2 + (C + A)))) * (B * sqrt(F))) / fma(-4.0, (C * A), (B * B));
	} else if (B <= 5.6e-145) {
		tmp = (t_3 * -sqrt((-2.0 * (4.0 * (F * (C * A)))))) / t_0;
	} else if (B <= 1.56e-114) {
		tmp = t_5;
	} else if (B <= 5e-49) {
		tmp = -(sqrt((-2.0 * (t_1 * (F * (((((B * B) * 0.5) / C) - A) - A))))) / t_1);
	} else if (B <= 7.5e+151) {
		tmp = t_5;
	} else {
		tmp = sqrt((F / B)) * t_4;
	}
	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(Float64(Float64(C * A) * -4.0) + Float64(B * B))
	t_1 = fma(B, B, Float64(C * Float64(A * -4.0)))
	t_2 = hypot(B, Float64(A - C))
	t_3 = sqrt(Float64(A + Float64(C + t_2)))
	t_4 = Float64(-sqrt(2.0))
	t_5 = Float64(Float64(t_3 * Float64(sqrt(F) * Float64(B * t_4))) / t_0)
	tmp = 0.0
	if (B <= -2.15e+130)
		tmp = Float64(Float64(sqrt(2.0) / B) * sqrt(Float64(Float64(C - B) * F)));
	elseif (B <= -1.95e-72)
		tmp = Float64(Float64(sqrt(Float64(2.0 * Float64(t_2 + Float64(C + A)))) * Float64(B * sqrt(F))) / fma(-4.0, Float64(C * A), Float64(B * B)));
	elseif (B <= 5.6e-145)
		tmp = Float64(Float64(t_3 * Float64(-sqrt(Float64(-2.0 * Float64(4.0 * Float64(F * Float64(C * A))))))) / t_0);
	elseif (B <= 1.56e-114)
		tmp = t_5;
	elseif (B <= 5e-49)
		tmp = Float64(-Float64(sqrt(Float64(-2.0 * Float64(t_1 * Float64(F * Float64(Float64(Float64(Float64(Float64(B * B) * 0.5) / C) - A) - A))))) / t_1));
	elseif (B <= 7.5e+151)
		tmp = t_5;
	else
		tmp = Float64(sqrt(Float64(F / B)) * t_4);
	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[(N[(N[(C * A), $MachinePrecision] * -4.0), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(A + N[(C + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = (-N[Sqrt[2.0], $MachinePrecision])}, Block[{t$95$5 = N[(N[(t$95$3 * N[(N[Sqrt[F], $MachinePrecision] * N[(B * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[B, -2.15e+130], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * N[Sqrt[N[(N[(C - B), $MachinePrecision] * F), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[B, -1.95e-72], N[(N[(N[Sqrt[N[(2.0 * N[(t$95$2 + N[(C + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(B * N[Sqrt[F], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-4.0 * N[(C * A), $MachinePrecision] + N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[B, 5.6e-145], N[(N[(t$95$3 * (-N[Sqrt[N[(-2.0 * N[(4.0 * N[(F * N[(C * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B, 1.56e-114], t$95$5, If[LessEqual[B, 5e-49], (-N[(N[Sqrt[N[(-2.0 * N[(t$95$1 * N[(F * N[(N[(N[(N[(N[(B * B), $MachinePrecision] * 0.5), $MachinePrecision] / C), $MachinePrecision] - A), $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision]), If[LessEqual[B, 7.5e+151], t$95$5, N[(N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision] * t$95$4), $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 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\
t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\
t_2 := \mathsf{hypot}\left(B, A - C\right)\\
t_3 := \sqrt{A + \left(C + t_2\right)}\\
t_4 := -\sqrt{2}\\
t_5 := \frac{t_3 \cdot \left(\sqrt{F} \cdot \left(B \cdot t_4\right)\right)}{t_0}\\
\mathbf{if}\;B \leq -2.15 \cdot 10^{+130}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\

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

\mathbf{elif}\;B \leq 5.6 \cdot 10^{-145}:\\
\;\;\;\;\frac{t_3 \cdot \left(-\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(C \cdot A\right)\right)\right)}\right)}{t_0}\\

\mathbf{elif}\;B \leq 1.56 \cdot 10^{-114}:\\
\;\;\;\;t_5\\

\mathbf{elif}\;B \leq 5 \cdot 10^{-49}:\\
\;\;\;\;-\frac{\sqrt{-2 \cdot \left(t_1 \cdot \left(F \cdot \left(\left(\frac{\left(B \cdot B\right) \cdot 0.5}{C} - A\right) - A\right)\right)\right)}}{t_1}\\

\mathbf{elif}\;B \leq 7.5 \cdot 10^{+151}:\\
\;\;\;\;t_5\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{F}{B}} \cdot t_4\\


\end{array}

Error?

Derivation?

  1. Split input into 6 regimes
  2. if B < -2.14999999999999992e130

    1. Initial program 62.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. Simplified62.2

      \[\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]62.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. Taylor expanded in A around 0 63.8

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

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

      [Start]63.8

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

      *-commutative [=>]63.8

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

      unpow2 [=>]63.8

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

      unpow2 [=>]63.8

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

      *-commutative [=>]63.8

      \[ \frac{-\sqrt{F \cdot \left(C + \sqrt{B \cdot B + C \cdot C}\right)} \cdot \color{blue}{\left(B \cdot \sqrt{2}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Taylor expanded in B around -inf 62.8

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

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

      [Start]62.8

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

      mul-1-neg [=>]62.8

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

      unsub-neg [=>]62.8

      \[ \frac{-\sqrt{F \cdot \color{blue}{\left(C - B\right)}} \cdot \left(B \cdot \sqrt{2}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    7. Applied egg-rr58.1

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

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

      [Start]58.1

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

      +-lft-identity [=>]58.1

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

      *-commutative [=>]58.1

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

      *-commutative [=>]58.1

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

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

    if -2.14999999999999992e130 < B < -1.95e-72

    1. Initial program 44.4

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

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

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

      \[\leadsto \frac{-\color{blue}{\left(-1 \cdot \left(\sqrt{F} \cdot B\right)\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)} \]
    5. Simplified36.9

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

      [Start]36.9

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

      *-commutative [=>]36.9

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

      associate-*l* [=>]36.9

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

      *-commutative [<=]36.9

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

      mul-1-neg [=>]36.9

      \[ \frac{-\left(\sqrt{F} \cdot \color{blue}{\left(-B\right)}\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 -1.95e-72 < B < 5.6000000000000002e-145

    1. Initial program 53.1

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

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

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

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

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

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

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

      \[ \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)} \]
    5. Taylor expanded in B around 0 47.1

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

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

      [Start]47.1

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

      associate-*r* [=>]44.8

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

      *-commutative [=>]44.8

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

    if 5.6000000000000002e-145 < B < 1.5599999999999999e-114 or 4.9999999999999999e-49 < B < 7.49999999999999977e151

    1. Initial program 44.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. Simplified44.7

      \[\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]44.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. Applied egg-rr33.9

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

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

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

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

      \[ \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)} \]
    5. Taylor expanded in B around inf 35.2

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

    if 1.5599999999999999e-114 < B < 4.9999999999999999e-49

    1. Initial program 47.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. Simplified40.7

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

      [Start]47.0

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Taylor expanded in C around -inf 49.8

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

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

      [Start]49.8

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

      associate-*r/ [=>]49.8

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

      unpow2 [=>]49.8

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

    if 7.49999999999999977e151 < B

    1. Initial program 63.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. Simplified63.9

      \[\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]63.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} \]
    3. Taylor expanded in A around 0 63.5

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

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

      [Start]63.5

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

      *-commutative [=>]63.5

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

      unpow2 [=>]63.5

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

      unpow2 [=>]63.5

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

      *-commutative [=>]63.5

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

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)} \]
    6. Simplified32.8

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

      [Start]32.8

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

      mul-1-neg [=>]32.8

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -2.15 \cdot 10^{+130}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq -1.95 \cdot 10^{-72}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\mathsf{hypot}\left(B, A - C\right) + \left(C + A\right)\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-145}:\\ \;\;\;\;\frac{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(C \cdot A\right)\right)\right)}\right)}{\left(C \cdot A\right) \cdot -4 + B \cdot B}\\ \mathbf{elif}\;B \leq 1.56 \cdot 10^{-114}:\\ \;\;\;\;\frac{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\sqrt{F} \cdot \left(B \cdot \left(-\sqrt{2}\right)\right)\right)}{\left(C \cdot A\right) \cdot -4 + B \cdot B}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-49}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(\left(\frac{\left(B \cdot B\right) \cdot 0.5}{C} - A\right) - A\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 7.5 \cdot 10^{+151}:\\ \;\;\;\;\frac{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(\sqrt{F} \cdot \left(B \cdot \left(-\sqrt{2}\right)\right)\right)}{\left(C \cdot A\right) \cdot -4 + B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error39.5
Cost27864
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_2 := \mathsf{hypot}\left(B, A - C\right)\\ t_3 := \frac{\left(\sqrt{F} \cdot \left(-B\right)\right) \cdot \sqrt{2 \cdot \left(t_2 + \left(C + A\right)\right)}}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ t_4 := \sqrt{A + \left(C + t_2\right)}\\ \mathbf{if}\;B \leq -6.2 \cdot 10^{+117}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq -6 \cdot 10^{-65}:\\ \;\;\;\;\frac{t_4 \cdot \left(-\sqrt{2 \cdot \left(B \cdot \left(B \cdot F\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-145}:\\ \;\;\;\;\frac{t_4 \cdot \left(-\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(C \cdot A\right)\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-115}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-48}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(t_1 \cdot \left(F \cdot \left(\left(\frac{\left(B \cdot B\right) \cdot 0.5}{C} - A\right) - A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+154}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 2
Error38.8
Cost27864
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \mathsf{hypot}\left(B, A - C\right)\\ t_2 := \sqrt{2 \cdot \left(t_1 + \left(C + A\right)\right)}\\ t_3 := \mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)\\ t_4 := \frac{\left(\sqrt{F} \cdot \left(-B\right)\right) \cdot t_2}{t_3}\\ \mathbf{if}\;B \leq -2.15 \cdot 10^{+130}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-73}:\\ \;\;\;\;\frac{t_2 \cdot \left(B \cdot \sqrt{F}\right)}{t_3}\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-145}:\\ \;\;\;\;\frac{\sqrt{A + \left(C + t_1\right)} \cdot \left(-\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(C \cdot A\right)\right)\right)}\right)}{\left(C \cdot A\right) \cdot -4 + B \cdot B}\\ \mathbf{elif}\;B \leq 8 \cdot 10^{-115}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq 4.6 \cdot 10^{-49}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(t_0 \cdot \left(F \cdot \left(\left(\frac{\left(B \cdot B\right) \cdot 0.5}{C} - A\right) - A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 3.7 \cdot 10^{+153}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 3
Error36.8
Cost27848
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4\\ \mathbf{if}\;B \leq -6.5 \cdot 10^{+117}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_0\right)\right)}\right)}{t_0 + B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 4
Error40.5
Cost21452
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ t_1 := \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\\ \mathbf{if}\;B \leq -9 \cdot 10^{+117}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq -6.5 \cdot 10^{-65}:\\ \;\;\;\;\frac{t_1 \cdot \left(-\sqrt{2 \cdot \left(B \cdot \left(B \cdot F\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-140}:\\ \;\;\;\;\frac{t_1 \cdot \left(-\sqrt{-2 \cdot \left(4 \cdot \left(F \cdot \left(C \cdot A\right)\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-42}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(\left(C \cdot A\right) \cdot 4 - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 5
Error45.1
Cost15184
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4\\ t_1 := t_0 + B \cdot B\\ \mathbf{if}\;B \leq -2.75 \cdot 10^{+108}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-67}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(B \cdot \left(B \cdot F\right)\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 2.45 \cdot 10^{-126}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{-48}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(\left(t_0 + {B}^{2}\right) \cdot \left(C + 2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 6
Error45.1
Cost15184
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4\\ t_1 := t_0 + B \cdot B\\ \mathbf{if}\;B \leq -1.85 \cdot 10^{+108}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{-63}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(B \cdot \left(B \cdot F\right)\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 2.22 \cdot 10^{-125}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \mathsf{fma}\left(-8, A \cdot \left(F \cdot \left(C \cdot C\right)\right), 4 \cdot \left(\left(B \cdot B\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-47}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(F \cdot \left(\left(t_0 + {B}^{2}\right) \cdot \left(C + 2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 7
Error41.5
Cost15176
\[\begin{array}{l} \mathbf{if}\;B \leq -3.7 \cdot 10^{+109}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq 1.42 \cdot 10^{-42}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(\left(C \cdot A\right) \cdot 4 - B \cdot B\right)\right)\right)}}{\left(C \cdot A\right) \cdot -4 + B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 8
Error45.1
Cost14792
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ \mathbf{if}\;B \leq -1.5 \cdot 10^{+108}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq -6.5 \cdot 10^{-65}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(B \cdot \left(B \cdot F\right)\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 3.65 \cdot 10^{-125}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-45}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A - C\right) + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 9
Error45.6
Cost13508
\[\begin{array}{l} \mathbf{if}\;B \leq -7 \cdot 10^{-99}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{\left(C - B\right) \cdot F}\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-145}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(C + \left(C + A\right)\right) \cdot \left(F \cdot \left(\left(C \cdot A\right) \cdot 4 - B \cdot B\right)\right)\right)}}{\left(C \cdot A\right) \cdot -4 + B \cdot B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 10
Error50.4
Cost13448
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ \mathbf{if}\;B \leq -5 \cdot 10^{-71}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(C + A\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(C + \left(C + A\right)\right) \cdot \left(F \cdot \left(\left(C \cdot A\right) \cdot 4 - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 11
Error53.6
Cost8976
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -5.2 \cdot 10^{-129}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -7.5 \cdot 10^{-280}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(\left(C + A\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-141}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(C + \left(C + A\right)\right) \cdot \left(F \cdot \left(\left(C \cdot A\right) \cdot 4 - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 8.5 \cdot 10^{-37}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A - C\right) + \left(C + A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 12
Error53.6
Cost8976
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -1.85 \cdot 10^{-127}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -3.1 \cdot 10^{-279}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(\left(C + A\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 2.4 \cdot 10^{-141}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(\left(C + A\right) + \left(C - A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{-34}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A - C\right) + \left(C + A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 13
Error53.7
Cost8848
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -1.66 \cdot 10^{-127}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -4.8 \cdot 10^{-279}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(\left(C + A\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 3.2 \cdot 10^{-141}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(C + \left(C + A\right)\right) \cdot \left(F \cdot \left(\left(C \cdot A\right) \cdot 4 - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 6.2 \cdot 10^{-46}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 14
Error53.9
Cost8584
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -1.85 \cdot 10^{-171}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 7 \cdot 10^{-47}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 15
Error53.4
Cost8584
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ \mathbf{if}\;A \leq -7 \cdot 10^{-169}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 4.3 \cdot 10^{-37}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(C + \left(C + A\right)\right) \cdot \left(F \cdot \left(\left(C \cdot A\right) \cdot 4 - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 16
Error54.9
Cost8452
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ \mathbf{if}\;A \leq 3.5 \cdot 10^{-37}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 17
Error55.8
Cost8200
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ \mathbf{if}\;C \leq -2.7 \cdot 10^{-301}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{elif}\;C \leq 4.5 \cdot 10^{-172}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(B \cdot \left(B \cdot F\right)\right) \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \end{array} \]
Alternative 18
Error55.9
Cost8196
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ \mathbf{if}\;A \leq 4.2 \cdot 10^{-8}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(A + \left(C + A\right)\right) \cdot \left(4 \cdot \left(F \cdot \left(C \cdot A\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 19
Error58.3
Cost8072
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ \mathbf{if}\;C \leq -3.25 \cdot 10^{-301}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{elif}\;C \leq 4.2 \cdot 10^{-173}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(-4 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 20
Error55.8
Cost8072
\[\begin{array}{l} t_0 := \left(C \cdot A\right) \cdot -4 + B \cdot B\\ \mathbf{if}\;C \leq -4.6 \cdot 10^{-301}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{elif}\;C \leq 5.9 \cdot 10^{-173}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -8\right)\right)}}{t_0}\\ \end{array} \]
Alternative 21
Error58.6
Cost7808
\[-\frac{\sqrt{-2 \cdot \left(\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot 8\right)}}{\left(C \cdot A\right) \cdot -4 + B \cdot B} \]
Alternative 22
Error62.0
Cost6848
\[\sqrt{F \cdot A} \cdot \frac{2}{B} \]

Error

Reproduce?

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