?

Average Error: 52.5 → 38.1
Time: 52.3s
Precision: binary64
Cost: 155852

?

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

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_4 \cdot \left(\sqrt{F} \cdot \frac{-C}{t_3}\right)\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{F \cdot t_3} \cdot \left(t_0 \cdot \frac{-1}{t_3}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{C \cdot \left(\sqrt{F} \cdot t_4\right)}{t_3}\\


\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.00000000000000028e-229

    1. Initial program 37.6

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

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

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

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

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

      [Start]22.7

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

      /-rgt-identity [=>]22.7

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

      *-commutative [=>]22.7

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

      *-commutative [=>]22.7

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

      *-commutative [=>]22.7

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

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

    if -4.00000000000000028e-229 < (/.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 61.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. 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]61.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. Taylor expanded in A around -inf 52.8

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

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

      [Start]52.8

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

      associate-*r* [=>]52.8

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

      unpow2 [=>]52.8

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

      \[\leadsto \color{blue}{\left(0 - e^{\mathsf{log1p}\left(\frac{\sqrt{-16 \cdot A} \cdot \left(C \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\right)}\right) + 1} \]
    6. Simplified50.9

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

      [Start]58.3

      \[ \left(0 - e^{\mathsf{log1p}\left(\frac{\sqrt{-16 \cdot A} \cdot \left(C \cdot \sqrt{F}\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\right)}\right) + 1 \]

      associate-+l- [=>]58.3

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

      expm1-def [=>]52.0

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

      expm1-log1p [=>]51.7

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

      sub0-neg [=>]51.7

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

      associate-*r/ [<=]51.5

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

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

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

      *-commutative [=>]51.5

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

      associate-/l* [=>]51.9

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

      associate-/r/ [=>]50.9

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

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

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right) \cdot F} \cdot \left(\left(-\sqrt{2 \cdot \left(C + \left(A + \mathsf{hypot}\left(B, A - C\right)\right)\right)}\right) \cdot \frac{1}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)}\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. Taylor expanded in A around -inf 61.9

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

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

      [Start]61.9

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

      associate-*r* [=>]61.9

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

      unpow2 [=>]61.9

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

      \[\leadsto \frac{-\color{blue}{\left(\left(0 - e^{\mathsf{log1p}\left(\sqrt{-16 \cdot A} \cdot \left(C \cdot \sqrt{F}\right)\right)}\right) + 1\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)} \]
    6. Simplified59.8

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

      [Start]63.1

      \[ \frac{-\left(\left(0 - e^{\mathsf{log1p}\left(\sqrt{-16 \cdot A} \cdot \left(C \cdot \sqrt{F}\right)\right)}\right) + 1\right)}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)} \]

      associate-+l- [=>]63.1

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

      expm1-def [=>]62.0

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

      expm1-log1p [=>]60.1

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

      sub0-neg [=>]60.1

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

      mul-1-neg [<=]60.1

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

      associate-*r* [=>]60.1

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

      *-commutative [=>]60.1

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

      associate-*l* [=>]59.8

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

      mul-1-neg [=>]59.8

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

      *-commutative [=>]59.8

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

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

Alternatives

Alternative 1
Error45.9
Cost27984
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \mathsf{hypot}\left(B, A - C\right)\\ t_2 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_3 := B \cdot \sqrt{F}\\ t_4 := \frac{\sqrt{2 \cdot \left(C + \left(A + t_1\right)\right)}}{t_2}\\ t_5 := -\frac{\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C + t_1\right)\right)\right)\right)}}{t_0}\\ \mathbf{if}\;B \leq -1.55 \cdot 10^{+15}:\\ \;\;\;\;t_3 \cdot t_4\\ \mathbf{elif}\;B \leq -1.04 \cdot 10^{-85}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;B \leq -1.4 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{F \cdot t_2} \cdot \frac{-2 \cdot \sqrt{C}}{t_2}\\ \mathbf{elif}\;B \leq -1.5 \cdot 10^{-178}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;B \leq 5.2 \cdot 10^{-263}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(8, \left(B \cdot F\right) \cdot \left(B \cdot C\right), C \cdot \left(\left(A \cdot -16\right) \cdot \left(C \cdot F\right)\right)\right)} \cdot \frac{1}{-t_2}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-80}:\\ \;\;\;\;\frac{\sqrt{A \cdot -16} \cdot \left(C \cdot \left(-\sqrt{F}\right)\right)}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\left(-t_4\right) \cdot t_3\\ \end{array} \]
Alternative 2
Error46.0
Cost27984
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := A + \left(C + t_0\right)\\ t_2 := B \cdot \sqrt{F}\\ t_3 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_4 := F \cdot t_3\\ t_5 := \frac{\sqrt{2 \cdot \left(C + \left(A + t_0\right)\right)}}{t_3}\\ t_6 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -330000000:\\ \;\;\;\;t_2 \cdot t_5\\ \mathbf{elif}\;B \leq -1.05 \cdot 10^{-87}:\\ \;\;\;\;\frac{-\sqrt{t_4 \cdot \left(2 \cdot t_1\right)}}{t_3}\\ \mathbf{elif}\;B \leq -1.02 \cdot 10^{-109}:\\ \;\;\;\;\sqrt{t_4} \cdot \frac{-2 \cdot \sqrt{C}}{t_3}\\ \mathbf{elif}\;B \leq -1.75 \cdot 10^{-178}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_6 \cdot \left(F \cdot t_1\right)\right)}}{t_6}\\ \mathbf{elif}\;B \leq 3.5 \cdot 10^{-263}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(8, \left(B \cdot F\right) \cdot \left(B \cdot C\right), C \cdot \left(\left(A \cdot -16\right) \cdot \left(C \cdot F\right)\right)\right)} \cdot \frac{1}{-t_3}\\ \mathbf{elif}\;B \leq 2.1 \cdot 10^{-80}:\\ \;\;\;\;\frac{\sqrt{A \cdot -16} \cdot \left(C \cdot \left(-\sqrt{F}\right)\right)}{t_3}\\ \mathbf{else}:\\ \;\;\;\;\left(-t_5\right) \cdot t_2\\ \end{array} \]
Alternative 3
Error46.6
Cost27984
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ t_1 := \mathsf{hypot}\left(B, A - C\right)\\ t_2 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ t_3 := B \cdot \sqrt{F}\\ t_4 := \frac{\sqrt{2 \cdot \left(C + \left(A + t_1\right)\right)}}{t_2}\\ \mathbf{if}\;B \leq -1.55 \cdot 10^{-68}:\\ \;\;\;\;t_3 \cdot t_4\\ \mathbf{elif}\;B \leq -1.42 \cdot 10^{-83}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \mathsf{fma}\left(2, A, -0.5 \cdot \frac{B \cdot B}{C}\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq -5.3 \cdot 10^{-111}:\\ \;\;\;\;\sqrt{F \cdot t_2} \cdot \frac{-2 \cdot \sqrt{C}}{t_2}\\ \mathbf{elif}\;B \leq -1.6 \cdot 10^{-178}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A + \left(C + t_1\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-263}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(8, \left(B \cdot F\right) \cdot \left(B \cdot C\right), C \cdot \left(\left(A \cdot -16\right) \cdot \left(C \cdot F\right)\right)\right)} \cdot \frac{1}{-t_2}\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-80}:\\ \;\;\;\;\frac{\sqrt{A \cdot -16} \cdot \left(C \cdot \left(-\sqrt{F}\right)\right)}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\left(-t_4\right) \cdot t_3\\ \end{array} \]
Alternative 4
Error40.9
Cost27716
\[\begin{array}{l} t_0 := -4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)\\ \mathbf{if}\;A \leq -2.8 \cdot 10^{-14}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \mathsf{fma}\left(2, C, \frac{\left(B \cdot B\right) \cdot -0.5}{A}\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\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 + t_0}\\ \end{array} \]
Alternative 5
Error45.9
Cost20356
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ \mathbf{if}\;A \leq -2.3 \cdot 10^{-11}:\\ \;\;\;\;\frac{\left(\sqrt{F} \cdot \sqrt{A \cdot -16}\right) \cdot \left(-C\right)}{t_1}\\ \mathbf{elif}\;A \leq 1.65 \cdot 10^{+159}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot F\right)}}{t_1} \cdot \left(-A\right)\\ \end{array} \]
Alternative 6
Error51.9
Cost15184
\[\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 := F \cdot t_0\\ t_3 := \frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;A \leq -1.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq -1.35 \cdot 10^{-207}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq -7.4 \cdot 10^{-228}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot -16\right)}}{\frac{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}{A}}\\ \mathbf{elif}\;A \leq 3.35 \cdot 10^{-307}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(F \cdot \left(B \cdot B\right) + \left(\left(4 \cdot A\right) \cdot C\right) \cdot F\right)} \cdot \left(-\sqrt{-B}\right)}{t_0}\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-232}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{+159}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot F\right)}}{t_1} \cdot \left(-A\right)\\ \end{array} \]
Alternative 7
Error45.7
Cost15176
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)\\ \mathbf{if}\;A \leq -2.2 \cdot 10^{-14}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{+159}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot F\right)}}{t_1} \cdot \left(-A\right)\\ \end{array} \]
Alternative 8
Error51.9
Cost15056
\[\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 := F \cdot t_0\\ t_3 := \frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;A \leq -1.15 \cdot 10^{-21}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq -2.7 \cdot 10^{-208}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq -8.8 \cdot 10^{-228}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot -16\right)}}{\frac{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}{A}}\\ \mathbf{elif}\;A \leq -6.4 \cdot 10^{-300}:\\ \;\;\;\;\frac{\sqrt{2 \cdot t_2} \cdot \left(-\sqrt{-B}\right)}{t_0}\\ \mathbf{elif}\;A \leq 5.8 \cdot 10^{-232}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.4 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 1.7 \cdot 10^{+159}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot F\right)}}{t_1} \cdot \left(-A\right)\\ \end{array} \]
Alternative 9
Error52.0
Cost14748
\[\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 := F \cdot t_0\\ t_3 := \frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;A \leq -3.2 \cdot 10^{-22}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq -1.92 \cdot 10^{-208}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq -8 \cdot 10^{-228}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot -16\right)}}{\frac{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}{A}}\\ \mathbf{elif}\;A \leq -6 \cdot 10^{-300}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(t_2 \cdot \left(\left(B + \frac{C \cdot C}{B} \cdot 0.5\right) - \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.1 \cdot 10^{-233}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.35 \cdot 10^{-17}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 1.6 \cdot 10^{+159}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot F\right)}}{t_1} \cdot \left(-A\right)\\ \end{array} \]
Alternative 10
Error51.9
Cost14748
\[\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 := F \cdot t_0\\ t_3 := \frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;A \leq -1.5 \cdot 10^{-23}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(A \cdot C\right) \cdot \left(C \cdot F\right)\right)}}{t_1}\\ \mathbf{elif}\;A \leq -1.3 \cdot 10^{-208}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq -7.4 \cdot 10^{-228}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot -16\right)}}{\frac{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}{A}}\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-306}:\\ \;\;\;\;\frac{\sqrt{2 \cdot \left(B \cdot \left(B \cdot F\right)\right)} \cdot \left(-\sqrt{-B}\right)}{t_0}\\ \mathbf{elif}\;A \leq 7.8 \cdot 10^{-234}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 3.8 \cdot 10^{-30}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;A \leq 1.65 \cdot 10^{+159}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_2 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot F\right)}}{t_1} \cdot \left(-A\right)\\ \end{array} \]
Alternative 11
Error52.7
Cost14484
\[\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 -1 \cdot 10^{-49}:\\ \;\;\;\;\sqrt{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right)\right)} \cdot \frac{0.25}{A \cdot C}\\ \mathbf{elif}\;A \leq -2 \cdot 10^{-308}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 2.9 \cdot 10^{-195}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 6.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.65 \cdot 10^{+159}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(C \cdot F\right)}}{\mathsf{fma}\left(-4, A \cdot C, B \cdot B\right)} \cdot \left(-A\right)\\ \end{array} \]
Alternative 12
Error53.4
Cost8848
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ t_2 := \frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(B + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{if}\;A \leq -9.5 \cdot 10^{-19}:\\ \;\;\;\;\sqrt{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right)\right)} \cdot \frac{0.25}{A \cdot C}\\ \mathbf{elif}\;A \leq -7.5 \cdot 10^{-206}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;A \leq 4 \cdot 10^{-232}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 9.2 \cdot 10^{-36}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 13
Error53.3
Cost8848
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -4.6 \cdot 10^{-49}:\\ \;\;\;\;\sqrt{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right)\right)} \cdot \frac{0.25}{A \cdot C}\\ \mathbf{elif}\;A \leq 4.1 \cdot 10^{-306}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(\left(A + C\right) - B\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 1.4 \cdot 10^{-198}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(C + \left(A + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;A \leq 4.8 \cdot 10^{-32}:\\ \;\;\;\;\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 14
Error53.6
Cost8584
\[\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 -1 \cdot 10^{-14}:\\ \;\;\;\;\sqrt{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right)\right)} \cdot \frac{0.25}{A \cdot C}\\ \mathbf{elif}\;A \leq 8.9 \cdot 10^{-38}:\\ \;\;\;\;\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 15
Error54.7
Cost8452
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;A \leq 1.2 \cdot 10^{-131}:\\ \;\;\;\;\sqrt{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right)\right)} \cdot \frac{0.25}{A \cdot C}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(A + C\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 16
Error55.9
Cost8196
\[\begin{array}{l} \mathbf{if}\;A \leq -1.5 \cdot 10^{-186}:\\ \;\;\;\;\sqrt{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right)\right)} \cdot \frac{0.25}{A \cdot C}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(\left(A + \left(A + C\right)\right) \cdot \left(F \cdot \left(A \cdot \left(4 \cdot C\right)\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \end{array} \]
Alternative 17
Error55.9
Cost7556
\[\begin{array}{l} \mathbf{if}\;A \leq 4.5 \cdot 10^{-147}:\\ \;\;\;\;\sqrt{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right)\right)} \cdot \frac{0.25}{A \cdot C}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{-16 \cdot \left(\left(C \cdot F\right) \cdot \left(A \cdot A\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \end{array} \]
Alternative 18
Error58.0
Cost7492
\[\begin{array}{l} \mathbf{if}\;B \leq -1.2 \cdot 10^{-18}:\\ \;\;\;\;2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(C \cdot C\right) \cdot \left(-16 \cdot \left(A \cdot F\right)\right)} \cdot \frac{0.25}{A \cdot C}\\ \end{array} \]
Alternative 19
Error62.0
Cost6976
\[2 \cdot \left(\sqrt{C \cdot F} \cdot \frac{1}{B}\right) \]
Alternative 20
Error62.2
Cost6848
\[\sqrt{A \cdot F} \cdot \frac{-2}{B} \]
Alternative 21
Error62.0
Cost6848
\[2 \cdot \frac{\sqrt{C \cdot F}}{B} \]

Error

Reproduce?

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