?

Average Error: 52.3 → 43.9
Time: 36.9s
Precision: binary64
Cost: 34120

?

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

\mathbf{elif}\;C \leq 7.2 \cdot 10^{+53}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(A + \left(C - t_1\right)\right)} \cdot \left(-\sqrt{2 \cdot t_0}\right)}{t_0}\\

\mathbf{else}:\\
\;\;\;\;-\frac{\sqrt{t_0 \cdot \left(\left(A + \left(A + 0.5 \cdot \frac{\left({\left(-A\right)}^{2} - A \cdot A\right) - B \cdot B}{C}\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_0}\\


\end{array}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if C < 8.4999999999999997e-288

    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. Simplified44.6

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

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

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

      [Start]44.5

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

      distribute-lft-out [=>]44.5

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

      *-commutative [=>]44.5

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

      *-commutative [=>]44.5

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

    if 8.4999999999999997e-288 < C < 7.2e53

    1. Initial program 49.6

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

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

      [Start]49.6

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

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

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

      [Start]42.0

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

      *-commutative [=>]42.0

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

      *-commutative [=>]42.0

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

    if 7.2e53 < C

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

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

      [Start]62.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 C around inf 44.7

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

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

      [Start]44.7

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

      associate--l+ [=>]44.7

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

      unpow2 [=>]44.7

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

      unpow2 [=>]44.7

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

      mul-1-neg [=>]44.7

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;C \leq 8.5 \cdot 10^{-288}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\right) \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;C \leq 7.2 \cdot 10^{+53}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(\left(A + \left(A + 0.5 \cdot \frac{\left({\left(-A\right)}^{2} - A \cdot A\right) - B \cdot B}{C}\right)\right) \cdot \left(2 \cdot F\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error44.9
Cost28292
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;C \leq 2.15 \cdot 10^{-23}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(\left(A + \left(A + 0.5 \cdot \frac{\left({\left(-A\right)}^{2} - A \cdot A\right) - B \cdot B}{C}\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_0}\\ \end{array} \]
Alternative 2
Error46.0
Cost27588
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;C \leq 2.25 \cdot 10^{-23}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(F \cdot \left(A \cdot 4\right)\right)}}{t_0}\\ \end{array} \]
Alternative 3
Error46.7
Cost21572
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;C \leq 1.2 \cdot 10^{-68}:\\ \;\;\;\;\sqrt{-2 \cdot \left(\left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right) \cdot \left(F \cdot \left(C \cdot \left(A \cdot 4\right)\right) - F \cdot \left(B \cdot B\right)\right)\right)} \cdot \frac{1}{-t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(F \cdot \left(A \cdot 4\right)\right)}}{t_0}\\ \end{array} \]
Alternative 4
Error49.5
Cost21136
\[\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(t_1 \cdot \left(A + \left(C - \sqrt{B \cdot B + A \cdot A}\right)\right)\right)}}{t_0}\\ t_3 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;C \leq -88000000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(A - C\right) - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(C \cdot A\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq -4.5 \cdot 10^{-294}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;C \leq 6.2 \cdot 10^{-248}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 3.3 \cdot 10^{-69}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{t_3 \cdot \left(F \cdot \left(A \cdot 4\right)\right)}}{t_3}\\ \end{array} \]
Alternative 5
Error49.1
Cost21136
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_2 := F \cdot t_0\\ t_3 := \frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C - \sqrt{B \cdot B + A \cdot A}\right)\right)\right)}}{t_0}\\ \mathbf{if}\;C \leq -6.8 \cdot 10^{-58}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(C + C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;C \leq -4.5 \cdot 10^{-294}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;C \leq 1.45 \cdot 10^{-248}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 1.65 \cdot 10^{-69}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{t_1 \cdot \left(F \cdot \left(A \cdot 4\right)\right)}}{t_1}\\ \end{array} \]
Alternative 6
Error50.2
Cost15632
\[\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(t_1 \cdot \left(A + \left(C - \sqrt{B \cdot B + A \cdot A}\right)\right)\right)}}{t_0}\\ \mathbf{if}\;C \leq -13000000000000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(A - C\right) - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(C \cdot A\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq -4.5 \cdot 10^{-294}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;C \leq 1.02 \cdot 10^{-247}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 3.6 \cdot 10^{-83}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \cdot \sqrt{2 \cdot \left(-4 \cdot \left(A \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)\right)\right)}\\ \end{array} \]
Alternative 7
Error53.6
Cost14612
\[\begin{array}{l} t_0 := F \cdot \left(4 \cdot \left(C \cdot A\right) - B \cdot B\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_2 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_3 := F \cdot t_2\\ \mathbf{if}\;C \leq -1750000000000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(A - C\right) - C\right) - A\right) \cdot t_0\right)}}{t_2}\\ \mathbf{elif}\;C \leq -7.5 \cdot 10^{-86}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(A + \left(C + A\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;C \leq -3.2 \cdot 10^{-122}:\\ \;\;\;\;\frac{-\sqrt{A \cdot \left(\left(C \cdot \left(C \cdot F\right)\right) \cdot -16\right)}}{t_1}\\ \mathbf{elif}\;C \leq -7.2 \cdot 10^{-293}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(A - \left(B - C\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;C \leq 4.5 \cdot 10^{-100}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(C - A\right) - C\right) - A\right) \cdot t_0\right)}}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(\left(A \cdot A\right) \cdot -16\right) \cdot \left(C \cdot F\right)}}{t_1}\\ \end{array} \]
Alternative 8
Error52.0
Cost14472
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;A \leq -9 \cdot 10^{-13}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(C - A\right) - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(C \cdot A\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.85 \cdot 10^{-114}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(4 \cdot \left(\left(F \cdot \left(C + C\right)\right) \cdot \left(C \cdot A\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \end{array} \]
Alternative 9
Error52.5
Cost14216
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;A \leq -3.3 \cdot 10^{-14}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(C - A\right) - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(C \cdot A\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 8.5 \cdot 10^{-116}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{A \cdot \left(\left(C \cdot \left(C \cdot F\right)\right) \cdot -16\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \end{array} \]
Alternative 10
Error55.2
Cost9220
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;A \leq -8.8 \cdot 10^{-65}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(C - A\right) - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(C \cdot A\right) - 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 + \left(\left(C - A\right) + -0.5 \cdot \frac{B \cdot B}{A - C}\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 11
Error55.1
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -5 \cdot 10^{-102}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 9.6 \cdot 10^{-42}:\\ \;\;\;\;\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(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 12
Error55.5
Cost8580
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;A \leq -1.95 \cdot 10^{-53}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C + A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(A - C\right) - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(C \cdot A\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 13
Error55.2
Cost8580
\[\begin{array}{l} t_0 := F \cdot \left(4 \cdot \left(C \cdot A\right) - B \cdot B\right)\\ t_1 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \mathbf{if}\;A \leq -1 \cdot 10^{-66}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(C - A\right) - C\right) - A\right) \cdot t_0\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(A - C\right) - C\right) - A\right) \cdot t_0\right)}}{t_1}\\ \end{array} \]
Alternative 14
Error56.7
Cost8452
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq 1.55 \cdot 10^{-42}:\\ \;\;\;\;\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(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 15
Error55.8
Cost8452
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -1.4 \cdot 10^{-6}:\\ \;\;\;\;\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(A + \left(C + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 16
Error59.3
Cost8320
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(C \cdot A\right)\\ \frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0} \end{array} \]
Alternative 17
Error61.9
Cost7808
\[\frac{-\sqrt{\left(4 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right) \cdot -2}}{B \cdot B + -4 \cdot \left(C \cdot A\right)} \]
Alternative 18
Error61.6
Cost7808
\[\frac{-\sqrt{2 \cdot \left(A \cdot \left(-4 \cdot \left(C \cdot \left(C \cdot F\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)} \]
Alternative 19
Error62.6
Cost7680
\[\frac{-\sqrt{2 \cdot \left(C \cdot \left(B \cdot \left(F \cdot B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)} \]
Alternative 20
Error62.6
Cost7680
\[\frac{-\sqrt{2 \cdot \left(C \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(C \cdot A\right)} \]
Alternative 21
Error62.6
Cost7616
\[\frac{\sqrt{2 \cdot \left(B \cdot \left(B \cdot \left(C \cdot F\right)\right)\right)}}{A \cdot \left(C \cdot 4\right) - B \cdot B} \]
Alternative 22
Error62.4
Cost6656
\[-\sqrt{\frac{F}{A}} \]

Error

Reproduce?

herbie shell --seed 2023073 
(FPCore (A B C F)
  :name "ABCF->ab-angle b"
  :precision binary64
  (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))