ABCF->ab-angle a

Percentage Accurate: 18.3% → 58.7%
Time: 12.4s
Alternatives: 16
Speedup: N/A×

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 16 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.3% 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: 58.7% accurate, N/A× 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 := -1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C\\ t_1 := {B\_m}^{2} - \left(4 \cdot A\right) \cdot C\\ t_2 := 2 \cdot \left(t\_1 \cdot F\right)\\ t_3 := \frac{\sqrt{t\_2 \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B\_m}^{2}}\right)}}{t\_0}\\ \mathbf{if}\;t\_3 \leq -5 \cdot 10^{-165}:\\ \;\;\;\;\frac{\left(\left({F}^{0.5} \cdot \sqrt{B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)}\right) \cdot {2}^{0.5}\right) \cdot \left(-1 \cdot \sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\_m\right)}\right)}{t\_1}\\ \mathbf{elif}\;t\_3 \leq 10^{+257}:\\ \;\;\;\;\frac{\sqrt{t\_2 \cdot \mathsf{fma}\left(-0.5, \frac{B\_m \cdot B\_m}{A}, 2 \cdot C\right)}}{t\_0}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;{\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\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 (- (* -1.0 (pow B_m 2.0)) (* (* -1.0 (* 4.0 A)) C)))
        (t_1 (- (pow B_m 2.0) (* (* 4.0 A) C)))
        (t_2 (* 2.0 (* t_1 F)))
        (t_3
         (/
          (sqrt (* t_2 (+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B_m 2.0))))))
          t_0)))
   (if (<= t_3 -5e-165)
     (/
      (*
       (* (* (pow F 0.5) (sqrt (- (* B_m B_m) (* 4.0 (* A C))))) (pow 2.0 0.5))
       (* -1.0 (sqrt (+ (+ A C) (hypot (- A C) B_m)))))
      t_1)
     (if (<= t_3 1e+257)
       (/ (sqrt (* t_2 (fma -0.5 (/ (* B_m B_m) A) (* 2.0 C)))) t_0)
       (if (<= t_3 INFINITY)
         (* (pow (* -0.5 (/ F A)) 0.5) (pow 2.0 0.5))
         (*
          (* -1.0 (/ (pow 2.0 0.5) B_m))
          (fma
           (pow B_m 0.5)
           (pow F 0.5)
           (* 0.5 (* (pow (/ F B_m) 0.5) C)))))))))
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 = (-1.0 * pow(B_m, 2.0)) - ((-1.0 * (4.0 * A)) * C);
	double t_1 = pow(B_m, 2.0) - ((4.0 * A) * C);
	double t_2 = 2.0 * (t_1 * F);
	double t_3 = sqrt((t_2 * ((A + C) + sqrt((pow((A - C), 2.0) + pow(B_m, 2.0)))))) / t_0;
	double tmp;
	if (t_3 <= -5e-165) {
		tmp = (((pow(F, 0.5) * sqrt(((B_m * B_m) - (4.0 * (A * C))))) * pow(2.0, 0.5)) * (-1.0 * sqrt(((A + C) + hypot((A - C), B_m))))) / t_1;
	} else if (t_3 <= 1e+257) {
		tmp = sqrt((t_2 * fma(-0.5, ((B_m * B_m) / A), (2.0 * C)))) / t_0;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = pow((-0.5 * (F / A)), 0.5) * pow(2.0, 0.5);
	} else {
		tmp = (-1.0 * (pow(2.0, 0.5) / B_m)) * fma(pow(B_m, 0.5), pow(F, 0.5), (0.5 * (pow((F / B_m), 0.5) * C)));
	}
	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(-1.0 * (B_m ^ 2.0)) - Float64(Float64(-1.0 * Float64(4.0 * A)) * C))
	t_1 = Float64((B_m ^ 2.0) - Float64(Float64(4.0 * A) * C))
	t_2 = Float64(2.0 * Float64(t_1 * F))
	t_3 = Float64(sqrt(Float64(t_2 * Float64(Float64(A + C) + sqrt(Float64((Float64(A - C) ^ 2.0) + (B_m ^ 2.0)))))) / t_0)
	tmp = 0.0
	if (t_3 <= -5e-165)
		tmp = Float64(Float64(Float64(Float64((F ^ 0.5) * sqrt(Float64(Float64(B_m * B_m) - Float64(4.0 * Float64(A * C))))) * (2.0 ^ 0.5)) * Float64(-1.0 * sqrt(Float64(Float64(A + C) + hypot(Float64(A - C), B_m))))) / t_1);
	elseif (t_3 <= 1e+257)
		tmp = Float64(sqrt(Float64(t_2 * fma(-0.5, Float64(Float64(B_m * B_m) / A), Float64(2.0 * C)))) / t_0);
	elseif (t_3 <= Inf)
		tmp = Float64((Float64(-0.5 * Float64(F / A)) ^ 0.5) * (2.0 ^ 0.5));
	else
		tmp = Float64(Float64(-1.0 * Float64((2.0 ^ 0.5) / B_m)) * fma((B_m ^ 0.5), (F ^ 0.5), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))));
	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[(-1.0 * N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 * N[(4.0 * A), $MachinePrecision]), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(t$95$1 * F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(t$95$2 * 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$0), $MachinePrecision]}, If[LessEqual[t$95$3, -5e-165], N[(N[(N[(N[(N[Power[F, 0.5], $MachinePrecision] * N[Sqrt[N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision] * N[(-1.0 * N[Sqrt[N[(N[(A + C), $MachinePrecision] + N[Sqrt[N[(A - C), $MachinePrecision] ^ 2 + B$95$m ^ 2], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 1e+257], N[(N[Sqrt[N[(t$95$2 * N[(-0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / A), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[Power[N[(-0.5 * N[(F / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[B$95$m, 0.5], $MachinePrecision] * N[Power[F, 0.5], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $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 := -1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C\\
t_1 := {B\_m}^{2} - \left(4 \cdot A\right) \cdot C\\
t_2 := 2 \cdot \left(t\_1 \cdot F\right)\\
t_3 := \frac{\sqrt{t\_2 \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B\_m}^{2}}\right)}}{t\_0}\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{-165}:\\
\;\;\;\;\frac{\left(\left({F}^{0.5} \cdot \sqrt{B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)}\right) \cdot {2}^{0.5}\right) \cdot \left(-1 \cdot \sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\_m\right)}\right)}{t\_1}\\

\mathbf{elif}\;t\_3 \leq 10^{+257}:\\
\;\;\;\;\frac{\sqrt{t\_2 \cdot \mathsf{fma}\left(-0.5, \frac{B\_m \cdot B\_m}{A}, 2 \cdot C\right)}}{t\_0}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;{\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)\\


\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))) < -4.99999999999999981e-165

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-\left(\left({F}^{\frac{1}{2}} \cdot \sqrt{{B}^{2} - 4 \cdot \left(A \cdot C\right)}\right) \cdot \sqrt{2}\right) \cdot \sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      8. pow2N/A

        \[\leadsto \frac{-\left(\left({F}^{\frac{1}{2}} \cdot \sqrt{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right) \cdot \sqrt{2}\right) \cdot \sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      9. lift-*.f64N/A

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

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

        \[\leadsto \frac{-\left(\left({F}^{\frac{1}{2}} \cdot \sqrt{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right) \cdot \sqrt{2}\right) \cdot \sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      12. pow1/2N/A

        \[\leadsto \frac{-\left(\left({F}^{\frac{1}{2}} \cdot \sqrt{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right) \cdot {2}^{\color{blue}{\frac{1}{2}}}\right) \cdot \sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      13. lift-pow.f6472.5

        \[\leadsto \frac{-\left(\left({F}^{0.5} \cdot \sqrt{B \cdot B - 4 \cdot \left(A \cdot C\right)}\right) \cdot {2}^{\color{blue}{0.5}}\right) \cdot \sqrt{\left(A + C\right) + \mathsf{hypot}\left(A - C, B\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    6. Applied rewrites72.5%

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

    if -4.99999999999999981e-165 < (/.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.00000000000000003e257

    1. Initial program 24.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. Taylor expanded in A around -inf

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

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

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

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

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left(-0.5, \frac{B \cdot B}{A}, 2 \cdot C\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    5. Applied rewrites43.4%

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

    if 1.00000000000000003e257 < (/.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 4.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 -inf

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

        \[\leadsto \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{-2 \cdot -1} \]
      2. metadata-evalN/A

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

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

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

      \[\leadsto {\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto {\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}} \]
      2. lower-/.f6457.9

        \[\leadsto {\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5} \]
    8. Applied rewrites57.9%

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

    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. Taylor expanded in A around 0

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

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

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

        \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
      4. pow1/2N/A

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

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

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

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
    5. Applied rewrites2.0%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
    6. Taylor expanded in C around 0

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

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

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
      3. pow1/2N/A

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

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
      5. pow1/2N/A

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

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

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

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      10. lift-pow.f64N/A

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      11. lift-/.f6418.1

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    8. Applied rewrites18.1%

      \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification44.0%

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

Alternative 2: 53.9% accurate, N/A× 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{{\left(A - C\right)}^{2} + {B\_m}^{2}}\\ t_1 := 2 \cdot \left(\left({B\_m}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\\ t_2 := -1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C\\ t_3 := \frac{\sqrt{t\_1 \cdot \mathsf{fma}\left(-0.5, \frac{B\_m \cdot B\_m}{A}, 2 \cdot C\right)}}{t\_2}\\ t_4 := \frac{\sqrt{t\_1 \cdot \left(\left(A + C\right) + t\_0\right)}}{t\_2}\\ \mathbf{if}\;t\_4 \leq -\infty:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-165}:\\ \;\;\;\;\frac{\sqrt{t\_1 \cdot \left(C + t\_0\right)}}{t\_2}\\ \mathbf{elif}\;t\_4 \leq 10^{+257}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;{\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\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 (sqrt (+ (pow (- A C) 2.0) (pow B_m 2.0))))
        (t_1 (* 2.0 (* (- (pow B_m 2.0) (* (* 4.0 A) C)) F)))
        (t_2 (- (* -1.0 (pow B_m 2.0)) (* (* -1.0 (* 4.0 A)) C)))
        (t_3 (/ (sqrt (* t_1 (fma -0.5 (/ (* B_m B_m) A) (* 2.0 C)))) t_2))
        (t_4 (/ (sqrt (* t_1 (+ (+ A C) t_0))) t_2)))
   (if (<= t_4 (- INFINITY))
     t_3
     (if (<= t_4 -5e-165)
       (/ (sqrt (* t_1 (+ C t_0))) t_2)
       (if (<= t_4 1e+257)
         t_3
         (if (<= t_4 INFINITY)
           (* (pow (* -0.5 (/ F A)) 0.5) (pow 2.0 0.5))
           (*
            (* -1.0 (/ (pow 2.0 0.5) B_m))
            (fma
             (pow B_m 0.5)
             (pow F 0.5)
             (* 0.5 (* (pow (/ F B_m) 0.5) C))))))))))
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((pow((A - C), 2.0) + pow(B_m, 2.0)));
	double t_1 = 2.0 * ((pow(B_m, 2.0) - ((4.0 * A) * C)) * F);
	double t_2 = (-1.0 * pow(B_m, 2.0)) - ((-1.0 * (4.0 * A)) * C);
	double t_3 = sqrt((t_1 * fma(-0.5, ((B_m * B_m) / A), (2.0 * C)))) / t_2;
	double t_4 = sqrt((t_1 * ((A + C) + t_0))) / t_2;
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_4 <= -5e-165) {
		tmp = sqrt((t_1 * (C + t_0))) / t_2;
	} else if (t_4 <= 1e+257) {
		tmp = t_3;
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = pow((-0.5 * (F / A)), 0.5) * pow(2.0, 0.5);
	} else {
		tmp = (-1.0 * (pow(2.0, 0.5) / B_m)) * fma(pow(B_m, 0.5), pow(F, 0.5), (0.5 * (pow((F / B_m), 0.5) * C)));
	}
	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 = sqrt(Float64((Float64(A - C) ^ 2.0) + (B_m ^ 2.0)))
	t_1 = Float64(2.0 * Float64(Float64((B_m ^ 2.0) - Float64(Float64(4.0 * A) * C)) * F))
	t_2 = Float64(Float64(-1.0 * (B_m ^ 2.0)) - Float64(Float64(-1.0 * Float64(4.0 * A)) * C))
	t_3 = Float64(sqrt(Float64(t_1 * fma(-0.5, Float64(Float64(B_m * B_m) / A), Float64(2.0 * C)))) / t_2)
	t_4 = Float64(sqrt(Float64(t_1 * Float64(Float64(A + C) + t_0))) / t_2)
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_4 <= -5e-165)
		tmp = Float64(sqrt(Float64(t_1 * Float64(C + t_0))) / t_2);
	elseif (t_4 <= 1e+257)
		tmp = t_3;
	elseif (t_4 <= Inf)
		tmp = Float64((Float64(-0.5 * Float64(F / A)) ^ 0.5) * (2.0 ^ 0.5));
	else
		tmp = Float64(Float64(-1.0 * Float64((2.0 ^ 0.5) / B_m)) * fma((B_m ^ 0.5), (F ^ 0.5), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))));
	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[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 * N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 * N[(4.0 * A), $MachinePrecision]), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[N[(t$95$1 * N[(-0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / A), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[N[(t$95$1 * N[(N[(A + C), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$3, If[LessEqual[t$95$4, -5e-165], N[(N[Sqrt[N[(t$95$1 * N[(C + t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$4, 1e+257], t$95$3, If[LessEqual[t$95$4, Infinity], N[(N[Power[N[(-0.5 * N[(F / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[B$95$m, 0.5], $MachinePrecision] * N[Power[F, 0.5], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $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 := \sqrt{{\left(A - C\right)}^{2} + {B\_m}^{2}}\\
t_1 := 2 \cdot \left(\left({B\_m}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\\
t_2 := -1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C\\
t_3 := \frac{\sqrt{t\_1 \cdot \mathsf{fma}\left(-0.5, \frac{B\_m \cdot B\_m}{A}, 2 \cdot C\right)}}{t\_2}\\
t_4 := \frac{\sqrt{t\_1 \cdot \left(\left(A + C\right) + t\_0\right)}}{t\_2}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-165}:\\
\;\;\;\;\frac{\sqrt{t\_1 \cdot \left(C + t\_0\right)}}{t\_2}\\

\mathbf{elif}\;t\_4 \leq 10^{+257}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;{\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)\\


\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 or -4.99999999999999981e-165 < (/.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.00000000000000003e257

    1. Initial program 13.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 A around -inf

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

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

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

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

        \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{2}, \frac{B \cdot B}{A}, 2 \cdot C\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. lower-*.f6433.7

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

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

    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))) < -4.99999999999999981e-165

    1. Initial program 98.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 A around 0

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

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

      if 1.00000000000000003e257 < (/.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 4.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 -inf

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

          \[\leadsto \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{-2 \cdot -1} \]
        2. metadata-evalN/A

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

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

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

        \[\leadsto {\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}} \]
      7. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto {\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}} \]
        2. lower-/.f6457.9

          \[\leadsto {\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5} \]
      8. Applied rewrites57.9%

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

      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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
      5. Applied rewrites2.0%

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
      6. Taylor expanded in C around 0

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        3. pow1/2N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        5. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        9. pow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        10. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        11. lift-/.f6418.1

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      8. Applied rewrites18.1%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    5. Recombined 4 regimes into one program.
    6. Final simplification36.0%

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

    Alternative 3: 51.6% accurate, N/A× 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 := -1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C\\ \mathbf{if}\;B\_m \leq 9.6 \cdot 10^{-35}:\\ \;\;\;\;\frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left(-0.5, \frac{B\_m \cdot B\_m}{A}, 2 \cdot C\right)}}{t\_0}\\ \mathbf{elif}\;B\_m \leq 3.6 \cdot 10^{+51}:\\ \;\;\;\;\frac{\left(\sqrt{F} \cdot \sqrt{\left(A + \left(C + {\left(\mathsf{fma}\left(B\_m, B\_m, {\left(A - C\right)}^{2}\right)\right)}^{0.5}\right)\right) \cdot \left(B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)\right)}\right) \cdot {2}^{0.5}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\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 (- (* -1.0 (pow B_m 2.0)) (* (* -1.0 (* 4.0 A)) C))))
       (if (<= B_m 9.6e-35)
         (/
          (sqrt
           (*
            (* 2.0 (* (- (pow B_m 2.0) (* (* 4.0 A) C)) F))
            (fma -0.5 (/ (* B_m B_m) A) (* 2.0 C))))
          t_0)
         (if (<= B_m 3.6e+51)
           (/
            (*
             (*
              (sqrt F)
              (sqrt
               (*
                (+ A (+ C (pow (fma B_m B_m (pow (- A C) 2.0)) 0.5)))
                (- (* B_m B_m) (* 4.0 (* A C))))))
             (pow 2.0 0.5))
            t_0)
           (*
            (* -1.0 (/ (pow 2.0 0.5) B_m))
            (fma (pow B_m 0.5) (pow F 0.5) (* 0.5 (* (pow (/ F B_m) 0.5) C))))))))
    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 = (-1.0 * pow(B_m, 2.0)) - ((-1.0 * (4.0 * A)) * C);
    	double tmp;
    	if (B_m <= 9.6e-35) {
    		tmp = sqrt(((2.0 * ((pow(B_m, 2.0) - ((4.0 * A) * C)) * F)) * fma(-0.5, ((B_m * B_m) / A), (2.0 * C)))) / t_0;
    	} else if (B_m <= 3.6e+51) {
    		tmp = ((sqrt(F) * sqrt(((A + (C + pow(fma(B_m, B_m, pow((A - C), 2.0)), 0.5))) * ((B_m * B_m) - (4.0 * (A * C)))))) * pow(2.0, 0.5)) / t_0;
    	} else {
    		tmp = (-1.0 * (pow(2.0, 0.5) / B_m)) * fma(pow(B_m, 0.5), pow(F, 0.5), (0.5 * (pow((F / B_m), 0.5) * C)));
    	}
    	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(-1.0 * (B_m ^ 2.0)) - Float64(Float64(-1.0 * Float64(4.0 * A)) * C))
    	tmp = 0.0
    	if (B_m <= 9.6e-35)
    		tmp = Float64(sqrt(Float64(Float64(2.0 * Float64(Float64((B_m ^ 2.0) - Float64(Float64(4.0 * A) * C)) * F)) * fma(-0.5, Float64(Float64(B_m * B_m) / A), Float64(2.0 * C)))) / t_0);
    	elseif (B_m <= 3.6e+51)
    		tmp = Float64(Float64(Float64(sqrt(F) * sqrt(Float64(Float64(A + Float64(C + (fma(B_m, B_m, (Float64(A - C) ^ 2.0)) ^ 0.5))) * Float64(Float64(B_m * B_m) - Float64(4.0 * Float64(A * C)))))) * (2.0 ^ 0.5)) / t_0);
    	else
    		tmp = Float64(Float64(-1.0 * Float64((2.0 ^ 0.5) / B_m)) * fma((B_m ^ 0.5), (F ^ 0.5), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))));
    	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[(-1.0 * N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 * N[(4.0 * A), $MachinePrecision]), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B$95$m, 9.6e-35], N[(N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B$95$m, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(-0.5 * N[(N[(B$95$m * B$95$m), $MachinePrecision] / A), $MachinePrecision] + N[(2.0 * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[B$95$m, 3.6e+51], N[(N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(N[(A + N[(C + N[Power[N[(B$95$m * B$95$m + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[B$95$m, 0.5], $MachinePrecision] * N[Power[F, 0.5], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $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 := -1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C\\
    \mathbf{if}\;B\_m \leq 9.6 \cdot 10^{-35}:\\
    \;\;\;\;\frac{\sqrt{\left(2 \cdot \left(\left({B\_m}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left(-0.5, \frac{B\_m \cdot B\_m}{A}, 2 \cdot C\right)}}{t\_0}\\
    
    \mathbf{elif}\;B\_m \leq 3.6 \cdot 10^{+51}:\\
    \;\;\;\;\frac{\left(\sqrt{F} \cdot \sqrt{\left(A + \left(C + {\left(\mathsf{fma}\left(B\_m, B\_m, {\left(A - C\right)}^{2}\right)\right)}^{0.5}\right)\right) \cdot \left(B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)\right)}\right) \cdot {2}^{0.5}}{t\_0}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if B < 9.6000000000000005e-35

      1. Initial program 19.9%

        \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. Add Preprocessing
      3. Taylor expanded in A around -inf

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

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

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

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

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

          \[\leadsto \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \mathsf{fma}\left(-0.5, \frac{B \cdot B}{A}, 2 \cdot C\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. Applied rewrites19.4%

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

      if 9.6000000000000005e-35 < B < 3.60000000000000011e51

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

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

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

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

      if 3.60000000000000011e51 < B

      1. Initial program 5.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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
      5. Applied rewrites13.7%

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
      6. Taylor expanded in C around 0

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        3. pow1/2N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        5. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        9. pow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        10. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        11. lift-/.f6461.8

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      8. Applied rewrites61.8%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    3. Recombined 3 regimes into one program.
    4. Final simplification29.4%

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

    Alternative 4: 49.7% accurate, N/A× 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}\;B\_m \leq 1.15 \cdot 10^{-29}:\\ \;\;\;\;\frac{\sqrt{C \cdot \mathsf{fma}\left(-16, A \cdot \left(C \cdot F\right), 2 \cdot \left(F \cdot \mathsf{fma}\left(-4, A \cdot \left(A - A\right), 2 \cdot \left(B\_m \cdot B\_m\right)\right)\right)\right)}}{-1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\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
     (if (<= B_m 1.15e-29)
       (/
        (sqrt
         (*
          C
          (fma
           -16.0
           (* A (* C F))
           (* 2.0 (* F (fma -4.0 (* A (- A A)) (* 2.0 (* B_m B_m))))))))
        (- (* -1.0 (pow B_m 2.0)) (* (* -1.0 (* 4.0 A)) C)))
       (*
        (* -1.0 (/ (pow 2.0 0.5) B_m))
        (fma (pow B_m 0.5) (pow F 0.5) (* 0.5 (* (pow (/ F B_m) 0.5) C))))))
    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 (B_m <= 1.15e-29) {
    		tmp = sqrt((C * fma(-16.0, (A * (C * F)), (2.0 * (F * fma(-4.0, (A * (A - A)), (2.0 * (B_m * B_m)))))))) / ((-1.0 * pow(B_m, 2.0)) - ((-1.0 * (4.0 * A)) * C));
    	} else {
    		tmp = (-1.0 * (pow(2.0, 0.5) / B_m)) * fma(pow(B_m, 0.5), pow(F, 0.5), (0.5 * (pow((F / B_m), 0.5) * C)));
    	}
    	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 (B_m <= 1.15e-29)
    		tmp = Float64(sqrt(Float64(C * fma(-16.0, Float64(A * Float64(C * F)), Float64(2.0 * Float64(F * fma(-4.0, Float64(A * Float64(A - A)), Float64(2.0 * Float64(B_m * B_m)))))))) / Float64(Float64(-1.0 * (B_m ^ 2.0)) - Float64(Float64(-1.0 * Float64(4.0 * A)) * C)));
    	else
    		tmp = Float64(Float64(-1.0 * Float64((2.0 ^ 0.5) / B_m)) * fma((B_m ^ 0.5), (F ^ 0.5), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))));
    	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[B$95$m, 1.15e-29], N[(N[Sqrt[N[(C * N[(-16.0 * N[(A * N[(C * F), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(F * N[(-4.0 * N[(A * N[(A - A), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(B$95$m * B$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[(-1.0 * N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 * N[(4.0 * A), $MachinePrecision]), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[B$95$m, 0.5], $MachinePrecision] * N[Power[F, 0.5], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $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}
    \mathbf{if}\;B\_m \leq 1.15 \cdot 10^{-29}:\\
    \;\;\;\;\frac{\sqrt{C \cdot \mathsf{fma}\left(-16, A \cdot \left(C \cdot F\right), 2 \cdot \left(F \cdot \mathsf{fma}\left(-4, A \cdot \left(A - A\right), 2 \cdot \left(B\_m \cdot B\_m\right)\right)\right)\right)}}{-1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if B < 1.14999999999999996e-29

      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 inf

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

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

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

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

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

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

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

          \[\leadsto \frac{-\sqrt{\left(C \cdot C\right) \cdot \mathsf{fma}\left(-16, A \cdot F, 2 \cdot \frac{F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot {B}^{2}\right)}{C}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      5. Applied rewrites11.6%

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

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

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

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

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

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

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

          \[\leadsto \frac{-\sqrt{C \cdot \mathsf{fma}\left(-16, A \cdot \left(C \cdot F\right), 2 \cdot \left(F \cdot \left(-4 \cdot \left(A \cdot \left(A + -1 \cdot A\right)\right) + 2 \cdot \left(B \cdot B\right)\right)\right)\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      8. Applied rewrites18.4%

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

      if 1.14999999999999996e-29 < B

      1. Initial program 15.9%

        \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. Add Preprocessing
      3. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
      6. Taylor expanded in C around 0

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        3. pow1/2N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        5. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        9. pow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        10. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        11. lift-/.f6457.7

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      8. Applied rewrites57.7%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification27.8%

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

    Alternative 5: 48.1% accurate, N/A× 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}\;{B\_m}^{2} \leq 10^{-211}:\\ \;\;\;\;{\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5}\\ \mathbf{elif}\;{B\_m}^{2} \leq 5 \cdot 10^{+94}:\\ \;\;\;\;\frac{\left(\sqrt{F} \cdot \sqrt{\left(A + \left(C + {\left(\mathsf{fma}\left(B\_m, B\_m, {\left(A - C\right)}^{2}\right)\right)}^{0.5}\right)\right) \cdot \left(B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)\right)}\right) \cdot {2}^{0.5}}{-1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\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
     (if (<= (pow B_m 2.0) 1e-211)
       (* (pow (* -0.5 (/ F A)) 0.5) (pow 2.0 0.5))
       (if (<= (pow B_m 2.0) 5e+94)
         (/
          (*
           (*
            (sqrt F)
            (sqrt
             (*
              (+ A (+ C (pow (fma B_m B_m (pow (- A C) 2.0)) 0.5)))
              (- (* B_m B_m) (* 4.0 (* A C))))))
           (pow 2.0 0.5))
          (- (* -1.0 (pow B_m 2.0)) (* (* -1.0 (* 4.0 A)) C)))
         (*
          (* -1.0 (/ (pow 2.0 0.5) B_m))
          (fma (pow B_m 0.5) (pow F 0.5) (* 0.5 (* (pow (/ F B_m) 0.5) C)))))))
    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 (pow(B_m, 2.0) <= 1e-211) {
    		tmp = pow((-0.5 * (F / A)), 0.5) * pow(2.0, 0.5);
    	} else if (pow(B_m, 2.0) <= 5e+94) {
    		tmp = ((sqrt(F) * sqrt(((A + (C + pow(fma(B_m, B_m, pow((A - C), 2.0)), 0.5))) * ((B_m * B_m) - (4.0 * (A * C)))))) * pow(2.0, 0.5)) / ((-1.0 * pow(B_m, 2.0)) - ((-1.0 * (4.0 * A)) * C));
    	} else {
    		tmp = (-1.0 * (pow(2.0, 0.5) / B_m)) * fma(pow(B_m, 0.5), pow(F, 0.5), (0.5 * (pow((F / B_m), 0.5) * C)));
    	}
    	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 ((B_m ^ 2.0) <= 1e-211)
    		tmp = Float64((Float64(-0.5 * Float64(F / A)) ^ 0.5) * (2.0 ^ 0.5));
    	elseif ((B_m ^ 2.0) <= 5e+94)
    		tmp = Float64(Float64(Float64(sqrt(F) * sqrt(Float64(Float64(A + Float64(C + (fma(B_m, B_m, (Float64(A - C) ^ 2.0)) ^ 0.5))) * Float64(Float64(B_m * B_m) - Float64(4.0 * Float64(A * C)))))) * (2.0 ^ 0.5)) / Float64(Float64(-1.0 * (B_m ^ 2.0)) - Float64(Float64(-1.0 * Float64(4.0 * A)) * C)));
    	else
    		tmp = Float64(Float64(-1.0 * Float64((2.0 ^ 0.5) / B_m)) * fma((B_m ^ 0.5), (F ^ 0.5), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))));
    	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[N[Power[B$95$m, 2.0], $MachinePrecision], 1e-211], N[(N[Power[N[(-0.5 * N[(F / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Power[B$95$m, 2.0], $MachinePrecision], 5e+94], N[(N[(N[(N[Sqrt[F], $MachinePrecision] * N[Sqrt[N[(N[(A + N[(C + N[Power[N[(B$95$m * B$95$m + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(B$95$m * B$95$m), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision] / N[(N[(-1.0 * N[Power[B$95$m, 2.0], $MachinePrecision]), $MachinePrecision] - N[(N[(-1.0 * N[(4.0 * A), $MachinePrecision]), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[B$95$m, 0.5], $MachinePrecision] * N[Power[F, 0.5], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $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}
    \mathbf{if}\;{B\_m}^{2} \leq 10^{-211}:\\
    \;\;\;\;{\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5}\\
    
    \mathbf{elif}\;{B\_m}^{2} \leq 5 \cdot 10^{+94}:\\
    \;\;\;\;\frac{\left(\sqrt{F} \cdot \sqrt{\left(A + \left(C + {\left(\mathsf{fma}\left(B\_m, B\_m, {\left(A - C\right)}^{2}\right)\right)}^{0.5}\right)\right) \cdot \left(B\_m \cdot B\_m - 4 \cdot \left(A \cdot C\right)\right)}\right) \cdot {2}^{0.5}}{-1 \cdot {B\_m}^{2} - \left(-1 \cdot \left(4 \cdot A\right)\right) \cdot C}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (pow.f64 B #s(literal 2 binary64)) < 1.00000000000000009e-211

      1. Initial program 17.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 F around -inf

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

          \[\leadsto \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{-2 \cdot -1} \]
        2. metadata-evalN/A

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

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

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

        \[\leadsto {\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}} \]
      7. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto {\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}} \]
        2. lower-/.f6418.7

          \[\leadsto {\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5} \]
      8. Applied rewrites18.7%

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

      if 1.00000000000000009e-211 < (pow.f64 B #s(literal 2 binary64)) < 5.0000000000000001e94

      1. Initial program 40.8%

        \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) + \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
      2. Add Preprocessing
      3. Taylor expanded in F around 0

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

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

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

      if 5.0000000000000001e94 < (pow.f64 B #s(literal 2 binary64))

      1. Initial program 6.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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
      5. Applied rewrites6.8%

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
      6. Taylor expanded in C around 0

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        3. pow1/2N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        5. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        9. pow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        10. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        11. lift-/.f6427.5

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      8. Applied rewrites27.5%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    3. Recombined 3 regimes into one program.
    4. Final simplification28.9%

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

    Alternative 6: 47.5% accurate, N/A× 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 -5 \cdot 10^{-310}:\\ \;\;\;\;{\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{+17}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-1 \cdot B\_m, -1 \cdot C\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot {\left(\frac{F}{B\_m}\right)}^{0.5}\right) \cdot {2}^{0.5}\\ \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 -5e-310)
       (* (pow (* -0.5 (/ F A)) 0.5) (pow 2.0 0.5))
       (if (<= F 4e+17)
         (*
          (* -1.0 (/ (pow 2.0 0.5) B_m))
          (pow (* F (+ C (hypot (* -1.0 B_m) (* -1.0 C)))) 0.5))
         (* (* -1.0 (pow (/ F B_m) 0.5)) (pow 2.0 0.5)))))
    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 <= -5e-310) {
    		tmp = pow((-0.5 * (F / A)), 0.5) * pow(2.0, 0.5);
    	} else if (F <= 4e+17) {
    		tmp = (-1.0 * (pow(2.0, 0.5) / B_m)) * pow((F * (C + hypot((-1.0 * B_m), (-1.0 * C)))), 0.5);
    	} else {
    		tmp = (-1.0 * pow((F / B_m), 0.5)) * pow(2.0, 0.5);
    	}
    	return tmp;
    }
    
    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 <= -5e-310) {
    		tmp = Math.pow((-0.5 * (F / A)), 0.5) * Math.pow(2.0, 0.5);
    	} else if (F <= 4e+17) {
    		tmp = (-1.0 * (Math.pow(2.0, 0.5) / B_m)) * Math.pow((F * (C + Math.hypot((-1.0 * B_m), (-1.0 * C)))), 0.5);
    	} else {
    		tmp = (-1.0 * Math.pow((F / B_m), 0.5)) * Math.pow(2.0, 0.5);
    	}
    	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 <= -5e-310:
    		tmp = math.pow((-0.5 * (F / A)), 0.5) * math.pow(2.0, 0.5)
    	elif F <= 4e+17:
    		tmp = (-1.0 * (math.pow(2.0, 0.5) / B_m)) * math.pow((F * (C + math.hypot((-1.0 * B_m), (-1.0 * C)))), 0.5)
    	else:
    		tmp = (-1.0 * math.pow((F / B_m), 0.5)) * math.pow(2.0, 0.5)
    	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 <= -5e-310)
    		tmp = Float64((Float64(-0.5 * Float64(F / A)) ^ 0.5) * (2.0 ^ 0.5));
    	elseif (F <= 4e+17)
    		tmp = Float64(Float64(-1.0 * Float64((2.0 ^ 0.5) / B_m)) * (Float64(F * Float64(C + hypot(Float64(-1.0 * B_m), Float64(-1.0 * C)))) ^ 0.5));
    	else
    		tmp = Float64(Float64(-1.0 * (Float64(F / B_m) ^ 0.5)) * (2.0 ^ 0.5));
    	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 <= -5e-310)
    		tmp = ((-0.5 * (F / A)) ^ 0.5) * (2.0 ^ 0.5);
    	elseif (F <= 4e+17)
    		tmp = (-1.0 * ((2.0 ^ 0.5) / B_m)) * ((F * (C + hypot((-1.0 * B_m), (-1.0 * C)))) ^ 0.5);
    	else
    		tmp = (-1.0 * ((F / B_m) ^ 0.5)) * (2.0 ^ 0.5);
    	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, -5e-310], N[(N[Power[N[(-0.5 * N[(F / A), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e+17], N[(N[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(F * N[(C + N[Sqrt[N[(-1.0 * B$95$m), $MachinePrecision] ^ 2 + N[(-1.0 * C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[Power[2.0, 0.5], $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}
    \mathbf{if}\;F \leq -5 \cdot 10^{-310}:\\
    \;\;\;\;{\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5}\\
    
    \mathbf{elif}\;F \leq 4 \cdot 10^{+17}:\\
    \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-1 \cdot B\_m, -1 \cdot C\right)\right)\right)}^{0.5}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-1 \cdot {\left(\frac{F}{B\_m}\right)}^{0.5}\right) \cdot {2}^{0.5}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if F < -4.999999999999985e-310

      1. Initial program 29.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. Taylor expanded in F around -inf

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

          \[\leadsto \sqrt{\frac{F \cdot \left(A + \left(C + \sqrt{{B}^{2} + {\left(A - C\right)}^{2}}\right)\right)}{{B}^{2} - 4 \cdot \left(A \cdot C\right)}} \cdot \sqrt{-2 \cdot -1} \]
        2. metadata-evalN/A

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

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

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

        \[\leadsto {\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}} \]
      7. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto {\left(\frac{-1}{2} \cdot \frac{F}{A}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}} \]
        2. lower-/.f6438.8

          \[\leadsto {\left(-0.5 \cdot \frac{F}{A}\right)}^{0.5} \cdot {2}^{0.5} \]
      8. Applied rewrites38.8%

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

      if -4.999999999999985e-310 < F < 4e17

      1. Initial program 17.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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        2. lift-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        3. lift-fma.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(B \cdot B + C \cdot C\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        4. unpow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{B \cdot B + C \cdot C}\right)\right)}^{\frac{1}{2}}\right) \]
        5. sqr-neg-revN/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{\left(\mathsf{neg}\left(B\right)\right) \cdot \left(\mathsf{neg}\left(B\right)\right) + C \cdot C}\right)\right)}^{\frac{1}{2}}\right) \]
        6. sqr-neg-revN/A

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-B, \mathsf{neg}\left(C\right)\right)\right)\right)}^{\frac{1}{2}}\right) \]
        9. lower-neg.f6422.3

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-B, -C\right)\right)\right)}^{0.5}\right) \]
      7. Applied rewrites22.3%

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

      if 4e17 < F

      1. Initial program 17.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 B around inf

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

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

          \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \color{blue}{\sqrt{2}}\right) \]
        3. pow1/2N/A

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

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

          \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \sqrt{2}\right) \]
        6. pow1/2N/A

          \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot {2}^{\color{blue}{\frac{1}{2}}}\right) \]
        7. lower-pow.f6417.0

          \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot {2}^{\color{blue}{0.5}}\right) \]
      5. Applied rewrites17.0%

        \[\leadsto \color{blue}{-1 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot {2}^{0.5}\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification22.4%

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

    Alternative 7: 38.2% accurate, N/A× 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 4 \cdot 10^{+17}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-1 \cdot B\_m, -1 \cdot C\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot {\left(\frac{F}{B\_m}\right)}^{0.5}\right) \cdot {2}^{0.5}\\ \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 4e+17)
       (*
        (* -1.0 (/ (pow 2.0 0.5) B_m))
        (pow (* F (+ C (hypot (* -1.0 B_m) (* -1.0 C)))) 0.5))
       (* (* -1.0 (pow (/ F B_m) 0.5)) (pow 2.0 0.5))))
    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 <= 4e+17) {
    		tmp = (-1.0 * (pow(2.0, 0.5) / B_m)) * pow((F * (C + hypot((-1.0 * B_m), (-1.0 * C)))), 0.5);
    	} else {
    		tmp = (-1.0 * pow((F / B_m), 0.5)) * pow(2.0, 0.5);
    	}
    	return tmp;
    }
    
    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 <= 4e+17) {
    		tmp = (-1.0 * (Math.pow(2.0, 0.5) / B_m)) * Math.pow((F * (C + Math.hypot((-1.0 * B_m), (-1.0 * C)))), 0.5);
    	} else {
    		tmp = (-1.0 * Math.pow((F / B_m), 0.5)) * Math.pow(2.0, 0.5);
    	}
    	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 <= 4e+17:
    		tmp = (-1.0 * (math.pow(2.0, 0.5) / B_m)) * math.pow((F * (C + math.hypot((-1.0 * B_m), (-1.0 * C)))), 0.5)
    	else:
    		tmp = (-1.0 * math.pow((F / B_m), 0.5)) * math.pow(2.0, 0.5)
    	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 <= 4e+17)
    		tmp = Float64(Float64(-1.0 * Float64((2.0 ^ 0.5) / B_m)) * (Float64(F * Float64(C + hypot(Float64(-1.0 * B_m), Float64(-1.0 * C)))) ^ 0.5));
    	else
    		tmp = Float64(Float64(-1.0 * (Float64(F / B_m) ^ 0.5)) * (2.0 ^ 0.5));
    	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 <= 4e+17)
    		tmp = (-1.0 * ((2.0 ^ 0.5) / B_m)) * ((F * (C + hypot((-1.0 * B_m), (-1.0 * C)))) ^ 0.5);
    	else
    		tmp = (-1.0 * ((F / B_m) ^ 0.5)) * (2.0 ^ 0.5);
    	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, 4e+17], N[(N[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(F * N[(C + N[Sqrt[N[(-1.0 * B$95$m), $MachinePrecision] ^ 2 + N[(-1.0 * C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[Power[2.0, 0.5], $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}
    \mathbf{if}\;F \leq 4 \cdot 10^{+17}:\\
    \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-1 \cdot B\_m, -1 \cdot C\right)\right)\right)}^{0.5}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-1 \cdot {\left(\frac{F}{B\_m}\right)}^{0.5}\right) \cdot {2}^{0.5}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if F < 4e17

      1. Initial program 20.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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        2. lift-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        3. lift-fma.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(B \cdot B + C \cdot C\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        4. unpow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{B \cdot B + C \cdot C}\right)\right)}^{\frac{1}{2}}\right) \]
        5. sqr-neg-revN/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{\left(\mathsf{neg}\left(B\right)\right) \cdot \left(\mathsf{neg}\left(B\right)\right) + C \cdot C}\right)\right)}^{\frac{1}{2}}\right) \]
        6. sqr-neg-revN/A

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-B, \mathsf{neg}\left(C\right)\right)\right)\right)}^{\frac{1}{2}}\right) \]
        9. lower-neg.f6417.1

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-B, -C\right)\right)\right)}^{0.5}\right) \]
      7. Applied rewrites17.1%

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

      if 4e17 < F

      1. Initial program 17.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 B around inf

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

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

          \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \color{blue}{\sqrt{2}}\right) \]
        3. pow1/2N/A

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

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

          \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \sqrt{2}\right) \]
        6. pow1/2N/A

          \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot {2}^{\color{blue}{\frac{1}{2}}}\right) \]
        7. lower-pow.f6417.0

          \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot {2}^{\color{blue}{0.5}}\right) \]
      5. Applied rewrites17.0%

        \[\leadsto \color{blue}{-1 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot {2}^{0.5}\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification17.0%

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

    Alternative 8: 38.0% accurate, N/A× 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 := -1 \cdot \frac{{2}^{0.5}}{B\_m}\\ \mathbf{if}\;F \leq 1.55 \cdot 10^{+30}:\\ \;\;\;\;t\_0 \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-1 \cdot B\_m, -1 \cdot C\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\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 (* -1.0 (/ (pow 2.0 0.5) B_m))))
       (if (<= F 1.55e+30)
         (* t_0 (pow (* F (+ C (hypot (* -1.0 B_m) (* -1.0 C)))) 0.5))
         (*
          t_0
          (fma (pow B_m 0.5) (pow F 0.5) (* 0.5 (* (pow (/ F B_m) 0.5) C)))))))
    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 = -1.0 * (pow(2.0, 0.5) / B_m);
    	double tmp;
    	if (F <= 1.55e+30) {
    		tmp = t_0 * pow((F * (C + hypot((-1.0 * B_m), (-1.0 * C)))), 0.5);
    	} else {
    		tmp = t_0 * fma(pow(B_m, 0.5), pow(F, 0.5), (0.5 * (pow((F / B_m), 0.5) * C)));
    	}
    	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(-1.0 * Float64((2.0 ^ 0.5) / B_m))
    	tmp = 0.0
    	if (F <= 1.55e+30)
    		tmp = Float64(t_0 * (Float64(F * Float64(C + hypot(Float64(-1.0 * B_m), Float64(-1.0 * C)))) ^ 0.5));
    	else
    		tmp = Float64(t_0 * fma((B_m ^ 0.5), (F ^ 0.5), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))));
    	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[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 1.55e+30], N[(t$95$0 * N[Power[N[(F * N[(C + N[Sqrt[N[(-1.0 * B$95$m), $MachinePrecision] ^ 2 + N[(-1.0 * C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[Power[B$95$m, 0.5], $MachinePrecision] * N[Power[F, 0.5], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $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 := -1 \cdot \frac{{2}^{0.5}}{B\_m}\\
    \mathbf{if}\;F \leq 1.55 \cdot 10^{+30}:\\
    \;\;\;\;t\_0 \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-1 \cdot B\_m, -1 \cdot C\right)\right)\right)}^{0.5}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0 \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if F < 1.5499999999999999e30

      1. Initial program 20.4%

        \[\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 A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        2. lift-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        3. lift-fma.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(B \cdot B + C \cdot C\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        4. unpow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{B \cdot B + C \cdot C}\right)\right)}^{\frac{1}{2}}\right) \]
        5. sqr-neg-revN/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{\left(\mathsf{neg}\left(B\right)\right) \cdot \left(\mathsf{neg}\left(B\right)\right) + C \cdot C}\right)\right)}^{\frac{1}{2}}\right) \]
        6. sqr-neg-revN/A

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-B, \mathsf{neg}\left(C\right)\right)\right)\right)}^{\frac{1}{2}}\right) \]
        9. lower-neg.f6416.7

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + \mathsf{hypot}\left(-B, -C\right)\right)\right)}^{0.5}\right) \]
      7. Applied rewrites16.7%

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

      if 1.5499999999999999e30 < F

      1. Initial program 17.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 A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
      6. Taylor expanded in C around 0

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        3. pow1/2N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        5. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        9. pow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        10. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        11. lift-/.f6417.1

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      8. Applied rewrites17.1%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification16.8%

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

    Alternative 9: 35.9% accurate, N/A× 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 := \log 2 \cdot 0.5\\ \mathbf{if}\;B\_m \leq 1.46 \cdot 10^{+51}:\\ \;\;\;\;\frac{\cosh t\_0 + \sinh t\_0}{-1 \cdot B\_m} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B\_m, B\_m, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\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 (* (log 2.0) 0.5)))
       (if (<= B_m 1.46e+51)
         (*
          (/ (+ (cosh t_0) (sinh t_0)) (* -1.0 B_m))
          (pow (* F (+ C (exp (* (log (fma B_m B_m (* C C))) 0.5)))) 0.5))
         (*
          (* -1.0 (/ (pow 2.0 0.5) B_m))
          (fma (pow B_m 0.5) (pow F 0.5) (* 0.5 (* (pow (/ F B_m) 0.5) C)))))))
    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 = log(2.0) * 0.5;
    	double tmp;
    	if (B_m <= 1.46e+51) {
    		tmp = ((cosh(t_0) + sinh(t_0)) / (-1.0 * B_m)) * pow((F * (C + exp((log(fma(B_m, B_m, (C * C))) * 0.5)))), 0.5);
    	} else {
    		tmp = (-1.0 * (pow(2.0, 0.5) / B_m)) * fma(pow(B_m, 0.5), pow(F, 0.5), (0.5 * (pow((F / B_m), 0.5) * C)));
    	}
    	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(log(2.0) * 0.5)
    	tmp = 0.0
    	if (B_m <= 1.46e+51)
    		tmp = Float64(Float64(Float64(cosh(t_0) + sinh(t_0)) / Float64(-1.0 * B_m)) * (Float64(F * Float64(C + exp(Float64(log(fma(B_m, B_m, Float64(C * C))) * 0.5)))) ^ 0.5));
    	else
    		tmp = Float64(Float64(-1.0 * Float64((2.0 ^ 0.5) / B_m)) * fma((B_m ^ 0.5), (F ^ 0.5), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))));
    	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[Log[2.0], $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[B$95$m, 1.46e+51], N[(N[(N[(N[Cosh[t$95$0], $MachinePrecision] + N[Sinh[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(-1.0 * B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(F * N[(C + N[Exp[N[(N[Log[N[(B$95$m * B$95$m + N[(C * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[B$95$m, 0.5], $MachinePrecision] * N[Power[F, 0.5], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $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 := \log 2 \cdot 0.5\\
    \mathbf{if}\;B\_m \leq 1.46 \cdot 10^{+51}:\\
    \;\;\;\;\frac{\cosh t\_0 + \sinh t\_0}{-1 \cdot B\_m} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B\_m, B\_m, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if B < 1.4600000000000001e51

      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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        2. lift-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        3. lift-fma.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(B \cdot B + C \cdot C\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        4. pow-to-expN/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        5. lower-exp.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        6. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        7. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        8. lower-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        9. lower-log.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        10. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        11. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        12. lift-fma.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        13. lift-*.f646.8

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]
      7. Applied rewrites6.8%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]
      8. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        2. pow-to-expN/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        3. lift-log.f64N/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        4. lift-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        5. sinh-+-cosh-revN/A

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot \frac{1}{2}\right) + \sinh \left(\log 2 \cdot \frac{1}{2}\right)}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        6. lower-+.f64N/A

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot \frac{1}{2}\right) + \sinh \left(\log 2 \cdot \frac{1}{2}\right)}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        7. lower-cosh.f64N/A

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot \frac{1}{2}\right) + \sinh \left(\log 2 \cdot \frac{1}{2}\right)}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        8. lower-sinh.f646.8

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot 0.5\right) + \sinh \left(\log 2 \cdot 0.5\right)}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]
      9. Applied rewrites6.8%

        \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot 0.5\right) + \sinh \left(\log 2 \cdot 0.5\right)}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]

      if 1.4600000000000001e51 < B

      1. Initial program 5.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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
      5. Applied rewrites13.7%

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
      6. Taylor expanded in C around 0

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        3. pow1/2N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        5. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        9. pow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        10. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        11. lift-/.f6461.8

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      8. Applied rewrites61.8%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification16.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 1.46 \cdot 10^{+51}:\\ \;\;\;\;\frac{\cosh \left(\log 2 \cdot 0.5\right) + \sinh \left(\log 2 \cdot 0.5\right)}{-1 \cdot B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B}\right) \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 10: 34.2% accurate, N/A× 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 := \log 2 \cdot 0.5\\ \mathbf{if}\;B\_m \leq 3.6 \cdot 10^{+56}:\\ \;\;\;\;\frac{\cosh t\_0 + \sinh t\_0}{-1 \cdot B\_m} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B\_m, B\_m, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, e^{\log F \cdot 0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\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 (* (log 2.0) 0.5)))
       (if (<= B_m 3.6e+56)
         (*
          (/ (+ (cosh t_0) (sinh t_0)) (* -1.0 B_m))
          (pow (* F (+ C (exp (* (log (fma B_m B_m (* C C))) 0.5)))) 0.5))
         (*
          (* -1.0 (/ (pow 2.0 0.5) B_m))
          (fma
           (pow B_m 0.5)
           (exp (* (log F) 0.5))
           (* 0.5 (* (pow (/ F B_m) 0.5) C)))))))
    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 = log(2.0) * 0.5;
    	double tmp;
    	if (B_m <= 3.6e+56) {
    		tmp = ((cosh(t_0) + sinh(t_0)) / (-1.0 * B_m)) * pow((F * (C + exp((log(fma(B_m, B_m, (C * C))) * 0.5)))), 0.5);
    	} else {
    		tmp = (-1.0 * (pow(2.0, 0.5) / B_m)) * fma(pow(B_m, 0.5), exp((log(F) * 0.5)), (0.5 * (pow((F / B_m), 0.5) * C)));
    	}
    	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(log(2.0) * 0.5)
    	tmp = 0.0
    	if (B_m <= 3.6e+56)
    		tmp = Float64(Float64(Float64(cosh(t_0) + sinh(t_0)) / Float64(-1.0 * B_m)) * (Float64(F * Float64(C + exp(Float64(log(fma(B_m, B_m, Float64(C * C))) * 0.5)))) ^ 0.5));
    	else
    		tmp = Float64(Float64(-1.0 * Float64((2.0 ^ 0.5) / B_m)) * fma((B_m ^ 0.5), exp(Float64(log(F) * 0.5)), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))));
    	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[Log[2.0], $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[B$95$m, 3.6e+56], N[(N[(N[(N[Cosh[t$95$0], $MachinePrecision] + N[Sinh[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(-1.0 * B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(F * N[(C + N[Exp[N[(N[Log[N[(B$95$m * B$95$m + N[(C * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * N[(N[Power[2.0, 0.5], $MachinePrecision] / B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[B$95$m, 0.5], $MachinePrecision] * N[Exp[N[(N[Log[F], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $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 := \log 2 \cdot 0.5\\
    \mathbf{if}\;B\_m \leq 3.6 \cdot 10^{+56}:\\
    \;\;\;\;\frac{\cosh t\_0 + \sinh t\_0}{-1 \cdot B\_m} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B\_m, B\_m, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B\_m}\right) \cdot \mathsf{fma}\left({B\_m}^{0.5}, e^{\log F \cdot 0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if B < 3.59999999999999998e56

      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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        2. lift-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        3. lift-fma.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(B \cdot B + C \cdot C\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        4. pow-to-expN/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        5. lower-exp.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        6. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        7. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        8. lower-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        9. lower-log.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        10. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        11. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        12. lift-fma.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        13. lift-*.f646.8

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]
      7. Applied rewrites6.8%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]
      8. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        2. pow-to-expN/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        3. lift-log.f64N/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        4. lift-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        5. sinh-+-cosh-revN/A

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot \frac{1}{2}\right) + \sinh \left(\log 2 \cdot \frac{1}{2}\right)}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        6. lower-+.f64N/A

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot \frac{1}{2}\right) + \sinh \left(\log 2 \cdot \frac{1}{2}\right)}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        7. lower-cosh.f64N/A

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot \frac{1}{2}\right) + \sinh \left(\log 2 \cdot \frac{1}{2}\right)}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        8. lower-sinh.f646.8

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot 0.5\right) + \sinh \left(\log 2 \cdot 0.5\right)}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]
      9. Applied rewrites6.8%

        \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot 0.5\right) + \sinh \left(\log 2 \cdot 0.5\right)}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]

      if 3.59999999999999998e56 < B

      1. Initial program 5.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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
      5. Applied rewrites13.7%

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
      6. Taylor expanded in C around 0

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        3. pow1/2N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        5. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        9. pow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        10. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        11. lift-/.f6461.8

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      8. Applied rewrites61.8%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      9. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        2. pow-to-expN/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, e^{\log F \cdot \frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        3. lower-exp.f64N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, e^{\log F \cdot \frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        5. lower-log.f6457.8

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, e^{\log F \cdot 0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      10. Applied rewrites57.8%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, e^{\log F \cdot 0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification15.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 3.6 \cdot 10^{+56}:\\ \;\;\;\;\frac{\cosh \left(\log 2 \cdot 0.5\right) + \sinh \left(\log 2 \cdot 0.5\right)}{-1 \cdot B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(-1 \cdot \frac{{2}^{0.5}}{B}\right) \cdot \mathsf{fma}\left({B}^{0.5}, e^{\log F \cdot 0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 11: 34.0% accurate, N/A× 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 := \log 2 \cdot 0.5\\ \mathbf{if}\;B\_m \leq 7.8 \cdot 10^{+51}:\\ \;\;\;\;\frac{\cosh t\_0 + \sinh t\_0}{-1 \cdot B\_m} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B\_m, B\_m, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{t\_0}}{-1 \cdot B\_m} \cdot \mathsf{fma}\left(e^{\log B\_m \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\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 (* (log 2.0) 0.5)))
       (if (<= B_m 7.8e+51)
         (*
          (/ (+ (cosh t_0) (sinh t_0)) (* -1.0 B_m))
          (pow (* F (+ C (exp (* (log (fma B_m B_m (* C C))) 0.5)))) 0.5))
         (*
          (/ (exp t_0) (* -1.0 B_m))
          (fma
           (exp (* (log B_m) 0.5))
           (pow F 0.5)
           (* 0.5 (* (pow (/ F B_m) 0.5) C)))))))
    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 = log(2.0) * 0.5;
    	double tmp;
    	if (B_m <= 7.8e+51) {
    		tmp = ((cosh(t_0) + sinh(t_0)) / (-1.0 * B_m)) * pow((F * (C + exp((log(fma(B_m, B_m, (C * C))) * 0.5)))), 0.5);
    	} else {
    		tmp = (exp(t_0) / (-1.0 * B_m)) * fma(exp((log(B_m) * 0.5)), pow(F, 0.5), (0.5 * (pow((F / B_m), 0.5) * C)));
    	}
    	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(log(2.0) * 0.5)
    	tmp = 0.0
    	if (B_m <= 7.8e+51)
    		tmp = Float64(Float64(Float64(cosh(t_0) + sinh(t_0)) / Float64(-1.0 * B_m)) * (Float64(F * Float64(C + exp(Float64(log(fma(B_m, B_m, Float64(C * C))) * 0.5)))) ^ 0.5));
    	else
    		tmp = Float64(Float64(exp(t_0) / Float64(-1.0 * B_m)) * fma(exp(Float64(log(B_m) * 0.5)), (F ^ 0.5), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))));
    	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[Log[2.0], $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[B$95$m, 7.8e+51], N[(N[(N[(N[Cosh[t$95$0], $MachinePrecision] + N[Sinh[t$95$0], $MachinePrecision]), $MachinePrecision] / N[(-1.0 * B$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[(F * N[(C + N[Exp[N[(N[Log[N[(B$95$m * B$95$m + N[(C * C), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(N[(N[Exp[t$95$0], $MachinePrecision] / N[(-1.0 * B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(N[Log[B$95$m], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[Power[F, 0.5], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $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 := \log 2 \cdot 0.5\\
    \mathbf{if}\;B\_m \leq 7.8 \cdot 10^{+51}:\\
    \;\;\;\;\frac{\cosh t\_0 + \sinh t\_0}{-1 \cdot B\_m} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B\_m, B\_m, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{e^{t\_0}}{-1 \cdot B\_m} \cdot \mathsf{fma}\left(e^{\log B\_m \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if B < 7.79999999999999968e51

      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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        2. lift-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        3. lift-fma.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + {\left(B \cdot B + C \cdot C\right)}^{\frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        4. pow-to-expN/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        5. lower-exp.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        6. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        7. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        8. lower-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        9. lower-log.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left({B}^{2} + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        10. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + {C}^{2}\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        11. pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(B \cdot B + C \cdot C\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        12. lift-fma.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        13. lift-*.f646.8

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]
      7. Applied rewrites6.8%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]
      8. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        2. pow-to-expN/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        3. lift-log.f64N/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        4. lift-*.f64N/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        5. sinh-+-cosh-revN/A

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot \frac{1}{2}\right) + \sinh \left(\log 2 \cdot \frac{1}{2}\right)}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        6. lower-+.f64N/A

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot \frac{1}{2}\right) + \sinh \left(\log 2 \cdot \frac{1}{2}\right)}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        7. lower-cosh.f64N/A

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot \frac{1}{2}\right) + \sinh \left(\log 2 \cdot \frac{1}{2}\right)}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot \frac{1}{2}}\right)\right)}^{\frac{1}{2}}\right) \]
        8. lower-sinh.f646.8

          \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot 0.5\right) + \sinh \left(\log 2 \cdot 0.5\right)}{B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]
      9. Applied rewrites6.8%

        \[\leadsto -1 \cdot \left(\frac{\cosh \left(\log 2 \cdot 0.5\right) + \sinh \left(\log 2 \cdot 0.5\right)}{B} \cdot {\left(\color{blue}{F} \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\right) \]

      if 7.79999999999999968e51 < B

      1. Initial program 5.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. Taylor expanded in A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot {\left(F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)\right)}^{\color{blue}{\frac{1}{2}}}\right) \]
      5. Applied rewrites13.7%

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
      6. Taylor expanded in C around 0

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        3. pow1/2N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        5. pow1/2N/A

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

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

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
        9. pow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        10. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        11. lift-/.f6461.8

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      8. Applied rewrites61.8%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      9. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        2. pow-to-expN/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\log B \cdot \frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        3. lower-exp.f64N/A

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

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\log B \cdot \frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        5. lower-log.f6457.3

          \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left(e^{\log B \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      10. Applied rewrites57.3%

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left(e^{\log B \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      11. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\color{blue}{\log B \cdot \frac{1}{2}}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        2. pow-to-expN/A

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\color{blue}{\log B \cdot \frac{1}{2}}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        3. lower-exp.f64N/A

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

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\color{blue}{\log B} \cdot \frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
        5. lower-log.f6457.3

          \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot 0.5}}{B} \cdot \mathsf{fma}\left(e^{\log \color{blue}{B} \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
      12. Applied rewrites57.3%

        \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot 0.5}}{B} \cdot \mathsf{fma}\left(e^{\color{blue}{\log B \cdot 0.5}}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification15.7%

      \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq 7.8 \cdot 10^{+51}:\\ \;\;\;\;\frac{\cosh \left(\log 2 \cdot 0.5\right) + \sinh \left(\log 2 \cdot 0.5\right)}{-1 \cdot B} \cdot {\left(F \cdot \left(C + e^{\log \left(\mathsf{fma}\left(B, B, C \cdot C\right)\right) \cdot 0.5}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{e^{\log 2 \cdot 0.5}}{-1 \cdot B} \cdot \mathsf{fma}\left(e^{\log B \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 32.4% accurate, N/A× speedup?

    \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \frac{e^{\log 2 \cdot 0.5}}{-1 \cdot B\_m} \cdot \mathsf{fma}\left(e^{\log B\_m \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right) \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
     (*
      (/ (exp (* (log 2.0) 0.5)) (* -1.0 B_m))
      (fma (exp (* (log B_m) 0.5)) (pow F 0.5) (* 0.5 (* (pow (/ F B_m) 0.5) C)))))
    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 (exp((log(2.0) * 0.5)) / (-1.0 * B_m)) * fma(exp((log(B_m) * 0.5)), pow(F, 0.5), (0.5 * (pow((F / B_m), 0.5) * C)));
    }
    
    B_m = abs(B)
    A, B_m, C, F = sort([A, B_m, C, F])
    function code(A, B_m, C, F)
    	return Float64(Float64(exp(Float64(log(2.0) * 0.5)) / Float64(-1.0 * B_m)) * fma(exp(Float64(log(B_m) * 0.5)), (F ^ 0.5), Float64(0.5 * Float64((Float64(F / B_m) ^ 0.5) * C))))
    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[(N[Exp[N[(N[Log[2.0], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] / N[(-1.0 * B$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Exp[N[(N[Log[B$95$m], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[Power[F, 0.5], $MachinePrecision] + N[(0.5 * N[(N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    B_m = \left|B\right|
    \\
    [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
    \\
    \frac{e^{\log 2 \cdot 0.5}}{-1 \cdot B\_m} \cdot \mathsf{fma}\left(e^{\log B\_m \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B\_m}\right)}^{0.5} \cdot C\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 19.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 A around 0

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

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

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

        \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
      4. pow1/2N/A

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
    6. Taylor expanded in C around 0

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

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

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(\sqrt{B}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
      3. pow1/2N/A

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

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, \sqrt{F}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
      5. pow1/2N/A

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

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

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

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left(\sqrt{\frac{F}{B}} \cdot C\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      10. lift-pow.f64N/A

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      11. lift-/.f6415.2

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    8. Applied rewrites15.2%

      \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left({B}^{0.5}, \color{blue}{{F}^{0.5}}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    9. Step-by-step derivation
      1. lift-pow.f64N/A

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left({B}^{\frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      2. pow-to-expN/A

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\log B \cdot \frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      3. lower-exp.f64N/A

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

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\log B \cdot \frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      5. lower-log.f6414.3

        \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left(e^{\log B \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    10. Applied rewrites14.3%

      \[\leadsto -1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot \mathsf{fma}\left(e^{\log B \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    11. Step-by-step derivation
      1. lift-pow.f64N/A

        \[\leadsto -1 \cdot \left(\frac{{2}^{\frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\color{blue}{\log B \cdot \frac{1}{2}}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      2. pow-to-expN/A

        \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\color{blue}{\log B \cdot \frac{1}{2}}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      3. lower-exp.f64N/A

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

        \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot \frac{1}{2}}}{B} \cdot \mathsf{fma}\left(e^{\color{blue}{\log B} \cdot \frac{1}{2}}, {F}^{\frac{1}{2}}, \frac{1}{2} \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot C\right)\right)\right) \]
      5. lower-log.f6414.3

        \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot 0.5}}{B} \cdot \mathsf{fma}\left(e^{\log \color{blue}{B} \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    12. Applied rewrites14.3%

      \[\leadsto -1 \cdot \left(\frac{e^{\log 2 \cdot 0.5}}{B} \cdot \mathsf{fma}\left(e^{\color{blue}{\log B \cdot 0.5}}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right)\right) \]
    13. Final simplification14.3%

      \[\leadsto \frac{e^{\log 2 \cdot 0.5}}{-1 \cdot B} \cdot \mathsf{fma}\left(e^{\log B \cdot 0.5}, {F}^{0.5}, 0.5 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot C\right)\right) \]
    14. Add Preprocessing

    Alternative 13: 25.2% accurate, N/A× 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}\;C \leq 9.2 \cdot 10^{+171}:\\ \;\;\;\;F \cdot \mathsf{fma}\left(-1, {\left({\left(B\_m \cdot F\right)}^{-1}\right)}^{0.5} \cdot {2}^{0.5}, -0.5 \cdot \left({\left({\left(\left(\left(B\_m \cdot B\_m\right) \cdot B\_m\right) \cdot F\right)}^{-1}\right)}^{0.5} \cdot \left({2}^{0.5} \cdot \left(A + C\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(\frac{2}{B\_m} \cdot {\left(C \cdot F\right)}^{0.5}\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
     (if (<= C 9.2e+171)
       (*
        F
        (fma
         -1.0
         (* (pow (pow (* B_m F) -1.0) 0.5) (pow 2.0 0.5))
         (*
          -0.5
          (*
           (pow (pow (* (* (* B_m B_m) B_m) F) -1.0) 0.5)
           (* (pow 2.0 0.5) (+ A C))))))
       (* -1.0 (* (/ 2.0 B_m) (pow (* C F) 0.5)))))
    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 (C <= 9.2e+171) {
    		tmp = F * fma(-1.0, (pow(pow((B_m * F), -1.0), 0.5) * pow(2.0, 0.5)), (-0.5 * (pow(pow((((B_m * B_m) * B_m) * F), -1.0), 0.5) * (pow(2.0, 0.5) * (A + C)))));
    	} else {
    		tmp = -1.0 * ((2.0 / B_m) * pow((C * F), 0.5));
    	}
    	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 (C <= 9.2e+171)
    		tmp = Float64(F * fma(-1.0, Float64(((Float64(B_m * F) ^ -1.0) ^ 0.5) * (2.0 ^ 0.5)), Float64(-0.5 * Float64(((Float64(Float64(Float64(B_m * B_m) * B_m) * F) ^ -1.0) ^ 0.5) * Float64((2.0 ^ 0.5) * Float64(A + C))))));
    	else
    		tmp = Float64(-1.0 * Float64(Float64(2.0 / B_m) * (Float64(C * F) ^ 0.5)));
    	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[C, 9.2e+171], N[(F * N[(-1.0 * N[(N[Power[N[Power[N[(B$95$m * F), $MachinePrecision], -1.0], $MachinePrecision], 0.5], $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[Power[N[Power[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] * B$95$m), $MachinePrecision] * F), $MachinePrecision], -1.0], $MachinePrecision], 0.5], $MachinePrecision] * N[(N[Power[2.0, 0.5], $MachinePrecision] * N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(N[(2.0 / B$95$m), $MachinePrecision] * N[Power[N[(C * F), $MachinePrecision], 0.5], $MachinePrecision]), $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}
    \mathbf{if}\;C \leq 9.2 \cdot 10^{+171}:\\
    \;\;\;\;F \cdot \mathsf{fma}\left(-1, {\left({\left(B\_m \cdot F\right)}^{-1}\right)}^{0.5} \cdot {2}^{0.5}, -0.5 \cdot \left({\left({\left(\left(\left(B\_m \cdot B\_m\right) \cdot B\_m\right) \cdot F\right)}^{-1}\right)}^{0.5} \cdot \left({2}^{0.5} \cdot \left(A + C\right)\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;-1 \cdot \left(\frac{2}{B\_m} \cdot {\left(C \cdot F\right)}^{0.5}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if C < 9.20000000000000069e171

      1. Initial program 21.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. Taylor expanded in B around inf

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{F}{{B}^{3}}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
        6. pow1/2N/A

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

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

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

          \[\leadsto \mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}}, \frac{-1}{2} \cdot \left(\sqrt{\frac{F}{{B}^{3}}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
      5. Applied rewrites12.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{0.5} \cdot {2}^{0.5}, -0.5 \cdot \left({\left(\frac{F}{\left(B \cdot B\right) \cdot B}\right)}^{0.5} \cdot \left({2}^{0.5} \cdot \left(A + C\right)\right)\right)\right)} \]
      6. Taylor expanded in F around inf

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

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

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

          \[\leadsto F \cdot \mathsf{fma}\left(-1, \sqrt{\frac{1}{B \cdot F}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{1}{{B}^{3} \cdot F}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
        4. pow1/2N/A

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

          \[\leadsto F \cdot \mathsf{fma}\left(-1, {\left(\frac{1}{B \cdot F}\right)}^{\frac{1}{2}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{1}{{B}^{3} \cdot F}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
        6. inv-powN/A

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

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

          \[\leadsto F \cdot \mathsf{fma}\left(-1, {\left({\left(B \cdot F\right)}^{-1}\right)}^{\frac{1}{2}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{1}{{B}^{3} \cdot F}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
        9. pow1/2N/A

          \[\leadsto F \cdot \mathsf{fma}\left(-1, {\left({\left(B \cdot F\right)}^{-1}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}}, \frac{-1}{2} \cdot \left(\sqrt{\frac{1}{{B}^{3} \cdot F}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
        10. lift-pow.f64N/A

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

          \[\leadsto F \cdot \mathsf{fma}\left(-1, {\left({\left(B \cdot F\right)}^{-1}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}}, \frac{-1}{2} \cdot \left(\sqrt{\frac{1}{{B}^{3} \cdot F}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
      8. Applied rewrites12.8%

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

      if 9.20000000000000069e171 < C

      1. Initial program 2.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 A around 0

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

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

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

          \[\leadsto -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\color{blue}{F \cdot \left(C + \sqrt{{B}^{2} + {C}^{2}}\right)}}\right) \]
        4. pow1/2N/A

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

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

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

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

        \[\leadsto \color{blue}{-1 \cdot \left(\frac{{2}^{0.5}}{B} \cdot {\left(F \cdot \left(C + {\left(\mathsf{fma}\left(B, B, C \cdot C\right)\right)}^{0.5}\right)\right)}^{0.5}\right)} \]
      6. Taylor expanded in B around 0

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

          \[\leadsto -1 \cdot \left(\frac{{\left(\sqrt{2}\right)}^{2}}{B} \cdot \sqrt{C \cdot F}\right) \]
        2. sqrt-pow2N/A

          \[\leadsto -1 \cdot \left(\frac{{2}^{\left(\frac{2}{2}\right)}}{B} \cdot \sqrt{C \cdot F}\right) \]
        3. metadata-evalN/A

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

          \[\leadsto -1 \cdot \left(\frac{2}{B} \cdot \sqrt{C \cdot F}\right) \]
        5. lower-/.f64N/A

          \[\leadsto -1 \cdot \left(\frac{2}{B} \cdot \sqrt{C \cdot F}\right) \]
        6. pow1/2N/A

          \[\leadsto -1 \cdot \left(\frac{2}{B} \cdot {\left(C \cdot F\right)}^{\frac{1}{2}}\right) \]
        7. lower-pow.f64N/A

          \[\leadsto -1 \cdot \left(\frac{2}{B} \cdot {\left(C \cdot F\right)}^{\frac{1}{2}}\right) \]
        8. lower-*.f645.5

          \[\leadsto -1 \cdot \left(\frac{2}{B} \cdot {\left(C \cdot F\right)}^{0.5}\right) \]
      8. Applied rewrites5.5%

        \[\leadsto -1 \cdot \left(\frac{2}{B} \cdot \color{blue}{{\left(C \cdot F\right)}^{0.5}}\right) \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 14: 23.9% accurate, N/A× speedup?

    \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ F \cdot \mathsf{fma}\left(-1, {\left({\left(B\_m \cdot F\right)}^{-1}\right)}^{0.5} \cdot {2}^{0.5}, -0.5 \cdot \left({\left({\left(\left(\left(B\_m \cdot B\_m\right) \cdot B\_m\right) \cdot F\right)}^{-1}\right)}^{0.5} \cdot \left({2}^{0.5} \cdot \left(A + C\right)\right)\right)\right) \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
     (*
      F
      (fma
       -1.0
       (* (pow (pow (* B_m F) -1.0) 0.5) (pow 2.0 0.5))
       (*
        -0.5
        (*
         (pow (pow (* (* (* B_m B_m) B_m) F) -1.0) 0.5)
         (* (pow 2.0 0.5) (+ A C)))))))
    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 F * fma(-1.0, (pow(pow((B_m * F), -1.0), 0.5) * pow(2.0, 0.5)), (-0.5 * (pow(pow((((B_m * B_m) * B_m) * F), -1.0), 0.5) * (pow(2.0, 0.5) * (A + C)))));
    }
    
    B_m = abs(B)
    A, B_m, C, F = sort([A, B_m, C, F])
    function code(A, B_m, C, F)
    	return Float64(F * fma(-1.0, Float64(((Float64(B_m * F) ^ -1.0) ^ 0.5) * (2.0 ^ 0.5)), Float64(-0.5 * Float64(((Float64(Float64(Float64(B_m * B_m) * B_m) * F) ^ -1.0) ^ 0.5) * Float64((2.0 ^ 0.5) * Float64(A + C))))))
    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[(F * N[(-1.0 * N[(N[Power[N[Power[N[(B$95$m * F), $MachinePrecision], -1.0], $MachinePrecision], 0.5], $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[Power[N[Power[N[(N[(N[(B$95$m * B$95$m), $MachinePrecision] * B$95$m), $MachinePrecision] * F), $MachinePrecision], -1.0], $MachinePrecision], 0.5], $MachinePrecision] * N[(N[Power[2.0, 0.5], $MachinePrecision] * N[(A + C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    B_m = \left|B\right|
    \\
    [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
    \\
    F \cdot \mathsf{fma}\left(-1, {\left({\left(B\_m \cdot F\right)}^{-1}\right)}^{0.5} \cdot {2}^{0.5}, -0.5 \cdot \left({\left({\left(\left(\left(B\_m \cdot B\_m\right) \cdot B\_m\right) \cdot F\right)}^{-1}\right)}^{0.5} \cdot \left({2}^{0.5} \cdot \left(A + C\right)\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 19.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 B around inf

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{F}{{B}^{3}}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
      6. pow1/2N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}}, \frac{-1}{2} \cdot \left(\sqrt{\frac{F}{{B}^{3}}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
    5. Applied rewrites11.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{0.5} \cdot {2}^{0.5}, -0.5 \cdot \left({\left(\frac{F}{\left(B \cdot B\right) \cdot B}\right)}^{0.5} \cdot \left({2}^{0.5} \cdot \left(A + C\right)\right)\right)\right)} \]
    6. Taylor expanded in F around inf

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

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

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

        \[\leadsto F \cdot \mathsf{fma}\left(-1, \sqrt{\frac{1}{B \cdot F}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{1}{{B}^{3} \cdot F}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
      4. pow1/2N/A

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

        \[\leadsto F \cdot \mathsf{fma}\left(-1, {\left(\frac{1}{B \cdot F}\right)}^{\frac{1}{2}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{1}{{B}^{3} \cdot F}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
      6. inv-powN/A

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

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

        \[\leadsto F \cdot \mathsf{fma}\left(-1, {\left({\left(B \cdot F\right)}^{-1}\right)}^{\frac{1}{2}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{1}{{B}^{3} \cdot F}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
      9. pow1/2N/A

        \[\leadsto F \cdot \mathsf{fma}\left(-1, {\left({\left(B \cdot F\right)}^{-1}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}}, \frac{-1}{2} \cdot \left(\sqrt{\frac{1}{{B}^{3} \cdot F}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
      10. lift-pow.f64N/A

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

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

      \[\leadsto F \cdot \color{blue}{\mathsf{fma}\left(-1, {\left({\left(B \cdot F\right)}^{-1}\right)}^{0.5} \cdot {2}^{0.5}, -0.5 \cdot \left({\left({\left(\left(\left(B \cdot B\right) \cdot B\right) \cdot F\right)}^{-1}\right)}^{0.5} \cdot \left({2}^{0.5} \cdot \left(A + C\right)\right)\right)\right)} \]
    9. Add Preprocessing

    Alternative 15: 2.5% accurate, N/A× speedup?

    \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ \left(-1 \cdot {\left(\frac{F}{B\_m}\right)}^{0.5}\right) \cdot \left(-1 \cdot {2}^{0.5}\right) \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
     (* (* -1.0 (pow (/ F B_m) 0.5)) (* -1.0 (pow 2.0 0.5))))
    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 (-1.0 * pow((F / B_m), 0.5)) * (-1.0 * pow(2.0, 0.5));
    }
    
    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 = ((-1.0d0) * ((f / b_m) ** 0.5d0)) * ((-1.0d0) * (2.0d0 ** 0.5d0))
    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 (-1.0 * Math.pow((F / B_m), 0.5)) * (-1.0 * Math.pow(2.0, 0.5));
    }
    
    B_m = math.fabs(B)
    [A, B_m, C, F] = sort([A, B_m, C, F])
    def code(A, B_m, C, F):
    	return (-1.0 * math.pow((F / B_m), 0.5)) * (-1.0 * math.pow(2.0, 0.5))
    
    B_m = abs(B)
    A, B_m, C, F = sort([A, B_m, C, F])
    function code(A, B_m, C, F)
    	return Float64(Float64(-1.0 * (Float64(F / B_m) ^ 0.5)) * Float64(-1.0 * (2.0 ^ 0.5)))
    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 = (-1.0 * ((F / B_m) ^ 0.5)) * (-1.0 * (2.0 ^ 0.5));
    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[(-1.0 * N[Power[N[(F / B$95$m), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(-1.0 * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    B_m = \left|B\right|
    \\
    [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
    \\
    \left(-1 \cdot {\left(\frac{F}{B\_m}\right)}^{0.5}\right) \cdot \left(-1 \cdot {2}^{0.5}\right)
    \end{array}
    
    Derivation
    1. Initial program 19.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 B around inf

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{F}{{B}^{3}}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
      6. pow1/2N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}}, \frac{-1}{2} \cdot \left(\sqrt{\frac{F}{{B}^{3}}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
    5. Applied rewrites11.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{0.5} \cdot {2}^{0.5}, -0.5 \cdot \left({\left(\frac{F}{\left(B \cdot B\right) \cdot B}\right)}^{0.5} \cdot \left({2}^{0.5} \cdot \left(A + C\right)\right)\right)\right)} \]
    6. Taylor expanded in B around -inf

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

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

        \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \left({-1}^{\left(\frac{2}{2}\right)} \cdot \sqrt{2}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \left({-1}^{1} \cdot \sqrt{2}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \left(-1 \cdot \sqrt{2}\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \left(-1 \cdot \color{blue}{\sqrt{2}}\right)\right) \]
      6. pow1/2N/A

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

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

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

        \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \left(-1 \cdot \sqrt{2}\right)\right) \]
      10. pow1/2N/A

        \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \left(-1 \cdot {2}^{\frac{1}{2}}\right)\right) \]
      11. lift-pow.f642.1

        \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot \left(-1 \cdot {2}^{0.5}\right)\right) \]
    8. Applied rewrites2.1%

      \[\leadsto -1 \cdot \color{blue}{\left({\left(\frac{F}{B}\right)}^{0.5} \cdot \left(-1 \cdot {2}^{0.5}\right)\right)} \]
    9. Final simplification2.1%

      \[\leadsto \left(-1 \cdot {\left(\frac{F}{B}\right)}^{0.5}\right) \cdot \left(-1 \cdot {2}^{0.5}\right) \]
    10. Add Preprocessing

    Alternative 16: 2.4% accurate, N/A× speedup?

    \[\begin{array}{l} B_m = \left|B\right| \\ [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\ \\ e^{\log \left(\frac{F}{B\_m}\right) \cdot 0.5} \cdot {2}^{0.5} \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
     (* (exp (* (log (/ F B_m)) 0.5)) (pow 2.0 0.5)))
    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 exp((log((F / B_m)) * 0.5)) * pow(2.0, 0.5);
    }
    
    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 = exp((log((f / b_m)) * 0.5d0)) * (2.0d0 ** 0.5d0)
    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.exp((Math.log((F / B_m)) * 0.5)) * Math.pow(2.0, 0.5);
    }
    
    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.exp((math.log((F / B_m)) * 0.5)) * math.pow(2.0, 0.5)
    
    B_m = abs(B)
    A, B_m, C, F = sort([A, B_m, C, F])
    function code(A, B_m, C, F)
    	return Float64(exp(Float64(log(Float64(F / B_m)) * 0.5)) * (2.0 ^ 0.5))
    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 = exp((log((F / B_m)) * 0.5)) * (2.0 ^ 0.5);
    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[Exp[N[(N[Log[N[(F / B$95$m), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * N[Power[2.0, 0.5], $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    B_m = \left|B\right|
    \\
    [A, B_m, C, F] = \mathsf{sort}([A, B_m, C, F])\\
    \\
    e^{\log \left(\frac{F}{B\_m}\right) \cdot 0.5} \cdot {2}^{0.5}
    \end{array}
    
    Derivation
    1. Initial program 19.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 B around inf

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \sqrt{2}, \frac{-1}{2} \cdot \left(\sqrt{\frac{F}{{B}^{3}}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
      6. pow1/2N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot {2}^{\frac{1}{2}}, \frac{-1}{2} \cdot \left(\sqrt{\frac{F}{{B}^{3}}} \cdot \left(\sqrt{2} \cdot \left(A + C\right)\right)\right)\right) \]
    5. Applied rewrites11.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-1, {\left(\frac{F}{B}\right)}^{0.5} \cdot {2}^{0.5}, -0.5 \cdot \left({\left(\frac{F}{\left(B \cdot B\right) \cdot B}\right)}^{0.5} \cdot \left({2}^{0.5} \cdot \left(A + C\right)\right)\right)\right)} \]
    6. Taylor expanded in B around -inf

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

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

        \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \left({-1}^{\left(\frac{2}{2}\right)} \cdot \sqrt{2}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \left({-1}^{1} \cdot \sqrt{2}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \left(-1 \cdot \sqrt{2}\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{F}{B}} \cdot \left(-1 \cdot \color{blue}{\sqrt{2}}\right)\right) \]
      6. pow1/2N/A

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

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

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

        \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \left(-1 \cdot \sqrt{2}\right)\right) \]
      10. pow1/2N/A

        \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \left(-1 \cdot {2}^{\frac{1}{2}}\right)\right) \]
      11. lift-pow.f642.1

        \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{0.5} \cdot \left(-1 \cdot {2}^{0.5}\right)\right) \]
    8. Applied rewrites2.1%

      \[\leadsto -1 \cdot \color{blue}{\left({\left(\frac{F}{B}\right)}^{0.5} \cdot \left(-1 \cdot {2}^{0.5}\right)\right)} \]
    9. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \left(-1 \cdot {2}^{\frac{1}{2}}\right)\right) \]
      2. lift-pow.f64N/A

        \[\leadsto -1 \cdot \left({\left(\frac{F}{B}\right)}^{\frac{1}{2}} \cdot \left(-1 \cdot {\color{blue}{2}}^{\frac{1}{2}}\right)\right) \]
      3. pow-to-expN/A

        \[\leadsto -1 \cdot \left(e^{\log \left(\frac{F}{B}\right) \cdot \frac{1}{2}} \cdot \left(-1 \cdot {\color{blue}{2}}^{\frac{1}{2}}\right)\right) \]
      4. lower-exp.f64N/A

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

        \[\leadsto -1 \cdot \left(e^{\log \left(\frac{F}{B}\right) \cdot \frac{1}{2}} \cdot \left(-1 \cdot {2}^{\frac{1}{2}}\right)\right) \]
      6. lower-log.f64N/A

        \[\leadsto -1 \cdot \left(e^{\log \left(\frac{F}{B}\right) \cdot \frac{1}{2}} \cdot \left(-1 \cdot {2}^{\frac{1}{2}}\right)\right) \]
      7. lift-/.f642.0

        \[\leadsto -1 \cdot \left(e^{\log \left(\frac{F}{B}\right) \cdot 0.5} \cdot \left(-1 \cdot {2}^{0.5}\right)\right) \]
    10. Applied rewrites2.0%

      \[\leadsto -1 \cdot \left(e^{\log \left(\frac{F}{B}\right) \cdot 0.5} \cdot \left(-1 \cdot {\color{blue}{2}}^{0.5}\right)\right) \]
    11. Final simplification2.0%

      \[\leadsto e^{\log \left(\frac{F}{B}\right) \cdot 0.5} \cdot {2}^{0.5} \]
    12. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2025065 
    (FPCore (A B C F)
      :name "ABCF->ab-angle a"
      :precision binary64
      (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (+ (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))