ABCF->ab-angle b

Percentage Accurate: 18.9% → 51.2%
Time: 12.6s
Alternatives: 19
Speedup: 14.4×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\ \frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0} \end{array} \end{array} \]
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
   (/
    (-
     (sqrt
      (*
       (* 2.0 (* t_0 F))
       (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
    t_0)))
double code(double A, double B, double C, double F) {
	double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
	return -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b, c, f)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: t_0
    t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
    code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) - sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
	double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
	return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F):
	t_0 = math.pow(B, 2.0) - ((4.0 * A) * C)
	return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F)
	t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C))
	return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0)
end
function tmp = code(A, B, C, F)
	t_0 = (B ^ 2.0) - ((4.0 * A) * C);
	tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0;
end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * 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]) / t$95$0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0}
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 18.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\ \frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0} \end{array} \end{array} \]
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (- (pow B 2.0) (* (* 4.0 A) C))))
   (/
    (-
     (sqrt
      (*
       (* 2.0 (* t_0 F))
       (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
    t_0)))
double code(double A, double B, double C, double F) {
	double t_0 = pow(B, 2.0) - ((4.0 * A) * C);
	return -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / t_0;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b, c, f)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: f
    real(8) :: t_0
    t_0 = (b ** 2.0d0) - ((4.0d0 * a) * c)
    code = -sqrt(((2.0d0 * (t_0 * f)) * ((a + c) - sqrt((((a - c) ** 2.0d0) + (b ** 2.0d0)))))) / t_0
end function
public static double code(double A, double B, double C, double F) {
	double t_0 = Math.pow(B, 2.0) - ((4.0 * A) * C);
	return -Math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - Math.sqrt((Math.pow((A - C), 2.0) + Math.pow(B, 2.0)))))) / t_0;
}
def code(A, B, C, F):
	t_0 = math.pow(B, 2.0) - ((4.0 * A) * C)
	return -math.sqrt(((2.0 * (t_0 * F)) * ((A + C) - math.sqrt((math.pow((A - C), 2.0) + math.pow(B, 2.0)))))) / t_0
function code(A, B, C, F)
	t_0 = Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C))
	return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(t_0 * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / t_0)
end
function tmp = code(A, B, C, F)
	t_0 = (B ^ 2.0) - ((4.0 * A) * C);
	tmp = -sqrt(((2.0 * (t_0 * F)) * ((A + C) - sqrt((((A - C) ^ 2.0) + (B ^ 2.0)))))) / t_0;
