?

Average Accuracy: 17.7% → 32.5%
Time: 56.3s
Precision: binary64
Cost: 149388

?

\[\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 := \frac{-\sqrt{\left(-2 \cdot \left(F \cdot \left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right)\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)}\\ t_1 := \mathsf{hypot}\left(B, A - C\right)\\ t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_3 := \sqrt{2 \cdot t_2}\\ \mathbf{if}\;t_0 \leq -5 \cdot 10^{-214}:\\ \;\;\;\;-\frac{\sqrt{F \cdot \left(A + \left(C - t_1\right)\right)} \cdot t_3}{t_2}\\ \mathbf{elif}\;t_0 \leq 0:\\ \;\;\;\;\frac{t_3 \cdot \left(-\sqrt{F \cdot \mathsf{fma}\left(-0.5, \frac{B \cdot B}{A - C}, 2 \cdot C\right)}\right)}{t_2}\\ \mathbf{elif}\;t_0 \leq \infty:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(C + \left(A - t_1\right)\right)\right)\right)}}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(A \cdot -8\right)} \cdot \left(-\sqrt{A + A}\right)}{t_2}\\ \end{array} \]
(FPCore (A B C F)
 :precision binary64
 (/
  (-
   (sqrt
    (*
     (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F))
     (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
  (- (pow B 2.0) (* (* 4.0 A) C))))
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0
         (/
          (-
           (sqrt
            (*
             (* -2.0 (* F (- (* (* 4.0 A) C) (pow B 2.0))))
             (- (+ A C) (sqrt (+ (pow B 2.0) (pow (- A C) 2.0)))))))
          (+ (pow B 2.0) (* C (* A -4.0)))))
        (t_1 (hypot B (- A C)))
        (t_2 (fma B B (* A (* C -4.0))))
        (t_3 (sqrt (* 2.0 t_2))))
   (if (<= t_0 -5e-214)
     (- (/ (* (sqrt (* F (+ A (- C t_1)))) t_3) t_2))
     (if (<= t_0 0.0)
       (/
        (* t_3 (- (sqrt (* F (fma -0.5 (/ (* B B) (- A C)) (* 2.0 C))))))
        t_2)
       (if (<= t_0 INFINITY)
         (- (/ (sqrt (* 2.0 (* t_2 (* F (+ C (- A t_1)))))) t_2))
         (/ (* (sqrt (* (* C F) (* A -8.0))) (- (sqrt (+ A A)))) t_2))))))
double code(double A, double B, double C, double F) {
	return -sqrt(((2.0 * ((pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / (pow(B, 2.0) - ((4.0 * A) * C));
}
double code(double A, double B, double C, double F) {
	double t_0 = -sqrt(((-2.0 * (F * (((4.0 * A) * C) - pow(B, 2.0)))) * ((A + C) - sqrt((pow(B, 2.0) + pow((A - C), 2.0)))))) / (pow(B, 2.0) + (C * (A * -4.0)));
	double t_1 = hypot(B, (A - C));
	double t_2 = fma(B, B, (A * (C * -4.0)));
	double t_3 = sqrt((2.0 * t_2));
	double tmp;
	if (t_0 <= -5e-214) {
		tmp = -((sqrt((F * (A + (C - t_1)))) * t_3) / t_2);
	} else if (t_0 <= 0.0) {
		tmp = (t_3 * -sqrt((F * fma(-0.5, ((B * B) / (A - C)), (2.0 * C))))) / t_2;
	} else if (t_0 <= ((double) INFINITY)) {
		tmp = -(sqrt((2.0 * (t_2 * (F * (C + (A - t_1)))))) / t_2);
	} else {
		tmp = (sqrt(((C * F) * (A * -8.0))) * -sqrt((A + A))) / t_2;
	}
	return tmp;
}
function code(A, B, C, F)
	return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)))
end
function code(A, B, C, F)
	t_0 = Float64(Float64(-sqrt(Float64(Float64(-2.0 * Float64(F * Float64(Float64(Float64(4.0 * A) * C) - (B ^ 2.0)))) * Float64(Float64(A + C) - sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0))))))) / Float64((B ^ 2.0) + Float64(C * Float64(A * -4.0))))
	t_1 = hypot(B, Float64(A - C))
	t_2 = fma(B, B, Float64(A * Float64(C * -4.0)))
	t_3 = sqrt(Float64(2.0 * t_2))
	tmp = 0.0
	if (t_0 <= -5e-214)
		tmp = Float64(-Float64(Float64(sqrt(Float64(F * Float64(A + Float64(C - t_1)))) * t_3) / t_2));
	elseif (t_0 <= 0.0)
		tmp = Float64(Float64(t_3 * Float64(-sqrt(Float64(F * fma(-0.5, Float64(Float64(B * B) / Float64(A - C)), Float64(2.0 * C)))))) / t_2);
	elseif (t_0 <= Inf)
		tmp = Float64(-Float64(sqrt(Float64(2.0 * Float64(t_2 * Float64(F * Float64(C + Float64(A - t_1)))))) / t_2));
	else
		tmp = Float64(Float64(sqrt(Float64(Float64(C * F) * Float64(A * -8.0))) * Float64(-sqrt(Float64(A + A)))) / t_2);
	end
	return tmp
