Average Error: 52.4 → 44.0
Time: 1.1min
Precision: binary64
Cost: 63496
\[\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(B \cdot B + C \cdot C\right) - {\left(-C\right)}^{2}\\ t_1 := \left(C - \left(-C\right)\right) \cdot F\\ \mathbf{if}\;A \leq -5.5 \cdot 10^{+54}:\\ \;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \mathbf{elif}\;A \leq 2.6 \cdot 10^{+48}:\\ \;\;\;\;\frac{-\sqrt{\left(\left(F + F\right) \cdot \left(C \cdot \left(-4 \cdot A\right)\right) + \left(F + F\right) \cdot \left(B \cdot B\right)\right) \cdot \left(C - \left(\mathsf{hypot}\left(A - C, B\right) - A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(2, t_0 \cdot \left(C \cdot F\right), \left(B \cdot B\right) \cdot t_1\right), \mathsf{fma}\left(2, \frac{\mathsf{fma}\left(-0.5, \left(B \cdot B\right) \cdot \left(t_0 \cdot F\right), 2 \cdot \left(t_0 \cdot \left(\left(C \cdot C\right) \cdot F\right)\right)\right)}{A}, \left(-8 \cdot A\right) \cdot \left(t_1 \cdot C\right)\right)\right)}}{\mathsf{fma}\left(4, A \cdot C, -B \cdot B\right)}\\ \end{array} \]
(FPCore (A B C F)
 :precision binary64
 (/
  (-
   (sqrt
    (*
     (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F))
     (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
  (- (pow B 2.0) (* (* 4.0 A) C))))
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (+ (* B B) (* C C)) (pow (- C) 2.0))) (t_1 (* (- C (- C)) F)))
   (if (<= A -5.5e+54)
     (* (- (sqrt (* -16.0 (* C F)))) (/ 0.25 C))
     (if (<= A 2.6e+48)
       (/
        (-
         (sqrt
          (*
           (+ (* (+ F F) (* C (* -4.0 A))) (* (+ F F) (* B B)))
           (- C (- (hypot (- A C) B) A)))))
        (- (* B B) (* 4.0 (* A C))))
       (/
        (sqrt
         (fma
          2.0
          (fma 2.0 (* t_0 (* C F)) (* (* B B) t_1))
          (fma
           2.0
           (/ (fma -0.5 (* (* B B) (* t_0 F)) (* 2.0 (* t_0 (* (* C C) F)))) A)
           (* (* -8.0 A) (* t_1 C)))))
        (fma 4.0 (* A C) (- (* B B))))))))