end
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, N[((-N[Sqrt[N[(N[(2.0 * N[(t$95$0 * 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]) / t$95$0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {B}^{2} - \left(4 \cdot A\right) \cdot C\\
\frac{-\sqrt{\left(2 \cdot \left(t\_0 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{t\_0}
\end{array}
\end{array}

Alternative 1: 51.2% accurate, 0.3× speedup?

\[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := \left(C + A\right) - \mathsf{hypot}\left(A - C, B\_m\right)\\ t_1 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\ t_2 := \left(2 \cdot F\right) \cdot t\_1\\ t_3 := -t\_1\\ t_4 := -\sqrt{2}\\ t_5 := {B\_m}^{2} - \left(4 \cdot A\right) \cdot C\\ t_6 := \frac{\sqrt{\left(2 \cdot \left(t\_5 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B\_m}^{2}}\right)}}{-t\_5}\\ \mathbf{if}\;t\_6 \leq -\infty:\\ \;\;\;\;\sqrt{F \cdot \frac{t\_0}{\mathsf{fma}\left(C \cdot A, -4, B\_m \cdot B\_m\right)}} \cdot t\_4\\ \mathbf{elif}\;t\_6 \leq -1 \cdot 10^{-203}:\\ \;\;\;\;\frac{\sqrt{t\_0 \cdot t\_2}}{t\_3}\\ \mathbf{elif}\;t\_6 \leq \infty:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot t\_2}}{t\_3}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot t\_4\\ \end{array} \end{array} \]
B_m = (fabs.f64 B)
NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
(FPCore (A B_m C F)
 :precision binary64
 (let* ((t_0 (- (+ C A) (hypot (- A C) B_m)))
        (t_1 (fma (* -4.0 A) C (* B_m B_m)))
        (t_2 (* (* 2.0 F) t_1))
        (t_3 (- t_1))
        (t_4 (- (sqrt 2.0)))
        (t_5 (- (pow B_m 2.0) (* (* 4.0 A) C)))
        (t_6
         (/
          (sqrt
           (*
            (* 2.0 (* t_5 F))
            (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B_m 2.0))))))
          (- t_5))))
   (if (<= t_6 (- INFINITY))
     (* (sqrt (* F (/ t_0 (fma (* C A) -4.0 (* B_m B_m))))) t_4)
     (if (<= t_6 -1e-203)
       (/ (sqrt (* t_0 t_2)) t_3)
       (if (<= t_6 INFINITY)
         (/ (sqrt (* (+ (- A (* 0.5 (/ (* B_m B_m) C))) A) t_2)) t_3)
         (* (sqrt (/ (- F) B_m)) t_4))))))
B_m = fabs(B);
assert(A < B_m && B_m < C && C < F);
double code(double A, double B_m, double C, double F) {
	double t_0 = (C + A) - hypot((A - C), B_m);
	double t_1 = fma((-4.0 * A), C, (B_m * B_m));
	double t_2 = (2.0 * F) * t_1;
	double t_3 = -t_1;
	double t_4 = -sqrt(2.0);
	double t_5 = pow(B_m, 2.0) - ((4.0 * A) * C);
	double t_6 = sqrt(((2.0 * (t_5 * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B_m, 2.0)))))) / -t_5;
	double tmp;
	if (t_6 <= -((double) INFINITY)) {
		tmp = sqrt((F * (t_0 / fma((C * A), -4.0, (B_m * B_m))))) * t_4;
	} else if (t_6 <= -1e-203) {
		tmp = sqrt((t_0 * t_2)) / t_3;
	} else if (t_6 <= ((double) INFINITY)) {
		tmp = sqrt((((A - (0.5 * ((B_m * B_m) / C))) + A) * t_2)) / t_3;
	} else {
		tmp = sqrt((-F / B_m)) * t_4;
	}
	return tmp;
}
B_m = abs(B)
A, B_m, C, F = sort([A, B_m, C, F])
function code(A, B_m, C, F)
	t_0 = Float64(Float64(C + A) - hypot(Float64(A - C), B_m))
	t_1 = fma(Float64(-4.0 * A), C, Float64(B_m * B_m))
	t_2 = Float64(Float64(2.0 * F) * t_1)
	t_3 = Float64(-t_1)
	t_4 = Float64(-sqrt(2.0))
	t_5 = Float64((B_m ^ 2.0) - Float64(Float64(4.0 * A) * C))
	t_6 = Float64(sqrt(Float64(Float64(2.0 * Float64(t_5 * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B_m ^ 2.0)))))) / Float64(-t_5))
	tmp = 0.0
	if (t_6 <= Float64(-Inf))
		tmp = Float64(sqrt(Float64(F * Float64(t_0 / fma(Float64(C * A), -4.0, Float64(B_m * B_m))))) * t_4);
	elseif (t_6 <= -1e-203)
		tmp = Float64(sqrt(Float64(t_0 * t_2)) / t_3);
	elseif (t_6 <= Inf)
		tmp = Float64(sqrt(Float64(Float64(Float64(A - Float64(0.5 * Float64(Float64(B_m * B_m) / C))) + A) * t_2)) / t_3);
	else
		tmp = Float64(sqrt(Float64(Float64(-F) / B_m)) * t_4);
	end
	return tmp
end
B_m = N[Abs[B], $MachinePrecision]
NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(C + A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * F), $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = (-t$95$1)}, Block[{t$95$4 = (-N[Sqrt[2.0], $MachinePrecision])}, Block[{t$95$5 = N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[Sqrt[N[(N[(2.0 * N[(t$95$5 * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-t$95$5)), $MachinePrecision]}, If[LessEqual[t$95$6, (-Infinity)], N[(N[Sqrt[N[(F * N[(t$95$0 / N[(N[(C * A), $MachinePrecision] * -4.0 + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[t$95$6, -1e-203], N[(N[Sqrt[N[(t$95$0 * t$95$2), $MachinePrecision]], $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[t$95$6, Infinity], N[(N[Sqrt[N[(N[(N[(A - N[(0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + A), $MachinePrecision] * t$95$2), $MachinePrecision]], $MachinePrecision] / t$95$3), $MachinePrecision], N[(N[Sqrt[N[((-F) / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$4), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
B_m = \left|B\right|
\\
[A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
\\
\begin{array}{l}
t_0 := \left(C + A\right) - \mathsf{hypot}\left(A - C, B\_m\right)\\
t_1 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\
t_2 := \left(2 \cdot F\right) \cdot t\_1\\
t_3 := -t\_1\\
t_4 := -\sqrt{2}\\
t_5 := {B\_m}^{2} - \left(4 \cdot A\right) \cdot C\\
t_6 := \frac{\sqrt{\left(2 \cdot \left(t\_5 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B\_m}^{2}}\right)}}{-t\_5}\\
\mathbf{if}\;t\_6 \leq -\infty:\\
\;\;\;\;\sqrt{F \cdot \frac{t\_0}{\mathsf{fma}\left(C \cdot A, -4, B\_m \cdot B\_m\right)}} \cdot t\_4\\

\mathbf{elif}\;t\_6 \leq -1 \cdot 10^{-203}:\\
\;\;\;\;\frac{\sqrt{t\_0 \cdot t\_2}}{t\_3}\\

\mathbf{elif}\;t\_6 \leq \infty:\\
\;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot t\_2}}{t\_3}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot t\_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -inf.0

    1. Initial program 3.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. Add Preprocessing
    3. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)} \]
      2. lower-neg.f64N/A

        \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
      3. lower-*.f64N/A

        \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
    5. Applied rewrites63.9%

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

    if -inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -1e-203

    1. Initial program 98.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\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. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. distribute-frac-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
      4. distribute-neg-frac2N/A

        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
    4. Applied rewrites98.5%

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

    if -1e-203 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < +inf.0

    1. Initial program 10.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\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. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. distribute-frac-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
      4. distribute-neg-frac2N/A

        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
    4. Applied rewrites25.1%

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

      \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - -1 \cdot A\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      3. fp-cancel-sign-sub-invN/A

        \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right) \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      4. metadata-evalN/A

        \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2}} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      5. lower--.f64N/A

        \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \frac{1}{2} \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2} \cdot \frac{{B}^{2}}{C}}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      7. lower-/.f64N/A

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

        \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      10. lower-neg.f6428.2

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

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

    if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) 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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\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. lift-neg.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      3. distribute-frac-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
      4. distribute-neg-frac2N/A

        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
    4. Applied rewrites0.4%

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

      \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      4. associate-*r*N/A

        \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      5. lower-*.f64N/A

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

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

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

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

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

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
    8. Taylor expanded in F around 0

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
      2. lower-neg.f64N/A

        \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
      3. lower-*.f64N/A

        \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
    10. Applied rewrites4.4%

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

      \[\leadsto -\sqrt{-1 \cdot \frac{F}{B}} \cdot \sqrt{2} \]
    12. Step-by-step derivation
      1. Applied rewrites18.3%

        \[\leadsto -\sqrt{\frac{-F}{B}} \cdot \sqrt{2} \]
    13. Recombined 4 regimes into one program.
    14. Final simplification43.8%

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

    Alternative 2: 50.8% accurate, 0.3× speedup?

    \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\ t_1 := \left(2 \cdot F\right) \cdot t\_0\\ t_2 := -t\_0\\ t_3 := -\sqrt{2}\\ t_4 := {B\_m}^{2} - \left(4 \cdot A\right) \cdot C\\ t_5 := \frac{\sqrt{\left(2 \cdot \left(t\_4 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B\_m}^{2}}\right)}}{-t\_4}\\ \mathbf{if}\;t\_5 \leq -\infty:\\ \;\;\;\;\sqrt{F \cdot \frac{\left(C + A\right) - \mathsf{hypot}\left(A - C, B\_m\right)}{\mathsf{fma}\left(C \cdot A, -4, B\_m \cdot B\_m\right)}} \cdot t\_3\\ \mathbf{elif}\;t\_5 \leq -1 \cdot 10^{-203}:\\ \;\;\;\;\frac{\sqrt{\left(\left(C + A\right) - \mathsf{hypot}\left(A, B\_m\right)\right) \cdot t\_1}}{t\_2}\\ \mathbf{elif}\;t\_5 \leq \infty:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot t\_1}}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot t\_3\\ \end{array} \end{array} \]
    B_m = (fabs.f64 B)
    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
    (FPCore (A B_m C F)
     :precision binary64
     (let* ((t_0 (fma (* -4.0 A) C (* B_m B_m)))
            (t_1 (* (* 2.0 F) t_0))
            (t_2 (- t_0))
            (t_3 (- (sqrt 2.0)))
            (t_4 (- (pow B_m 2.0) (* (* 4.0 A) C)))
            (t_5
             (/
              (sqrt
               (*
                (* 2.0 (* t_4 F))
                (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B_m 2.0))))))
              (- t_4))))
       (if (<= t_5 (- INFINITY))
         (*
          (sqrt
           (*
            F
            (/ (- (+ C A) (hypot (- A C) B_m)) (fma (* C A) -4.0 (* B_m B_m)))))
          t_3)
         (if (<= t_5 -1e-203)
           (/ (sqrt (* (- (+ C A) (hypot A B_m)) t_1)) t_2)
           (if (<= t_5 INFINITY)
             (/ (sqrt (* (+ (- A (* 0.5 (/ (* B_m B_m) C))) A) t_1)) t_2)
             (* (sqrt (/ (- F) B_m)) t_3))))))
    B_m = fabs(B);
    assert(A < B_m && B_m < C && C < F);
    double code(double A, double B_m, double C, double F) {
    	double t_0 = fma((-4.0 * A), C, (B_m * B_m));
    	double t_1 = (2.0 * F) * t_0;
    	double t_2 = -t_0;
    	double t_3 = -sqrt(2.0);
    	double t_4 = pow(B_m, 2.0) - ((4.0 * A) * C);
    	double t_5 = sqrt(((2.0 * (t_4 * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B_m, 2.0)))))) / -t_4;
    	double tmp;
    	if (t_5 <= -((double) INFINITY)) {
    		tmp = sqrt((F * (((C + A) - hypot((A - C), B_m)) / fma((C * A), -4.0, (B_m * B_m))))) * t_3;
    	} else if (t_5 <= -1e-203) {
    		tmp = sqrt((((C + A) - hypot(A, B_m)) * t_1)) / t_2;
    	} else if (t_5 <= ((double) INFINITY)) {
    		tmp = sqrt((((A - (0.5 * ((B_m * B_m) / C))) + A) * t_1)) / t_2;
    	} else {
    		tmp = sqrt((-F / B_m)) * t_3;
    	}
    	return tmp;
    }
    
    B_m = abs(B)
    A, B_m, C, F = sort([A, B_m, C, F])
    function code(A, B_m, C, F)
    	t_0 = fma(Float64(-4.0 * A), C, Float64(B_m * B_m))
    	t_1 = Float64(Float64(2.0 * F) * t_0)
    	t_2 = Float64(-t_0)
    	t_3 = Float64(-sqrt(2.0))
    	t_4 = Float64((B_m ^ 2.0) - Float64(Float64(4.0 * A) * C))
    	t_5 = Float64(sqrt(Float64(Float64(2.0 * Float64(t_4 * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B_m ^ 2.0)))))) / Float64(-t_4))
    	tmp = 0.0
    	if (t_5 <= Float64(-Inf))
    		tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(C + A) - hypot(Float64(A - C), B_m)) / fma(Float64(C * A), -4.0, Float64(B_m * B_m))))) * t_3);
    	elseif (t_5 <= -1e-203)
    		tmp = Float64(sqrt(Float64(Float64(Float64(C + A) - hypot(A, B_m)) * t_1)) / t_2);
    	elseif (t_5 <= Inf)
    		tmp = Float64(sqrt(Float64(Float64(Float64(A - Float64(0.5 * Float64(Float64(B_m * B_m) / C))) + A) * t_1)) / t_2);
    	else
    		tmp = Float64(sqrt(Float64(Float64(-F) / B_m)) * t_3);
    	end
    	return tmp
    end
    
    B_m = N[Abs[B], $MachinePrecision]
    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
    code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(2.0 * F), $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = (-t$95$0)}, Block[{t$95$3 = (-N[Sqrt[2.0], $MachinePrecision])}, Block[{t$95$4 = N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $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[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-t$95$4)), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], N[(N[Sqrt[N[(F * N[(N[(N[(C + A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision] / N[(N[(C * A), $MachinePrecision] * -4.0 + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[t$95$5, -1e-203], N[(N[Sqrt[N[(N[(N[(C + A), $MachinePrecision] - N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[Sqrt[N[(N[(N[(A - N[(0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + A), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision], N[(N[Sqrt[N[((-F) / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]]]
    
    \begin{array}{l}
    B_m = \left|B\right|
    \\
    [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
    \\
    \begin{array}{l}
    t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\
    t_1 := \left(2 \cdot F\right) \cdot t\_0\\
    t_2 := -t\_0\\
    t_3 := -\sqrt{2}\\
    t_4 := {B\_m}^{2} - \left(4 \cdot A\right) \cdot C\\
    t_5 := \frac{\sqrt{\left(2 \cdot \left(t\_4 \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B\_m}^{2}}\right)}}{-t\_4}\\
    \mathbf{if}\;t\_5 \leq -\infty:\\
    \;\;\;\;\sqrt{F \cdot \frac{\left(C + A\right) - \mathsf{hypot}\left(A - C, B\_m\right)}{\mathsf{fma}\left(C \cdot A, -4, B\_m \cdot B\_m\right)}} \cdot t\_3\\
    
    \mathbf{elif}\;t\_5 \leq -1 \cdot 10^{-203}:\\
    \;\;\;\;\frac{\sqrt{\left(\left(C + A\right) - \mathsf{hypot}\left(A, B\_m\right)\right) \cdot t\_1}}{t\_2}\\
    
    \mathbf{elif}\;t\_5 \leq \infty:\\
    \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot t\_1}}{t\_2}\\
    
    \mathbf{else}:\\
    \;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot t\_3\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -inf.0

      1. Initial program 3.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. Add Preprocessing
      3. Taylor expanded in F around 0

        \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)} \]
        2. lower-neg.f64N/A

          \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
        3. lower-*.f64N/A

          \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
      5. Applied rewrites63.9%

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

      if -inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < -1e-203

      1. Initial program 98.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. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\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. lift-neg.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
        3. distribute-frac-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
        4. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      4. Applied rewrites98.5%

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

        \[\leadsto \frac{\sqrt{\left(\left(C + A\right) - \color{blue}{\sqrt{{A}^{2} + {B}^{2}}}\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      6. Step-by-step derivation
        1. unpow2N/A

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

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

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

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

      if -1e-203 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C))) < +inf.0

      1. Initial program 10.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. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\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. lift-neg.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
        3. distribute-frac-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
        4. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      4. Applied rewrites25.1%

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

        \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - -1 \cdot A\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

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

          \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        3. fp-cancel-sign-sub-invN/A

          \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right) \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        4. metadata-evalN/A

          \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2}} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        5. lower--.f64N/A

          \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \frac{1}{2} \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2} \cdot \frac{{B}^{2}}{C}}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        7. lower-/.f64N/A

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

          \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        9. lower-*.f64N/A

          \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        10. lower-neg.f6428.2

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

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

      if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 #s(literal 2 binary64) (*.f64 (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) #s(literal 2 binary64)) (pow.f64 B #s(literal 2 binary64)))))))) (-.f64 (pow.f64 B #s(literal 2 binary64)) (*.f64 (*.f64 #s(literal 4 binary64) 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. Add Preprocessing
      3. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\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. lift-neg.f64N/A

          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
        3. distribute-frac-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
        4. distribute-neg-frac2N/A

          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
      4. Applied rewrites0.4%

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

        \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      6. Step-by-step derivation
        1. associate-*r*N/A

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

          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        4. associate-*r*N/A

          \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        5. lower-*.f64N/A

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

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

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

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

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

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
      8. Taylor expanded in F around 0

        \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
      9. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
        2. lower-neg.f64N/A

          \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
        3. lower-*.f64N/A

          \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
      10. Applied rewrites4.4%

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

        \[\leadsto -\sqrt{-1 \cdot \frac{F}{B}} \cdot \sqrt{2} \]
      12. Step-by-step derivation
        1. Applied rewrites18.3%

          \[\leadsto -\sqrt{\frac{-F}{B}} \cdot \sqrt{2} \]
      13. Recombined 4 regimes into one program.
      14. Final simplification40.2%

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

      Alternative 3: 48.3% accurate, 2.7× speedup?

      \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\ t_1 := -\sqrt{2}\\ \mathbf{if}\;B\_m \leq 2.25 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot \left(\left(2 \cdot F\right) \cdot t\_0\right)}}{-t\_0}\\ \mathbf{elif}\;B\_m \leq 5 \cdot 10^{+148}:\\ \;\;\;\;\sqrt{F \cdot \frac{\left(C + A\right) - \mathsf{hypot}\left(A - C, B\_m\right)}{\mathsf{fma}\left(C \cdot A, -4, B\_m \cdot B\_m\right)}} \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot t\_1\\ \end{array} \end{array} \]
      B_m = (fabs.f64 B)
      NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
      (FPCore (A B_m C F)
       :precision binary64
       (let* ((t_0 (fma (* -4.0 A) C (* B_m B_m))) (t_1 (- (sqrt 2.0))))
         (if (<= B_m 2.25e-29)
           (/
            (sqrt (* (+ (- A (* 0.5 (/ (* B_m B_m) C))) A) (* (* 2.0 F) t_0)))
            (- t_0))
           (if (<= B_m 5e+148)
             (*
              (sqrt
               (*
                F
                (/ (- (+ C A) (hypot (- A C) B_m)) (fma (* C A) -4.0 (* B_m B_m)))))
              t_1)
             (* (sqrt (* F (/ (- (/ (+ C A) B_m) 1.0) B_m))) t_1)))))
      B_m = fabs(B);
      assert(A < B_m && B_m < C && C < F);
      double code(double A, double B_m, double C, double F) {
      	double t_0 = fma((-4.0 * A), C, (B_m * B_m));
      	double t_1 = -sqrt(2.0);
      	double tmp;
      	if (B_m <= 2.25e-29) {
      		tmp = sqrt((((A - (0.5 * ((B_m * B_m) / C))) + A) * ((2.0 * F) * t_0))) / -t_0;
      	} else if (B_m <= 5e+148) {
      		tmp = sqrt((F * (((C + A) - hypot((A - C), B_m)) / fma((C * A), -4.0, (B_m * B_m))))) * t_1;
      	} else {
      		tmp = sqrt((F * ((((C + A) / B_m) - 1.0) / B_m))) * t_1;
      	}
      	return tmp;
      }
      
      B_m = abs(B)
      A, B_m, C, F = sort([A, B_m, C, F])
      function code(A, B_m, C, F)
      	t_0 = fma(Float64(-4.0 * A), C, Float64(B_m * B_m))
      	t_1 = Float64(-sqrt(2.0))
      	tmp = 0.0
      	if (B_m <= 2.25e-29)
      		tmp = Float64(sqrt(Float64(Float64(Float64(A - Float64(0.5 * Float64(Float64(B_m * B_m) / C))) + A) * Float64(Float64(2.0 * F) * t_0))) / Float64(-t_0));
      	elseif (B_m <= 5e+148)
      		tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(C + A) - hypot(Float64(A - C), B_m)) / fma(Float64(C * A), -4.0, Float64(B_m * B_m))))) * t_1);
      	else
      		tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(Float64(C + A) / B_m) - 1.0) / B_m))) * t_1);
      	end
      	return tmp
      end
      
      B_m = N[Abs[B], $MachinePrecision]
      NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
      code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[B$95$m, 2.25e-29], N[(N[Sqrt[N[(N[(N[(A - N[(0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + A), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-t$95$0)), $MachinePrecision], If[LessEqual[B$95$m, 5e+148], N[(N[Sqrt[N[(F * N[(N[(N[(C + A), $MachinePrecision] - N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision] / N[(N[(C * A), $MachinePrecision] * -4.0 + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Sqrt[N[(F * N[(N[(N[(N[(C + A), $MachinePrecision] / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
      
      \begin{array}{l}
      B_m = \left|B\right|
      \\
      [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
      \\
      \begin{array}{l}
      t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\
      t_1 := -\sqrt{2}\\
      \mathbf{if}\;B\_m \leq 2.25 \cdot 10^{-29}:\\
      \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot \left(\left(2 \cdot F\right) \cdot t\_0\right)}}{-t\_0}\\
      
      \mathbf{elif}\;B\_m \leq 5 \cdot 10^{+148}:\\
      \;\;\;\;\sqrt{F \cdot \frac{\left(C + A\right) - \mathsf{hypot}\left(A - C, B\_m\right)}{\mathsf{fma}\left(C \cdot A, -4, B\_m \cdot B\_m\right)}} \cdot t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if B < 2.2499999999999999e-29

        1. Initial program 20.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. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\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. lift-neg.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
          3. distribute-frac-negN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
          4. distribute-neg-frac2N/A

            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
          5. lower-/.f64N/A

            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
        4. Applied rewrites28.3%

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

          \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - -1 \cdot A\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        6. Step-by-step derivation
          1. mul-1-negN/A

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

            \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          3. fp-cancel-sign-sub-invN/A

            \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right) \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          4. metadata-evalN/A

            \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2}} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          5. lower--.f64N/A

            \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \frac{1}{2} \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2} \cdot \frac{{B}^{2}}{C}}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          7. lower-/.f64N/A

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

            \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          9. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          10. lower-neg.f6414.2

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

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

        if 2.2499999999999999e-29 < B < 5.00000000000000024e148

        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. Add Preprocessing
        3. Taylor expanded in F around 0

          \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)} \]
        4. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}\right)} \]
          2. lower-neg.f64N/A

            \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
          3. lower-*.f64N/A

            \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{2}} \]
        5. Applied rewrites57.3%

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

        if 5.00000000000000024e148 < B

        1. Initial program 3.3%

          \[\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. Add Preprocessing
        3. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\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. lift-neg.f64N/A

            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
          3. distribute-frac-negN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
          4. distribute-neg-frac2N/A

            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
          5. lower-/.f64N/A

            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
        4. Applied rewrites3.3%

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

          \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        6. Step-by-step derivation
          1. associate-*r*N/A

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

            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          4. associate-*r*N/A

            \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          5. lower-*.f64N/A

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

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

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

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

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

          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
        8. Taylor expanded in F around 0

          \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
        9. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
          2. lower-neg.f64N/A

            \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
          3. lower-*.f64N/A

            \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
        10. Applied rewrites7.5%

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

          \[\leadsto -\sqrt{F \cdot \frac{\left(\frac{A}{B} + \frac{C}{B}\right) - 1}{B}} \cdot \sqrt{2} \]
        12. Step-by-step derivation
          1. Applied rewrites59.5%

            \[\leadsto -\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \sqrt{2} \]
        13. Recombined 3 regimes into one program.
        14. Final simplification26.6%

          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.25 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 5 \cdot 10^{+148}:\\ \;\;\;\;\sqrt{F \cdot \frac{\left(C + A\right) - \mathsf{hypot}\left(A - C, B\right)}{\mathsf{fma}\left(C \cdot A, -4, B \cdot B\right)}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
        15. Add Preprocessing

        Alternative 4: 46.4% accurate, 3.3× speedup?

        \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\ \mathbf{if}\;B\_m \leq 3.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot \left(\left(2 \cdot F\right) \cdot t\_0\right)}}{-t\_0}\\ \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+187}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\_m\right)\right) \cdot F\right) \cdot 2}}{-B\_m}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \end{array} \]
        B_m = (fabs.f64 B)
        NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
        (FPCore (A B_m C F)
         :precision binary64
         (let* ((t_0 (fma (* -4.0 A) C (* B_m B_m))))
           (if (<= B_m 3.5e-29)
             (/
              (sqrt (* (+ (- A (* 0.5 (/ (* B_m B_m) C))) A) (* (* 2.0 F) t_0)))
              (- t_0))
             (if (<= B_m 2.6e+187)
               (/ (sqrt (* (* (- A (hypot A B_m)) F) 2.0)) (- B_m))
               (* (sqrt (* F (/ (- (/ (+ C A) B_m) 1.0) B_m))) (- (sqrt 2.0)))))))
        B_m = fabs(B);
        assert(A < B_m && B_m < C && C < F);
        double code(double A, double B_m, double C, double F) {
        	double t_0 = fma((-4.0 * A), C, (B_m * B_m));
        	double tmp;
        	if (B_m <= 3.5e-29) {
        		tmp = sqrt((((A - (0.5 * ((B_m * B_m) / C))) + A) * ((2.0 * F) * t_0))) / -t_0;
        	} else if (B_m <= 2.6e+187) {
        		tmp = sqrt((((A - hypot(A, B_m)) * F) * 2.0)) / -B_m;
        	} else {
        		tmp = sqrt((F * ((((C + A) / B_m) - 1.0) / B_m))) * -sqrt(2.0);
        	}
        	return tmp;
        }
        
        B_m = abs(B)
        A, B_m, C, F = sort([A, B_m, C, F])
        function code(A, B_m, C, F)
        	t_0 = fma(Float64(-4.0 * A), C, Float64(B_m * B_m))
        	tmp = 0.0
        	if (B_m <= 3.5e-29)
        		tmp = Float64(sqrt(Float64(Float64(Float64(A - Float64(0.5 * Float64(Float64(B_m * B_m) / C))) + A) * Float64(Float64(2.0 * F) * t_0))) / Float64(-t_0));
        	elseif (B_m <= 2.6e+187)
        		tmp = Float64(sqrt(Float64(Float64(Float64(A - hypot(A, B_m)) * F) * 2.0)) / Float64(-B_m));
        	else
        		tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(Float64(C + A) / B_m) - 1.0) / B_m))) * Float64(-sqrt(2.0)));
        	end
        	return tmp
        end
        
        B_m = N[Abs[B], $MachinePrecision]
        NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
        code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.5e-29], N[(N[Sqrt[N[(N[(N[(A - N[(0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + A), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-t$95$0)), $MachinePrecision], If[LessEqual[B$95$m, 2.6e+187], N[(N[Sqrt[N[(N[(N[(A - N[Sqrt[A ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / (-B$95$m)), $MachinePrecision], N[(N[Sqrt[N[(F * N[(N[(N[(N[(C + A), $MachinePrecision] / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]]]]
        
        \begin{array}{l}
        B_m = \left|B\right|
        \\
        [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
        \\
        \begin{array}{l}
        t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\
        \mathbf{if}\;B\_m \leq 3.5 \cdot 10^{-29}:\\
        \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot \left(\left(2 \cdot F\right) \cdot t\_0\right)}}{-t\_0}\\
        
        \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+187}:\\
        \;\;\;\;\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\_m\right)\right) \cdot F\right) \cdot 2}}{-B\_m}\\
        
        \mathbf{else}:\\
        \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot \left(-\sqrt{2}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if B < 3.4999999999999997e-29

          1. Initial program 20.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. Add Preprocessing
          3. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \color{blue}{\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. lift-neg.f64N/A

              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
            3. distribute-frac-negN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
            4. distribute-neg-frac2N/A

              \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
            5. lower-/.f64N/A

              \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
          4. Applied rewrites28.3%

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

            \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - -1 \cdot A\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
          6. Step-by-step derivation
            1. mul-1-negN/A

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

              \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
            3. fp-cancel-sign-sub-invN/A

              \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right) \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
            4. metadata-evalN/A

              \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2}} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
            5. lower--.f64N/A

              \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \frac{1}{2} \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2} \cdot \frac{{B}^{2}}{C}}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
            7. lower-/.f64N/A

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

              \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
            9. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
            10. lower-neg.f6414.2

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

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

          if 3.4999999999999997e-29 < B < 2.5999999999999999e187

          1. Initial program 32.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. Add Preprocessing
          3. Taylor expanded in C around 0

            \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
          4. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
            2. lower-neg.f64N/A

              \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
            3. *-commutativeN/A

              \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
            4. lower-*.f64N/A

              \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
            5. lower-sqrt.f64N/A

              \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \cdot \frac{\sqrt{2}}{B} \]
            6. *-commutativeN/A

              \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
            7. lower-*.f64N/A

              \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
            8. lower--.f64N/A

              \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot F} \cdot \frac{\sqrt{2}}{B} \]
            9. unpow2N/A

              \[\leadsto -\sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
            10. unpow2N/A

              \[\leadsto -\sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
            11. lower-hypot.f64N/A

              \[\leadsto -\sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
            12. lower-/.f64N/A

              \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
            13. lower-sqrt.f6440.1

              \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\color{blue}{\sqrt{2}}}{B} \]
          5. Applied rewrites40.1%

            \[\leadsto \color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
          6. Step-by-step derivation
            1. Applied rewrites40.3%

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

            if 2.5999999999999999e187 < B

            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. Add Preprocessing
            3. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
              3. distribute-frac-negN/A

                \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
              4. distribute-neg-frac2N/A

                \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
              5. lower-/.f64N/A

                \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
            4. Applied rewrites0.0%

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

              \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
            6. Step-by-step derivation
              1. associate-*r*N/A

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

                \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
              3. lower-*.f64N/A

                \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
              4. associate-*r*N/A

                \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
              5. lower-*.f64N/A

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

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

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

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

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

              \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
            8. Taylor expanded in F around 0

              \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
            9. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
              2. lower-neg.f64N/A

                \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
              3. lower-*.f64N/A

                \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
            10. Applied rewrites4.7%

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

              \[\leadsto -\sqrt{F \cdot \frac{\left(\frac{A}{B} + \frac{C}{B}\right) - 1}{B}} \cdot \sqrt{2} \]
            12. Step-by-step derivation
              1. Applied rewrites62.8%

                \[\leadsto -\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \sqrt{2} \]
            13. Recombined 3 regimes into one program.
            14. Final simplification23.4%

              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+187}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right) \cdot 2}}{-B}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
            15. Add Preprocessing

            Alternative 5: 43.6% accurate, 4.7× speedup?

            \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\ \mathbf{if}\;B\_m \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot \left(\left(2 \cdot F\right) \cdot t\_0\right)}}{-t\_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \end{array} \]
            B_m = (fabs.f64 B)
            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
            (FPCore (A B_m C F)
             :precision binary64
             (let* ((t_0 (fma (* -4.0 A) C (* B_m B_m))))
               (if (<= B_m 2.6e+18)
                 (/
                  (sqrt (* (+ (- A (* 0.5 (/ (* B_m B_m) C))) A) (* (* 2.0 F) t_0)))
                  (- t_0))
                 (* (sqrt (* F (/ (- (/ (+ C A) B_m) 1.0) B_m))) (- (sqrt 2.0))))))
            B_m = fabs(B);
            assert(A < B_m && B_m < C && C < F);
            double code(double A, double B_m, double C, double F) {
            	double t_0 = fma((-4.0 * A), C, (B_m * B_m));
            	double tmp;
            	if (B_m <= 2.6e+18) {
            		tmp = sqrt((((A - (0.5 * ((B_m * B_m) / C))) + A) * ((2.0 * F) * t_0))) / -t_0;
            	} else {
            		tmp = sqrt((F * ((((C + A) / B_m) - 1.0) / B_m))) * -sqrt(2.0);
            	}
            	return tmp;
            }
            
            B_m = abs(B)
            A, B_m, C, F = sort([A, B_m, C, F])
            function code(A, B_m, C, F)
            	t_0 = fma(Float64(-4.0 * A), C, Float64(B_m * B_m))
            	tmp = 0.0
            	if (B_m <= 2.6e+18)
            		tmp = Float64(sqrt(Float64(Float64(Float64(A - Float64(0.5 * Float64(Float64(B_m * B_m) / C))) + A) * Float64(Float64(2.0 * F) * t_0))) / Float64(-t_0));
            	else
            		tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(Float64(C + A) / B_m) - 1.0) / B_m))) * Float64(-sqrt(2.0)));
            	end
            	return tmp
            end
            
            B_m = N[Abs[B], $MachinePrecision]
            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
            code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 2.6e+18], N[(N[Sqrt[N[(N[(N[(A - N[(0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + A), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-t$95$0)), $MachinePrecision], N[(N[Sqrt[N[(F * N[(N[(N[(N[(C + A), $MachinePrecision] / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]]]
            
            \begin{array}{l}
            B_m = \left|B\right|
            \\
            [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
            \\
            \begin{array}{l}
            t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\
            \mathbf{if}\;B\_m \leq 2.6 \cdot 10^{+18}:\\
            \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B\_m \cdot B\_m}{C}\right) + A\right) \cdot \left(\left(2 \cdot F\right) \cdot t\_0\right)}}{-t\_0}\\
            
            \mathbf{else}:\\
            \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot \left(-\sqrt{2}\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if B < 2.6e18

              1. Initial program 22.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. Add Preprocessing
              3. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                3. distribute-frac-negN/A

                  \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                4. distribute-neg-frac2N/A

                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                5. lower-/.f64N/A

                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
              4. Applied rewrites29.8%

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

                \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - -1 \cdot A\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
              6. Step-by-step derivation
                1. mul-1-negN/A

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

                  \[\leadsto \frac{\sqrt{\color{blue}{\left(\left(A + \frac{-1}{2} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                3. fp-cancel-sign-sub-invN/A

                  \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \left(\mathsf{neg}\left(\frac{-1}{2}\right)\right) \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                4. metadata-evalN/A

                  \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2}} \cdot \frac{{B}^{2}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                5. lower--.f64N/A

                  \[\leadsto \frac{\sqrt{\left(\color{blue}{\left(A - \frac{1}{2} \cdot \frac{{B}^{2}}{C}\right)} - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                6. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{\left(\left(A - \color{blue}{\frac{1}{2} \cdot \frac{{B}^{2}}{C}}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                7. lower-/.f64N/A

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

                  \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                9. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{\left(\left(A - \frac{1}{2} \cdot \frac{\color{blue}{B \cdot B}}{C}\right) - \left(\mathsf{neg}\left(A\right)\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                10. lower-neg.f6414.3

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

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

              if 2.6e18 < B

              1. Initial program 16.7%

                \[\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. Add Preprocessing
              3. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                3. distribute-frac-negN/A

                  \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                4. distribute-neg-frac2N/A

                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                5. lower-/.f64N/A

                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
              4. Applied rewrites18.4%

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

                \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
              6. Step-by-step derivation
                1. associate-*r*N/A

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

                  \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                4. associate-*r*N/A

                  \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                5. lower-*.f64N/A

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

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

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

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

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

                \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
              8. Taylor expanded in F around 0

                \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
              9. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                2. lower-neg.f64N/A

                  \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                3. lower-*.f64N/A

                  \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
              10. Applied rewrites32.6%

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

                \[\leadsto -\sqrt{F \cdot \frac{\left(\frac{A}{B} + \frac{C}{B}\right) - 1}{B}} \cdot \sqrt{2} \]
              12. Step-by-step derivation
                1. Applied rewrites51.7%

                  \[\leadsto -\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \sqrt{2} \]
              13. Recombined 2 regimes into one program.
              14. Final simplification22.6%

                \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
              15. Add Preprocessing

              Alternative 6: 43.8% accurate, 6.1× speedup?

              \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\ \mathbf{if}\;B\_m \leq 3.2 \cdot 10^{+18}:\\ \;\;\;\;\frac{\sqrt{\left(A + A\right) \cdot \left(\left(2 \cdot F\right) \cdot t\_0\right)}}{-t\_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \end{array} \]
              B_m = (fabs.f64 B)
              NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
              (FPCore (A B_m C F)
               :precision binary64
               (let* ((t_0 (fma (* -4.0 A) C (* B_m B_m))))
                 (if (<= B_m 3.2e+18)
                   (/ (sqrt (* (+ A A) (* (* 2.0 F) t_0))) (- t_0))
                   (* (sqrt (* F (/ (- (/ (+ C A) B_m) 1.0) B_m))) (- (sqrt 2.0))))))
              B_m = fabs(B);
              assert(A < B_m && B_m < C && C < F);
              double code(double A, double B_m, double C, double F) {
              	double t_0 = fma((-4.0 * A), C, (B_m * B_m));
              	double tmp;
              	if (B_m <= 3.2e+18) {
              		tmp = sqrt(((A + A) * ((2.0 * F) * t_0))) / -t_0;
              	} else {
              		tmp = sqrt((F * ((((C + A) / B_m) - 1.0) / B_m))) * -sqrt(2.0);
              	}
              	return tmp;
              }
              
              B_m = abs(B)
              A, B_m, C, F = sort([A, B_m, C, F])
              function code(A, B_m, C, F)
              	t_0 = fma(Float64(-4.0 * A), C, Float64(B_m * B_m))
              	tmp = 0.0
              	if (B_m <= 3.2e+18)
              		tmp = Float64(sqrt(Float64(Float64(A + A) * Float64(Float64(2.0 * F) * t_0))) / Float64(-t_0));
              	else
              		tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(Float64(C + A) / B_m) - 1.0) / B_m))) * Float64(-sqrt(2.0)));
              	end
              	return tmp
              end
              
              B_m = N[Abs[B], $MachinePrecision]
              NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
              code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 3.2e+18], N[(N[Sqrt[N[(N[(A + A), $MachinePrecision] * N[(N[(2.0 * F), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-t$95$0)), $MachinePrecision], N[(N[Sqrt[N[(F * N[(N[(N[(N[(C + A), $MachinePrecision] / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]]]
              
              \begin{array}{l}
              B_m = \left|B\right|
              \\
              [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
              \\
              \begin{array}{l}
              t_0 := \mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)\\
              \mathbf{if}\;B\_m \leq 3.2 \cdot 10^{+18}:\\
              \;\;\;\;\frac{\sqrt{\left(A + A\right) \cdot \left(\left(2 \cdot F\right) \cdot t\_0\right)}}{-t\_0}\\
              
              \mathbf{else}:\\
              \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot \left(-\sqrt{2}\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if B < 3.2e18

                1. Initial program 22.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. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                    \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                  3. distribute-frac-negN/A

                    \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                  4. distribute-neg-frac2N/A

                    \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                  5. lower-/.f64N/A

                    \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                4. Applied rewrites29.8%

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

                  \[\leadsto \frac{\sqrt{\color{blue}{\left(A - -1 \cdot A\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                6. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \frac{\sqrt{\left(A - \color{blue}{\left(\mathsf{neg}\left(A\right)\right)}\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                  2. lower--.f64N/A

                    \[\leadsto \frac{\sqrt{\color{blue}{\left(A - \left(\mathsf{neg}\left(A\right)\right)\right)} \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                  3. lower-neg.f6415.1

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

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

                if 3.2e18 < B

                1. Initial program 16.7%

                  \[\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. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                    \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                  3. distribute-frac-negN/A

                    \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                  4. distribute-neg-frac2N/A

                    \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                  5. lower-/.f64N/A

                    \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                4. Applied rewrites18.4%

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

                  \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                6. Step-by-step derivation
                  1. associate-*r*N/A

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

                    \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                  4. associate-*r*N/A

                    \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                  5. lower-*.f64N/A

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

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

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

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

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

                  \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                8. Taylor expanded in F around 0

                  \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                9. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                  2. lower-neg.f64N/A

                    \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                  3. lower-*.f64N/A

                    \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                10. Applied rewrites32.6%

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

                  \[\leadsto -\sqrt{F \cdot \frac{\left(\frac{A}{B} + \frac{C}{B}\right) - 1}{B}} \cdot \sqrt{2} \]
                12. Step-by-step derivation
                  1. Applied rewrites51.7%

                    \[\leadsto -\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \sqrt{2} \]
                13. Recombined 2 regimes into one program.
                14. Final simplification23.2%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.2 \cdot 10^{+18}:\\ \;\;\;\;\frac{\sqrt{\left(A + A\right) \cdot \left(\left(2 \cdot F\right) \cdot \mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
                15. Add Preprocessing

                Alternative 7: 37.0% accurate, 6.2× speedup?

                \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ \mathbf{if}\;B\_m \leq 1.2 \cdot 10^{-127}:\\ \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\ \mathbf{elif}\;B\_m \leq 3.4 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\ \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot t\_0\\ \end{array} \end{array} \]
                B_m = (fabs.f64 B)
                NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                (FPCore (A B_m C F)
                 :precision binary64
                 (let* ((t_0 (- (sqrt 2.0))))
                   (if (<= B_m 1.2e-127)
                     (/
                      (sqrt (* (* -16.0 (* A A)) (* C F)))
                      (- (fma (* -4.0 A) C (* B_m B_m))))
                     (if (<= B_m 3.4e-90)
                       (/ (sqrt (* (* (- A B_m) F) 2.0)) (- B_m))
                       (if (<= B_m 2.6e+18)
                         (* (sqrt (* F (/ -0.5 C))) t_0)
                         (* (sqrt (* F (/ (- (/ (+ C A) B_m) 1.0) B_m))) t_0))))))
                B_m = fabs(B);
                assert(A < B_m && B_m < C && C < F);
                double code(double A, double B_m, double C, double F) {
                	double t_0 = -sqrt(2.0);
                	double tmp;
                	if (B_m <= 1.2e-127) {
                		tmp = sqrt(((-16.0 * (A * A)) * (C * F))) / -fma((-4.0 * A), C, (B_m * B_m));
                	} else if (B_m <= 3.4e-90) {
                		tmp = sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                	} else if (B_m <= 2.6e+18) {
                		tmp = sqrt((F * (-0.5 / C))) * t_0;
                	} else {
                		tmp = sqrt((F * ((((C + A) / B_m) - 1.0) / B_m))) * t_0;
                	}
                	return tmp;
                }
                
                B_m = abs(B)
                A, B_m, C, F = sort([A, B_m, C, F])
                function code(A, B_m, C, F)
                	t_0 = Float64(-sqrt(2.0))
                	tmp = 0.0
                	if (B_m <= 1.2e-127)
                		tmp = Float64(sqrt(Float64(Float64(-16.0 * Float64(A * A)) * Float64(C * F))) / Float64(-fma(Float64(-4.0 * A), C, Float64(B_m * B_m))));
                	elseif (B_m <= 3.4e-90)
                		tmp = Float64(sqrt(Float64(Float64(Float64(A - B_m) * F) * 2.0)) / Float64(-B_m));
                	elseif (B_m <= 2.6e+18)
                		tmp = Float64(sqrt(Float64(F * Float64(-0.5 / C))) * t_0);
                	else
                		tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(Float64(C + A) / B_m) - 1.0) / B_m))) * t_0);
                	end
                	return tmp
                end
                
                B_m = N[Abs[B], $MachinePrecision]
                NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[B$95$m, 1.2e-127], N[(N[Sqrt[N[(N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[B$95$m, 3.4e-90], N[(N[Sqrt[N[(N[(N[(A - B$95$m), $MachinePrecision] * F), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / (-B$95$m)), $MachinePrecision], If[LessEqual[B$95$m, 2.6e+18], N[(N[Sqrt[N[(F * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(N[(N[(N[(C + A), $MachinePrecision] / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
                
                \begin{array}{l}
                B_m = \left|B\right|
                \\
                [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                \\
                \begin{array}{l}
                t_0 := -\sqrt{2}\\
                \mathbf{if}\;B\_m \leq 1.2 \cdot 10^{-127}:\\
                \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\
                
                \mathbf{elif}\;B\_m \leq 3.4 \cdot 10^{-90}:\\
                \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\
                
                \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\
                \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\
                
                \mathbf{else}:\\
                \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 4 regimes
                2. if B < 1.19999999999999991e-127

                  1. Initial program 18.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. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                    3. distribute-frac-negN/A

                      \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                    4. distribute-neg-frac2N/A

                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                    5. lower-/.f64N/A

                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                  4. Applied rewrites27.0%

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

                    \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                  6. Step-by-step derivation
                    1. associate-*r*N/A

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

                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                    4. associate-*r*N/A

                      \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                    5. lower-*.f64N/A

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

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

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

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

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

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

                    \[\leadsto \frac{\sqrt{\color{blue}{-16 \cdot \left({A}^{2} \cdot \left(C \cdot F\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                  9. Step-by-step derivation
                    1. associate-*r*N/A

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

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

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

                      \[\leadsto \frac{\sqrt{\left(-16 \cdot \color{blue}{\left(A \cdot A\right)}\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                    5. lower-*.f64N/A

                      \[\leadsto \frac{\sqrt{\left(-16 \cdot \color{blue}{\left(A \cdot A\right)}\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                    6. lower-*.f649.7

                      \[\leadsto \frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \color{blue}{\left(C \cdot F\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                  10. Applied rewrites9.7%

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

                  if 1.19999999999999991e-127 < B < 3.39999999999999994e-90

                  1. Initial program 60.3%

                    \[\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. Add Preprocessing
                  3. Taylor expanded in C around 0

                    \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                  4. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                    2. lower-neg.f64N/A

                      \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
                    3. *-commutativeN/A

                      \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                    4. lower-*.f64N/A

                      \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                    5. lower-sqrt.f64N/A

                      \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \cdot \frac{\sqrt{2}}{B} \]
                    6. *-commutativeN/A

                      \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                    7. lower-*.f64N/A

                      \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                    8. lower--.f64N/A

                      \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                    9. unpow2N/A

                      \[\leadsto -\sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                    10. unpow2N/A

                      \[\leadsto -\sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                    11. lower-hypot.f64N/A

                      \[\leadsto -\sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                    12. lower-/.f64N/A

                      \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
                    13. lower-sqrt.f6462.0

                      \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\color{blue}{\sqrt{2}}}{B} \]
                  5. Applied rewrites62.0%

                    \[\leadsto \color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
                  6. Step-by-step derivation
                    1. Applied rewrites62.6%

                      \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right) \cdot 2}}{-B}} \]
                    2. Taylor expanded in A around 0

                      \[\leadsto \frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B} \]
                    3. Step-by-step derivation
                      1. Applied rewrites61.9%

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

                      if 3.39999999999999994e-90 < B < 2.6e18

                      1. Initial program 37.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. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                        3. distribute-frac-negN/A

                          \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                        4. distribute-neg-frac2N/A

                          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                        5. lower-/.f64N/A

                          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                      4. Applied rewrites41.0%

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

                        \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                      6. Step-by-step derivation
                        1. associate-*r*N/A

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

                          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                        3. lower-*.f64N/A

                          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                        4. associate-*r*N/A

                          \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                        5. lower-*.f64N/A

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

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

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

                          \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \color{blue}{\left(C - \left(\mathsf{neg}\left(C\right)\right)\right)}\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                        9. lower-neg.f649.6

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

                        \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                      8. Taylor expanded in F around 0

                        \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                      9. Step-by-step derivation
                        1. mul-1-negN/A

                          \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                        2. lower-neg.f64N/A

                          \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                        3. lower-*.f64N/A

                          \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                      10. Applied rewrites37.4%

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

                        \[\leadsto -\sqrt{F \cdot \frac{\frac{-1}{2}}{C}} \cdot \sqrt{2} \]
                      12. Step-by-step derivation
                        1. Applied rewrites9.4%

                          \[\leadsto -\sqrt{F \cdot \frac{-0.5}{C}} \cdot \sqrt{2} \]

                        if 2.6e18 < B

                        1. Initial program 16.7%

                          \[\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. Add Preprocessing
                        3. Step-by-step derivation
                          1. lift-/.f64N/A

                            \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                          3. distribute-frac-negN/A

                            \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                          4. distribute-neg-frac2N/A

                            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                          5. lower-/.f64N/A

                            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                        4. Applied rewrites18.4%

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

                          \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                        6. Step-by-step derivation
                          1. associate-*r*N/A

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

                            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                          3. lower-*.f64N/A

                            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                          4. associate-*r*N/A

                            \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                          5. lower-*.f64N/A

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

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

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

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

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

                          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                        8. Taylor expanded in F around 0

                          \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                        9. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                          2. lower-neg.f64N/A

                            \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                          3. lower-*.f64N/A

                            \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                        10. Applied rewrites32.6%

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

                          \[\leadsto -\sqrt{F \cdot \frac{\left(\frac{A}{B} + \frac{C}{B}\right) - 1}{B}} \cdot \sqrt{2} \]
                        12. Step-by-step derivation
                          1. Applied rewrites51.7%

                            \[\leadsto -\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \sqrt{2} \]
                        13. Recombined 4 regimes into one program.
                        14. Final simplification20.1%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.2 \cdot 10^{-127}:\\ \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
                        15. Add Preprocessing

                        Alternative 8: 37.0% accurate, 6.2× speedup?

                        \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ \mathbf{if}\;B\_m \leq 1.2 \cdot 10^{-127}:\\ \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\ \mathbf{elif}\;B\_m \leq 3.4 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\ \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\mathsf{fma}\left(F, \frac{C + A}{B\_m}, -F\right)}{B\_m}} \cdot t\_0\\ \end{array} \end{array} \]
                        B_m = (fabs.f64 B)
                        NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                        (FPCore (A B_m C F)
                         :precision binary64
                         (let* ((t_0 (- (sqrt 2.0))))
                           (if (<= B_m 1.2e-127)
                             (/
                              (sqrt (* (* -16.0 (* A A)) (* C F)))
                              (- (fma (* -4.0 A) C (* B_m B_m))))
                             (if (<= B_m 3.4e-90)
                               (/ (sqrt (* (* (- A B_m) F) 2.0)) (- B_m))
                               (if (<= B_m 2.6e+18)
                                 (* (sqrt (* F (/ -0.5 C))) t_0)
                                 (* (sqrt (/ (fma F (/ (+ C A) B_m) (- F)) B_m)) t_0))))))
                        B_m = fabs(B);
                        assert(A < B_m && B_m < C && C < F);
                        double code(double A, double B_m, double C, double F) {
                        	double t_0 = -sqrt(2.0);
                        	double tmp;
                        	if (B_m <= 1.2e-127) {
                        		tmp = sqrt(((-16.0 * (A * A)) * (C * F))) / -fma((-4.0 * A), C, (B_m * B_m));
                        	} else if (B_m <= 3.4e-90) {
                        		tmp = sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                        	} else if (B_m <= 2.6e+18) {
                        		tmp = sqrt((F * (-0.5 / C))) * t_0;
                        	} else {
                        		tmp = sqrt((fma(F, ((C + A) / B_m), -F) / B_m)) * t_0;
                        	}
                        	return tmp;
                        }
                        
                        B_m = abs(B)
                        A, B_m, C, F = sort([A, B_m, C, F])
                        function code(A, B_m, C, F)
                        	t_0 = Float64(-sqrt(2.0))
                        	tmp = 0.0
                        	if (B_m <= 1.2e-127)
                        		tmp = Float64(sqrt(Float64(Float64(-16.0 * Float64(A * A)) * Float64(C * F))) / Float64(-fma(Float64(-4.0 * A), C, Float64(B_m * B_m))));
                        	elseif (B_m <= 3.4e-90)
                        		tmp = Float64(sqrt(Float64(Float64(Float64(A - B_m) * F) * 2.0)) / Float64(-B_m));
                        	elseif (B_m <= 2.6e+18)
                        		tmp = Float64(sqrt(Float64(F * Float64(-0.5 / C))) * t_0);
                        	else
                        		tmp = Float64(sqrt(Float64(fma(F, Float64(Float64(C + A) / B_m), Float64(-F)) / B_m)) * t_0);
                        	end
                        	return tmp
                        end
                        
                        B_m = N[Abs[B], $MachinePrecision]
                        NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                        code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[B$95$m, 1.2e-127], N[(N[Sqrt[N[(N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[B$95$m, 3.4e-90], N[(N[Sqrt[N[(N[(N[(A - B$95$m), $MachinePrecision] * F), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / (-B$95$m)), $MachinePrecision], If[LessEqual[B$95$m, 2.6e+18], N[(N[Sqrt[N[(F * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(N[(F * N[(N[(C + A), $MachinePrecision] / B$95$m), $MachinePrecision] + (-F)), $MachinePrecision] / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
                        
                        \begin{array}{l}
                        B_m = \left|B\right|
                        \\
                        [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                        \\
                        \begin{array}{l}
                        t_0 := -\sqrt{2}\\
                        \mathbf{if}\;B\_m \leq 1.2 \cdot 10^{-127}:\\
                        \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\
                        
                        \mathbf{elif}\;B\_m \leq 3.4 \cdot 10^{-90}:\\
                        \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\
                        
                        \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\
                        \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\sqrt{\frac{\mathsf{fma}\left(F, \frac{C + A}{B\_m}, -F\right)}{B\_m}} \cdot t\_0\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 4 regimes
                        2. if B < 1.19999999999999991e-127

                          1. Initial program 18.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. Add Preprocessing
                          3. Step-by-step derivation
                            1. lift-/.f64N/A

                              \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                            3. distribute-frac-negN/A

                              \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                            4. distribute-neg-frac2N/A

                              \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                            5. lower-/.f64N/A

                              \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                          4. Applied rewrites27.0%

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

                            \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                          6. Step-by-step derivation
                            1. associate-*r*N/A

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

                              \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                            3. lower-*.f64N/A

                              \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                            4. associate-*r*N/A

                              \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                            5. lower-*.f64N/A

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

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

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

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

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

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

                            \[\leadsto \frac{\sqrt{\color{blue}{-16 \cdot \left({A}^{2} \cdot \left(C \cdot F\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                          9. Step-by-step derivation
                            1. associate-*r*N/A

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

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

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

                              \[\leadsto \frac{\sqrt{\left(-16 \cdot \color{blue}{\left(A \cdot A\right)}\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                            5. lower-*.f64N/A

                              \[\leadsto \frac{\sqrt{\left(-16 \cdot \color{blue}{\left(A \cdot A\right)}\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                            6. lower-*.f649.7

                              \[\leadsto \frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \color{blue}{\left(C \cdot F\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                          10. Applied rewrites9.7%

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

                          if 1.19999999999999991e-127 < B < 3.39999999999999994e-90

                          1. Initial program 60.3%

                            \[\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. Add Preprocessing
                          3. Taylor expanded in C around 0

                            \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                          4. Step-by-step derivation
                            1. mul-1-negN/A

                              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                            2. lower-neg.f64N/A

                              \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
                            3. *-commutativeN/A

                              \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                            4. lower-*.f64N/A

                              \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                            5. lower-sqrt.f64N/A

                              \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \cdot \frac{\sqrt{2}}{B} \]
                            6. *-commutativeN/A

                              \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                            7. lower-*.f64N/A

                              \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                            8. lower--.f64N/A

                              \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                            9. unpow2N/A

                              \[\leadsto -\sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                            10. unpow2N/A

                              \[\leadsto -\sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                            11. lower-hypot.f64N/A

                              \[\leadsto -\sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                            12. lower-/.f64N/A

                              \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
                            13. lower-sqrt.f6462.0

                              \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\color{blue}{\sqrt{2}}}{B} \]
                          5. Applied rewrites62.0%

                            \[\leadsto \color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
                          6. Step-by-step derivation
                            1. Applied rewrites62.6%

                              \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right) \cdot 2}}{-B}} \]
                            2. Taylor expanded in A around 0

                              \[\leadsto \frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B} \]
                            3. Step-by-step derivation
                              1. Applied rewrites61.9%

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

                              if 3.39999999999999994e-90 < B < 2.6e18

                              1. Initial program 37.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. Add Preprocessing
                              3. Step-by-step derivation
                                1. lift-/.f64N/A

                                  \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                3. distribute-frac-negN/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                4. distribute-neg-frac2N/A

                                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                5. lower-/.f64N/A

                                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                              4. Applied rewrites41.0%

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

                                \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                              6. Step-by-step derivation
                                1. associate-*r*N/A

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

                                  \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                3. lower-*.f64N/A

                                  \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                4. associate-*r*N/A

                                  \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                5. lower-*.f64N/A

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

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

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

                                  \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \color{blue}{\left(C - \left(\mathsf{neg}\left(C\right)\right)\right)}\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                9. lower-neg.f649.6

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

                                \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                              8. Taylor expanded in F around 0

                                \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                              9. Step-by-step derivation
                                1. mul-1-negN/A

                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                2. lower-neg.f64N/A

                                  \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                3. lower-*.f64N/A

                                  \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                              10. Applied rewrites37.4%

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

                                \[\leadsto -\sqrt{F \cdot \frac{\frac{-1}{2}}{C}} \cdot \sqrt{2} \]
                              12. Step-by-step derivation
                                1. Applied rewrites9.4%

                                  \[\leadsto -\sqrt{F \cdot \frac{-0.5}{C}} \cdot \sqrt{2} \]

                                if 2.6e18 < B

                                1. Initial program 16.7%

                                  \[\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. Add Preprocessing
                                3. Step-by-step derivation
                                  1. lift-/.f64N/A

                                    \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                    \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                  3. distribute-frac-negN/A

                                    \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                  4. distribute-neg-frac2N/A

                                    \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                  5. lower-/.f64N/A

                                    \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                4. Applied rewrites18.4%

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

                                  \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                6. Step-by-step derivation
                                  1. associate-*r*N/A

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

                                    \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                  3. lower-*.f64N/A

                                    \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                  4. associate-*r*N/A

                                    \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                  5. lower-*.f64N/A

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

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

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

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

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

                                  \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                8. Taylor expanded in F around 0

                                  \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                9. Step-by-step derivation
                                  1. mul-1-negN/A

                                    \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                  2. lower-neg.f64N/A

                                    \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                  3. lower-*.f64N/A

                                    \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                10. Applied rewrites32.6%

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

                                  \[\leadsto -\sqrt{\frac{-1 \cdot F + \frac{F \cdot \left(A + C\right)}{B}}{B}} \cdot \sqrt{2} \]
                                12. Step-by-step derivation
                                  1. Applied rewrites51.0%

                                    \[\leadsto -\sqrt{\frac{\mathsf{fma}\left(F, \frac{C + A}{B}, -F\right)}{B}} \cdot \sqrt{2} \]
                                13. Recombined 4 regimes into one program.
                                14. Final simplification19.9%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.2 \cdot 10^{-127}:\\ \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\mathsf{fma}\left(F, \frac{C + A}{B}, -F\right)}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
                                15. Add Preprocessing

                                Alternative 9: 39.3% accurate, 6.7× speedup?

                                \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ \mathbf{if}\;B\_m \leq 1.15 \cdot 10^{-26}:\\ \;\;\;\;\frac{\sqrt{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(A + A\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\ \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot t\_0\\ \end{array} \end{array} \]
                                B_m = (fabs.f64 B)
                                NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                (FPCore (A B_m C F)
                                 :precision binary64
                                 (let* ((t_0 (- (sqrt 2.0))))
                                   (if (<= B_m 1.15e-26)
                                     (/
                                      (sqrt (* (* -8.0 A) (* (* C F) (+ A A))))
                                      (- (fma (* -4.0 A) C (* B_m B_m))))
                                     (if (<= B_m 2.6e+18)
                                       (* (sqrt (* F (/ -0.5 C))) t_0)
                                       (* (sqrt (* F (/ (- (/ (+ C A) B_m) 1.0) B_m))) t_0)))))
                                B_m = fabs(B);
                                assert(A < B_m && B_m < C && C < F);
                                double code(double A, double B_m, double C, double F) {
                                	double t_0 = -sqrt(2.0);
                                	double tmp;
                                	if (B_m <= 1.15e-26) {
                                		tmp = sqrt(((-8.0 * A) * ((C * F) * (A + A)))) / -fma((-4.0 * A), C, (B_m * B_m));
                                	} else if (B_m <= 2.6e+18) {
                                		tmp = sqrt((F * (-0.5 / C))) * t_0;
                                	} else {
                                		tmp = sqrt((F * ((((C + A) / B_m) - 1.0) / B_m))) * t_0;
                                	}
                                	return tmp;
                                }
                                
                                B_m = abs(B)
                                A, B_m, C, F = sort([A, B_m, C, F])
                                function code(A, B_m, C, F)
                                	t_0 = Float64(-sqrt(2.0))
                                	tmp = 0.0
                                	if (B_m <= 1.15e-26)
                                		tmp = Float64(sqrt(Float64(Float64(-8.0 * A) * Float64(Float64(C * F) * Float64(A + A)))) / Float64(-fma(Float64(-4.0 * A), C, Float64(B_m * B_m))));
                                	elseif (B_m <= 2.6e+18)
                                		tmp = Float64(sqrt(Float64(F * Float64(-0.5 / C))) * t_0);
                                	else
                                		tmp = Float64(sqrt(Float64(F * Float64(Float64(Float64(Float64(C + A) / B_m) - 1.0) / B_m))) * t_0);
                                	end
                                	return tmp
                                end
                                
                                B_m = N[Abs[B], $MachinePrecision]
                                NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[B$95$m, 1.15e-26], N[(N[Sqrt[N[(N[(-8.0 * A), $MachinePrecision] * N[(N[(C * F), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[B$95$m, 2.6e+18], N[(N[Sqrt[N[(F * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(N[(N[(N[(C + A), $MachinePrecision] / B$95$m), $MachinePrecision] - 1.0), $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
                                
                                \begin{array}{l}
                                B_m = \left|B\right|
                                \\
                                [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                \\
                                \begin{array}{l}
                                t_0 := -\sqrt{2}\\
                                \mathbf{if}\;B\_m \leq 1.15 \cdot 10^{-26}:\\
                                \;\;\;\;\frac{\sqrt{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(A + A\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\
                                
                                \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\
                                \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B\_m} - 1}{B\_m}} \cdot t\_0\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if B < 1.15000000000000004e-26

                                  1. Initial program 20.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. Add Preprocessing
                                  3. Step-by-step derivation
                                    1. lift-/.f64N/A

                                      \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                    3. distribute-frac-negN/A

                                      \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                    4. distribute-neg-frac2N/A

                                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                    5. lower-/.f64N/A

                                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                  4. Applied rewrites28.7%

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

                                    \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(A - -1 \cdot A\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                  6. Step-by-step derivation
                                    1. associate-*r*N/A

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

                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(A - -1 \cdot A\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                    3. lower-*.f64N/A

                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(A - -1 \cdot A\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                    4. associate-*r*N/A

                                      \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(A - -1 \cdot A\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                    5. lower-*.f64N/A

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

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

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

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

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

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

                                  if 1.15000000000000004e-26 < B < 2.6e18

                                  1. Initial program 43.7%

                                    \[\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. Add Preprocessing
                                  3. Step-by-step derivation
                                    1. lift-/.f64N/A

                                      \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                    3. distribute-frac-negN/A

                                      \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                    4. distribute-neg-frac2N/A

                                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                    5. lower-/.f64N/A

                                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                  4. Applied rewrites44.3%

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

                                    \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                  6. Step-by-step derivation
                                    1. associate-*r*N/A

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

                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                    3. lower-*.f64N/A

                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                    4. associate-*r*N/A

                                      \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                    5. lower-*.f64N/A

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

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

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

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

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

                                    \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                  8. Taylor expanded in F around 0

                                    \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                  9. Step-by-step derivation
                                    1. mul-1-negN/A

                                      \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                    2. lower-neg.f64N/A

                                      \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                    3. lower-*.f64N/A

                                      \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                  10. Applied rewrites44.6%

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

                                    \[\leadsto -\sqrt{F \cdot \frac{\frac{-1}{2}}{C}} \cdot \sqrt{2} \]
                                  12. Step-by-step derivation
                                    1. Applied rewrites9.5%

                                      \[\leadsto -\sqrt{F \cdot \frac{-0.5}{C}} \cdot \sqrt{2} \]

                                    if 2.6e18 < B

                                    1. Initial program 16.7%

                                      \[\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. Add Preprocessing
                                    3. Step-by-step derivation
                                      1. lift-/.f64N/A

                                        \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                      3. distribute-frac-negN/A

                                        \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                      4. distribute-neg-frac2N/A

                                        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                      5. lower-/.f64N/A

                                        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                    4. Applied rewrites18.4%

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

                                      \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                    6. Step-by-step derivation
                                      1. associate-*r*N/A

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

                                        \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                      4. associate-*r*N/A

                                        \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                      5. lower-*.f64N/A

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

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

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

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

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

                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                    8. Taylor expanded in F around 0

                                      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                    9. Step-by-step derivation
                                      1. mul-1-negN/A

                                        \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                      2. lower-neg.f64N/A

                                        \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                    10. Applied rewrites32.6%

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

                                      \[\leadsto -\sqrt{F \cdot \frac{\left(\frac{A}{B} + \frac{C}{B}\right) - 1}{B}} \cdot \sqrt{2} \]
                                    12. Step-by-step derivation
                                      1. Applied rewrites51.7%

                                        \[\leadsto -\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \sqrt{2} \]
                                    13. Recombined 3 regimes into one program.
                                    14. Final simplification20.2%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.15 \cdot 10^{-26}:\\ \;\;\;\;\frac{\sqrt{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(A + A\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{\frac{C + A}{B} - 1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
                                    15. Add Preprocessing

                                    Alternative 10: 36.8% accurate, 7.4× speedup?

                                    \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ \mathbf{if}\;B\_m \leq 1.2 \cdot 10^{-127}:\\ \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\ \mathbf{elif}\;B\_m \leq 3.4 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\ \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{-1}{B\_m}} \cdot t\_0\\ \end{array} \end{array} \]
                                    B_m = (fabs.f64 B)
                                    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                    (FPCore (A B_m C F)
                                     :precision binary64
                                     (let* ((t_0 (- (sqrt 2.0))))
                                       (if (<= B_m 1.2e-127)
                                         (/
                                          (sqrt (* (* -16.0 (* A A)) (* C F)))
                                          (- (fma (* -4.0 A) C (* B_m B_m))))
                                         (if (<= B_m 3.4e-90)
                                           (/ (sqrt (* (* (- A B_m) F) 2.0)) (- B_m))
                                           (if (<= B_m 2.6e+18)
                                             (* (sqrt (* F (/ -0.5 C))) t_0)
                                             (* (sqrt (* F (/ -1.0 B_m))) t_0))))))
                                    B_m = fabs(B);
                                    assert(A < B_m && B_m < C && C < F);
                                    double code(double A, double B_m, double C, double F) {
                                    	double t_0 = -sqrt(2.0);
                                    	double tmp;
                                    	if (B_m <= 1.2e-127) {
                                    		tmp = sqrt(((-16.0 * (A * A)) * (C * F))) / -fma((-4.0 * A), C, (B_m * B_m));
                                    	} else if (B_m <= 3.4e-90) {
                                    		tmp = sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                                    	} else if (B_m <= 2.6e+18) {
                                    		tmp = sqrt((F * (-0.5 / C))) * t_0;
                                    	} else {
                                    		tmp = sqrt((F * (-1.0 / B_m))) * t_0;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    B_m = abs(B)
                                    A, B_m, C, F = sort([A, B_m, C, F])
                                    function code(A, B_m, C, F)
                                    	t_0 = Float64(-sqrt(2.0))
                                    	tmp = 0.0
                                    	if (B_m <= 1.2e-127)
                                    		tmp = Float64(sqrt(Float64(Float64(-16.0 * Float64(A * A)) * Float64(C * F))) / Float64(-fma(Float64(-4.0 * A), C, Float64(B_m * B_m))));
                                    	elseif (B_m <= 3.4e-90)
                                    		tmp = Float64(sqrt(Float64(Float64(Float64(A - B_m) * F) * 2.0)) / Float64(-B_m));
                                    	elseif (B_m <= 2.6e+18)
                                    		tmp = Float64(sqrt(Float64(F * Float64(-0.5 / C))) * t_0);
                                    	else
                                    		tmp = Float64(sqrt(Float64(F * Float64(-1.0 / B_m))) * t_0);
                                    	end
                                    	return tmp
                                    end
                                    
                                    B_m = N[Abs[B], $MachinePrecision]
                                    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                    code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[B$95$m, 1.2e-127], N[(N[Sqrt[N[(N[(-16.0 * N[(A * A), $MachinePrecision]), $MachinePrecision] * N[(C * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[B$95$m, 3.4e-90], N[(N[Sqrt[N[(N[(N[(A - B$95$m), $MachinePrecision] * F), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / (-B$95$m)), $MachinePrecision], If[LessEqual[B$95$m, 2.6e+18], N[(N[Sqrt[N[(F * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
                                    
                                    \begin{array}{l}
                                    B_m = \left|B\right|
                                    \\
                                    [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                    \\
                                    \begin{array}{l}
                                    t_0 := -\sqrt{2}\\
                                    \mathbf{if}\;B\_m \leq 1.2 \cdot 10^{-127}:\\
                                    \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\
                                    
                                    \mathbf{elif}\;B\_m \leq 3.4 \cdot 10^{-90}:\\
                                    \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\
                                    
                                    \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\
                                    \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\sqrt{F \cdot \frac{-1}{B\_m}} \cdot t\_0\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 4 regimes
                                    2. if B < 1.19999999999999991e-127

                                      1. Initial program 18.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. Add Preprocessing
                                      3. Step-by-step derivation
                                        1. lift-/.f64N/A

                                          \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                        3. distribute-frac-negN/A

                                          \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                        4. distribute-neg-frac2N/A

                                          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                        5. lower-/.f64N/A

                                          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                      4. Applied rewrites27.0%

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

                                        \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                      6. Step-by-step derivation
                                        1. associate-*r*N/A

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

                                          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                        3. lower-*.f64N/A

                                          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                        4. associate-*r*N/A

                                          \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                        5. lower-*.f64N/A

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

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

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

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

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

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

                                        \[\leadsto \frac{\sqrt{\color{blue}{-16 \cdot \left({A}^{2} \cdot \left(C \cdot F\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                      9. Step-by-step derivation
                                        1. associate-*r*N/A

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

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

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

                                          \[\leadsto \frac{\sqrt{\left(-16 \cdot \color{blue}{\left(A \cdot A\right)}\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                        5. lower-*.f64N/A

                                          \[\leadsto \frac{\sqrt{\left(-16 \cdot \color{blue}{\left(A \cdot A\right)}\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                        6. lower-*.f649.7

                                          \[\leadsto \frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \color{blue}{\left(C \cdot F\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                      10. Applied rewrites9.7%

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

                                      if 1.19999999999999991e-127 < B < 3.39999999999999994e-90

                                      1. Initial program 60.3%

                                        \[\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. Add Preprocessing
                                      3. Taylor expanded in C around 0

                                        \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                      4. Step-by-step derivation
                                        1. mul-1-negN/A

                                          \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                        2. lower-neg.f64N/A

                                          \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
                                        3. *-commutativeN/A

                                          \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                        4. lower-*.f64N/A

                                          \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                        5. lower-sqrt.f64N/A

                                          \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \cdot \frac{\sqrt{2}}{B} \]
                                        6. *-commutativeN/A

                                          \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                        7. lower-*.f64N/A

                                          \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                        8. lower--.f64N/A

                                          \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                        9. unpow2N/A

                                          \[\leadsto -\sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                        10. unpow2N/A

                                          \[\leadsto -\sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                        11. lower-hypot.f64N/A

                                          \[\leadsto -\sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                        12. lower-/.f64N/A

                                          \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
                                        13. lower-sqrt.f6462.0

                                          \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\color{blue}{\sqrt{2}}}{B} \]
                                      5. Applied rewrites62.0%

                                        \[\leadsto \color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites62.6%

                                          \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right) \cdot 2}}{-B}} \]
                                        2. Taylor expanded in A around 0

                                          \[\leadsto \frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites61.9%

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

                                          if 3.39999999999999994e-90 < B < 2.6e18

                                          1. Initial program 37.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. Add Preprocessing
                                          3. Step-by-step derivation
                                            1. lift-/.f64N/A

                                              \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                            3. distribute-frac-negN/A

                                              \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                            4. distribute-neg-frac2N/A

                                              \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                            5. lower-/.f64N/A

                                              \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                          4. Applied rewrites41.0%

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

                                            \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                          6. Step-by-step derivation
                                            1. associate-*r*N/A

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

                                              \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                            3. lower-*.f64N/A

                                              \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                            4. associate-*r*N/A

                                              \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                            5. lower-*.f64N/A

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

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

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

                                              \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \color{blue}{\left(C - \left(\mathsf{neg}\left(C\right)\right)\right)}\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                            9. lower-neg.f649.6

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

                                            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                          8. Taylor expanded in F around 0

                                            \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                          9. Step-by-step derivation
                                            1. mul-1-negN/A

                                              \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                            2. lower-neg.f64N/A

                                              \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                            3. lower-*.f64N/A

                                              \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                          10. Applied rewrites37.4%

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

                                            \[\leadsto -\sqrt{F \cdot \frac{\frac{-1}{2}}{C}} \cdot \sqrt{2} \]
                                          12. Step-by-step derivation
                                            1. Applied rewrites9.4%

                                              \[\leadsto -\sqrt{F \cdot \frac{-0.5}{C}} \cdot \sqrt{2} \]

                                            if 2.6e18 < B

                                            1. Initial program 16.7%

                                              \[\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. Add Preprocessing
                                            3. Step-by-step derivation
                                              1. lift-/.f64N/A

                                                \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                              3. distribute-frac-negN/A

                                                \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                              4. distribute-neg-frac2N/A

                                                \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                              5. lower-/.f64N/A

                                                \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                            4. Applied rewrites18.4%

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

                                              \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                            6. Step-by-step derivation
                                              1. associate-*r*N/A

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

                                                \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                              3. lower-*.f64N/A

                                                \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                              4. associate-*r*N/A

                                                \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                              5. lower-*.f64N/A

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

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

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

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

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

                                              \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                            8. Taylor expanded in F around 0

                                              \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                            9. Step-by-step derivation
                                              1. mul-1-negN/A

                                                \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                              2. lower-neg.f64N/A

                                                \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                              3. lower-*.f64N/A

                                                \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                            10. Applied rewrites32.6%

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

                                              \[\leadsto -\sqrt{F \cdot \frac{-1}{B}} \cdot \sqrt{2} \]
                                            12. Step-by-step derivation
                                              1. Applied rewrites51.3%

                                                \[\leadsto -\sqrt{F \cdot \frac{-1}{B}} \cdot \sqrt{2} \]
                                            13. Recombined 4 regimes into one program.
                                            14. Final simplification20.0%

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.2 \cdot 10^{-127}:\\ \;\;\;\;\frac{\sqrt{\left(-16 \cdot \left(A \cdot A\right)\right) \cdot \left(C \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{-1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
                                            15. Add Preprocessing

                                            Alternative 11: 37.1% accurate, 7.4× speedup?

                                            \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ \mathbf{if}\;B\_m \leq 2.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(\left(A \cdot A\right) \cdot C\right) \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\ \mathbf{elif}\;B\_m \leq 3.4 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\ \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{-1}{B\_m}} \cdot t\_0\\ \end{array} \end{array} \]
                                            B_m = (fabs.f64 B)
                                            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                            (FPCore (A B_m C F)
                                             :precision binary64
                                             (let* ((t_0 (- (sqrt 2.0))))
                                               (if (<= B_m 2.5e-125)
                                                 (/
                                                  (sqrt (* -16.0 (* (* (* A A) C) F)))
                                                  (- (fma (* -4.0 A) C (* B_m B_m))))
                                                 (if (<= B_m 3.4e-90)
                                                   (/ (sqrt (* (* (- A B_m) F) 2.0)) (- B_m))
                                                   (if (<= B_m 2.6e+18)
                                                     (* (sqrt (* F (/ -0.5 C))) t_0)
                                                     (* (sqrt (* F (/ -1.0 B_m))) t_0))))))
                                            B_m = fabs(B);
                                            assert(A < B_m && B_m < C && C < F);
                                            double code(double A, double B_m, double C, double F) {
                                            	double t_0 = -sqrt(2.0);
                                            	double tmp;
                                            	if (B_m <= 2.5e-125) {
                                            		tmp = sqrt((-16.0 * (((A * A) * C) * F))) / -fma((-4.0 * A), C, (B_m * B_m));
                                            	} else if (B_m <= 3.4e-90) {
                                            		tmp = sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                                            	} else if (B_m <= 2.6e+18) {
                                            		tmp = sqrt((F * (-0.5 / C))) * t_0;
                                            	} else {
                                            		tmp = sqrt((F * (-1.0 / B_m))) * t_0;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            B_m = abs(B)
                                            A, B_m, C, F = sort([A, B_m, C, F])
                                            function code(A, B_m, C, F)
                                            	t_0 = Float64(-sqrt(2.0))
                                            	tmp = 0.0
                                            	if (B_m <= 2.5e-125)
                                            		tmp = Float64(sqrt(Float64(-16.0 * Float64(Float64(Float64(A * A) * C) * F))) / Float64(-fma(Float64(-4.0 * A), C, Float64(B_m * B_m))));
                                            	elseif (B_m <= 3.4e-90)
                                            		tmp = Float64(sqrt(Float64(Float64(Float64(A - B_m) * F) * 2.0)) / Float64(-B_m));
                                            	elseif (B_m <= 2.6e+18)
                                            		tmp = Float64(sqrt(Float64(F * Float64(-0.5 / C))) * t_0);
                                            	else
                                            		tmp = Float64(sqrt(Float64(F * Float64(-1.0 / B_m))) * t_0);
                                            	end
                                            	return tmp
                                            end
                                            
                                            B_m = N[Abs[B], $MachinePrecision]
                                            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                            code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[B$95$m, 2.5e-125], N[(N[Sqrt[N[(-16.0 * N[(N[(N[(A * A), $MachinePrecision] * C), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-N[(N[(-4.0 * A), $MachinePrecision] * C + N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], If[LessEqual[B$95$m, 3.4e-90], N[(N[Sqrt[N[(N[(N[(A - B$95$m), $MachinePrecision] * F), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / (-B$95$m)), $MachinePrecision], If[LessEqual[B$95$m, 2.6e+18], N[(N[Sqrt[N[(F * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
                                            
                                            \begin{array}{l}
                                            B_m = \left|B\right|
                                            \\
                                            [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                            \\
                                            \begin{array}{l}
                                            t_0 := -\sqrt{2}\\
                                            \mathbf{if}\;B\_m \leq 2.5 \cdot 10^{-125}:\\
                                            \;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(\left(A \cdot A\right) \cdot C\right) \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B\_m \cdot B\_m\right)}\\
                                            
                                            \mathbf{elif}\;B\_m \leq 3.4 \cdot 10^{-90}:\\
                                            \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\
                                            
                                            \mathbf{elif}\;B\_m \leq 2.6 \cdot 10^{+18}:\\
                                            \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\sqrt{F \cdot \frac{-1}{B\_m}} \cdot t\_0\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 4 regimes
                                            2. if B < 2.49999999999999983e-125

                                              1. Initial program 18.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. Add Preprocessing
                                              3. Step-by-step derivation
                                                1. lift-/.f64N/A

                                                  \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                3. distribute-frac-negN/A

                                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                4. distribute-neg-frac2N/A

                                                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                5. lower-/.f64N/A

                                                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                              4. Applied rewrites27.0%

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

                                                \[\leadsto \frac{\sqrt{\color{blue}{-16 \cdot \left({A}^{2} \cdot \left(C \cdot F\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                              6. Step-by-step derivation
                                                1. lower-*.f64N/A

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

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

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

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

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

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

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

                                              if 2.49999999999999983e-125 < B < 3.39999999999999994e-90

                                              1. Initial program 60.3%

                                                \[\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. Add Preprocessing
                                              3. Taylor expanded in C around 0

                                                \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                              4. Step-by-step derivation
                                                1. mul-1-negN/A

                                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                                2. lower-neg.f64N/A

                                                  \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
                                                3. *-commutativeN/A

                                                  \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                4. lower-*.f64N/A

                                                  \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                5. lower-sqrt.f64N/A

                                                  \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \cdot \frac{\sqrt{2}}{B} \]
                                                6. *-commutativeN/A

                                                  \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                7. lower-*.f64N/A

                                                  \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                8. lower--.f64N/A

                                                  \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                9. unpow2N/A

                                                  \[\leadsto -\sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                10. unpow2N/A

                                                  \[\leadsto -\sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                11. lower-hypot.f64N/A

                                                  \[\leadsto -\sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                12. lower-/.f64N/A

                                                  \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
                                                13. lower-sqrt.f6462.0

                                                  \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\color{blue}{\sqrt{2}}}{B} \]
                                              5. Applied rewrites62.0%

                                                \[\leadsto \color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites62.6%

                                                  \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right) \cdot 2}}{-B}} \]
                                                2. Taylor expanded in A around 0

                                                  \[\leadsto \frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B} \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites61.9%

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

                                                  if 3.39999999999999994e-90 < B < 2.6e18

                                                  1. Initial program 37.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. Add Preprocessing
                                                  3. Step-by-step derivation
                                                    1. lift-/.f64N/A

                                                      \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                    3. distribute-frac-negN/A

                                                      \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                    4. distribute-neg-frac2N/A

                                                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                    5. lower-/.f64N/A

                                                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                  4. Applied rewrites41.0%

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

                                                    \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                  6. Step-by-step derivation
                                                    1. associate-*r*N/A

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

                                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                    3. lower-*.f64N/A

                                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                    4. associate-*r*N/A

                                                      \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                    5. lower-*.f64N/A

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

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

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

                                                      \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \color{blue}{\left(C - \left(\mathsf{neg}\left(C\right)\right)\right)}\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                    9. lower-neg.f649.6

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

                                                    \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                  8. Taylor expanded in F around 0

                                                    \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                  9. Step-by-step derivation
                                                    1. mul-1-negN/A

                                                      \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                    2. lower-neg.f64N/A

                                                      \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                    3. lower-*.f64N/A

                                                      \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                  10. Applied rewrites37.4%

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

                                                    \[\leadsto -\sqrt{F \cdot \frac{\frac{-1}{2}}{C}} \cdot \sqrt{2} \]
                                                  12. Step-by-step derivation
                                                    1. Applied rewrites9.4%

                                                      \[\leadsto -\sqrt{F \cdot \frac{-0.5}{C}} \cdot \sqrt{2} \]

                                                    if 2.6e18 < B

                                                    1. Initial program 16.7%

                                                      \[\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. Add Preprocessing
                                                    3. Step-by-step derivation
                                                      1. lift-/.f64N/A

                                                        \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                      3. distribute-frac-negN/A

                                                        \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                      4. distribute-neg-frac2N/A

                                                        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                      5. lower-/.f64N/A

                                                        \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                    4. Applied rewrites18.4%

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

                                                      \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                    6. Step-by-step derivation
                                                      1. associate-*r*N/A

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

                                                        \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                      3. lower-*.f64N/A

                                                        \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                      4. associate-*r*N/A

                                                        \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                      5. lower-*.f64N/A

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

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

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

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

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

                                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                    8. Taylor expanded in F around 0

                                                      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                    9. Step-by-step derivation
                                                      1. mul-1-negN/A

                                                        \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                      2. lower-neg.f64N/A

                                                        \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                      3. lower-*.f64N/A

                                                        \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                    10. Applied rewrites32.6%

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

                                                      \[\leadsto -\sqrt{F \cdot \frac{-1}{B}} \cdot \sqrt{2} \]
                                                    12. Step-by-step derivation
                                                      1. Applied rewrites51.3%

                                                        \[\leadsto -\sqrt{F \cdot \frac{-1}{B}} \cdot \sqrt{2} \]
                                                    13. Recombined 4 regimes into one program.
                                                    14. Final simplification18.9%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.5 \cdot 10^{-125}:\\ \;\;\;\;\frac{\sqrt{-16 \cdot \left(\left(\left(A \cdot A\right) \cdot C\right) \cdot F\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B}\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{-1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
                                                    15. Add Preprocessing

                                                    Alternative 12: 39.8% accurate, 9.8× speedup?

                                                    \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ \mathbf{if}\;B\_m \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{-1}{B\_m}} \cdot t\_0\\ \end{array} \end{array} \]
                                                    B_m = (fabs.f64 B)
                                                    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                    (FPCore (A B_m C F)
                                                     :precision binary64
                                                     (let* ((t_0 (- (sqrt 2.0))))
                                                       (if (<= B_m 2.6e+18)
                                                         (* (sqrt (* F (/ -0.5 C))) t_0)
                                                         (* (sqrt (* F (/ -1.0 B_m))) t_0))))
                                                    B_m = fabs(B);
                                                    assert(A < B_m && B_m < C && C < F);
                                                    double code(double A, double B_m, double C, double F) {
                                                    	double t_0 = -sqrt(2.0);
                                                    	double tmp;
                                                    	if (B_m <= 2.6e+18) {
                                                    		tmp = sqrt((F * (-0.5 / C))) * t_0;
                                                    	} else {
                                                    		tmp = sqrt((F * (-1.0 / B_m))) * t_0;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    B_m =     private
                                                    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                    module fmin_fmax_functions
                                                        implicit none
                                                        private
                                                        public fmax
                                                        public fmin
                                                    
                                                        interface fmax
                                                            module procedure fmax88
                                                            module procedure fmax44
                                                            module procedure fmax84
                                                            module procedure fmax48
                                                        end interface
                                                        interface fmin
                                                            module procedure fmin88
                                                            module procedure fmin44
                                                            module procedure fmin84
                                                            module procedure fmin48
                                                        end interface
                                                    contains
                                                        real(8) function fmax88(x, y) result (res)
                                                            real(8), intent (in) :: x
                                                            real(8), intent (in) :: y
                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                        end function
                                                        real(4) function fmax44(x, y) result (res)
                                                            real(4), intent (in) :: x
                                                            real(4), intent (in) :: y
                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                        end function
                                                        real(8) function fmax84(x, y) result(res)
                                                            real(8), intent (in) :: x
                                                            real(4), intent (in) :: y
                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                        end function
                                                        real(8) function fmax48(x, y) result(res)
                                                            real(4), intent (in) :: x
                                                            real(8), intent (in) :: y
                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                        end function
                                                        real(8) function fmin88(x, y) result (res)
                                                            real(8), intent (in) :: x
                                                            real(8), intent (in) :: y
                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                        end function
                                                        real(4) function fmin44(x, y) result (res)
                                                            real(4), intent (in) :: x
                                                            real(4), intent (in) :: y
                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                        end function
                                                        real(8) function fmin84(x, y) result(res)
                                                            real(8), intent (in) :: x
                                                            real(4), intent (in) :: y
                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                        end function
                                                        real(8) function fmin48(x, y) result(res)
                                                            real(4), intent (in) :: x
                                                            real(8), intent (in) :: y
                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                        end function
                                                    end module
                                                    
                                                    real(8) function code(a, b_m, c, f)
                                                    use fmin_fmax_functions
                                                        real(8), intent (in) :: a
                                                        real(8), intent (in) :: b_m
                                                        real(8), intent (in) :: c
                                                        real(8), intent (in) :: f
                                                        real(8) :: t_0
                                                        real(8) :: tmp
                                                        t_0 = -sqrt(2.0d0)
                                                        if (b_m <= 2.6d+18) then
                                                            tmp = sqrt((f * ((-0.5d0) / c))) * t_0
                                                        else
                                                            tmp = sqrt((f * ((-1.0d0) / b_m))) * t_0
                                                        end if
                                                        code = tmp
                                                    end function
                                                    
                                                    B_m = Math.abs(B);
                                                    assert A < B_m && B_m < C && C < F;
                                                    public static double code(double A, double B_m, double C, double F) {
                                                    	double t_0 = -Math.sqrt(2.0);
                                                    	double tmp;
                                                    	if (B_m <= 2.6e+18) {
                                                    		tmp = Math.sqrt((F * (-0.5 / C))) * t_0;
                                                    	} else {
                                                    		tmp = Math.sqrt((F * (-1.0 / B_m))) * t_0;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    B_m = math.fabs(B)
                                                    [A, B_m, C, F] = sort([A, B_m, C, F])
                                                    def code(A, B_m, C, F):
                                                    	t_0 = -math.sqrt(2.0)
                                                    	tmp = 0
                                                    	if B_m <= 2.6e+18:
                                                    		tmp = math.sqrt((F * (-0.5 / C))) * t_0
                                                    	else:
                                                    		tmp = math.sqrt((F * (-1.0 / B_m))) * t_0
                                                    	return tmp
                                                    
                                                    B_m = abs(B)
                                                    A, B_m, C, F = sort([A, B_m, C, F])
                                                    function code(A, B_m, C, F)
                                                    	t_0 = Float64(-sqrt(2.0))
                                                    	tmp = 0.0
                                                    	if (B_m <= 2.6e+18)
                                                    		tmp = Float64(sqrt(Float64(F * Float64(-0.5 / C))) * t_0);
                                                    	else
                                                    		tmp = Float64(sqrt(Float64(F * Float64(-1.0 / B_m))) * t_0);
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    B_m = abs(B);
                                                    A, B_m, C, F = num2cell(sort([A, B_m, C, F])){:}
                                                    function tmp_2 = code(A, B_m, C, F)
                                                    	t_0 = -sqrt(2.0);
                                                    	tmp = 0.0;
                                                    	if (B_m <= 2.6e+18)
                                                    		tmp = sqrt((F * (-0.5 / C))) * t_0;
                                                    	else
                                                    		tmp = sqrt((F * (-1.0 / B_m))) * t_0;
                                                    	end
                                                    	tmp_2 = tmp;
                                                    end
                                                    
                                                    B_m = N[Abs[B], $MachinePrecision]
                                                    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                    code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[B$95$m, 2.6e+18], N[(N[Sqrt[N[(F * N[(-0.5 / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]
                                                    
                                                    \begin{array}{l}
                                                    B_m = \left|B\right|
                                                    \\
                                                    [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                                    \\
                                                    \begin{array}{l}
                                                    t_0 := -\sqrt{2}\\
                                                    \mathbf{if}\;B\_m \leq 2.6 \cdot 10^{+18}:\\
                                                    \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot t\_0\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\sqrt{F \cdot \frac{-1}{B\_m}} \cdot t\_0\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if B < 2.6e18

                                                      1. Initial program 22.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. Add Preprocessing
                                                      3. Step-by-step derivation
                                                        1. lift-/.f64N/A

                                                          \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                          \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                        3. distribute-frac-negN/A

                                                          \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                        4. distribute-neg-frac2N/A

                                                          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                        5. lower-/.f64N/A

                                                          \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                      4. Applied rewrites29.8%

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

                                                        \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                      6. Step-by-step derivation
                                                        1. associate-*r*N/A

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

                                                          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                        3. lower-*.f64N/A

                                                          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                        4. associate-*r*N/A

                                                          \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                        5. lower-*.f64N/A

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

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

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

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

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

                                                        \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                      8. Taylor expanded in F around 0

                                                        \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                      9. Step-by-step derivation
                                                        1. mul-1-negN/A

                                                          \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                        2. lower-neg.f64N/A

                                                          \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                        3. lower-*.f64N/A

                                                          \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                      10. Applied rewrites28.2%

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

                                                        \[\leadsto -\sqrt{F \cdot \frac{\frac{-1}{2}}{C}} \cdot \sqrt{2} \]
                                                      12. Step-by-step derivation
                                                        1. Applied rewrites7.8%

                                                          \[\leadsto -\sqrt{F \cdot \frac{-0.5}{C}} \cdot \sqrt{2} \]

                                                        if 2.6e18 < B

                                                        1. Initial program 16.7%

                                                          \[\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. Add Preprocessing
                                                        3. Step-by-step derivation
                                                          1. lift-/.f64N/A

                                                            \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                          3. distribute-frac-negN/A

                                                            \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                          4. distribute-neg-frac2N/A

                                                            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                          5. lower-/.f64N/A

                                                            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                        4. Applied rewrites18.4%

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

                                                          \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                        6. Step-by-step derivation
                                                          1. associate-*r*N/A

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

                                                            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                          3. lower-*.f64N/A

                                                            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                          4. associate-*r*N/A

                                                            \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                          5. lower-*.f64N/A

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

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

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

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

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

                                                          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                        8. Taylor expanded in F around 0

                                                          \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                        9. Step-by-step derivation
                                                          1. mul-1-negN/A

                                                            \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                          2. lower-neg.f64N/A

                                                            \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                          3. lower-*.f64N/A

                                                            \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                        10. Applied rewrites32.6%

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

                                                          \[\leadsto -\sqrt{F \cdot \frac{-1}{B}} \cdot \sqrt{2} \]
                                                        12. Step-by-step derivation
                                                          1. Applied rewrites51.3%

                                                            \[\leadsto -\sqrt{F \cdot \frac{-1}{B}} \cdot \sqrt{2} \]
                                                        13. Recombined 2 regimes into one program.
                                                        14. Final simplification17.5%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{F \cdot \frac{-0.5}{C}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{-1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
                                                        15. Add Preprocessing

                                                        Alternative 13: 39.8% accurate, 9.8× speedup?

                                                        \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ \mathbf{if}\;B\_m \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{F}{C}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{-1}{B\_m}} \cdot t\_0\\ \end{array} \end{array} \]
                                                        B_m = (fabs.f64 B)
                                                        NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                        (FPCore (A B_m C F)
                                                         :precision binary64
                                                         (let* ((t_0 (- (sqrt 2.0))))
                                                           (if (<= B_m 2.6e+18)
                                                             (* (sqrt (* -0.5 (/ F C))) t_0)
                                                             (* (sqrt (* F (/ -1.0 B_m))) t_0))))
                                                        B_m = fabs(B);
                                                        assert(A < B_m && B_m < C && C < F);
                                                        double code(double A, double B_m, double C, double F) {
                                                        	double t_0 = -sqrt(2.0);
                                                        	double tmp;
                                                        	if (B_m <= 2.6e+18) {
                                                        		tmp = sqrt((-0.5 * (F / C))) * t_0;
                                                        	} else {
                                                        		tmp = sqrt((F * (-1.0 / B_m))) * t_0;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        B_m =     private
                                                        NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                        module fmin_fmax_functions
                                                            implicit none
                                                            private
                                                            public fmax
                                                            public fmin
                                                        
                                                            interface fmax
                                                                module procedure fmax88
                                                                module procedure fmax44
                                                                module procedure fmax84
                                                                module procedure fmax48
                                                            end interface
                                                            interface fmin
                                                                module procedure fmin88
                                                                module procedure fmin44
                                                                module procedure fmin84
                                                                module procedure fmin48
                                                            end interface
                                                        contains
                                                            real(8) function fmax88(x, y) result (res)
                                                                real(8), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                            end function
                                                            real(4) function fmax44(x, y) result (res)
                                                                real(4), intent (in) :: x
                                                                real(4), intent (in) :: y
                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmax84(x, y) result(res)
                                                                real(8), intent (in) :: x
                                                                real(4), intent (in) :: y
                                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmax48(x, y) result(res)
                                                                real(4), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmin88(x, y) result (res)
                                                                real(8), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                            end function
                                                            real(4) function fmin44(x, y) result (res)
                                                                real(4), intent (in) :: x
                                                                real(4), intent (in) :: y
                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmin84(x, y) result(res)
                                                                real(8), intent (in) :: x
                                                                real(4), intent (in) :: y
                                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmin48(x, y) result(res)
                                                                real(4), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                            end function
                                                        end module
                                                        
                                                        real(8) function code(a, b_m, c, f)
                                                        use fmin_fmax_functions
                                                            real(8), intent (in) :: a
                                                            real(8), intent (in) :: b_m
                                                            real(8), intent (in) :: c
                                                            real(8), intent (in) :: f
                                                            real(8) :: t_0
                                                            real(8) :: tmp
                                                            t_0 = -sqrt(2.0d0)
                                                            if (b_m <= 2.6d+18) then
                                                                tmp = sqrt(((-0.5d0) * (f / c))) * t_0
                                                            else
                                                                tmp = sqrt((f * ((-1.0d0) / b_m))) * t_0
                                                            end if
                                                            code = tmp
                                                        end function
                                                        
                                                        B_m = Math.abs(B);
                                                        assert A < B_m && B_m < C && C < F;
                                                        public static double code(double A, double B_m, double C, double F) {
                                                        	double t_0 = -Math.sqrt(2.0);
                                                        	double tmp;
                                                        	if (B_m <= 2.6e+18) {
                                                        		tmp = Math.sqrt((-0.5 * (F / C))) * t_0;
                                                        	} else {
                                                        		tmp = Math.sqrt((F * (-1.0 / B_m))) * t_0;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        B_m = math.fabs(B)
                                                        [A, B_m, C, F] = sort([A, B_m, C, F])
                                                        def code(A, B_m, C, F):
                                                        	t_0 = -math.sqrt(2.0)
                                                        	tmp = 0
                                                        	if B_m <= 2.6e+18:
                                                        		tmp = math.sqrt((-0.5 * (F / C))) * t_0
                                                        	else:
                                                        		tmp = math.sqrt((F * (-1.0 / B_m))) * t_0
                                                        	return tmp
                                                        
                                                        B_m = abs(B)
                                                        A, B_m, C, F = sort([A, B_m, C, F])
                                                        function code(A, B_m, C, F)
                                                        	t_0 = Float64(-sqrt(2.0))
                                                        	tmp = 0.0
                                                        	if (B_m <= 2.6e+18)
                                                        		tmp = Float64(sqrt(Float64(-0.5 * Float64(F / C))) * t_0);
                                                        	else
                                                        		tmp = Float64(sqrt(Float64(F * Float64(-1.0 / B_m))) * t_0);
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        B_m = abs(B);
                                                        A, B_m, C, F = num2cell(sort([A, B_m, C, F])){:}
                                                        function tmp_2 = code(A, B_m, C, F)
                                                        	t_0 = -sqrt(2.0);
                                                        	tmp = 0.0;
                                                        	if (B_m <= 2.6e+18)
                                                        		tmp = sqrt((-0.5 * (F / C))) * t_0;
                                                        	else
                                                        		tmp = sqrt((F * (-1.0 / B_m))) * t_0;
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        B_m = N[Abs[B], $MachinePrecision]
                                                        NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                        code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[B$95$m, 2.6e+18], N[(N[Sqrt[N[(-0.5 * N[(F / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[(F * N[(-1.0 / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]
                                                        
                                                        \begin{array}{l}
                                                        B_m = \left|B\right|
                                                        \\
                                                        [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                                        \\
                                                        \begin{array}{l}
                                                        t_0 := -\sqrt{2}\\
                                                        \mathbf{if}\;B\_m \leq 2.6 \cdot 10^{+18}:\\
                                                        \;\;\;\;\sqrt{-0.5 \cdot \frac{F}{C}} \cdot t\_0\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\sqrt{F \cdot \frac{-1}{B\_m}} \cdot t\_0\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if B < 2.6e18

                                                          1. Initial program 22.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. Add Preprocessing
                                                          3. Step-by-step derivation
                                                            1. lift-/.f64N/A

                                                              \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                              \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                            3. distribute-frac-negN/A

                                                              \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                            4. distribute-neg-frac2N/A

                                                              \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                            5. lower-/.f64N/A

                                                              \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                          4. Applied rewrites29.8%

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

                                                            \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                          6. Step-by-step derivation
                                                            1. associate-*r*N/A

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

                                                              \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                            3. lower-*.f64N/A

                                                              \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                            4. associate-*r*N/A

                                                              \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                            5. lower-*.f64N/A

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

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

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

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

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

                                                            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                          8. Taylor expanded in F around 0

                                                            \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                          9. Step-by-step derivation
                                                            1. mul-1-negN/A

                                                              \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                            2. lower-neg.f64N/A

                                                              \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                            3. lower-*.f64N/A

                                                              \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                          10. Applied rewrites28.2%

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

                                                            \[\leadsto -\sqrt{\frac{-1}{2} \cdot \frac{F}{C}} \cdot \sqrt{2} \]
                                                          12. Step-by-step derivation
                                                            1. Applied rewrites7.8%

                                                              \[\leadsto -\sqrt{-0.5 \cdot \frac{F}{C}} \cdot \sqrt{2} \]

                                                            if 2.6e18 < B

                                                            1. Initial program 16.7%

                                                              \[\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. Add Preprocessing
                                                            3. Step-by-step derivation
                                                              1. lift-/.f64N/A

                                                                \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                                \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                              3. distribute-frac-negN/A

                                                                \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                              4. distribute-neg-frac2N/A

                                                                \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                              5. lower-/.f64N/A

                                                                \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                            4. Applied rewrites18.4%

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

                                                              \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                            6. Step-by-step derivation
                                                              1. associate-*r*N/A

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

                                                                \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                              3. lower-*.f64N/A

                                                                \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                              4. associate-*r*N/A

                                                                \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                              5. lower-*.f64N/A

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

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

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

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

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

                                                              \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                            8. Taylor expanded in F around 0

                                                              \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                            9. Step-by-step derivation
                                                              1. mul-1-negN/A

                                                                \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                              2. lower-neg.f64N/A

                                                                \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                              3. lower-*.f64N/A

                                                                \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                            10. Applied rewrites32.6%

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

                                                              \[\leadsto -\sqrt{F \cdot \frac{-1}{B}} \cdot \sqrt{2} \]
                                                            12. Step-by-step derivation
                                                              1. Applied rewrites51.3%

                                                                \[\leadsto -\sqrt{F \cdot \frac{-1}{B}} \cdot \sqrt{2} \]
                                                            13. Recombined 2 regimes into one program.
                                                            14. Final simplification17.5%

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{F}{C}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \frac{-1}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
                                                            15. Add Preprocessing

                                                            Alternative 14: 39.8% accurate, 9.8× speedup?

                                                            \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} t_0 := -\sqrt{2}\\ \mathbf{if}\;B\_m \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{F}{C}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot t\_0\\ \end{array} \end{array} \]
                                                            B_m = (fabs.f64 B)
                                                            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                            (FPCore (A B_m C F)
                                                             :precision binary64
                                                             (let* ((t_0 (- (sqrt 2.0))))
                                                               (if (<= B_m 2.6e+18)
                                                                 (* (sqrt (* -0.5 (/ F C))) t_0)
                                                                 (* (sqrt (/ (- F) B_m)) t_0))))
                                                            B_m = fabs(B);
                                                            assert(A < B_m && B_m < C && C < F);
                                                            double code(double A, double B_m, double C, double F) {
                                                            	double t_0 = -sqrt(2.0);
                                                            	double tmp;
                                                            	if (B_m <= 2.6e+18) {
                                                            		tmp = sqrt((-0.5 * (F / C))) * t_0;
                                                            	} else {
                                                            		tmp = sqrt((-F / B_m)) * t_0;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            B_m =     private
                                                            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                            module fmin_fmax_functions
                                                                implicit none
                                                                private
                                                                public fmax
                                                                public fmin
                                                            
                                                                interface fmax
                                                                    module procedure fmax88
                                                                    module procedure fmax44
                                                                    module procedure fmax84
                                                                    module procedure fmax48
                                                                end interface
                                                                interface fmin
                                                                    module procedure fmin88
                                                                    module procedure fmin44
                                                                    module procedure fmin84
                                                                    module procedure fmin48
                                                                end interface
                                                            contains
                                                                real(8) function fmax88(x, y) result (res)
                                                                    real(8), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                end function
                                                                real(4) function fmax44(x, y) result (res)
                                                                    real(4), intent (in) :: x
                                                                    real(4), intent (in) :: y
                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmax84(x, y) result(res)
                                                                    real(8), intent (in) :: x
                                                                    real(4), intent (in) :: y
                                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmax48(x, y) result(res)
                                                                    real(4), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmin88(x, y) result (res)
                                                                    real(8), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                end function
                                                                real(4) function fmin44(x, y) result (res)
                                                                    real(4), intent (in) :: x
                                                                    real(4), intent (in) :: y
                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmin84(x, y) result(res)
                                                                    real(8), intent (in) :: x
                                                                    real(4), intent (in) :: y
                                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                end function
                                                                real(8) function fmin48(x, y) result(res)
                                                                    real(4), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                end function
                                                            end module
                                                            
                                                            real(8) function code(a, b_m, c, f)
                                                            use fmin_fmax_functions
                                                                real(8), intent (in) :: a
                                                                real(8), intent (in) :: b_m
                                                                real(8), intent (in) :: c
                                                                real(8), intent (in) :: f
                                                                real(8) :: t_0
                                                                real(8) :: tmp
                                                                t_0 = -sqrt(2.0d0)
                                                                if (b_m <= 2.6d+18) then
                                                                    tmp = sqrt(((-0.5d0) * (f / c))) * t_0
                                                                else
                                                                    tmp = sqrt((-f / b_m)) * t_0
                                                                end if
                                                                code = tmp
                                                            end function
                                                            
                                                            B_m = Math.abs(B);
                                                            assert A < B_m && B_m < C && C < F;
                                                            public static double code(double A, double B_m, double C, double F) {
                                                            	double t_0 = -Math.sqrt(2.0);
                                                            	double tmp;
                                                            	if (B_m <= 2.6e+18) {
                                                            		tmp = Math.sqrt((-0.5 * (F / C))) * t_0;
                                                            	} else {
                                                            		tmp = Math.sqrt((-F / B_m)) * t_0;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            B_m = math.fabs(B)
                                                            [A, B_m, C, F] = sort([A, B_m, C, F])
                                                            def code(A, B_m, C, F):
                                                            	t_0 = -math.sqrt(2.0)
                                                            	tmp = 0
                                                            	if B_m <= 2.6e+18:
                                                            		tmp = math.sqrt((-0.5 * (F / C))) * t_0
                                                            	else:
                                                            		tmp = math.sqrt((-F / B_m)) * t_0
                                                            	return tmp
                                                            
                                                            B_m = abs(B)
                                                            A, B_m, C, F = sort([A, B_m, C, F])
                                                            function code(A, B_m, C, F)
                                                            	t_0 = Float64(-sqrt(2.0))
                                                            	tmp = 0.0
                                                            	if (B_m <= 2.6e+18)
                                                            		tmp = Float64(sqrt(Float64(-0.5 * Float64(F / C))) * t_0);
                                                            	else
                                                            		tmp = Float64(sqrt(Float64(Float64(-F) / B_m)) * t_0);
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            B_m = abs(B);
                                                            A, B_m, C, F = num2cell(sort([A, B_m, C, F])){:}
                                                            function tmp_2 = code(A, B_m, C, F)
                                                            	t_0 = -sqrt(2.0);
                                                            	tmp = 0.0;
                                                            	if (B_m <= 2.6e+18)
                                                            		tmp = sqrt((-0.5 * (F / C))) * t_0;
                                                            	else
                                                            		tmp = sqrt((-F / B_m)) * t_0;
                                                            	end
                                                            	tmp_2 = tmp;
                                                            end
                                                            
                                                            B_m = N[Abs[B], $MachinePrecision]
                                                            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                            code[A_, B$95$m_, C_, F_] := Block[{t$95$0 = (-N[Sqrt[2.0], $MachinePrecision])}, If[LessEqual[B$95$m, 2.6e+18], N[(N[Sqrt[N[(-0.5 * N[(F / C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sqrt[N[((-F) / B$95$m), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]
                                                            
                                                            \begin{array}{l}
                                                            B_m = \left|B\right|
                                                            \\
                                                            [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                                            \\
                                                            \begin{array}{l}
                                                            t_0 := -\sqrt{2}\\
                                                            \mathbf{if}\;B\_m \leq 2.6 \cdot 10^{+18}:\\
                                                            \;\;\;\;\sqrt{-0.5 \cdot \frac{F}{C}} \cdot t\_0\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot t\_0\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if B < 2.6e18

                                                              1. Initial program 22.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. Add Preprocessing
                                                              3. Step-by-step derivation
                                                                1. lift-/.f64N/A

                                                                  \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                                  \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                                3. distribute-frac-negN/A

                                                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                                4. distribute-neg-frac2N/A

                                                                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                                5. lower-/.f64N/A

                                                                  \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                              4. Applied rewrites29.8%

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

                                                                \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                              6. Step-by-step derivation
                                                                1. associate-*r*N/A

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

                                                                  \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                3. lower-*.f64N/A

                                                                  \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                4. associate-*r*N/A

                                                                  \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                5. lower-*.f64N/A

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

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

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

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

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

                                                                \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                              8. Taylor expanded in F around 0

                                                                \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                              9. Step-by-step derivation
                                                                1. mul-1-negN/A

                                                                  \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                                2. lower-neg.f64N/A

                                                                  \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                                3. lower-*.f64N/A

                                                                  \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                              10. Applied rewrites28.2%

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

                                                                \[\leadsto -\sqrt{\frac{-1}{2} \cdot \frac{F}{C}} \cdot \sqrt{2} \]
                                                              12. Step-by-step derivation
                                                                1. Applied rewrites7.8%

                                                                  \[\leadsto -\sqrt{-0.5 \cdot \frac{F}{C}} \cdot \sqrt{2} \]

                                                                if 2.6e18 < B

                                                                1. Initial program 16.7%

                                                                  \[\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. Add Preprocessing
                                                                3. Step-by-step derivation
                                                                  1. lift-/.f64N/A

                                                                    \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                                    \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                                  3. distribute-frac-negN/A

                                                                    \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                                  4. distribute-neg-frac2N/A

                                                                    \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                                  5. lower-/.f64N/A

                                                                    \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                                4. Applied rewrites18.4%

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

                                                                  \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                6. Step-by-step derivation
                                                                  1. associate-*r*N/A

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

                                                                    \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                  3. lower-*.f64N/A

                                                                    \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                  4. associate-*r*N/A

                                                                    \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                  5. lower-*.f64N/A

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

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

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

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

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

                                                                  \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                8. Taylor expanded in F around 0

                                                                  \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                                9. Step-by-step derivation
                                                                  1. mul-1-negN/A

                                                                    \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                                  2. lower-neg.f64N/A

                                                                    \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                                  3. lower-*.f64N/A

                                                                    \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                                10. Applied rewrites32.6%

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

                                                                  \[\leadsto -\sqrt{-1 \cdot \frac{F}{B}} \cdot \sqrt{2} \]
                                                                12. Step-by-step derivation
                                                                  1. Applied rewrites51.2%

                                                                    \[\leadsto -\sqrt{\frac{-F}{B}} \cdot \sqrt{2} \]
                                                                13. Recombined 2 regimes into one program.
                                                                14. Final simplification17.5%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 2.6 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{F}{C}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-F}{B}} \cdot \left(-\sqrt{2}\right)\\ \end{array} \]
                                                                15. Add Preprocessing

                                                                Alternative 15: 34.1% accurate, 10.2× speedup?

                                                                \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+45}:\\ \;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-B\_m, F, A \cdot F\right) \cdot 2}}{-B\_m}\\ \end{array} \end{array} \]
                                                                B_m = (fabs.f64 B)
                                                                NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                (FPCore (A B_m C F)
                                                                 :precision binary64
                                                                 (if (<= F -2e+45)
                                                                   (* (sqrt (/ (- F) B_m)) (- (sqrt 2.0)))
                                                                   (/ (sqrt (* (fma (- B_m) F (* A F)) 2.0)) (- B_m))))
                                                                B_m = fabs(B);
                                                                assert(A < B_m && B_m < C && C < F);
                                                                double code(double A, double B_m, double C, double F) {
                                                                	double tmp;
                                                                	if (F <= -2e+45) {
                                                                		tmp = sqrt((-F / B_m)) * -sqrt(2.0);
                                                                	} else {
                                                                		tmp = sqrt((fma(-B_m, F, (A * F)) * 2.0)) / -B_m;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                B_m = abs(B)
                                                                A, B_m, C, F = sort([A, B_m, C, F])
                                                                function code(A, B_m, C, F)
                                                                	tmp = 0.0
                                                                	if (F <= -2e+45)
                                                                		tmp = Float64(sqrt(Float64(Float64(-F) / B_m)) * Float64(-sqrt(2.0)));
                                                                	else
                                                                		tmp = Float64(sqrt(Float64(fma(Float64(-B_m), F, Float64(A * F)) * 2.0)) / Float64(-B_m));
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                B_m = N[Abs[B], $MachinePrecision]
                                                                NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -2e+45], N[(N[Sqrt[N[((-F) / B$95$m), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[N[(N[((-B$95$m) * F + N[(A * F), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / (-B$95$m)), $MachinePrecision]]
                                                                
                                                                \begin{array}{l}
                                                                B_m = \left|B\right|
                                                                \\
                                                                [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                                                \\
                                                                \begin{array}{l}
                                                                \mathbf{if}\;F \leq -2 \cdot 10^{+45}:\\
                                                                \;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot \left(-\sqrt{2}\right)\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-B\_m, F, A \cdot F\right) \cdot 2}}{-B\_m}\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if F < -1.9999999999999999e45

                                                                  1. Initial program 22.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. Add Preprocessing
                                                                  3. Step-by-step derivation
                                                                    1. lift-/.f64N/A

                                                                      \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                                      \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                                    3. distribute-frac-negN/A

                                                                      \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                                    4. distribute-neg-frac2N/A

                                                                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                                    5. lower-/.f64N/A

                                                                      \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                                  4. Applied rewrites22.1%

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

                                                                    \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                  6. Step-by-step derivation
                                                                    1. associate-*r*N/A

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

                                                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                    3. lower-*.f64N/A

                                                                      \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                    4. associate-*r*N/A

                                                                      \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                    5. lower-*.f64N/A

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

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

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

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

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

                                                                    \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                  8. Taylor expanded in F around 0

                                                                    \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                                  9. Step-by-step derivation
                                                                    1. mul-1-negN/A

                                                                      \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                                    2. lower-neg.f64N/A

                                                                      \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                                    3. lower-*.f64N/A

                                                                      \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                                  10. Applied rewrites29.4%

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

                                                                    \[\leadsto -\sqrt{-1 \cdot \frac{F}{B}} \cdot \sqrt{2} \]
                                                                  12. Step-by-step derivation
                                                                    1. Applied rewrites19.0%

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

                                                                    if -1.9999999999999999e45 < F

                                                                    1. Initial program 20.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. Add Preprocessing
                                                                    3. Taylor expanded in C around 0

                                                                      \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                                                    4. Step-by-step derivation
                                                                      1. mul-1-negN/A

                                                                        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                                                      2. lower-neg.f64N/A

                                                                        \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
                                                                      3. *-commutativeN/A

                                                                        \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                                      4. lower-*.f64N/A

                                                                        \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                                      5. lower-sqrt.f64N/A

                                                                        \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \cdot \frac{\sqrt{2}}{B} \]
                                                                      6. *-commutativeN/A

                                                                        \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                                      7. lower-*.f64N/A

                                                                        \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                                      8. lower--.f64N/A

                                                                        \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                      9. unpow2N/A

                                                                        \[\leadsto -\sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                      10. unpow2N/A

                                                                        \[\leadsto -\sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                      11. lower-hypot.f64N/A

                                                                        \[\leadsto -\sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                      12. lower-/.f64N/A

                                                                        \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
                                                                      13. lower-sqrt.f6419.7

                                                                        \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\color{blue}{\sqrt{2}}}{B} \]
                                                                    5. Applied rewrites19.7%

                                                                      \[\leadsto \color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
                                                                    6. Step-by-step derivation
                                                                      1. Applied rewrites19.8%

                                                                        \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right) \cdot 2}}{-B}} \]
                                                                      2. Taylor expanded in A around 0

                                                                        \[\leadsto \frac{\sqrt{\left(-1 \cdot \left(B \cdot F\right) + A \cdot F\right) \cdot 2}}{-B} \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites16.4%

                                                                          \[\leadsto \frac{\sqrt{\mathsf{fma}\left(-B, F, A \cdot F\right) \cdot 2}}{-B} \]
                                                                      4. Recombined 2 regimes into one program.
                                                                      5. Final simplification17.4%

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+45}:\\ \;\;\;\;\sqrt{\frac{-F}{B}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(-B, F, A \cdot F\right) \cdot 2}}{-B}\\ \end{array} \]
                                                                      6. Add Preprocessing

                                                                      Alternative 16: 34.1% accurate, 10.4× speedup?

                                                                      \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+45}:\\ \;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\ \end{array} \end{array} \]
                                                                      B_m = (fabs.f64 B)
                                                                      NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                      (FPCore (A B_m C F)
                                                                       :precision binary64
                                                                       (if (<= F -2e+45)
                                                                         (* (sqrt (/ (- F) B_m)) (- (sqrt 2.0)))
                                                                         (/ (sqrt (* (* (- A B_m) F) 2.0)) (- B_m))))
                                                                      B_m = fabs(B);
                                                                      assert(A < B_m && B_m < C && C < F);
                                                                      double code(double A, double B_m, double C, double F) {
                                                                      	double tmp;
                                                                      	if (F <= -2e+45) {
                                                                      		tmp = sqrt((-F / B_m)) * -sqrt(2.0);
                                                                      	} else {
                                                                      		tmp = sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      B_m =     private
                                                                      NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                      module fmin_fmax_functions
                                                                          implicit none
                                                                          private
                                                                          public fmax
                                                                          public fmin
                                                                      
                                                                          interface fmax
                                                                              module procedure fmax88
                                                                              module procedure fmax44
                                                                              module procedure fmax84
                                                                              module procedure fmax48
                                                                          end interface
                                                                          interface fmin
                                                                              module procedure fmin88
                                                                              module procedure fmin44
                                                                              module procedure fmin84
                                                                              module procedure fmin48
                                                                          end interface
                                                                      contains
                                                                          real(8) function fmax88(x, y) result (res)
                                                                              real(8), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(4) function fmax44(x, y) result (res)
                                                                              real(4), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmax84(x, y) result(res)
                                                                              real(8), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmax48(x, y) result(res)
                                                                              real(4), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmin88(x, y) result (res)
                                                                              real(8), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(4) function fmin44(x, y) result (res)
                                                                              real(4), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmin84(x, y) result(res)
                                                                              real(8), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmin48(x, y) result(res)
                                                                              real(4), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                          end function
                                                                      end module
                                                                      
                                                                      real(8) function code(a, b_m, c, f)
                                                                      use fmin_fmax_functions
                                                                          real(8), intent (in) :: a
                                                                          real(8), intent (in) :: b_m
                                                                          real(8), intent (in) :: c
                                                                          real(8), intent (in) :: f
                                                                          real(8) :: tmp
                                                                          if (f <= (-2d+45)) then
                                                                              tmp = sqrt((-f / b_m)) * -sqrt(2.0d0)
                                                                          else
                                                                              tmp = sqrt((((a - b_m) * f) * 2.0d0)) / -b_m
                                                                          end if
                                                                          code = tmp
                                                                      end function
                                                                      
                                                                      B_m = Math.abs(B);
                                                                      assert A < B_m && B_m < C && C < F;
                                                                      public static double code(double A, double B_m, double C, double F) {
                                                                      	double tmp;
                                                                      	if (F <= -2e+45) {
                                                                      		tmp = Math.sqrt((-F / B_m)) * -Math.sqrt(2.0);
                                                                      	} else {
                                                                      		tmp = Math.sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      B_m = math.fabs(B)
                                                                      [A, B_m, C, F] = sort([A, B_m, C, F])
                                                                      def code(A, B_m, C, F):
                                                                      	tmp = 0
                                                                      	if F <= -2e+45:
                                                                      		tmp = math.sqrt((-F / B_m)) * -math.sqrt(2.0)
                                                                      	else:
                                                                      		tmp = math.sqrt((((A - B_m) * F) * 2.0)) / -B_m
                                                                      	return tmp
                                                                      
                                                                      B_m = abs(B)
                                                                      A, B_m, C, F = sort([A, B_m, C, F])
                                                                      function code(A, B_m, C, F)
                                                                      	tmp = 0.0
                                                                      	if (F <= -2e+45)
                                                                      		tmp = Float64(sqrt(Float64(Float64(-F) / B_m)) * Float64(-sqrt(2.0)));
                                                                      	else
                                                                      		tmp = Float64(sqrt(Float64(Float64(Float64(A - B_m) * F) * 2.0)) / Float64(-B_m));
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      B_m = abs(B);
                                                                      A, B_m, C, F = num2cell(sort([A, B_m, C, F])){:}
                                                                      function tmp_2 = code(A, B_m, C, F)
                                                                      	tmp = 0.0;
                                                                      	if (F <= -2e+45)
                                                                      		tmp = sqrt((-F / B_m)) * -sqrt(2.0);
                                                                      	else
                                                                      		tmp = sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                                                                      	end
                                                                      	tmp_2 = tmp;
                                                                      end
                                                                      
                                                                      B_m = N[Abs[B], $MachinePrecision]
                                                                      NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                      code[A_, B$95$m_, C_, F_] := If[LessEqual[F, -2e+45], N[(N[Sqrt[N[((-F) / B$95$m), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(A - B$95$m), $MachinePrecision] * F), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / (-B$95$m)), $MachinePrecision]]
                                                                      
                                                                      \begin{array}{l}
                                                                      B_m = \left|B\right|
                                                                      \\
                                                                      [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                                                      \\
                                                                      \begin{array}{l}
                                                                      \mathbf{if}\;F \leq -2 \cdot 10^{+45}:\\
                                                                      \;\;\;\;\sqrt{\frac{-F}{B\_m}} \cdot \left(-\sqrt{2}\right)\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;\frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 2 regimes
                                                                      2. if F < -1.9999999999999999e45

                                                                        1. Initial program 22.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. Add Preprocessing
                                                                        3. Step-by-step derivation
                                                                          1. lift-/.f64N/A

                                                                            \[\leadsto \color{blue}{\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. lift-neg.f64N/A

                                                                            \[\leadsto \frac{\color{blue}{\mathsf{neg}\left(\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)}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
                                                                          3. distribute-frac-negN/A

                                                                            \[\leadsto \color{blue}{\mathsf{neg}\left(\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}\right)} \]
                                                                          4. distribute-neg-frac2N/A

                                                                            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                                          5. lower-/.f64N/A

                                                                            \[\leadsto \color{blue}{\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)}}{\mathsf{neg}\left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right)\right)}} \]
                                                                        4. Applied rewrites22.1%

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

                                                                          \[\leadsto \frac{\sqrt{\color{blue}{-8 \cdot \left(A \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                        6. Step-by-step derivation
                                                                          1. associate-*r*N/A

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

                                                                            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                          3. lower-*.f64N/A

                                                                            \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right)} \cdot \left(C \cdot \left(F \cdot \left(C - -1 \cdot C\right)\right)\right)}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                          4. associate-*r*N/A

                                                                            \[\leadsto \frac{\sqrt{\left(-8 \cdot A\right) \cdot \color{blue}{\left(\left(C \cdot F\right) \cdot \left(C - -1 \cdot C\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                          5. lower-*.f64N/A

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

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

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

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

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

                                                                          \[\leadsto \frac{\sqrt{\color{blue}{\left(-8 \cdot A\right) \cdot \left(\left(C \cdot F\right) \cdot \left(C - \left(-C\right)\right)\right)}}}{-\mathsf{fma}\left(-4 \cdot A, C, B \cdot B\right)} \]
                                                                        8. Taylor expanded in F around 0

                                                                          \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                                        9. Step-by-step derivation
                                                                          1. mul-1-negN/A

                                                                            \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}\right)} \]
                                                                          2. lower-neg.f64N/A

                                                                            \[\leadsto \color{blue}{-\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                                          3. lower-*.f64N/A

                                                                            \[\leadsto -\color{blue}{\sqrt{\frac{F \cdot \left(\left(A + C\right) - \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)}{-4 \cdot \left(A \cdot C\right) + {B}^{2}}} \cdot \sqrt{2}} \]
                                                                        10. Applied rewrites29.4%

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

                                                                          \[\leadsto -\sqrt{-1 \cdot \frac{F}{B}} \cdot \sqrt{2} \]
                                                                        12. Step-by-step derivation
                                                                          1. Applied rewrites19.0%

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

                                                                          if -1.9999999999999999e45 < F

                                                                          1. Initial program 20.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. Add Preprocessing
                                                                          3. Taylor expanded in C around 0

                                                                            \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                                                          4. Step-by-step derivation
                                                                            1. mul-1-negN/A

                                                                              \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                                                            2. lower-neg.f64N/A

                                                                              \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
                                                                            3. *-commutativeN/A

                                                                              \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                                            4. lower-*.f64N/A

                                                                              \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                                            5. lower-sqrt.f64N/A

                                                                              \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \cdot \frac{\sqrt{2}}{B} \]
                                                                            6. *-commutativeN/A

                                                                              \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                                            7. lower-*.f64N/A

                                                                              \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                                            8. lower--.f64N/A

                                                                              \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                            9. unpow2N/A

                                                                              \[\leadsto -\sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                            10. unpow2N/A

                                                                              \[\leadsto -\sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                            11. lower-hypot.f64N/A

                                                                              \[\leadsto -\sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                            12. lower-/.f64N/A

                                                                              \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
                                                                            13. lower-sqrt.f6419.7

                                                                              \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\color{blue}{\sqrt{2}}}{B} \]
                                                                          5. Applied rewrites19.7%

                                                                            \[\leadsto \color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
                                                                          6. Step-by-step derivation
                                                                            1. Applied rewrites19.8%

                                                                              \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right) \cdot 2}}{-B}} \]
                                                                            2. Taylor expanded in A around 0

                                                                              \[\leadsto \frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B} \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites16.4%

                                                                                \[\leadsto \frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B} \]
                                                                            4. Recombined 2 regimes into one program.
                                                                            5. Final simplification17.4%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -2 \cdot 10^{+45}:\\ \;\;\;\;\sqrt{\frac{-F}{B}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B}\\ \end{array} \]
                                                                            6. Add Preprocessing

                                                                            Alternative 17: 26.8% accurate, 13.3× speedup?

                                                                            \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m} \end{array} \]
                                                                            B_m = (fabs.f64 B)
                                                                            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                            (FPCore (A B_m C F)
                                                                             :precision binary64
                                                                             (/ (sqrt (* (* (- A B_m) F) 2.0)) (- B_m)))
                                                                            B_m = fabs(B);
                                                                            assert(A < B_m && B_m < C && C < F);
                                                                            double code(double A, double B_m, double C, double F) {
                                                                            	return sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                                                                            }
                                                                            
                                                                            B_m =     private
                                                                            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                            module fmin_fmax_functions
                                                                                implicit none
                                                                                private
                                                                                public fmax
                                                                                public fmin
                                                                            
                                                                                interface fmax
                                                                                    module procedure fmax88
                                                                                    module procedure fmax44
                                                                                    module procedure fmax84
                                                                                    module procedure fmax48
                                                                                end interface
                                                                                interface fmin
                                                                                    module procedure fmin88
                                                                                    module procedure fmin44
                                                                                    module procedure fmin84
                                                                                    module procedure fmin48
                                                                                end interface
                                                                            contains
                                                                                real(8) function fmax88(x, y) result (res)
                                                                                    real(8), intent (in) :: x
                                                                                    real(8), intent (in) :: y
                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                end function
                                                                                real(4) function fmax44(x, y) result (res)
                                                                                    real(4), intent (in) :: x
                                                                                    real(4), intent (in) :: y
                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                end function
                                                                                real(8) function fmax84(x, y) result(res)
                                                                                    real(8), intent (in) :: x
                                                                                    real(4), intent (in) :: y
                                                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                end function
                                                                                real(8) function fmax48(x, y) result(res)
                                                                                    real(4), intent (in) :: x
                                                                                    real(8), intent (in) :: y
                                                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                end function
                                                                                real(8) function fmin88(x, y) result (res)
                                                                                    real(8), intent (in) :: x
                                                                                    real(8), intent (in) :: y
                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                end function
                                                                                real(4) function fmin44(x, y) result (res)
                                                                                    real(4), intent (in) :: x
                                                                                    real(4), intent (in) :: y
                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                end function
                                                                                real(8) function fmin84(x, y) result(res)
                                                                                    real(8), intent (in) :: x
                                                                                    real(4), intent (in) :: y
                                                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                end function
                                                                                real(8) function fmin48(x, y) result(res)
                                                                                    real(4), intent (in) :: x
                                                                                    real(8), intent (in) :: y
                                                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                end function
                                                                            end module
                                                                            
                                                                            real(8) function code(a, b_m, c, f)
                                                                            use fmin_fmax_functions
                                                                                real(8), intent (in) :: a
                                                                                real(8), intent (in) :: b_m
                                                                                real(8), intent (in) :: c
                                                                                real(8), intent (in) :: f
                                                                                code = sqrt((((a - b_m) * f) * 2.0d0)) / -b_m
                                                                            end function
                                                                            
                                                                            B_m = Math.abs(B);
                                                                            assert A < B_m && B_m < C && C < F;
                                                                            public static double code(double A, double B_m, double C, double F) {
                                                                            	return Math.sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                                                                            }
                                                                            
                                                                            B_m = math.fabs(B)
                                                                            [A, B_m, C, F] = sort([A, B_m, C, F])
                                                                            def code(A, B_m, C, F):
                                                                            	return math.sqrt((((A - B_m) * F) * 2.0)) / -B_m
                                                                            
                                                                            B_m = abs(B)
                                                                            A, B_m, C, F = sort([A, B_m, C, F])
                                                                            function code(A, B_m, C, F)
                                                                            	return Float64(sqrt(Float64(Float64(Float64(A - B_m) * F) * 2.0)) / Float64(-B_m))
                                                                            end
                                                                            
                                                                            B_m = abs(B);
                                                                            A, B_m, C, F = num2cell(sort([A, B_m, C, F])){:}
                                                                            function tmp = code(A, B_m, C, F)
                                                                            	tmp = sqrt((((A - B_m) * F) * 2.0)) / -B_m;
                                                                            end
                                                                            
                                                                            B_m = N[Abs[B], $MachinePrecision]
                                                                            NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                            code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(N[(N[(A - B$95$m), $MachinePrecision] * F), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] / (-B$95$m)), $MachinePrecision]
                                                                            
                                                                            \begin{array}{l}
                                                                            B_m = \left|B\right|
                                                                            \\
                                                                            [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                                                            \\
                                                                            \frac{\sqrt{\left(\left(A - B\_m\right) \cdot F\right) \cdot 2}}{-B\_m}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Initial program 21.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. Add Preprocessing
                                                                            3. Taylor expanded in C around 0

                                                                              \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                                                            4. Step-by-step derivation
                                                                              1. mul-1-negN/A

                                                                                \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                                                              2. lower-neg.f64N/A

                                                                                \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
                                                                              3. *-commutativeN/A

                                                                                \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                                              4. lower-*.f64N/A

                                                                                \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                                              5. lower-sqrt.f64N/A

                                                                                \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \cdot \frac{\sqrt{2}}{B} \]
                                                                              6. *-commutativeN/A

                                                                                \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                                              7. lower-*.f64N/A

                                                                                \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                                              8. lower--.f64N/A

                                                                                \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                              9. unpow2N/A

                                                                                \[\leadsto -\sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                              10. unpow2N/A

                                                                                \[\leadsto -\sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                              11. lower-hypot.f64N/A

                                                                                \[\leadsto -\sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                              12. lower-/.f64N/A

                                                                                \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
                                                                              13. lower-sqrt.f6415.8

                                                                                \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\color{blue}{\sqrt{2}}}{B} \]
                                                                            5. Applied rewrites15.8%

                                                                              \[\leadsto \color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
                                                                            6. Step-by-step derivation
                                                                              1. Applied rewrites15.9%

                                                                                \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right) \cdot 2}}{-B}} \]
                                                                              2. Taylor expanded in A around 0

                                                                                \[\leadsto \frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites12.7%

                                                                                  \[\leadsto \frac{\sqrt{\left(\left(A - B\right) \cdot F\right) \cdot 2}}{-B} \]
                                                                                2. Add Preprocessing

                                                                                Alternative 18: 26.5% accurate, 14.4× speedup?

                                                                                \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \frac{\sqrt{-2 \cdot \left(B\_m \cdot F\right)}}{-B\_m} \end{array} \]
                                                                                B_m = (fabs.f64 B)
                                                                                NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                                (FPCore (A B_m C F) :precision binary64 (/ (sqrt (* -2.0 (* B_m F))) (- B_m)))
                                                                                B_m = fabs(B);
                                                                                assert(A < B_m && B_m < C && C < F);
                                                                                double code(double A, double B_m, double C, double F) {
                                                                                	return sqrt((-2.0 * (B_m * F))) / -B_m;
                                                                                }
                                                                                
                                                                                B_m =     private
                                                                                NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                                module fmin_fmax_functions
                                                                                    implicit none
                                                                                    private
                                                                                    public fmax
                                                                                    public fmin
                                                                                
                                                                                    interface fmax
                                                                                        module procedure fmax88
                                                                                        module procedure fmax44
                                                                                        module procedure fmax84
                                                                                        module procedure fmax48
                                                                                    end interface
                                                                                    interface fmin
                                                                                        module procedure fmin88
                                                                                        module procedure fmin44
                                                                                        module procedure fmin84
                                                                                        module procedure fmin48
                                                                                    end interface
                                                                                contains
                                                                                    real(8) function fmax88(x, y) result (res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(4) function fmax44(x, y) result (res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmax84(x, y) result(res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmax48(x, y) result(res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmin88(x, y) result (res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(4) function fmin44(x, y) result (res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmin84(x, y) result(res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmin48(x, y) result(res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                    end function
                                                                                end module
                                                                                
                                                                                real(8) function code(a, b_m, c, f)
                                                                                use fmin_fmax_functions
                                                                                    real(8), intent (in) :: a
                                                                                    real(8), intent (in) :: b_m
                                                                                    real(8), intent (in) :: c
                                                                                    real(8), intent (in) :: f
                                                                                    code = sqrt(((-2.0d0) * (b_m * f))) / -b_m
                                                                                end function
                                                                                
                                                                                B_m = Math.abs(B);
                                                                                assert A < B_m && B_m < C && C < F;
                                                                                public static double code(double A, double B_m, double C, double F) {
                                                                                	return Math.sqrt((-2.0 * (B_m * F))) / -B_m;
                                                                                }
                                                                                
                                                                                B_m = math.fabs(B)
                                                                                [A, B_m, C, F] = sort([A, B_m, C, F])
                                                                                def code(A, B_m, C, F):
                                                                                	return math.sqrt((-2.0 * (B_m * F))) / -B_m
                                                                                
                                                                                B_m = abs(B)
                                                                                A, B_m, C, F = sort([A, B_m, C, F])
                                                                                function code(A, B_m, C, F)
                                                                                	return Float64(sqrt(Float64(-2.0 * Float64(B_m * F))) / Float64(-B_m))
                                                                                end
                                                                                
                                                                                B_m = abs(B);
                                                                                A, B_m, C, F = num2cell(sort([A, B_m, C, F])){:}
                                                                                function tmp = code(A, B_m, C, F)
                                                                                	tmp = sqrt((-2.0 * (B_m * F))) / -B_m;
                                                                                end
                                                                                
                                                                                B_m = N[Abs[B], $MachinePrecision]
                                                                                NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                                code[A_, B$95$m_, C_, F_] := N[(N[Sqrt[N[(-2.0 * N[(B$95$m * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-B$95$m)), $MachinePrecision]
                                                                                
                                                                                \begin{array}{l}
                                                                                B_m = \left|B\right|
                                                                                \\
                                                                                [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                                                                \\
                                                                                \frac{\sqrt{-2 \cdot \left(B\_m \cdot F\right)}}{-B\_m}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Initial program 21.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. Add Preprocessing
                                                                                3. Taylor expanded in C around 0

                                                                                  \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                                                                4. Step-by-step derivation
                                                                                  1. mul-1-negN/A

                                                                                    \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}\right)} \]
                                                                                  2. lower-neg.f64N/A

                                                                                    \[\leadsto \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \]
                                                                                  3. *-commutativeN/A

                                                                                    \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                                                  4. lower-*.f64N/A

                                                                                    \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot \frac{\sqrt{2}}{B}} \]
                                                                                  5. lower-sqrt.f64N/A

                                                                                    \[\leadsto -\color{blue}{\sqrt{F \cdot \left(A - \sqrt{{A}^{2} + {B}^{2}}\right)}} \cdot \frac{\sqrt{2}}{B} \]
                                                                                  6. *-commutativeN/A

                                                                                    \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                                                  7. lower-*.f64N/A

                                                                                    \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right) \cdot F}} \cdot \frac{\sqrt{2}}{B} \]
                                                                                  8. lower--.f64N/A

                                                                                    \[\leadsto -\sqrt{\color{blue}{\left(A - \sqrt{{A}^{2} + {B}^{2}}\right)} \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                                  9. unpow2N/A

                                                                                    \[\leadsto -\sqrt{\left(A - \sqrt{\color{blue}{A \cdot A} + {B}^{2}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                                  10. unpow2N/A

                                                                                    \[\leadsto -\sqrt{\left(A - \sqrt{A \cdot A + \color{blue}{B \cdot B}}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                                  11. lower-hypot.f64N/A

                                                                                    \[\leadsto -\sqrt{\left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right) \cdot F} \cdot \frac{\sqrt{2}}{B} \]
                                                                                  12. lower-/.f64N/A

                                                                                    \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
                                                                                  13. lower-sqrt.f6415.8

                                                                                    \[\leadsto -\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\color{blue}{\sqrt{2}}}{B} \]
                                                                                5. Applied rewrites15.8%

                                                                                  \[\leadsto \color{blue}{-\sqrt{\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F} \cdot \frac{\sqrt{2}}{B}} \]
                                                                                6. Step-by-step derivation
                                                                                  1. Applied rewrites15.9%

                                                                                    \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(A - \mathsf{hypot}\left(A, B\right)\right) \cdot F\right) \cdot 2}}{-B}} \]
                                                                                  2. Taylor expanded in A around 0

                                                                                    \[\leadsto \frac{\sqrt{-2 \cdot \left(B \cdot F\right)}}{-B} \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites13.4%

                                                                                      \[\leadsto \frac{\sqrt{-2 \cdot \left(B \cdot F\right)}}{-B} \]
                                                                                    2. Add Preprocessing

                                                                                    Alternative 19: 1.6% accurate, 18.2× speedup?

                                                                                    \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \sqrt{F \cdot \frac{2}{B\_m}} \end{array} \]
                                                                                    B_m = (fabs.f64 B)
                                                                                    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                                    (FPCore (A B_m C F) :precision binary64 (sqrt (* F (/ 2.0 B_m))))
                                                                                    B_m = fabs(B);
                                                                                    assert(A < B_m && B_m < C && C < F);
                                                                                    double code(double A, double B_m, double C, double F) {
                                                                                    	return sqrt((F * (2.0 / B_m)));
                                                                                    }
                                                                                    
                                                                                    B_m =     private
                                                                                    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                                    module fmin_fmax_functions
                                                                                        implicit none
                                                                                        private
                                                                                        public fmax
                                                                                        public fmin
                                                                                    
                                                                                        interface fmax
                                                                                            module procedure fmax88
                                                                                            module procedure fmax44
                                                                                            module procedure fmax84
                                                                                            module procedure fmax48
                                                                                        end interface
                                                                                        interface fmin
                                                                                            module procedure fmin88
                                                                                            module procedure fmin44
                                                                                            module procedure fmin84
                                                                                            module procedure fmin48
                                                                                        end interface
                                                                                    contains
                                                                                        real(8) function fmax88(x, y) result (res)
                                                                                            real(8), intent (in) :: x
                                                                                            real(8), intent (in) :: y
                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                        end function
                                                                                        real(4) function fmax44(x, y) result (res)
                                                                                            real(4), intent (in) :: x
                                                                                            real(4), intent (in) :: y
                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                        end function
                                                                                        real(8) function fmax84(x, y) result(res)
                                                                                            real(8), intent (in) :: x
                                                                                            real(4), intent (in) :: y
                                                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                        end function
                                                                                        real(8) function fmax48(x, y) result(res)
                                                                                            real(4), intent (in) :: x
                                                                                            real(8), intent (in) :: y
                                                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                        end function
                                                                                        real(8) function fmin88(x, y) result (res)
                                                                                            real(8), intent (in) :: x
                                                                                            real(8), intent (in) :: y
                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                        end function
                                                                                        real(4) function fmin44(x, y) result (res)
                                                                                            real(4), intent (in) :: x
                                                                                            real(4), intent (in) :: y
                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                        end function
                                                                                        real(8) function fmin84(x, y) result(res)
                                                                                            real(8), intent (in) :: x
                                                                                            real(4), intent (in) :: y
                                                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                        end function
                                                                                        real(8) function fmin48(x, y) result(res)
                                                                                            real(4), intent (in) :: x
                                                                                            real(8), intent (in) :: y
                                                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                        end function
                                                                                    end module
                                                                                    
                                                                                    real(8) function code(a, b_m, c, f)
                                                                                    use fmin_fmax_functions
                                                                                        real(8), intent (in) :: a
                                                                                        real(8), intent (in) :: b_m
                                                                                        real(8), intent (in) :: c
                                                                                        real(8), intent (in) :: f
                                                                                        code = sqrt((f * (2.0d0 / b_m)))
                                                                                    end function
                                                                                    
                                                                                    B_m = Math.abs(B);
                                                                                    assert A < B_m && B_m < C && C < F;
                                                                                    public static double code(double A, double B_m, double C, double F) {
                                                                                    	return Math.sqrt((F * (2.0 / B_m)));
                                                                                    }
                                                                                    
                                                                                    B_m = math.fabs(B)
                                                                                    [A, B_m, C, F] = sort([A, B_m, C, F])
                                                                                    def code(A, B_m, C, F):
                                                                                    	return math.sqrt((F * (2.0 / B_m)))
                                                                                    
                                                                                    B_m = abs(B)
                                                                                    A, B_m, C, F = sort([A, B_m, C, F])
                                                                                    function code(A, B_m, C, F)
                                                                                    	return sqrt(Float64(F * Float64(2.0 / B_m)))
                                                                                    end
                                                                                    
                                                                                    B_m = abs(B);
                                                                                    A, B_m, C, F = num2cell(sort([A, B_m, C, F])){:}
                                                                                    function tmp = code(A, B_m, C, F)
                                                                                    	tmp = sqrt((F * (2.0 / B_m)));
                                                                                    end
                                                                                    
                                                                                    B_m = N[Abs[B], $MachinePrecision]
                                                                                    NOTE: A, B_m, C, and F should be sorted in increasing order before calling this function.
                                                                                    code[A_, B$95$m_, C_, F_] := N[Sqrt[N[(F * N[(2.0 / B$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    B_m = \left|B\right|
                                                                                    \\
                                                                                    [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
                                                                                    \\
                                                                                    \sqrt{F \cdot \frac{2}{B\_m}}
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Initial program 21.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. Add Preprocessing
                                                                                    3. Taylor expanded in B around -inf

                                                                                      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. mul-1-negN/A

                                                                                        \[\leadsto \color{blue}{\mathsf{neg}\left(\sqrt{\frac{F}{B}} \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)} \]
                                                                                      2. lower-neg.f64N/A

                                                                                        \[\leadsto \color{blue}{-\sqrt{\frac{F}{B}} \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)} \]
                                                                                      3. *-commutativeN/A

                                                                                        \[\leadsto -\color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right) \cdot \sqrt{\frac{F}{B}}} \]
                                                                                      4. lower-*.f64N/A

                                                                                        \[\leadsto -\color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right) \cdot \sqrt{\frac{F}{B}}} \]
                                                                                      5. *-commutativeN/A

                                                                                        \[\leadsto -\color{blue}{\left(\sqrt{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \cdot \sqrt{\frac{F}{B}} \]
                                                                                      6. unpow2N/A

                                                                                        \[\leadsto -\left(\sqrt{2} \cdot \color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)}\right) \cdot \sqrt{\frac{F}{B}} \]
                                                                                      7. rem-square-sqrtN/A

                                                                                        \[\leadsto -\left(\sqrt{2} \cdot \color{blue}{-1}\right) \cdot \sqrt{\frac{F}{B}} \]
                                                                                      8. lower-*.f64N/A

                                                                                        \[\leadsto -\color{blue}{\left(\sqrt{2} \cdot -1\right)} \cdot \sqrt{\frac{F}{B}} \]
                                                                                      9. lower-sqrt.f64N/A

                                                                                        \[\leadsto -\left(\color{blue}{\sqrt{2}} \cdot -1\right) \cdot \sqrt{\frac{F}{B}} \]
                                                                                      10. lower-sqrt.f64N/A

                                                                                        \[\leadsto -\left(\sqrt{2} \cdot -1\right) \cdot \color{blue}{\sqrt{\frac{F}{B}}} \]
                                                                                      11. lower-/.f642.1

                                                                                        \[\leadsto -\left(\sqrt{2} \cdot -1\right) \cdot \sqrt{\color{blue}{\frac{F}{B}}} \]
                                                                                    5. Applied rewrites2.1%

                                                                                      \[\leadsto \color{blue}{-\left(\sqrt{2} \cdot -1\right) \cdot \sqrt{\frac{F}{B}}} \]
                                                                                    6. Taylor expanded in B around 0

                                                                                      \[\leadsto \sqrt{\frac{F}{B}} \cdot \color{blue}{\sqrt{2}} \]
                                                                                    7. Step-by-step derivation
                                                                                      1. Applied rewrites2.1%

                                                                                        \[\leadsto \sqrt{\frac{F}{B}} \cdot \color{blue}{\sqrt{2}} \]
                                                                                      2. Step-by-step derivation
                                                                                        1. Applied rewrites2.1%

                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{F}{B} \cdot 2}} \]
                                                                                        2. Step-by-step derivation
                                                                                          1. Applied rewrites2.1%

                                                                                            \[\leadsto \sqrt{F \cdot \frac{2}{B}} \]
                                                                                          2. Add Preprocessing

                                                                                          Reproduce

                                                                                          ?
                                                                                          herbie shell --seed 2025017 
                                                                                          (FPCore (A B C F)
                                                                                            :name "ABCF->ab-angle b"
                                                                                            :precision binary64
                                                                                            (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))