end
code[A_, B_, C_, F_] := N[((-N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[A_, B_, C_, F_] := Block[{t$95$0 = N[((-N[Sqrt[N[(N[(-2.0 * N[(F * N[(N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision] - N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $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]) / N[(N[Power[B, 2.0], $MachinePrecision] + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$2 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(2.0 * t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -5e-214], (-N[(N[(N[Sqrt[N[(F * N[(A + N[(C - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision] / t$95$2), $MachinePrecision]), If[LessEqual[t$95$0, 0.0], N[(N[(t$95$3 * (-N[Sqrt[N[(F * N[(-0.5 * N[(N[(B * B), $MachinePrecision] / N[(A - C), $MachinePrecision]), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$0, Infinity], (-N[(N[Sqrt[N[(2.0 * N[(t$95$2 * N[(F * N[(C + N[(A - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision]), N[(N[(N[Sqrt[N[(N[(C * F), $MachinePrecision] * N[(A * -8.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(A + A), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$2), $MachinePrecision]]]]]]]]
\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\begin{array}{l}
t_0 := \frac{-\sqrt{\left(-2 \cdot \left(F \cdot \left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right)\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)}\\
t_1 := \mathsf{hypot}\left(B, A - C\right)\\
t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
t_3 := \sqrt{2 \cdot t_2}\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{-214}:\\
\;\;\;\;-\frac{\sqrt{F \cdot \left(A + \left(C - t_1\right)\right)} \cdot t_3}{t_2}\\

\mathbf{elif}\;t_0 \leq 0:\\
\;\;\;\;\frac{t_3 \cdot \left(-\sqrt{F \cdot \mathsf{fma}\left(-0.5, \frac{B \cdot B}{A - C}, 2 \cdot C\right)}\right)}{t_2}\\

\mathbf{elif}\;t_0 \leq \infty:\\
\;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(C + \left(A - t_1\right)\right)\right)\right)}}{t_2}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(A \cdot -8\right)} \cdot \left(-\sqrt{A + A}\right)}{t_2}\\


\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))) < -4.9999999999999998e-214

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

      \[\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]41.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. Applied egg-rr65.2%

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

      [Start]49.0

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

      associate-*r* [=>]49.0

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

      sqrt-prod [=>]65.2

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

      associate--r- [=>]65.2

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

      +-commutative [=>]65.2

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

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

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

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

      \[ \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 -4.9999999999999998e-214 < (/.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 4.2%

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

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

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

      [Start]8.6

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

      associate-*r* [=>]8.6

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

      sqrt-prod [=>]15.8

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

      associate--r- [=>]15.7

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

      +-commutative [=>]15.7

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

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

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

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

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

      \[\leadsto \frac{-\sqrt{F \cdot \color{blue}{\left(-0.5 \cdot \frac{{B}^{2}}{A - C} + 2 \cdot C\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)} \]
    6. Simplified23.0%

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

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

      fma-def [=>]23.0

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

      unpow2 [=>]23.0

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

    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 34.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. Simplified55.9%

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

    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.4%

      \[\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]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 C around inf 4.5%

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

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

      [Start]4.5

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

      associate-*r* [=>]4.6

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

      *-commutative [=>]4.6

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

      *-commutative [=>]4.6

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

      mul-1-neg [=>]4.6

      \[ \frac{-\sqrt{\left(-8 \cdot A\right) \cdot \left(\left(F \cdot C\right) \cdot \left(A - \color{blue}{\left(-A\right)}\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    5. Applied egg-rr4.7%

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

      [Start]4.6

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

      associate-*r* [=>]4.6

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

      sqrt-prod [=>]4.7

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

      associate-*l* [=>]4.7

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

      neg-mul-1 [=>]4.7

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

      cancel-sign-sub-inv [=>]4.7

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

      metadata-eval [=>]4.7

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

      *-un-lft-identity [<=]4.7

      \[ \frac{-\sqrt{-8 \cdot \left(A \cdot \left(F \cdot C\right)\right)} \cdot \sqrt{A + \color{blue}{A}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    6. Simplified4.7%

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

      [Start]4.7

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

      *-commutative [=>]4.7

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

      associate-*r* [=>]4.7

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

      *-commutative [=>]4.7

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

      *-commutative [=>]4.7

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

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

Alternatives

Alternative 1
Accuracy29.8%
Cost34316
\[\begin{array}{l} t_0 := A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_2 := \sqrt{2 \cdot t_1}\\ \mathbf{if}\;A \leq -1.1 \cdot 10^{+134}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot \left(A + A\right)\right)} \cdot \left(-\sqrt{A \cdot -8}\right)}{t_1}\\ \mathbf{elif}\;A \leq -8.8 \cdot 10^{-74}:\\ \;\;\;\;-\frac{\sqrt{t_1 \cdot \left(t_0 \cdot \left(2 \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq 2.7 \cdot 10^{-117}:\\ \;\;\;\;-\frac{\sqrt{F \cdot t_0} \cdot t_2}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_2 \cdot \left(-\sqrt{F \cdot \mathsf{fma}\left(-0.5, \frac{B \cdot B}{A}, 2 \cdot C\right)}\right)}{t_1}\\ \end{array} \]
Alternative 2
Accuracy30.4%
Cost34252
\[\begin{array}{l} t_0 := A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;A \leq -1.05 \cdot 10^{+134}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot \left(A + A\right)\right)} \cdot \left(-\sqrt{A \cdot -8}\right)}{t_1}\\ \mathbf{elif}\;A \leq -1.55 \cdot 10^{-73}:\\ \;\;\;\;-\frac{\sqrt{t_1 \cdot \left(t_0 \cdot \left(2 \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq 2.7 \cdot 10^{-117}:\\ \;\;\;\;-\frac{\sqrt{F \cdot t_0} \cdot \sqrt{2 \cdot t_1}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\mathsf{fma}\left(-0.5, \frac{B \cdot B}{A - C}, 2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{t_1}\\ \end{array} \]
Alternative 3
Accuracy28.6%
Cost34188
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;A \leq -1 \cdot 10^{+155}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot \left(A + A\right)\right)} \cdot \left(-\sqrt{A \cdot -8}\right)}{t_1}\\ \mathbf{elif}\;A \leq -1.35 \cdot 10^{-203}:\\ \;\;\;\;-\frac{\sqrt{t_1 \cdot \left(\left(A + \left(C - t_0\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq 9.6 \cdot 10^{-152}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(C + \left(A - t_0\right)\right)} \cdot \left(-\mathsf{hypot}\left(B, \sqrt{-4 \cdot \left(A \cdot C\right)}\right)\right)}{t_1}\\ \mathbf{elif}\;A \leq 9.2 \cdot 10^{-88}:\\ \;\;\;\;\frac{\sqrt{\left(C \cdot F\right) \cdot \left(A \cdot -8\right)} \cdot \left(-\sqrt{A + A}\right)}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(\mathsf{fma}\left(-0.5, \frac{B \cdot B}{A - C}, 2 \cdot C\right) \cdot \left(2 \cdot F\right)\right)}}{t_1}\\ \end{array} \]
Alternative 4
Accuracy26.1%
Cost27720
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_2 := \sqrt{F \cdot \left(A + \left(C - t_0\right)\right)}\\ \mathbf{if}\;B \leq -8.5 \cdot 10^{+26}:\\ \;\;\;\;\frac{t_2 \cdot \left(B \cdot \sqrt{2}\right)}{t_1}\\ \mathbf{elif}\;B \leq 2.4 \cdot 10^{-103}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(C + \left(A - t_0\right)\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_2 \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)}{t_1}\\ \end{array} \]
Alternative 5
Accuracy26.0%
Cost27720
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\\ t_2 := \sqrt{F \cdot t_1}\\ \mathbf{if}\;B \leq -1.56 \cdot 10^{+38}:\\ \;\;\;\;\frac{t_2 \cdot \left(B \cdot \sqrt{2}\right)}{t_0}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{-124}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(t_1 \cdot \left(2 \cdot F\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_2 \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)}{t_0}\\ \end{array} \]
Alternative 6
Accuracy21.2%
Cost27600
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -6.6 \cdot 10^{+24}:\\ \;\;\;\;\frac{\sqrt{2 \cdot t_0} \cdot \left(-\sqrt{B \cdot F}\right)}{t_0}\\ \mathbf{elif}\;B \leq -1.62 \cdot 10^{-155}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(\left(A \cdot -2\right) \cdot \left(F \cdot -2\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-287}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{-124}:\\ \;\;\;\;\frac{-\sqrt{\left(F \cdot \left(C \cdot \left(A + A\right)\right)\right) \cdot \left(A \cdot -8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)}{t_0}\\ \end{array} \]
Alternative 7
Accuracy22.9%
Cost27600
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := \sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ \mathbf{if}\;B \leq -1.05 \cdot 10^{+20}:\\ \;\;\;\;\frac{t_1 \cdot \left(B \cdot \sqrt{2}\right)}{t_0}\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{-154}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(\left(A \cdot -2\right) \cdot \left(F \cdot -2\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -3.4 \cdot 10^{-276}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.9 \cdot 10^{-124}:\\ \;\;\;\;\frac{-\sqrt{\left(F \cdot \left(C \cdot \left(A + A\right)\right)\right) \cdot \left(A \cdot -8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1 \cdot \left(\sqrt{2} \cdot \left(-B\right)\right)}{t_0}\\ \end{array} \]
Alternative 8
Accuracy19.6%
Cost27140
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -7.6 \cdot 10^{+25}:\\ \;\;\;\;\frac{\sqrt{2 \cdot t_0} \cdot \left(-\sqrt{B \cdot F}\right)}{t_0}\\ \mathbf{elif}\;B \leq -1.9 \cdot 10^{-161}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(\left(A \cdot -2\right) \cdot \left(F \cdot -2\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -4.4 \cdot 10^{-287}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{-\sqrt{\left(F \cdot \left(C \cdot \left(A + A\right)\right)\right) \cdot \left(A \cdot -8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{B \cdot B + A \cdot A}\right)}\\ \end{array} \]
Alternative 9
Accuracy26.0%
Cost21832
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;A \leq -2.1 \cdot 10^{+74}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot \left(A + A\right)\right)} \cdot \left(-\sqrt{A \cdot -8}\right)}{t_0}\\ \mathbf{elif}\;A \leq 58000000000000:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(A + \left(C - \sqrt{{\left(A - C\right)}^{2} + B \cdot B}\right)\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(4 \cdot \left(\left(A \cdot C\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 10
Accuracy18.0%
Cost21008
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot \left(C \cdot \left(A + A\right)\right)\\ t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_3 := \sqrt{B \cdot B + A \cdot A}\\ t_4 := \frac{-\sqrt{t_1 \cdot \left(A \cdot -8\right)}}{t_2}\\ \mathbf{if}\;B \leq -1.05 \cdot 10^{+20}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(C - t_3\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -3.9 \cdot 10^{-157}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-236}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-304}:\\ \;\;\;\;\frac{\sqrt{t_1} \cdot \left(-\sqrt{A \cdot -8}\right)}{t_2}\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{-124}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - t_3\right)}\\ \end{array} \]
Alternative 11
Accuracy17.5%
Cost21000
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -5.8 \cdot 10^{+75}:\\ \;\;\;\;\sqrt{F \cdot \left(C + C \cdot \frac{A}{A - C}\right)} \cdot \left(2 \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq -1.15 \cdot 10^{-161}:\\ \;\;\;\;-\frac{\sqrt{t_0 \cdot \left(\left(A \cdot -2\right) \cdot \left(F \cdot -2\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -7.6 \cdot 10^{-286}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.65 \cdot 10^{-122}:\\ \;\;\;\;\frac{-\sqrt{\left(F \cdot \left(C \cdot \left(A + A\right)\right)\right) \cdot \left(A \cdot -8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{B \cdot B + A \cdot A}\right)}\\ \end{array} \]
Alternative 12
Accuracy17.4%
Cost20884
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_2 := \sqrt{B \cdot B + A \cdot A}\\ t_3 := F \cdot t_0\\ t_4 := \frac{-\sqrt{\left(F \cdot \left(C \cdot \left(A + A\right)\right)\right) \cdot \left(A \cdot -8\right)}}{t_1}\\ \mathbf{if}\;B \leq -1.05 \cdot 10^{+20}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(A + \left(C - t_2\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -7.8 \cdot 10^{-154}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq -3.5 \cdot 10^{-230}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 3 \cdot 10^{-287}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_3 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 7.3 \cdot 10^{-122}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - t_2\right)}\\ \end{array} \]
Alternative 13
Accuracy23.4%
Cost15368
\[\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 -4.7 \cdot 10^{+48}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 1.35 \cdot 10^{-32}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\frac{-\sqrt{\left(F \cdot \left(C \cdot \left(A + A\right)\right)\right) \cdot \left(A \cdot -8\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \end{array} \]
Alternative 14
Accuracy13.1%
Cost14480
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -1.42 \cdot 10^{+29}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + \left(B + \frac{A \cdot A}{B} \cdot 0.5\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -1.32 \cdot 10^{-158}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(\left(C - A\right) - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-294}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4.8 \cdot 10^{-152}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 15
Accuracy14.1%
Cost14476
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := \frac{-\sqrt{\left(F \cdot \left(C \cdot \left(A + A\right)\right)\right) \cdot \left(A \cdot -8\right)}}{t_0}\\ t_2 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -6.8 \cdot 10^{-156}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-297}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C + C\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 3 \cdot 10^{-124}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_2\right) \cdot \left(A - \left(B - C\right)\right)\right)}}{t_2}\\ \end{array} \]
Alternative 16
Accuracy14.0%
Cost14348
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -1.5 \cdot 10^{+29}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + \left(B + \frac{A \cdot A}{B} \cdot 0.5\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -2.45 \cdot 10^{-232}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-124}:\\ \;\;\;\;\frac{-\sqrt{A \cdot \left(-16 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 17
Accuracy17.6%
Cost14344
\[\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 -3500:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;C \leq 4.5 \cdot 10^{-32}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(F \cdot \left(C \cdot \left(A + A\right)\right)\right) \cdot \left(A \cdot -8\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \end{array} \]
Alternative 18
Accuracy13.2%
Cost8976
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2 \cdot \left(\left(\left(\left(C - A\right) - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_0}\\ t_2 := F \cdot t_0\\ \mathbf{if}\;B \leq -1.6 \cdot 10^{+29}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -1.65 \cdot 10^{-158}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-300}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 6.2 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 19
Accuracy13.1%
Cost8976
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{2 \cdot \left(\left(\left(\left(C - A\right) - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_0}\\ t_2 := F \cdot t_0\\ \mathbf{if}\;B \leq -1.42 \cdot 10^{+29}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C + \left(B + \frac{A \cdot A}{B} \cdot 0.5\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -1.25 \cdot 10^{-158}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-296}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(C + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-124}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A - \left(B - C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 20
Accuracy11.9%
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -2.2 \cdot 10^{+29}:\\ \;\;\;\;\sqrt{F \cdot \left(C + C \cdot \frac{A}{A - C}\right)} \cdot \left(2 \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-124}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\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 21
Accuracy12.7%
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;B \leq -1.42 \cdot 10^{+29}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-125}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\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 22
Accuracy8.6%
Cost8452
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -6.2 \cdot 10^{-116}:\\ \;\;\;\;\sqrt{F \cdot \left(C + C \cdot \frac{A}{A - C}\right)} \cdot \left(2 \cdot \frac{1}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\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 23
Accuracy2.8%
Cost7488
\[\sqrt{F \cdot \left(C + C \cdot \frac{A}{A - C}\right)} \cdot \left(2 \cdot \frac{1}{B}\right) \]
Alternative 24
Accuracy3.8%
Cost6464
\[\sqrt{0} \]

Error

Reproduce?

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