double code(double A, double B, double C, double F) {
	return -sqrt(((2.0 * ((pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / (pow(B, 2.0) - ((4.0 * A) * C));
}
double code(double A, double B, double C, double F) {
	double t_0 = ((B * B) + (C * C)) - pow(-C, 2.0);
	double t_1 = (C - -C) * F;
	double tmp;
	if (A <= -5.5e+54) {
		tmp = -sqrt((-16.0 * (C * F))) * (0.25 / C);
	} else if (A <= 2.6e+48) {
		tmp = -sqrt(((((F + F) * (C * (-4.0 * A))) + ((F + F) * (B * B))) * (C - (hypot((A - C), B) - A)))) / ((B * B) - (4.0 * (A * C)));
	} else {
		tmp = sqrt(fma(2.0, fma(2.0, (t_0 * (C * F)), ((B * B) * t_1)), fma(2.0, (fma(-0.5, ((B * B) * (t_0 * F)), (2.0 * (t_0 * ((C * C) * F)))) / A), ((-8.0 * A) * (t_1 * C))))) / fma(4.0, (A * C), -(B * B));
	}
	return tmp;
}
function code(A, B, C, F)
	return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)))
end
function code(A, B, C, F)
	t_0 = Float64(Float64(Float64(B * B) + Float64(C * C)) - (Float64(-C) ^ 2.0))
	t_1 = Float64(Float64(C - Float64(-C)) * F)
	tmp = 0.0
	if (A <= -5.5e+54)
		tmp = Float64(Float64(-sqrt(Float64(-16.0 * Float64(C * F)))) * Float64(0.25 / C));
	elseif (A <= 2.6e+48)
		tmp = Float64(Float64(-sqrt(Float64(Float64(Float64(Float64(F + F) * Float64(C * Float64(-4.0 * A))) + Float64(Float64(F + F) * Float64(B * B))) * Float64(C - Float64(hypot(Float64(A - C), B) - A))))) / Float64(Float64(B * B) - Float64(4.0 * Float64(A * C))));
	else
		tmp = Float64(sqrt(fma(2.0, fma(2.0, Float64(t_0 * Float64(C * F)), Float64(Float64(B * B) * t_1)), fma(2.0, Float64(fma(-0.5, Float64(Float64(B * B) * Float64(t_0 * F)), Float64(2.0 * Float64(t_0 * Float64(Float64(C * C) * F)))) / A), Float64(Float64(-8.0 * A) * Float64(t_1 * C))))) / fma(4.0, Float64(A * C), Float64(-Float64(B * B))));
	end
	return tmp
end
code[A_, B_, C_, F_] := N[((-N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[(N[(B * B), $MachinePrecision] + N[(C * C), $MachinePrecision]), $MachinePrecision] - N[Power[(-C), 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(C - (-C)), $MachinePrecision] * F), $MachinePrecision]}, If[LessEqual[A, -5.5e+54], N[((-N[Sqrt[N[(-16.0 * N[(C * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * N[(0.25 / C), $MachinePrecision]), $MachinePrecision], If[LessEqual[A, 2.6e+48], N[((-N[Sqrt[N[(N[(N[(N[(F + F), $MachinePrecision] * N[(C * N[(-4.0 * A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F + F), $MachinePrecision] * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(C - N[(N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B ^ 2], $MachinePrecision] - A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(2.0 * N[(t$95$0 * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(N[(B * B), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(-0.5 * N[(N[(B * B), $MachinePrecision] * N[(t$95$0 * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$0 * N[(N[(C * C), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / A), $MachinePrecision] + N[(N[(-8.0 * A), $MachinePrecision] * N[(t$95$1 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(4.0 * N[(A * C), $MachinePrecision] + (-N[(B * B), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]
\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\begin{array}{l}
t_0 := \left(B \cdot B + C \cdot C\right) - {\left(-C\right)}^{2}\\
t_1 := \left(C - \left(-C\right)\right) \cdot F\\
\mathbf{if}\;A \leq -5.5 \cdot 10^{+54}:\\
\;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\

\mathbf{elif}\;A \leq 2.6 \cdot 10^{+48}:\\
\;\;\;\;\frac{-\sqrt{\left(\left(F + F\right) \cdot \left(C \cdot \left(-4 \cdot A\right)\right) + \left(F + F\right) \cdot \left(B \cdot B\right)\right) \cdot \left(C - \left(\mathsf{hypot}\left(A - C, B\right) - A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\mathsf{fma}\left(2, \mathsf{fma}\left(2, t_0 \cdot \left(C \cdot F\right), \left(B \cdot B\right) \cdot t_1\right), \mathsf{fma}\left(2, \frac{\mathsf{fma}\left(-0.5, \left(B \cdot B\right) \cdot \left(t_0 \cdot F\right), 2 \cdot \left(t_0 \cdot \left(\left(C \cdot C\right) \cdot F\right)\right)\right)}{A}, \left(-8 \cdot A\right) \cdot \left(t_1 \cdot C\right)\right)\right)}}{\mathsf{fma}\left(4, A \cdot C, -B \cdot B\right)}\\


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if A < -5.50000000000000026e54

    1. Initial program 55.3

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

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

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

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

      \[\leadsto \color{blue}{\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \left(A \cdot \frac{-1}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right)} \]
    6. Taylor expanded in A around inf 36.3

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

    if -5.50000000000000026e54 < A < 2.59999999999999995e48

    1. Initial program 47.8

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

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

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

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

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

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

    if 2.59999999999999995e48 < A

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

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

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

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

Alternatives

Alternative 1
Error44.4
Cost62984
\[\begin{array}{l} t_0 := \left(B \cdot B + C \cdot C\right) - {\left(-C\right)}^{2}\\ t_1 := C - \left(-C\right)\\ \mathbf{if}\;A \leq -1.8 \cdot 10^{+49}:\\ \;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \mathbf{elif}\;A \leq 3 \cdot 10^{+48}:\\ \;\;\;\;\frac{-\sqrt{\left(\left(F + F\right) \cdot \left(C \cdot \left(-4 \cdot A\right)\right) + \left(F + F\right) \cdot \left(B \cdot B\right)\right) \cdot \left(C - \left(\mathsf{hypot}\left(A - C, B\right) - A\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \mathsf{fma}\left(2, \frac{t_0 \cdot \left(C \cdot C\right)}{A}, \mathsf{fma}\left(-4, A \cdot \left(t_1 \cdot C\right), \mathsf{fma}\left(B \cdot B, t_1, \mathsf{fma}\left(-0.5, \frac{\left(B \cdot B\right) \cdot t_0}{A}, 2 \cdot \left(t_0 \cdot C\right)\right)\right)\right)\right)}}{\mathsf{fma}\left(4, A \cdot C, -B \cdot B\right)}\\ \end{array} \]
Alternative 2
Error44.5
Cost15432
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq -9.5 \cdot 10^{+52}:\\ \;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \mathbf{elif}\;A \leq 1.16 \cdot 10^{+95}:\\ \;\;\;\;\frac{-\sqrt{\left(\left(F + F\right) \cdot \left(C \cdot \left(-4 \cdot A\right)\right) + \left(F + F\right) \cdot \left(B \cdot B\right)\right) \cdot \left(C - \left(\mathsf{hypot}\left(A - C, B\right) - A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-8 \cdot \left(A \cdot \left(\left(C - \left(-C\right)\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 3
Error48.0
Cost14472
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq -1.2 \cdot 10^{-103}:\\ \;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \mathbf{elif}\;A \leq 7 \cdot 10^{-206}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(B \cdot B\right) \cdot \left(\left(A - \sqrt{B \cdot B + A \cdot A}\right) \cdot F\right)\right)}}{B \cdot B}\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{+131}:\\ \;\;\;\;\frac{-\left(-C\right) \cdot \sqrt{-16 \cdot \left(A \cdot F\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-8 \cdot \left(A \cdot \left(\left(C - \left(-C\right)\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 4
Error47.5
Cost14472
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq -4.1 \cdot 10^{-160}:\\ \;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \mathbf{elif}\;A \leq 2.9 \cdot 10^{-206}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(B \cdot B\right) \cdot \left(\left(C - \sqrt{B \cdot B + C \cdot C}\right) \cdot F\right)\right)}}{B \cdot B}\\ \mathbf{elif}\;A \leq 1.85 \cdot 10^{+131}:\\ \;\;\;\;\frac{-\left(-C\right) \cdot \sqrt{-16 \cdot \left(A \cdot F\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-8 \cdot \left(A \cdot \left(\left(C - \left(-C\right)\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 5
Error47.5
Cost14472
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq -4.1 \cdot 10^{-162}:\\ \;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \mathbf{elif}\;A \leq 7.6 \cdot 10^{-205}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(C - \sqrt{B \cdot B + C \cdot C}\right) \cdot \left(F \cdot \left(B \cdot B\right)\right)\right)}}{-B \cdot B}\\ \mathbf{elif}\;A \leq 2.6 \cdot 10^{+136}:\\ \;\;\;\;\frac{-\left(-C\right) \cdot \sqrt{-16 \cdot \left(A \cdot F\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-8 \cdot \left(A \cdot \left(\left(C - \left(-C\right)\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 6
Error47.9
Cost14216
\[\begin{array}{l} t_0 := 4 \cdot \left(A \cdot C\right)\\ t_1 := B \cdot B - t_0\\ t_2 := \left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \mathbf{if}\;A \leq 2.8 \cdot 10^{-300}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 6 \cdot 10^{-189}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(F \cdot {\left(\frac{1}{B}\right)}^{-3}\right)}}{t_0 - B \cdot B}\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-167}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 3.3 \cdot 10^{+131}:\\ \;\;\;\;\frac{-\left(-C\right) \cdot \sqrt{-16 \cdot \left(A \cdot F\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-8 \cdot \left(A \cdot \left(\left(C - \left(-C\right)\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_1}\\ \end{array} \]
Alternative 7
Error47.9
Cost13896
\[\begin{array}{l} t_0 := \left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq 10^{-299}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 8.5 \cdot 10^{-206}:\\ \;\;\;\;\frac{\sqrt{-2 \cdot \left(F \cdot {\left(\frac{1}{B}\right)}^{-3}\right)}}{-B \cdot B}\\ \mathbf{elif}\;A \leq 1.48 \cdot 10^{-167}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;A \leq 2.2 \cdot 10^{+131}:\\ \;\;\;\;\frac{-\left(-C\right) \cdot \sqrt{-16 \cdot \left(A \cdot F\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-8 \cdot \left(A \cdot \left(\left(C - \left(-C\right)\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_1}\\ \end{array} \]
Alternative 8
Error47.6
Cost8136
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq 6 \cdot 10^{-238}:\\ \;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \mathbf{elif}\;A \leq 1.4 \cdot 10^{+131}:\\ \;\;\;\;\frac{-\left(-C\right) \cdot \sqrt{-16 \cdot \left(A \cdot F\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-8 \cdot \left(A \cdot \left(\left(C - \left(-C\right)\right) \cdot \left(C \cdot F\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 9
Error48.2
Cost7748
\[\begin{array}{l} \mathbf{if}\;A \leq 5.4 \cdot 10^{-239}:\\ \;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\left(-C\right) \cdot \sqrt{-16 \cdot \left(A \cdot F\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \end{array} \]
Alternative 10
Error51.7
Cost7172
\[\begin{array}{l} \mathbf{if}\;C \leq -3.9 \cdot 10^{+120}:\\ \;\;\;\;-\frac{\sqrt{4 \cdot \left(C \cdot F\right)}}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-\sqrt{-16 \cdot \left(C \cdot F\right)}\right) \cdot \frac{0.25}{C}\\ \end{array} \]
Alternative 11
Error61.0
Cost7044
\[\begin{array}{l} \mathbf{if}\;B \leq -4 \cdot 10^{-257}:\\ \;\;\;\;\frac{\sqrt{\left(4 \cdot F\right) \cdot C}}{B}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{4 \cdot \left(C \cdot F\right)}}{B}\\ \end{array} \]
Alternative 12
Error62.1
Cost6848
\[\frac{\sqrt{4 \cdot \left(C \cdot F\right)}}{B} \]
Alternative 13
Error62.1
Cost6848
\[\frac{\sqrt{\left(4 \cdot F\right) \cdot C}}{B} \]

Error

Reproduce

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