?

Average Error: 18.5% → 43.4%
Time: 1.6min
Precision: binary64
Cost: 149260.00

?

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

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

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

\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))) < -4.9999999999999996e-199

    1. Initial program 41.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. Simplified50.9

      \[\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]41.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-rr64.6

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

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

      [Start]64.6

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

      *-commutative [<=]64.6

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

      *-commutative [=>]64.6

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

      *-commutative [=>]64.6

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

      +-commutative [=>]64.6

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

      associate-+r+ [<=]65.3

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

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

    if -4.9999999999999996e-199 < (/.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.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. Simplified7.1

      \[\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(\left(A + C\right) + \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}} \]
      Proof

      [Start]5.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. Taylor expanded in A around -inf 27.8

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

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

      [Start]27.8

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

      fma-def [=>]27.8

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

      associate-*r/ [=>]27.8

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

      unpow2 [=>]27.8

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

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

      \[\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.5

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

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

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

      [Start]81.1

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

      *-commutative [<=]81.1

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

      *-commutative [=>]81.1

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

      *-commutative [=>]81.1

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

      +-commutative [=>]81.1

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

      associate-+r+ [<=]81.1

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

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

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

    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.1

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

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

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

      associate-*r* [=>]1.1

      \[ \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 14.8

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

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

      [Start]14.8

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

      mul-1-neg [=>]14.8

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

      *-commutative [=>]14.8

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

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

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

Alternatives

Alternative 1
Error34.5%
Cost28372.00
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := -4 \cdot \left(A \cdot C\right)\\ t_2 := \frac{\sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{\mathsf{fma}\left(B, B, t_1\right)}\\ t_3 := \sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_1}\\ \mathbf{if}\;B \leq -1.3 \cdot 10^{-30}:\\ \;\;\;\;t_2 \cdot \left(B \cdot \sqrt{F}\right)\\ \mathbf{elif}\;B \leq -1.9 \cdot 10^{-89}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \mathsf{fma}\left(2, A, 0.5 \cdot \frac{B \cdot B}{A - C}\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -1.25 \cdot 10^{-212}:\\ \;\;\;\;t_3 \cdot \left(\sqrt{\frac{1}{C}} \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{A} \cdot 0.25\right)\right)\\ \mathbf{elif}\;B \leq -2.9 \cdot 10^{-246}:\\ \;\;\;\;\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.15 \cdot 10^{+24}:\\ \;\;\;\;t_2 \cdot \left(-t_3\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 2
Error34.5%
Cost28244.00
\[\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 := -4 \cdot \left(A \cdot C\right)\\ t_3 := \mathsf{fma}\left(B, B, t_2\right)\\ \mathbf{if}\;B \leq -7.5 \cdot 10^{-30}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)}}{t_3} \cdot \left(B \cdot \sqrt{F}\right)\\ \mathbf{elif}\;B \leq -8.5 \cdot 10^{-90}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \mathsf{fma}\left(2, A, 0.5 \cdot \frac{B \cdot B}{A - C}\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -2.45 \cdot 10^{-211}:\\ \;\;\;\;\sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_2} \cdot \left(\sqrt{\frac{1}{C}} \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{A} \cdot 0.25\right)\right)\\ \mathbf{elif}\;B \leq -4.3 \cdot 10^{-246}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{+24}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot t_3\right)} \cdot \left(-\sqrt{A + \left(C + t_0\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} \]
Alternative 3
Error34.2%
Cost28116.00
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := 4 \cdot \left(A \cdot C\right)\\ t_2 := C \cdot \left(A \cdot -4\right)\\ t_3 := \mathsf{fma}\left(B, B, t_2\right)\\ t_4 := -4 \cdot \left(A \cdot C\right)\\ t_5 := A + \left(C + t_0\right)\\ \mathbf{if}\;B \leq -3.8 \cdot 10^{+38}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)}}{\mathsf{fma}\left(B, B, t_4\right)} \cdot \left(B \cdot \sqrt{F}\right)\\ \mathbf{elif}\;B \leq -3.8 \cdot 10^{-127}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(t_1 - B \cdot B\right)\right)\right)}}{B \cdot B - t_1}\\ \mathbf{elif}\;B \leq -1.8 \cdot 10^{-243}:\\ \;\;\;\;\sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_4} \cdot \left(\sqrt{\frac{1}{C}} \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{A} \cdot 0.25\right)\right)\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-52}:\\ \;\;\;\;\frac{\sqrt{2 \cdot t_5} \cdot \left(-\sqrt{F \cdot t_2}\right)}{t_4}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{+16}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(F \cdot t_5\right)\right)}}{t_3}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 4
Error34.2%
Cost28116.00
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := -4 \cdot \left(A \cdot C\right)\\ t_2 := 4 \cdot \left(A \cdot C\right)\\ t_3 := C \cdot \left(A \cdot -4\right)\\ t_4 := \mathsf{fma}\left(B, B, t_3\right)\\ \mathbf{if}\;B \leq -4 \cdot 10^{+38}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)}}{\mathsf{fma}\left(B, B, t_1\right)} \cdot \left(B \cdot \sqrt{F}\right)\\ \mathbf{elif}\;B \leq -1.15 \cdot 10^{-137}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(t_2 - B \cdot B\right)\right)\right)}}{B \cdot B - t_2}\\ \mathbf{elif}\;B \leq -1.2 \cdot 10^{-240}:\\ \;\;\;\;\sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_1} \cdot \left(\sqrt{\frac{1}{C}} \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{A} \cdot 0.25\right)\right)\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-51}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + t_0\right)\right)} \cdot \left(-\sqrt{F \cdot t_3}\right)}{t_1}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{+16}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_4 \cdot \left(F \cdot \left(\left(A + C\right) + t_0\right)\right)\right)}}{t_4}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 5
Error34.4%
Cost28116.00
\[\begin{array}{l} t_0 := -4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_2 := \mathsf{hypot}\left(B, A - C\right)\\ t_3 := 2 \cdot \left(A + \left(C + t_2\right)\right)\\ t_4 := C \cdot \left(A \cdot -4\right)\\ t_5 := \mathsf{fma}\left(B, B, t_4\right)\\ \mathbf{if}\;B \leq -4.7 \cdot 10^{+38}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + t_2\right)\right)}}{\mathsf{fma}\left(B, B, t_0\right)} \cdot \left(B \cdot \sqrt{F}\right)\\ \mathbf{elif}\;B \leq -7 \cdot 10^{-137}:\\ \;\;\;\;\frac{-\sqrt{t_3 \cdot \left(F \cdot t_1\right)}}{t_1}\\ \mathbf{elif}\;B \leq -1.8 \cdot 10^{-240}:\\ \;\;\;\;\sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_0} \cdot \left(\sqrt{\frac{1}{C}} \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{A} \cdot 0.25\right)\right)\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-52}:\\ \;\;\;\;\frac{\sqrt{t_3} \cdot \left(-\sqrt{F \cdot t_4}\right)}{t_0}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{+16}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_5 \cdot \left(F \cdot \left(\left(A + C\right) + t_2\right)\right)\right)}}{t_5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 6
Error33.2%
Cost28116.00
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := C \cdot \left(A \cdot -4\right)\\ t_2 := \mathsf{fma}\left(B, B, t_1\right)\\ t_3 := -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -1.45 \cdot 10^{-40}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)}}{\mathsf{fma}\left(B, B, t_3\right)} \cdot \left(B \cdot \sqrt{F}\right)\\ \mathbf{elif}\;B \leq -3.1 \cdot 10^{-90}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \mathsf{fma}\left(2, A, -0.5 \cdot \frac{B}{\frac{C}{B}}\right)\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq -2 \cdot 10^{-240}:\\ \;\;\;\;\sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_3} \cdot \left(\sqrt{\frac{1}{C}} \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{A} \cdot 0.25\right)\right)\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-52}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + t_0\right)\right)} \cdot \left(-\sqrt{F \cdot t_1}\right)}{t_3}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{+16}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(\left(A + C\right) + t_0\right)\right)\right)}}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 7
Error34.7%
Cost27980.00
\[\begin{array}{l} t_0 := -4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{\sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_0\right)\right)} \cdot \left(-\sqrt{A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{if}\;B \leq -1.35 \cdot 10^{-132}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -9 \cdot 10^{-241}:\\ \;\;\;\;\sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_0} \cdot \left(\sqrt{\frac{1}{C}} \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{A} \cdot 0.25\right)\right)\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 8
Error31.9%
Cost27732.00
\[\begin{array}{l} t_0 := C \cdot \left(A \cdot -4\right)\\ t_1 := \mathsf{fma}\left(B, B, t_0\right)\\ t_2 := 4 \cdot \left(A \cdot C\right)\\ t_3 := \mathsf{hypot}\left(B, A - C\right)\\ t_4 := -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -4 \cdot 10^{-90}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(t_2 - B \cdot B\right)\right)\right)}}{B \cdot B - t_2}\\ \mathbf{elif}\;B \leq -1 \cdot 10^{-297}:\\ \;\;\;\;\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.7 \cdot 10^{-265}:\\ \;\;\;\;\sqrt{2 \cdot \mathsf{fma}\left(-8, A \cdot \left(A \cdot \left(C \cdot F\right)\right), A \cdot \left(4 \cdot \left(B \cdot \left(B \cdot F\right)\right)\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 1.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + t_3\right)\right)} \cdot \left(-\sqrt{F \cdot t_0}\right)}{t_4}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{+154}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(C + \left(A + t_3\right)\right)}}{\mathsf{fma}\left(B, B, t_4\right)} \cdot \left(B \cdot \left(-\sqrt{F}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 9
Error36.2%
Cost27732.00
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := -4 \cdot \left(A \cdot C\right)\\ t_2 := 4 \cdot \left(A \cdot C\right)\\ t_3 := \frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)}}{\mathsf{fma}\left(B, B, t_1\right)}\\ \mathbf{if}\;B \leq -5.4 \cdot 10^{+38}:\\ \;\;\;\;t_3 \cdot \left(B \cdot \sqrt{F}\right)\\ \mathbf{elif}\;B \leq -2.55 \cdot 10^{-141}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(t_2 - B \cdot B\right)\right)\right)}}{B \cdot B - t_2}\\ \mathbf{elif}\;B \leq -1.9 \cdot 10^{-240}:\\ \;\;\;\;\sqrt{F \cdot \left(B \cdot B\right) + F \cdot t_1} \cdot \left(\sqrt{\frac{1}{C}} \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{A} \cdot 0.25\right)\right)\\ \mathbf{elif}\;B \leq 6 \cdot 10^{-52}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + t_0\right)\right)} \cdot \left(-\sqrt{F \cdot \left(C \cdot \left(A \cdot -4\right)\right)}\right)}{t_1}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{+161}:\\ \;\;\;\;t_3 \cdot \left(B \cdot \left(-\sqrt{F}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 10
Error36.4%
Cost27468.00
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := -4 \cdot \left(A \cdot C\right)\\ t_2 := \frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)}}{\mathsf{fma}\left(B, B, t_1\right)}\\ \mathbf{if}\;B \leq -5 \cdot 10^{-49}:\\ \;\;\;\;t_2 \cdot \left(B \cdot \sqrt{F}\right)\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-52}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + t_0\right)\right)} \cdot \left(-\sqrt{F \cdot \left(C \cdot \left(A \cdot -4\right)\right)}\right)}{t_1}\\ \mathbf{elif}\;B \leq 1.4 \cdot 10^{+154}:\\ \;\;\;\;t_2 \cdot \left(B \cdot \left(-\sqrt{F}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 11
Error29.8%
Cost21516.00
\[\begin{array}{l} t_0 := C \cdot \left(A \cdot -4\right)\\ t_1 := \mathsf{fma}\left(B, B, t_0\right)\\ t_2 := 4 \cdot \left(A \cdot C\right)\\ t_3 := \frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(t_2 - B \cdot B\right)\right)\right)}}{B \cdot B - t_2}\\ \mathbf{if}\;B \leq -1.2 \cdot 10^{-89}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-296}:\\ \;\;\;\;\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.8 \cdot 10^{-265}:\\ \;\;\;\;\sqrt{2 \cdot \mathsf{fma}\left(-8, A \cdot \left(A \cdot \left(C \cdot F\right)\right), A \cdot \left(4 \cdot \left(B \cdot \left(B \cdot F\right)\right)\right)\right)} \cdot \frac{1}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-52}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(-\sqrt{F \cdot t_0}\right)}{-4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{+16}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 12
Error29.7%
Cost21328.00
\[\begin{array}{l} t_0 := C \cdot \left(A \cdot -4\right)\\ t_1 := \mathsf{fma}\left(B, B, t_0\right)\\ t_2 := 4 \cdot \left(A \cdot C\right)\\ t_3 := \frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(t_2 - B \cdot B\right)\right)\right)}}{B \cdot B - t_2}\\ \mathbf{if}\;B \leq -4.8 \cdot 10^{-90}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;B \leq -4.6 \cdot 10^{-296}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{-221}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{-52}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(-\sqrt{F \cdot t_0}\right)}{-4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{+16}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 13
Error29.4%
Cost21000.00
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := 4 \cdot \left(A \cdot C\right)\\ t_2 := \frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(t_1 - B \cdot B\right)\right)\right)}}{B \cdot B - t_1}\\ \mathbf{if}\;B \leq -3.6 \cdot 10^{-90}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{-296}:\\ \;\;\;\;\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.1 \cdot 10^{+16}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 14
Error28.8%
Cost15308.00
\[\begin{array}{l} t_0 := 4 \cdot \left(A \cdot C\right)\\ t_1 := \frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right) \cdot \left(F \cdot \left(t_0 - B \cdot B\right)\right)\right)}}{B \cdot B - t_0}\\ \mathbf{if}\;B \leq -6.5 \cdot 10^{-149}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq -4.1 \cdot 10^{-253}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot \left(F \cdot \left(C \cdot C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 4.3 \cdot 10^{+16}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 15
Error21.9%
Cost14736.00
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot \left(C \cdot C\right)\\ t_2 := F \cdot t_0\\ \mathbf{if}\;B \leq -1.4 \cdot 10^{-31}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -3 \cdot 10^{-89}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(\left(A + C\right) + \left(A + \left(0.5 \cdot \frac{B \cdot B}{A - C} - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -1.7 \cdot 10^{-246}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot t_1\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 3.2 \cdot 10^{-181}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{-8 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}\right)}{t_0}\\ \mathbf{elif}\;B \leq 2.7 \cdot 10^{-64}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(A \cdot -16\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 16
Error21.9%
Cost14612.00
\[\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)\\ t_2 := \frac{-\sqrt{\left(F \cdot \left(C \cdot C\right)\right) \cdot \left(A \cdot -16\right)}}{t_1}\\ t_3 := F \cdot t_0\\ \mathbf{if}\;B \leq -8 \cdot 10^{-30}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -4.2 \cdot 10^{-90}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(\left(A + C\right) + \left(A + \left(0.5 \cdot \frac{B \cdot B}{A - C} - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -4.6 \cdot 10^{-246}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;B \leq 2.05 \cdot 10^{-181}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{-63}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 17
Error21.9%
Cost14612.00
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot \left(C \cdot C\right)\\ t_2 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_3 := F \cdot t_0\\ \mathbf{if}\;B \leq -1 \cdot 10^{-30}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -8 \cdot 10^{-90}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(\left(A + C\right) + \left(A + \left(0.5 \cdot \frac{B \cdot B}{A - C} - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -1.5 \cdot 10^{-246}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(A \cdot t_1\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 1.95 \cdot 10^{-181}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-63}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(A \cdot -16\right)}}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 18
Error22.3%
Cost14480.00
\[\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.15 \cdot 10^{-31}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -3.3 \cdot 10^{-90}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) + \left(A + \left(0.5 \cdot \frac{B \cdot B}{A - C} - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -1.06 \cdot 10^{-190}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2.3 \cdot 10^{-56}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot A\right) \cdot \left(C \cdot F\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 19
Error21.8%
Cost13712.00
\[\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.55 \cdot 10^{-31}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -2.6 \cdot 10^{-89}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) + \left(A + \left(0.5 \cdot \frac{B \cdot B}{A - C} - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -4.8 \cdot 10^{-246}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{-56}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 20
Error13.5%
Cost9220.00
\[\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 3.9 \cdot 10^{-85}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) + \left(A + \left(0.5 \cdot \frac{B \cdot B}{A - C} - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 21
Error11.6%
Cost8452.00
\[\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.5 \cdot 10^{-142}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 22
Error13.0%
Cost8452.00
\[\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 5 \cdot 10^{-90}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 23
Error8.7%
Cost8320.00
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \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 24
Error6.8%
Cost8064.00
\[\frac{-\sqrt{2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot \left(-4 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
Alternative 25
Error7.8%
Cost8064.00
\[\frac{-\sqrt{2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot \left(F \cdot \left(A \cdot \left(C \cdot -4\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
Alternative 26
Error3.3%
Cost7936.00
\[\frac{-\sqrt{2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot \left(B \cdot \left(B \cdot F\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
Alternative 27
Error3.0%
Cost7808.00
\[\frac{-\sqrt{2 \cdot \left(\left(B \cdot F\right) \cdot \left(B \cdot \left(A + A\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
Alternative 28
Error2.9%
Cost6848.00
\[\sqrt{A \cdot F} \cdot \frac{-2}{B} \]
Alternative 29
Error3.1%
Cost6848.00
\[\sqrt{A \cdot F} \cdot \frac{2}{B} \]

Error

Reproduce?

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