?

Average Error: 51.9 → 40.4
Time: 1.0min
Precision: binary64
Cost: 40784

?

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

\mathbf{elif}\;C \leq -2.4 \cdot 10^{-293}:\\
\;\;\;\;t_3\\

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

\mathbf{elif}\;C \leq 3.4 \cdot 10^{-63}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_4 \cdot t_2\\


\end{array}

Error?

Derivation?

  1. Split input into 4 regimes
  2. if C < -5.2e21

    1. Initial program 62.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. Simplified58.5

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

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

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

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

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

      \[ \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 -5.2e21 < C < -2.3999999999999999e-293 or 2.4000000000000002e-214 < C < 3.39999999999999998e-63

    1. Initial program 47.5

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

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

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

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

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

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

      [Start]40.1

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

      /-rgt-identity [=>]40.1

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

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

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

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

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

    if -2.3999999999999999e-293 < C < 2.4000000000000002e-214

    1. Initial program 49.5

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

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Applied egg-rr41.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 A around -inf 54.3

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

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

      [Start]54.3

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

      fma-def [=>]54.3

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

      unpow2 [=>]54.3

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

    if 3.39999999999999998e-63 < C

    1. Initial program 50.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. Simplified45.2

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

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

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

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

      [Start]36.8

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

      /-rgt-identity [=>]36.8

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

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

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

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

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

Alternatives

Alternative 1
Error43.8
Cost34580
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := -4 \cdot \left(C \cdot A\right)\\ t_2 := \mathsf{hypot}\left(B, A - C\right)\\ t_3 := A + \left(C + t_2\right)\\ t_4 := \mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)\\ t_5 := F \cdot \mathsf{fma}\left(B, B, t_1\right)\\ \mathbf{if}\;A \leq -2.2 \cdot 10^{+105}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{t_4}\\ \mathbf{elif}\;A \leq -38000000000:\\ \;\;\;\;\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}\;A \leq -8 \cdot 10^{-76}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot t_5\right)}}{t_0}\\ \mathbf{elif}\;A \leq -3 \cdot 10^{-88}:\\ \;\;\;\;{\left(\frac{t_4}{\sqrt{F} \cdot \left(B \cdot \sqrt{2 \cdot \left(t_2 + \left(C + A\right)\right)}\right)}\right)}^{-1}\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{-83}:\\ \;\;\;\;\sqrt{F \cdot t_4} \cdot \left(\sqrt{2 \cdot t_3} \cdot \frac{-1}{t_4}\right)\\ \mathbf{elif}\;A \leq 4 \cdot 10^{+47}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(A + \frac{-0.5 \cdot \left(B \cdot B\right)}{C}\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{t_3} \cdot \left(-\sqrt{2 \cdot t_5}\right)}{B \cdot B + t_1}\\ \end{array} \]
Alternative 2
Error43.7
Cost34384
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := -4 \cdot \left(C \cdot A\right)\\ t_2 := A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\\ t_3 := \mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)\\ t_4 := F \cdot \mathsf{fma}\left(B, B, t_1\right)\\ \mathbf{if}\;A \leq -2.15 \cdot 10^{+108}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{t_3}\\ \mathbf{elif}\;A \leq -1800000000:\\ \;\;\;\;\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}\;A \leq -9.6 \cdot 10^{-88}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot t_4\right)}}{t_0}\\ \mathbf{elif}\;A \leq 4.5 \cdot 10^{-82}:\\ \;\;\;\;\sqrt{2 \cdot t_2} \cdot \frac{\sqrt{F \cdot t_3}}{-t_3}\\ \mathbf{elif}\;A \leq 1.8 \cdot 10^{+48}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(A + \frac{-0.5 \cdot \left(B \cdot B\right)}{C}\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{t_2} \cdot \left(-\sqrt{2 \cdot t_4}\right)}{B \cdot B + t_1}\\ \end{array} \]
Alternative 3
Error43.7
Cost28245
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := -4 \cdot \left(C \cdot A\right)\\ t_2 := F \cdot \mathsf{fma}\left(B, B, t_1\right)\\ \mathbf{if}\;A \leq -1.3 \cdot 10^{+105}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \mathbf{elif}\;A \leq -1300000000:\\ \;\;\;\;\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}\;A \leq -1.35 \cdot 10^{-87}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot t_2\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.6 \cdot 10^{-82} \lor \neg \left(A \leq 3.9 \cdot 10^{+47}\right):\\ \;\;\;\;\frac{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\sqrt{2 \cdot t_2}\right)}{B \cdot B + t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(A + \frac{-0.5 \cdot \left(B \cdot B\right)}{C}\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 4
Error45.0
Cost27984
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := -4 \cdot \left(C \cdot A\right)\\ t_2 := F \cdot \mathsf{fma}\left(B, B, t_1\right)\\ \mathbf{if}\;A \leq -4 \cdot 10^{+108}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \mathbf{elif}\;A \leq -400000000:\\ \;\;\;\;\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}\;A \leq -1.7 \cdot 10^{-87}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot t_2\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{-91}:\\ \;\;\;\;\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}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot t_2} \cdot \sqrt{A + A}}{B \cdot B + t_1}\\ \end{array} \]
Alternative 5
Error46.0
Cost27856
\[\begin{array}{l} t_0 := -4 \cdot \left(C \cdot A\right)\\ t_1 := B \cdot B + t_0\\ t_2 := \mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)\\ t_3 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_4 := -\frac{\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{if}\;C \leq -5.2 \cdot 10^{+21}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(F \cdot \left(A + \left(A + \frac{-0.5 \cdot \left(B \cdot B\right)}{C}\right)\right)\right)\right)}}{t_3}\\ \mathbf{elif}\;C \leq 3.1 \cdot 10^{-307}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;C \leq 1.35 \cdot 10^{-49}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{t_2}\\ \mathbf{elif}\;C \leq 2.8 \cdot 10^{+23}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{t_2} \cdot \left(-\sqrt{F \cdot t_0}\right)\\ \end{array} \]
Alternative 6
Error46.0
Cost27856
\[\begin{array}{l} t_0 := -4 \cdot \left(C \cdot A\right)\\ t_1 := \mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)\\ t_2 := \mathsf{hypot}\left(B, A - C\right)\\ t_3 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_4 := B \cdot B + t_0\\ \mathbf{if}\;C \leq -5.2 \cdot 10^{+21}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(F \cdot \left(A + \left(A + \frac{-0.5 \cdot \left(B \cdot B\right)}{C}\right)\right)\right)\right)}}{t_3}\\ \mathbf{elif}\;C \leq 7.5 \cdot 10^{-307}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(F \cdot \left(A + \left(C + t_2\right)\right)\right)\right)}}{t_3}\\ \mathbf{elif}\;C \leq 1.05 \cdot 10^{-45}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{t_1}\\ \mathbf{elif}\;C \leq 4.2 \cdot 10^{+21}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_4\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_4}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + t_2\right)\right)}}{t_1} \cdot \left(-\sqrt{F \cdot t_0}\right)\\ \end{array} \]
Alternative 7
Error46.3
Cost27856
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := C + \left(A + t_0\right)\\ t_2 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_3 := \mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)\\ t_4 := -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;C \leq -7.4 \cdot 10^{+21}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(A + \left(A + \frac{-0.5 \cdot \left(B \cdot B\right)}{C}\right)\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;C \leq 3.8 \cdot 10^{-307}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(t_2 \cdot F\right)\right)}}{-t_2}\\ \mathbf{elif}\;C \leq 3 \cdot 10^{-216}:\\ \;\;\;\;\frac{\sqrt{F \cdot t_3} \cdot \left(-\sqrt{2 \cdot \left(C \cdot 2\right)}\right)}{t_3}\\ \mathbf{elif}\;C \leq 9.5 \cdot 10^{-50}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(t_0 + \left(C + A\right)\right)}}{\frac{\mathsf{fma}\left(B, B, t_4\right)}{B \cdot \sqrt{F}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot t_1}}{t_3} \cdot \left(-\sqrt{F \cdot t_4}\right)\\ \end{array} \]
Alternative 8
Error45.6
Cost27665
\[\begin{array}{l} t_0 := -4 \cdot \left(C \cdot A\right)\\ t_1 := B \cdot B + t_0\\ t_2 := \mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)\\ t_3 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;C \leq -2.2 \cdot 10^{+22}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(F \cdot \left(A + \left(A + \frac{-0.5 \cdot \left(B \cdot B\right)}{C}\right)\right)\right)\right)}}{t_3}\\ \mathbf{elif}\;C \leq 7.5 \cdot 10^{-307}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;C \leq 1.06 \cdot 10^{-215} \lor \neg \left(C \leq 2.1 \cdot 10^{-70}\right):\\ \;\;\;\;\frac{\sqrt{F \cdot t_2} \cdot \left(-\sqrt{2 \cdot \left(C \cdot 2\right)}\right)}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\mathsf{hypot}\left(B, A - C\right) + \left(C + A\right)\right)}}{\frac{\mathsf{fma}\left(B, B, t_0\right)}{B \cdot \sqrt{F}}}\\ \end{array} \]
Alternative 9
Error47.2
Cost21584
\[\begin{array}{l} t_0 := -4 \cdot \left(C \cdot A\right)\\ t_1 := B \cdot B + t_0\\ t_2 := -\frac{\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{if}\;C \leq -5.2 \cdot 10^{+21}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_0\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;C \leq 6.4 \cdot 10^{-307}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;C \leq 1.55 \cdot 10^{-45}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \mathbf{elif}\;C \leq 1.35 \cdot 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\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)}{t_1}\\ \end{array} \]
Alternative 10
Error46.1
Cost21584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_2 := -\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{if}\;C \leq -6.8 \cdot 10^{+21}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + \left(A + \frac{-0.5 \cdot \left(B \cdot B\right)}{C}\right)\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;C \leq 7.5 \cdot 10^{-307}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;C \leq 1.15 \cdot 10^{-48}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \mathbf{elif}\;C \leq 3.6 \cdot 10^{+24}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\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)}{t_0}\\ \end{array} \]
Alternative 11
Error46.1
Cost21520
\[\begin{array}{l} t_0 := -4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot \mathsf{fma}\left(B, B, t_0\right)\\ t_2 := B \cdot B + t_0\\ t_3 := -\frac{\sqrt{2 \cdot \left(\left(F \cdot t_2\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_2}\\ \mathbf{if}\;C \leq -5.8 \cdot 10^{+21}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot t_1\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;C \leq 6 \cdot 10^{-307}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;C \leq 1.05 \cdot 10^{-46}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \mathbf{elif}\;C \leq 1.85 \cdot 10^{+95}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2 \cdot t_1} \cdot \left(-\sqrt{A + C \cdot 2}\right)}{t_2}\\ \end{array} \]
Alternative 12
Error44.9
Cost21128
\[\begin{array}{l} t_0 := -4 \cdot \left(C \cdot A\right)\\ t_1 := B \cdot B + t_0\\ \mathbf{if}\;A \leq -6.3 \cdot 10^{-96}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{-91}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_0\right)\right)} \cdot \sqrt{A + A}}{t_1}\\ \end{array} \]
Alternative 13
Error47.7
Cost20868
\[\begin{array}{l} t_0 := -4 \cdot \left(C \cdot A\right)\\ t_1 := B \cdot B + t_0\\ \mathbf{if}\;C \leq -6.8 \cdot 10^{+21}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_0\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;C \leq 7.5 \cdot 10^{-307} \lor \neg \left(C \leq 6 \cdot 10^{-49}\right):\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \end{array} \]
Alternative 14
Error47.6
Cost20621
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;C \leq -1.42 \cdot 10^{+22}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{elif}\;C \leq 7.5 \cdot 10^{-307} \lor \neg \left(C \leq 5.8 \cdot 10^{-48}\right):\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot \left(-\sqrt{A \cdot -16}\right)\right)}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \end{array} \]
Alternative 15
Error47.8
Cost20356
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;A \leq -1.36 \cdot 10^{-95}:\\ \;\;\;\;\frac{\sqrt{A \cdot -16}}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)} \cdot \left(\sqrt{F} \cdot \left(-C\right)\right)\\ \mathbf{elif}\;A \leq 3.1 \cdot 10^{-89}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \end{array} \]
Alternative 16
Error45.5
Cost15044
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;C \leq -5.2 \cdot 10^{+21}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(C + A\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 17
Error51.3
Cost14925
\[\begin{array}{l} \mathbf{if}\;A \leq -1.25 \cdot 10^{+25}:\\ \;\;\;\;-\frac{\sqrt{F \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot C\right)\right)\right)}}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ \mathbf{elif}\;A \leq -1.6 \cdot 10^{-87} \lor \neg \left(A \leq 1.7 \cdot 10^{-105}\right):\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{\left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(2 \cdot \left(B \cdot \left(B \cdot F\right)\right)\right)}}{B \cdot B + -4 \cdot \left(C \cdot A\right)}\\ \end{array} \]
Alternative 18
Error53.2
Cost14348
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ t_2 := \frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{\mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)}\\ t_3 := \frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \mathbf{if}\;A \leq -2.5 \cdot 10^{+45}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq -2 \cdot 10^{-55}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq -3.5 \cdot 10^{-92}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq -4 \cdot 10^{-130}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(\left(C + A\right) + \left(-0.5 \cdot \frac{A \cdot A}{B} - B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.95 \cdot 10^{-156}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 2.95 \cdot 10^{+54}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 19
Error53.1
Cost14348
\[\begin{array}{l} t_0 := \mathsf{fma}\left(-4, C \cdot A, B \cdot B\right)\\ t_1 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_2 := F \cdot t_1\\ t_3 := \frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_1}\\ \mathbf{if}\;A \leq -2.3 \cdot 10^{+47}:\\ \;\;\;\;-\frac{\sqrt{F \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -2.1 \cdot 10^{-55}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq -4 \cdot 10^{-93}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq -1.65 \cdot 10^{-134}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(\left(C + A\right) + \left(-0.5 \cdot \frac{A \cdot A}{B} - B\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq 2.1 \cdot 10^{-156}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(B + \left(C + A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq 6.1 \cdot 10^{+54}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_1}\\ \end{array} \]
Alternative 20
Error51.7
Cost14340
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;C \leq -2.8 \cdot 10^{-86}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right) \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{elif}\;C \leq -2 \cdot 10^{-216}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 4600000:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(C + A\right) + \left(C - A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 21
Error54.9
Cost8716
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ t_2 := \frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \mathbf{if}\;A \leq -1.85 \cdot 10^{-130}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{-157}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 2.95 \cdot 10^{+51}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 22
Error52.8
Cost8712
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;C \leq -60:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 4600000:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(C + A\right) + \left(C - A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 23
Error52.7
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;C \leq -1160:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 4.1 \cdot 10^{-20}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(C + A\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 24
Error55.3
Cost8452
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;C \leq -61:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\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 25
Error56.5
Cost8196
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;C \leq -60:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-4 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C + 2 \cdot A\right)\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 26
Error56.3
Cost8196
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;C \leq -560:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\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 27
Error58.0
Cost7808
\[\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)\right)}}{B \cdot B + -4 \cdot \left(C \cdot A\right)} \]
Alternative 28
Error61.3
Cost6976
\[-2 \cdot \sqrt{F \cdot \frac{A}{B \cdot B}} \]
Alternative 29
Error62.0
Cost6848
\[-2 \cdot \frac{\sqrt{A \cdot F}}{B} \]
Alternative 30
Error62.1
Cost6848
\[2 \cdot \frac{\sqrt{A \cdot F}}{B} \]

Error

Reproduce?

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