?

Average Error: 52.3 → 33.6
Time: 47.0s
Precision: binary64
Cost: 155788

?

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

\mathbf{elif}\;t_5 \leq 5 \cdot 10^{+25}:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \mathsf{fma}\left(2, A, -0.5 \cdot \frac{B \cdot B}{C}\right)\right)\right)}}{t_1}\\

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\frac{t_6 \cdot \left(-\sqrt{F \cdot t_3}\right)}{t_3}\\

\mathbf{else}:\\
\;\;\;\;t_6 \cdot \frac{t_2}{\mathsf{fma}\left(-2, \frac{A}{\frac{B}{C}}, B\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))) < -5.00000000000000021e-216

    1. Initial program 38.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. Simplified32.6

      \[\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]38.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. Applied egg-rr24.2

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

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

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

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

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

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

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

      \[ \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-rr24.3

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

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

      [Start]24.3

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

      associate-*r/ [=>]24.2

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

      *-rgt-identity [=>]24.2

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

      distribute-frac-neg [=>]24.2

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

      distribute-rgt-neg-out [=>]24.2

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

      associate-*r/ [=>]24.2

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

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

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

      [Start]13.1

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

      associate-*l/ [=>]13.1

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

      *-inverses [=>]13.1

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

    if -5.00000000000000021e-216 < (/.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))) < 5.00000000000000024e25

    1. Initial program 54.9

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

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

      \[ \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 43.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 A + -0.5 \cdot \frac{{B}^{2}}{C}\right)}\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \]
    4. Simplified43.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, A, -0.5 \cdot \frac{B \cdot B}{C}\right)}\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \]
      Proof

      [Start]43.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 A + -0.5 \cdot \frac{{B}^{2}}{C}\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \]

      fma-def [=>]43.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, A, -0.5 \cdot \frac{{B}^{2}}{C}\right)}\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \]

      unpow2 [=>]43.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, A, -0.5 \cdot \frac{\color{blue}{B \cdot B}}{C}\right)\right)\right)}}{\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)} \]

    if 5.00000000000000024e25 < (/.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 46.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. Simplified30.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]46.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-rr14.8

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

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

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

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

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

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

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

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

    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 64.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. Simplified63.4

      \[\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]64.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-rr64.0

      \[\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. Simplified64.0

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

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

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

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

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

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

      \[ \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-rr64.0

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

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

      [Start]64.0

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

      associate-*r/ [=>]64.0

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

      *-rgt-identity [=>]64.0

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

      distribute-frac-neg [=>]64.0

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

      distribute-rgt-neg-out [=>]64.0

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

      associate-*r/ [=>]64.0

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

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

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

      [Start]63.8

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

      associate-*l/ [=>]63.8

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

      *-inverses [=>]61.9

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

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

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

      [Start]51.0

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

      fma-def [=>]51.0

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

      associate-/l* [=>]49.9

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

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

Alternatives

Alternative 1
Error31.4
Cost27848
\[\begin{array}{l} t_0 := -\sqrt{F}\\ t_1 := -4 \cdot \left(A \cdot C\right)\\ t_2 := A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\\ t_3 := \sqrt{2 \cdot t_2}\\ \mathbf{if}\;B \leq -1.9 \cdot 10^{+66}:\\ \;\;\;\;t_3 \cdot \frac{t_0}{2 \cdot \left(C \cdot \frac{A}{B}\right) - B}\\ \mathbf{elif}\;B \leq 240000000000:\\ \;\;\;\;-\frac{\sqrt{t_2} \cdot \sqrt{2 \cdot \left(F \cdot \mathsf{fma}\left(B, B, t_1\right)\right)}}{B \cdot B + t_1}\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \frac{t_0}{B}\\ \end{array} \]
Alternative 2
Error33.9
Cost27592
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := -\sqrt{F}\\ t_2 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_3 := \sqrt{2 \cdot \left(A + \left(C + t_0\right)\right)}\\ \mathbf{if}\;B \leq -9.8 \cdot 10^{-119}:\\ \;\;\;\;t_3 \cdot \frac{t_1}{2 \cdot \left(C \cdot \frac{A}{B}\right) - B}\\ \mathbf{elif}\;B \leq 1.25 \cdot 10^{-143}:\\ \;\;\;\;t_3 \cdot \frac{-\sqrt{F \cdot \left(A \cdot \left(C \cdot -4\right)\right)}}{t_2}\\ \mathbf{elif}\;B \leq 8.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)}}{\sqrt{\frac{t_2}{F}}}\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \frac{t_1}{B}\\ \end{array} \]
Alternative 3
Error34.6
Cost27340
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := -\sqrt{F}\\ t_2 := A + \left(C + t_0\right)\\ t_3 := \sqrt{2 \cdot t_2}\\ \mathbf{if}\;B \leq -2.45 \cdot 10^{-119}:\\ \;\;\;\;t_3 \cdot \frac{t_1}{2 \cdot \left(C \cdot \frac{A}{B}\right) - B}\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{-141}:\\ \;\;\;\;\frac{\sqrt{t_2} \cdot \left(-\sqrt{2 \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)}\\ \mathbf{elif}\;B \leq 6500000000000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + C\right) + t_0\right)}}{\sqrt{\frac{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}{F}}}\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \frac{t_1}{B}\\ \end{array} \]
Alternative 4
Error36.3
Cost21640
\[\begin{array}{l} t_0 := \sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ t_1 := -\sqrt{F}\\ t_2 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -4.4 \cdot 10^{-165}:\\ \;\;\;\;t_0 \cdot \frac{t_1}{2 \cdot \left(C \cdot \frac{A}{B}\right) - B}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{-58}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(t_2 \cdot \left(F \cdot \left(A \cdot -2\right) - F \cdot \left(\left(B \cdot B\right) \cdot \frac{-0.5}{C}\right)\right)\right)}}{t_2}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{t_1}{B}\\ \end{array} \]
Alternative 5
Error36.3
Cost21000
\[\begin{array}{l} t_0 := \sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -4.6 \cdot 10^{-163}:\\ \;\;\;\;t_0 \cdot \left(\sqrt{F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-56}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{-\sqrt{F}}{B}\\ \end{array} \]
Alternative 6
Error36.3
Cost21000
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := -\sqrt{F}\\ t_2 := \sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ \mathbf{if}\;B \leq -2 \cdot 10^{-169}:\\ \;\;\;\;t_2 \cdot \frac{t_1}{2 \cdot \left(C \cdot \frac{A}{B}\right) - B}\\ \mathbf{elif}\;B \leq 7.2 \cdot 10^{-56}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \frac{t_1}{B}\\ \end{array} \]
Alternative 7
Error34.7
Cost20424
\[\begin{array}{l} t_0 := \sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\\ \mathbf{if}\;B \leq -2.8 \cdot 10^{+65}:\\ \;\;\;\;t_0 \cdot \left(\sqrt{F} \cdot \frac{1}{B}\right)\\ \mathbf{elif}\;B \leq 1.76 \cdot 10^{-25}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, 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}:\\ \;\;\;\;t_0 \cdot \frac{-\sqrt{F}}{B}\\ \end{array} \]
Alternative 8
Error42.2
Cost20356
\[\begin{array}{l} \mathbf{if}\;B \leq 8.4 \cdot 10^{-26}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, 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}:\\ \;\;\;\;\sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \left(\sqrt{F} \cdot \frac{-1}{B}\right)\\ \end{array} \]
Alternative 9
Error42.2
Cost20292
\[\begin{array}{l} \mathbf{if}\;B \leq 4.4 \cdot 10^{-24}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, 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}:\\ \;\;\;\;\sqrt{2 \cdot \left(A + \left(C + \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \frac{-\sqrt{F}}{B}\\ \end{array} \]
Alternative 10
Error44.8
Cost15044
\[\begin{array}{l} \mathbf{if}\;B \leq 1.95 \cdot 10^{+43}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(\left(A + C\right) + \mathsf{hypot}\left(A - C, 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}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 11
Error50.0
Cost13448
\[\begin{array}{l} t_0 := F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\\ t_1 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -3.5 \cdot 10^{-69}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(\left(A + C\right) - B\right) \cdot t_0\right)}}{t_1}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{-56}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot t_0\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
Alternative 12
Error53.1
Cost8584
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\\ \mathbf{if}\;C \leq -5.2 \cdot 10^{-66}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{elif}\;C \leq 5200000000000:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot t_1\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(C + \left(A + C\right)\right) \cdot t_1\right)}}{t_0}\\ \end{array} \]
Alternative 13
Error55.8
Cost8452
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq -1.25 \cdot 10^{-71}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 14
Error56.8
Cost8196
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq -2.15 \cdot 10^{-54}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(4 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(A \cdot -2 - C\right)\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 15
Error56.5
Cost8196
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;C \leq -9 \cdot 10^{-50}:\\ \;\;\;\;-\frac{\sqrt{-2 \cdot \left(\left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right) \cdot 8\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot \left(-4 \cdot \left(F \cdot \left(A \cdot C\right)\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 16
Error58.2
Cost7808
\[-\frac{\sqrt{-2 \cdot \left(\left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right) \cdot 8\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \]
Alternative 17
Error62.6
Cost7680
\[\frac{-\sqrt{2 \cdot \left(B \cdot \left(C \cdot \left(B \cdot F\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \]
Alternative 18
Error62.9
Cost7552
\[-\frac{B \cdot \sqrt{F \cdot \left(2 \cdot C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \]
Alternative 19
Error62.9
Cost7488
\[\frac{B \cdot \sqrt{F \cdot \left(2 \cdot C\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)} \]

Error

Reproduce?

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