?

Average Accuracy: 18.3% → 43.4%
Time: 1.1min
Precision: binary64
Cost: 142988

?

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

\mathbf{elif}\;t_5 \leq 0:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(A + \left(A + \frac{\left(B \cdot B\right) \cdot -0.5}{C}\right)\right)\right)\right)}}{t_2}\\

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\frac{\sqrt{A + \left(C + t_3\right)} \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\

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


\end{array}

Error?

Derivation?

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

    1. Initial program 40.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. Simplified49.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]40.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} \]
    3. Applied egg-rr62.3%

      \[\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)} \]
      Proof

      [Start]49.8

      \[ \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)} \]

      sqrt-prod [=>]63.0

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

      associate-+r+ [=>]62.3

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

      +-commutative [=>]62.3

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

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

      \[ \frac{-\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)} \]

      sqrt-prod [=>]73.2

      \[ \frac{-\color{blue}{\left(\sqrt{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)} \cdot \sqrt{F}\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 -1e-204 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -0.0

    1. Initial program 5.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. Simplified10.2%

      \[\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]5.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. Taylor expanded in C around -inf 28.4%

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

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

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

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

      \[ \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 -0.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0

    1. Initial program 37.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. Simplified37.6%

      \[\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]37.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-rr81.6%

      \[\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)} \]
      Proof

      [Start]37.6

      \[ \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)} \]

      associate-*r* [=>]37.6

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

      sqrt-prod [=>]41.5

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

      fma-neg [=>]41.5

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

      distribute-lft-neg-in [=>]41.5

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

      *-commutative [=>]41.5

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

      metadata-eval [=>]41.5

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

      associate-+l+ [=>]41.5

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

      unpow2 [=>]41.5

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

      hypot-def [=>]81.6

      \[ \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 + \color{blue}{\mathsf{hypot}\left(B, A - C\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Simplified81.6%

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

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

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

      \[ \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 68.9%

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

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

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

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

      \[ \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 +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (+.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)))

    1. Initial program 0.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. Simplified1.1%

      \[\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]0.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 B around inf 1.2%

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

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

      [Start]1.2

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

      associate-*r* [=>]1.2

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

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

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

      [Start]15.9

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

      mul-1-neg [=>]15.9

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

      *-commutative [=>]15.9

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

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

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

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

Alternatives

Alternative 1
Accuracy37.9%
Cost28112
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_2 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_3 := \sqrt{A + \left(C + t_0\right)}\\ t_4 := \frac{t_3 \cdot \left(-\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, -4 \cdot \left(A \cdot C\right)\right)\right)}\right)}{t_2}\\ \mathbf{if}\;B \leq -13200000000000:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq -3.7 \cdot 10^{-99}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq -2.1 \cdot 10^{-238}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.68 \cdot 10^{+41}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{+143}:\\ \;\;\;\;\frac{t_3 \cdot \left(\sqrt{F} \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)\right)}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 2
Accuracy33.7%
Cost27860
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_2 := \sqrt{A + \left(C + t_0\right)}\\ t_3 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -8.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq -1.56 \cdot 10^{-99}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -2.6 \cdot 10^{-238}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{t_2 \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{t_3}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{+144}:\\ \;\;\;\;\frac{t_2 \cdot \left(\sqrt{F} \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)\right)}{t_3}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 3
Accuracy34.8%
Cost27860
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_2 := A + \left(C + t_0\right)\\ t_3 := \sqrt{t_2}\\ t_4 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -3.5 \cdot 10^{+18}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)} \cdot \left(B \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq -5.2 \cdot 10^{-105}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot t_2\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -2.3 \cdot 10^{-239}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-122}:\\ \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{t_4}\\ \mathbf{elif}\;B \leq 7.8 \cdot 10^{+145}:\\ \;\;\;\;\frac{t_3 \cdot \left(\sqrt{F} \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)\right)}{t_4}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 4
Accuracy34.4%
Cost27860
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := A + \left(C + t_0\right)\\ t_2 := \sqrt{t_1}\\ t_3 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_4 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -2.3 \cdot 10^{+16}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)} \cdot \left(B \cdot \sqrt{F}\right)}{t_3}\\ \mathbf{elif}\;B \leq -1.8 \cdot 10^{-228}:\\ \;\;\;\;\frac{-\sqrt{\left(F \cdot t_3\right) \cdot \left(2 \cdot t_1\right)}}{t_3}\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-289}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-125}:\\ \;\;\;\;\frac{t_2 \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{t_4}\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{+144}:\\ \;\;\;\;\frac{t_2 \cdot \left(\sqrt{F} \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)\right)}{t_4}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 5
Accuracy32.2%
Cost27732
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_2 := \mathsf{hypot}\left(B, A - C\right)\\ t_3 := \sqrt{A + \left(C + t_2\right)}\\ \mathbf{if}\;B \leq -2.15 \cdot 10^{-45}:\\ \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{2 \cdot \left(B \cdot \left(B \cdot F\right)\right)}\right)}{t_1}\\ \mathbf{elif}\;B \leq -9.4 \cdot 10^{-105}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -2.3 \cdot 10^{-239}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{-123}:\\ \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{t_1}\\ \mathbf{elif}\;B \leq 9.8 \cdot 10^{+142}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(\left(A + C\right) + t_2\right)} \cdot \left(\sqrt{F} \cdot \left(-B\right)\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 6
Accuracy33.8%
Cost27732
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_2 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_3 := \sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)}\\ \mathbf{if}\;B \leq -2.05 \cdot 10^{-45}:\\ \;\;\;\;\frac{t_3 \cdot \left(B \cdot \sqrt{F}\right)}{t_2}\\ \mathbf{elif}\;B \leq -9.8 \cdot 10^{-104}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -6.6 \cdot 10^{-239}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.35 \cdot 10^{-125}:\\ \;\;\;\;\frac{\sqrt{A + \left(C + t_0\right)} \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{+144}:\\ \;\;\;\;\frac{t_3 \cdot \left(\sqrt{F} \cdot \left(-B\right)\right)}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 7
Accuracy31.3%
Cost21908
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_2 := \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\\ \mathbf{if}\;B \leq -4.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{t_2 \cdot \left(-\sqrt{2 \cdot \left(B \cdot \left(B \cdot F\right)\right)}\right)}{t_1}\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-96}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -2.2 \cdot 10^{-239}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 7 \cdot 10^{-125}:\\ \;\;\;\;\frac{t_2 \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{t_1}\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{-47}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(A + \frac{\left(B \cdot B\right) \cdot -0.5}{C}\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.42 \cdot 10^{+73}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 8
Accuracy31.1%
Cost21720
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t_0}\\ t_2 := \sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\\ t_3 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_4 := \frac{t_2 \cdot \left(-\sqrt{2 \cdot \left(B \cdot \left(B \cdot F\right)\right)}\right)}{t_3}\\ \mathbf{if}\;B \leq -1.65 \cdot 10^{-50}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq -5.5 \cdot 10^{-105}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{-238}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 9 \cdot 10^{-126}:\\ \;\;\;\;\frac{t_2 \cdot \left(-\sqrt{2 \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)}\right)}{t_3}\\ \mathbf{elif}\;B \leq 2.45 \cdot 10^{-67}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 3 \cdot 10^{-39}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq 1.9 \cdot 10^{+75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_3\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_3}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 9
Accuracy30.3%
Cost21132
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -1.58 \cdot 10^{-46}:\\ \;\;\;\;\frac{\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)} \cdot \left(-\sqrt{2 \cdot \left(B \cdot \left(B \cdot F\right)\right)}\right)}{t_1}\\ \mathbf{elif}\;B \leq -8.9 \cdot 10^{-100}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + A\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-109}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{+74}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 10
Accuracy29.9%
Cost21000
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\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(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -4.4 \cdot 10^{-100}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-108}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{+72}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 11
Accuracy30.0%
Cost15308
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -5.5 \cdot 10^{-204}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-288}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 1.06 \cdot 10^{+73}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 12
Accuracy24.6%
Cost14484
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ t_2 := \sqrt{-16 \cdot \left(C \cdot F\right)} \cdot \frac{-A}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\\ \mathbf{if}\;B \leq -9.2 \cdot 10^{-45}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -1.75 \cdot 10^{-94}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq -5.8 \cdot 10^{-97}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -5.9 \cdot 10^{-273}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 5.5 \cdot 10^{-79}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 13
Accuracy24.4%
Cost14352
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ \mathbf{if}\;B \leq -1.5 \cdot 10^{-53}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -4.3 \cdot 10^{-169}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(A \cdot F\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -1.2 \cdot 10^{-272}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 6.4 \cdot 10^{-85}:\\ \;\;\;\;\sqrt{-16 \cdot \left(C \cdot F\right)} \cdot \frac{-A}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 14
Accuracy24.4%
Cost14352
\[\begin{array}{l} t_0 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ \mathbf{if}\;B \leq -2.7 \cdot 10^{-52}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(B \cdot B\right) \cdot \left(B \cdot F\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-168}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(C \cdot \left(A \cdot \left(A \cdot F\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{-273}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{-83}:\\ \;\;\;\;\sqrt{-16 \cdot \left(C \cdot F\right)} \cdot \frac{-A}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 15
Accuracy23.4%
Cost13712
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -2.7 \cdot 10^{-46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -2.4 \cdot 10^{-93}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{elif}\;B \leq -1.48 \cdot 10^{-96}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-109}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 16
Accuracy18.1%
Cost13584
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;C \leq -2.6 \cdot 10^{-5}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{elif}\;C \leq 1.22 \cdot 10^{-189}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 1.5 \cdot 10^{-10}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 1.2 \cdot 10^{+178}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) + \left(C - A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-F}}{\sqrt{A}}\\ \end{array} \]
Alternative 17
Accuracy17.7%
Cost8844
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -4.6 \cdot 10^{-26}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;A \leq 1.15 \cdot 10^{-176}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{+96}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) + \left(A - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 18
Accuracy15.7%
Cost8717
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq -1.45 \cdot 10^{-45}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{elif}\;C \leq -1.15 \cdot 10^{-275} \lor \neg \left(C \leq 2.6 \cdot 10^{+176}\right):\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 19
Accuracy17.8%
Cost8716
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -2.05 \cdot 10^{-36}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;A \leq 7.5 \cdot 10^{-150}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 5.2 \cdot 10^{+98}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 20
Accuracy17.4%
Cost8716
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -4.6 \cdot 10^{-164}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;A \leq 2.4 \cdot 10^{-175}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{+101}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 21
Accuracy17.6%
Cost8716
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -8.1 \cdot 10^{-19}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;A \leq 1.75 \cdot 10^{-174}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 5.4 \cdot 10^{+101}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 22
Accuracy12.9%
Cost7752
\[\begin{array}{l} \mathbf{if}\;A \leq 8.5 \cdot 10^{-181}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{+103}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(B \cdot \sqrt{A \cdot F}\right) \cdot -2}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \end{array} \]
Alternative 23
Accuracy13.2%
Cost7688
\[\begin{array}{l} \mathbf{if}\;A \leq 3 \cdot 10^{-180}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{elif}\;A \leq 1.2 \cdot 10^{+103}:\\ \;\;\;\;-\frac{\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{A \cdot F} \cdot \frac{-2}{B}\\ \end{array} \]
Alternative 24
Accuracy11.3%
Cost6980
\[\begin{array}{l} \mathbf{if}\;B \leq 3.7 \cdot 10^{-55}:\\ \;\;\;\;\sqrt{-\frac{F}{A}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{A \cdot F} \cdot \frac{-2}{B}\\ \end{array} \]
Alternative 25
Accuracy11.1%
Cost6656
\[\sqrt{-\frac{F}{A}} \]
Alternative 26
Accuracy1.2%
Cost6592
\[\sqrt{\frac{F}{A}} \]

Error

Reproduce?

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