Henrywood and Agarwal, Equation (3)

Percentage Accurate: 73.8% → 91.2%
Time: 10.8s
Alternatives: 16
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \end{array} \]
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
	return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
	return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l):
	return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l)
	return Float64(c0 * sqrt(Float64(A / Float64(V * l))))
end
function tmp = code(c0, A, V, l)
	tmp = c0 * sqrt((A / (V * l)));
end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\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: 73.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \end{array} \]
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
double code(double c0, double A, double V, double l) {
	return c0 * sqrt((A / (V * l)));
}
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    code = c0 * sqrt((a / (v * l)))
end function
public static double code(double c0, double A, double V, double l) {
	return c0 * Math.sqrt((A / (V * l)));
}
def code(c0, A, V, l):
	return c0 * math.sqrt((A / (V * l)))
function code(c0, A, V, l)
	return Float64(c0 * sqrt(Float64(A / Float64(V * l))))
end
function tmp = code(c0, A, V, l)
	tmp = c0 * sqrt((A / (V * l)));
end
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}

Alternative 1: 91.2% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := c0 \cdot \frac{\sqrt{\frac{A}{-\ell}}}{\sqrt{-V}}\\ \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-285}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\ \;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (* c0 (/ (sqrt (/ A (- l))) (sqrt (- V))))))
   (if (<= (* V l) (- INFINITY))
     t_0
     (if (<= (* V l) -1e-285)
       (* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
       (if (<= (* V l) 0.0)
         t_0
         (if (<= (* V l) 5e+304)
           (* c0 (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
           (* c0 (sqrt (/ (/ A V) l)))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = c0 * (sqrt((A / -l)) / sqrt(-V));
	double tmp;
	if ((V * l) <= -((double) INFINITY)) {
		tmp = t_0;
	} else if ((V * l) <= -1e-285) {
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	} else if ((V * l) <= 0.0) {
		tmp = t_0;
	} else if ((V * l) <= 5e+304) {
		tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
	} else {
		tmp = c0 * sqrt(((A / V) / l));
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = c0 * (Math.sqrt((A / -l)) / Math.sqrt(-V));
	double tmp;
	if ((V * l) <= -Double.POSITIVE_INFINITY) {
		tmp = t_0;
	} else if ((V * l) <= -1e-285) {
		tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
	} else if ((V * l) <= 0.0) {
		tmp = t_0;
	} else if ((V * l) <= 5e+304) {
		tmp = c0 * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
	} else {
		tmp = c0 * Math.sqrt(((A / V) / l));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = c0 * (math.sqrt((A / -l)) / math.sqrt(-V))
	tmp = 0
	if (V * l) <= -math.inf:
		tmp = t_0
	elif (V * l) <= -1e-285:
		tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l)))
	elif (V * l) <= 0.0:
		tmp = t_0
	elif (V * l) <= 5e+304:
		tmp = c0 * (1.0 / (math.sqrt((V * l)) / math.sqrt(A)))
	else:
		tmp = c0 * math.sqrt(((A / V) / l))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(c0 * Float64(sqrt(Float64(A / Float64(-l))) / sqrt(Float64(-V))))
	tmp = 0.0
	if (Float64(V * l) <= Float64(-Inf))
		tmp = t_0;
	elseif (Float64(V * l) <= -1e-285)
		tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l)))));
	elseif (Float64(V * l) <= 0.0)
		tmp = t_0;
	elseif (Float64(V * l) <= 5e+304)
		tmp = Float64(c0 * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A))));
	else
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = c0 * (sqrt((A / -l)) / sqrt(-V));
	tmp = 0.0;
	if ((V * l) <= -Inf)
		tmp = t_0;
	elseif ((V * l) <= -1e-285)
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	elseif ((V * l) <= 0.0)
		tmp = t_0;
	elseif ((V * l) <= 5e+304)
		tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
	else
		tmp = c0 * sqrt(((A / V) / l));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[(N[Sqrt[N[(A / (-l)), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -1e-285], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], 5e+304], N[(c0 * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \frac{\sqrt{\frac{A}{-\ell}}}{\sqrt{-V}}\\
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-285}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\

\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\
\;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 V l) < -inf.0 or -1.00000000000000007e-285 < (*.f64 V l) < -0.0

    1. Initial program 36.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity36.3%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac59.6%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr59.6%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. associate-*l/59.7%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot \frac{A}{\ell}}{V}}} \]
      2. *-un-lft-identity59.7%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{\frac{A}{\ell}}}{V}} \]
      3. frac-2neg59.7%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{-\frac{A}{\ell}}{-V}}} \]
      4. sqrt-div36.3%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{-\frac{A}{\ell}}}{\sqrt{-V}}} \]
      5. distribute-neg-frac236.3%

        \[\leadsto c0 \cdot \frac{\sqrt{\color{blue}{\frac{A}{-\ell}}}}{\sqrt{-V}} \]
    6. Applied egg-rr36.3%

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{A}{-\ell}}}{\sqrt{-V}}} \]
    7. Step-by-step derivation
      1. distribute-frac-neg236.3%

        \[\leadsto c0 \cdot \frac{\sqrt{\color{blue}{-\frac{A}{\ell}}}}{\sqrt{-V}} \]
      2. distribute-frac-neg36.3%

        \[\leadsto c0 \cdot \frac{\sqrt{\color{blue}{\frac{-A}{\ell}}}}{\sqrt{-V}} \]
    8. Simplified36.3%

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{-A}{\ell}}}{\sqrt{-V}}} \]

    if -inf.0 < (*.f64 V l) < -1.00000000000000007e-285

    1. Initial program 88.0%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. frac-2neg88.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{-A}{-V \cdot \ell}}} \]
      2. sqrt-div99.4%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{-A}}{\sqrt{-V \cdot \ell}}} \]
      3. *-commutative99.4%

        \[\leadsto c0 \cdot \frac{\sqrt{-A}}{\sqrt{-\color{blue}{\ell \cdot V}}} \]
      4. distribute-rgt-neg-in99.4%

        \[\leadsto c0 \cdot \frac{\sqrt{-A}}{\sqrt{\color{blue}{\ell \cdot \left(-V\right)}}} \]
    4. Applied egg-rr99.4%

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{-A}}{\sqrt{\ell \cdot \left(-V\right)}}} \]

    if -0.0 < (*.f64 V l) < 4.9999999999999997e304

    1. Initial program 77.9%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div98.2%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{A}}{\sqrt{V \cdot \ell}}} \]
      2. clear-num98.2%

        \[\leadsto c0 \cdot \color{blue}{\frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}} \]
    4. Applied egg-rr98.2%

      \[\leadsto c0 \cdot \color{blue}{\frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}} \]

    if 4.9999999999999997e304 < (*.f64 V l)

    1. Initial program 46.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. *-commutative46.3%

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\ell \cdot V}}} \]
      2. associate-/l/76.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]
    3. Simplified76.0%

      \[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}} \]
    4. Add Preprocessing
  3. Recombined 4 regimes into one program.
  4. Final simplification83.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{-\ell}}}{\sqrt{-V}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-285}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{-\ell}}}{\sqrt{-V}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\ \;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 76.4% accurate, 0.3× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq 2 \cdot 10^{-211}:\\ \;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+298}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (* c0 (sqrt (/ A (* V l))))))
   (if (<= t_0 2e-211)
     (/ c0 (sqrt (* l (/ V A))))
     (if (<= t_0 2e+298) t_0 (/ c0 (sqrt (* V (/ l A))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = c0 * sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 2e-211) {
		tmp = c0 / sqrt((l * (V / A)));
	} else if (t_0 <= 2e+298) {
		tmp = t_0;
	} else {
		tmp = c0 / sqrt((V * (l / A)));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = c0 * sqrt((a / (v * l)))
    if (t_0 <= 2d-211) then
        tmp = c0 / sqrt((l * (v / a)))
    else if (t_0 <= 2d+298) then
        tmp = t_0
    else
        tmp = c0 / sqrt((v * (l / a)))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = c0 * Math.sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 2e-211) {
		tmp = c0 / Math.sqrt((l * (V / A)));
	} else if (t_0 <= 2e+298) {
		tmp = t_0;
	} else {
		tmp = c0 / Math.sqrt((V * (l / A)));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = c0 * math.sqrt((A / (V * l)))
	tmp = 0
	if t_0 <= 2e-211:
		tmp = c0 / math.sqrt((l * (V / A)))
	elif t_0 <= 2e+298:
		tmp = t_0
	else:
		tmp = c0 / math.sqrt((V * (l / A)))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l))))
	tmp = 0.0
	if (t_0 <= 2e-211)
		tmp = Float64(c0 / sqrt(Float64(l * Float64(V / A))));
	elseif (t_0 <= 2e+298)
		tmp = t_0;
	else
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = c0 * sqrt((A / (V * l)));
	tmp = 0.0;
	if (t_0 <= 2e-211)
		tmp = c0 / sqrt((l * (V / A)));
	elseif (t_0 <= 2e+298)
		tmp = t_0;
	else
		tmp = c0 / sqrt((V * (l / A)));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-211], N[(c0 / N[Sqrt[N[(l * N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+298], t$95$0, N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-211}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.00000000000000017e-211

    1. Initial program 66.7%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity66.7%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac65.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr65.9%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times66.7%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity66.7%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num66.7%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr66.7%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div66.7%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval66.7%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv66.8%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*65.7%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr65.7%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]
    9. Step-by-step derivation
      1. *-commutative65.7%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell}{A} \cdot V}}} \]
      2. associate-*l/66.8%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
      3. associate-*r/70.7%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\ell \cdot \frac{V}{A}}}} \]
    10. Simplified70.7%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}} \]

    if 2.00000000000000017e-211 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.9999999999999999e298

    1. Initial program 96.0%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing

    if 1.9999999999999999e298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l))))

    1. Initial program 48.9%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity48.9%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac58.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr58.9%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times48.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity48.9%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num48.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr48.9%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div48.9%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval48.9%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv48.9%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*59.0%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr59.0%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 76.9% accurate, 0.3× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+298}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (* c0 (sqrt (/ A (* V l))))))
   (if (<= t_0 0.0)
     (* c0 (sqrt (/ (/ A V) l)))
     (if (<= t_0 2e+298) t_0 (/ c0 (sqrt (* V (/ l A))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = c0 * sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 0.0) {
		tmp = c0 * sqrt(((A / V) / l));
	} else if (t_0 <= 2e+298) {
		tmp = t_0;
	} else {
		tmp = c0 / sqrt((V * (l / A)));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = c0 * sqrt((a / (v * l)))
    if (t_0 <= 0.0d0) then
        tmp = c0 * sqrt(((a / v) / l))
    else if (t_0 <= 2d+298) then
        tmp = t_0
    else
        tmp = c0 / sqrt((v * (l / a)))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = c0 * Math.sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 0.0) {
		tmp = c0 * Math.sqrt(((A / V) / l));
	} else if (t_0 <= 2e+298) {
		tmp = t_0;
	} else {
		tmp = c0 / Math.sqrt((V * (l / A)));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = c0 * math.sqrt((A / (V * l)))
	tmp = 0
	if t_0 <= 0.0:
		tmp = c0 * math.sqrt(((A / V) / l))
	elif t_0 <= 2e+298:
		tmp = t_0
	else:
		tmp = c0 / math.sqrt((V * (l / A)))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l))))
	tmp = 0.0
	if (t_0 <= 0.0)
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	elseif (t_0 <= 2e+298)
		tmp = t_0;
	else
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = c0 * sqrt((A / (V * l)));
	tmp = 0.0;
	if (t_0 <= 0.0)
		tmp = c0 * sqrt(((A / V) / l));
	elseif (t_0 <= 2e+298)
		tmp = t_0;
	else
		tmp = c0 / sqrt((V * (l / A)));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+298], t$95$0, N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 0.0

    1. Initial program 64.9%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. *-commutative64.9%

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\ell \cdot V}}} \]
      2. associate-/l/69.6%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]
    3. Simplified69.6%

      \[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}} \]
    4. Add Preprocessing

    if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.9999999999999999e298

    1. Initial program 96.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing

    if 1.9999999999999999e298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l))))

    1. Initial program 48.9%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity48.9%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac58.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr58.9%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times48.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity48.9%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num48.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr48.9%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div48.9%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval48.9%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv48.9%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*59.0%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr59.0%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 89.7% accurate, 0.3× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;A \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\sqrt{-A}}{\sqrt{-V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (if (<= A -5e-310)
   (* (/ (sqrt (- A)) (sqrt (- V))) (/ c0 (sqrt l)))
   (* c0 (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if (A <= -5e-310) {
		tmp = (sqrt(-A) / sqrt(-V)) * (c0 / sqrt(l));
	} else {
		tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: tmp
    if (a <= (-5d-310)) then
        tmp = (sqrt(-a) / sqrt(-v)) * (c0 / sqrt(l))
    else
        tmp = c0 * (1.0d0 / (sqrt((v * l)) / sqrt(a)))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if (A <= -5e-310) {
		tmp = (Math.sqrt(-A) / Math.sqrt(-V)) * (c0 / Math.sqrt(l));
	} else {
		tmp = c0 * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if A <= -5e-310:
		tmp = (math.sqrt(-A) / math.sqrt(-V)) * (c0 / math.sqrt(l))
	else:
		tmp = c0 * (1.0 / (math.sqrt((V * l)) / math.sqrt(A)))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (A <= -5e-310)
		tmp = Float64(Float64(sqrt(Float64(-A)) / sqrt(Float64(-V))) * Float64(c0 / sqrt(l)));
	else
		tmp = Float64(c0 * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A))));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if (A <= -5e-310)
		tmp = (sqrt(-A) / sqrt(-V)) * (c0 / sqrt(l));
	else
		tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := If[LessEqual[A, -5e-310], N[(N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision] * N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;A \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{\sqrt{-A}}{\sqrt{-V}} \cdot \frac{c0}{\sqrt{\ell}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if A < -4.999999999999985e-310

    1. Initial program 69.8%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*68.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]
      2. sqrt-div32.6%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
      3. associate-*r/32.5%

        \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
    4. Applied egg-rr32.5%

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
    5. Step-by-step derivation
      1. *-commutative32.5%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{A}{V}} \cdot c0}}{\sqrt{\ell}} \]
      2. associate-/l*32.6%

        \[\leadsto \color{blue}{\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}} \]
    6. Simplified32.6%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}} \]
    7. Step-by-step derivation
      1. frac-2neg32.6%

        \[\leadsto \sqrt{\color{blue}{\frac{-A}{-V}}} \cdot \frac{c0}{\sqrt{\ell}} \]
      2. sqrt-div40.0%

        \[\leadsto \color{blue}{\frac{\sqrt{-A}}{\sqrt{-V}}} \cdot \frac{c0}{\sqrt{\ell}} \]
    8. Applied egg-rr40.0%

      \[\leadsto \color{blue}{\frac{\sqrt{-A}}{\sqrt{-V}}} \cdot \frac{c0}{\sqrt{\ell}} \]

    if -4.999999999999985e-310 < A

    1. Initial program 70.6%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div86.1%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{A}}{\sqrt{V \cdot \ell}}} \]
      2. clear-num86.0%

        \[\leadsto c0 \cdot \color{blue}{\frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}} \]
    4. Applied egg-rr86.0%

      \[\leadsto c0 \cdot \color{blue}{\frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 90.8% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+251}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-285}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\ \;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* V l) -1e+251)
   (/ (sqrt (/ A V)) (/ (sqrt l) c0))
   (if (<= (* V l) -1e-285)
     (* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
     (if (<= (* V l) 0.0)
       (/ c0 (sqrt (* V (/ l A))))
       (if (<= (* V l) 5e+304)
         (* c0 (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
         (* c0 (sqrt (/ (/ A V) l))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -1e+251) {
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	} else if ((V * l) <= -1e-285) {
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	} else if ((V * l) <= 0.0) {
		tmp = c0 / sqrt((V * (l / A)));
	} else if ((V * l) <= 5e+304) {
		tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
	} else {
		tmp = c0 * sqrt(((A / V) / l));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: tmp
    if ((v * l) <= (-1d+251)) then
        tmp = sqrt((a / v)) / (sqrt(l) / c0)
    else if ((v * l) <= (-1d-285)) then
        tmp = c0 * (sqrt(-a) / sqrt((v * -l)))
    else if ((v * l) <= 0.0d0) then
        tmp = c0 / sqrt((v * (l / a)))
    else if ((v * l) <= 5d+304) then
        tmp = c0 * (1.0d0 / (sqrt((v * l)) / sqrt(a)))
    else
        tmp = c0 * sqrt(((a / v) / l))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -1e+251) {
		tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
	} else if ((V * l) <= -1e-285) {
		tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
	} else if ((V * l) <= 0.0) {
		tmp = c0 / Math.sqrt((V * (l / A)));
	} else if ((V * l) <= 5e+304) {
		tmp = c0 * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
	} else {
		tmp = c0 * Math.sqrt(((A / V) / l));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if (V * l) <= -1e+251:
		tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0)
	elif (V * l) <= -1e-285:
		tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l)))
	elif (V * l) <= 0.0:
		tmp = c0 / math.sqrt((V * (l / A)))
	elif (V * l) <= 5e+304:
		tmp = c0 * (1.0 / (math.sqrt((V * l)) / math.sqrt(A)))
	else:
		tmp = c0 * math.sqrt(((A / V) / l))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= -1e+251)
		tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0));
	elseif (Float64(V * l) <= -1e-285)
		tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l)))));
	elseif (Float64(V * l) <= 0.0)
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	elseif (Float64(V * l) <= 5e+304)
		tmp = Float64(c0 * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A))));
	else
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if ((V * l) <= -1e+251)
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	elseif ((V * l) <= -1e-285)
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	elseif ((V * l) <= 0.0)
		tmp = c0 / sqrt((V * (l / A)));
	elseif ((V * l) <= 5e+304)
		tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
	else
		tmp = c0 * sqrt(((A / V) / l));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+251], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-285], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+304], N[(c0 * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+251}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\

\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-285}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\

\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\

\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\
\;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 V l) < -1e251

    1. Initial program 38.4%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity38.4%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac55.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr55.0%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times38.4%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity38.4%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num38.4%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr38.4%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. clear-num38.4%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{A}{V \cdot \ell}}} \]
      2. *-un-lft-identity38.4%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      3. *-commutative38.4%

        \[\leadsto c0 \cdot \sqrt{\frac{1 \cdot A}{\color{blue}{\ell \cdot V}}} \]
      4. times-frac55.1%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}} \]
      5. inv-pow55.1%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{{\ell}^{-1}} \cdot \frac{A}{V}} \]
      6. metadata-eval55.1%

        \[\leadsto c0 \cdot \sqrt{{\ell}^{\color{blue}{\left(-0.5 + -0.5\right)}} \cdot \frac{A}{V}} \]
      7. pow-prod-up13.5%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\left({\ell}^{-0.5} \cdot {\ell}^{-0.5}\right)} \cdot \frac{A}{V}} \]
      8. add-sqr-sqrt13.5%

        \[\leadsto c0 \cdot \sqrt{\left({\ell}^{-0.5} \cdot {\ell}^{-0.5}\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{A}{V}}\right)}} \]
      9. swap-sqr13.5%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right) \cdot \left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)}} \]
      10. sqrt-unprod26.0%

        \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{{\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}} \cdot \sqrt{{\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}}\right)} \]
      11. add-sqr-sqrt26.0%

        \[\leadsto c0 \cdot \color{blue}{\left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)} \]
      12. associate-*r*25.8%

        \[\leadsto \color{blue}{\left(c0 \cdot {\ell}^{-0.5}\right) \cdot \sqrt{\frac{A}{V}}} \]
      13. *-commutative25.8%

        \[\leadsto \color{blue}{\left({\ell}^{-0.5} \cdot c0\right)} \cdot \sqrt{\frac{A}{V}} \]
      14. metadata-eval25.8%

        \[\leadsto \left({\ell}^{\color{blue}{\left(-0.5\right)}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      15. pow-flip25.8%

        \[\leadsto \left(\color{blue}{\frac{1}{{\ell}^{0.5}}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      16. pow1/225.8%

        \[\leadsto \left(\frac{1}{\color{blue}{\sqrt{\ell}}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      17. associate-/r/26.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{\ell}}{c0}}} \cdot \sqrt{\frac{A}{V}} \]
      18. associate-*l/26.0%

        \[\leadsto \color{blue}{\frac{1 \cdot \sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]
      19. *-un-lft-identity26.0%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{A}{V}}}}{\frac{\sqrt{\ell}}{c0}} \]
    8. Applied egg-rr26.0%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]

    if -1e251 < (*.f64 V l) < -1.00000000000000007e-285

    1. Initial program 89.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. frac-2neg89.5%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{-A}{-V \cdot \ell}}} \]
      2. sqrt-div99.3%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{-A}}{\sqrt{-V \cdot \ell}}} \]
      3. *-commutative99.3%

        \[\leadsto c0 \cdot \frac{\sqrt{-A}}{\sqrt{-\color{blue}{\ell \cdot V}}} \]
      4. distribute-rgt-neg-in99.3%

        \[\leadsto c0 \cdot \frac{\sqrt{-A}}{\sqrt{\color{blue}{\ell \cdot \left(-V\right)}}} \]
    4. Applied egg-rr99.3%

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{-A}}{\sqrt{\ell \cdot \left(-V\right)}}} \]

    if -1.00000000000000007e-285 < (*.f64 V l) < -0.0

    1. Initial program 39.8%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity39.8%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac63.6%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr63.6%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times39.8%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity39.8%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num39.8%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr39.8%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div39.8%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval39.8%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv39.8%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*63.8%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr63.8%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]

    if -0.0 < (*.f64 V l) < 4.9999999999999997e304

    1. Initial program 77.9%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div98.2%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{A}}{\sqrt{V \cdot \ell}}} \]
      2. clear-num98.2%

        \[\leadsto c0 \cdot \color{blue}{\frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}} \]
    4. Applied egg-rr98.2%

      \[\leadsto c0 \cdot \color{blue}{\frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}} \]

    if 4.9999999999999997e304 < (*.f64 V l)

    1. Initial program 46.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. *-commutative46.3%

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\ell \cdot V}}} \]
      2. associate-/l/76.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]
    3. Simplified76.0%

      \[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}} \]
    4. Add Preprocessing
  3. Recombined 5 regimes into one program.
  4. Final simplification85.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+251}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-285}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\ \;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 86.7% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+138}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-158}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\ \;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* V l) -1e+138)
   (/ (sqrt (/ A V)) (/ (sqrt l) c0))
   (if (<= (* V l) -1e-158)
     (/ c0 (sqrt (/ (* V l) A)))
     (if (<= (* V l) 0.0)
       (/ c0 (sqrt (* V (/ l A))))
       (if (<= (* V l) 5e+304)
         (* c0 (/ 1.0 (/ (sqrt (* V l)) (sqrt A))))
         (* c0 (sqrt (/ (/ A V) l))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -1e+138) {
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	} else if ((V * l) <= -1e-158) {
		tmp = c0 / sqrt(((V * l) / A));
	} else if ((V * l) <= 0.0) {
		tmp = c0 / sqrt((V * (l / A)));
	} else if ((V * l) <= 5e+304) {
		tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
	} else {
		tmp = c0 * sqrt(((A / V) / l));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: tmp
    if ((v * l) <= (-1d+138)) then
        tmp = sqrt((a / v)) / (sqrt(l) / c0)
    else if ((v * l) <= (-1d-158)) then
        tmp = c0 / sqrt(((v * l) / a))
    else if ((v * l) <= 0.0d0) then
        tmp = c0 / sqrt((v * (l / a)))
    else if ((v * l) <= 5d+304) then
        tmp = c0 * (1.0d0 / (sqrt((v * l)) / sqrt(a)))
    else
        tmp = c0 * sqrt(((a / v) / l))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -1e+138) {
		tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
	} else if ((V * l) <= -1e-158) {
		tmp = c0 / Math.sqrt(((V * l) / A));
	} else if ((V * l) <= 0.0) {
		tmp = c0 / Math.sqrt((V * (l / A)));
	} else if ((V * l) <= 5e+304) {
		tmp = c0 * (1.0 / (Math.sqrt((V * l)) / Math.sqrt(A)));
	} else {
		tmp = c0 * Math.sqrt(((A / V) / l));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if (V * l) <= -1e+138:
		tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0)
	elif (V * l) <= -1e-158:
		tmp = c0 / math.sqrt(((V * l) / A))
	elif (V * l) <= 0.0:
		tmp = c0 / math.sqrt((V * (l / A)))
	elif (V * l) <= 5e+304:
		tmp = c0 * (1.0 / (math.sqrt((V * l)) / math.sqrt(A)))
	else:
		tmp = c0 * math.sqrt(((A / V) / l))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= -1e+138)
		tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0));
	elseif (Float64(V * l) <= -1e-158)
		tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A)));
	elseif (Float64(V * l) <= 0.0)
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	elseif (Float64(V * l) <= 5e+304)
		tmp = Float64(c0 * Float64(1.0 / Float64(sqrt(Float64(V * l)) / sqrt(A))));
	else
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if ((V * l) <= -1e+138)
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	elseif ((V * l) <= -1e-158)
		tmp = c0 / sqrt(((V * l) / A));
	elseif ((V * l) <= 0.0)
		tmp = c0 / sqrt((V * (l / A)));
	elseif ((V * l) <= 5e+304)
		tmp = c0 * (1.0 / (sqrt((V * l)) / sqrt(A)));
	else
		tmp = c0 * sqrt(((A / V) / l));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+138], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-158], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+304], N[(c0 * N[(1.0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+138}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\

\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-158}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\

\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\

\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\
\;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 V l) < -1e138

    1. Initial program 51.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity51.2%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac58.3%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr58.3%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times51.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity51.2%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num51.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr51.2%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. clear-num51.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{A}{V \cdot \ell}}} \]
      2. *-un-lft-identity51.2%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      3. *-commutative51.2%

        \[\leadsto c0 \cdot \sqrt{\frac{1 \cdot A}{\color{blue}{\ell \cdot V}}} \]
      4. times-frac60.7%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}} \]
      5. inv-pow60.7%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{{\ell}^{-1}} \cdot \frac{A}{V}} \]
      6. metadata-eval60.7%

        \[\leadsto c0 \cdot \sqrt{{\ell}^{\color{blue}{\left(-0.5 + -0.5\right)}} \cdot \frac{A}{V}} \]
      7. pow-prod-up24.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\left({\ell}^{-0.5} \cdot {\ell}^{-0.5}\right)} \cdot \frac{A}{V}} \]
      8. add-sqr-sqrt23.9%

        \[\leadsto c0 \cdot \sqrt{\left({\ell}^{-0.5} \cdot {\ell}^{-0.5}\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{A}{V}}\right)}} \]
      9. swap-sqr23.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right) \cdot \left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)}} \]
      10. sqrt-unprod33.3%

        \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{{\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}} \cdot \sqrt{{\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}}\right)} \]
      11. add-sqr-sqrt33.5%

        \[\leadsto c0 \cdot \color{blue}{\left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)} \]
      12. associate-*r*33.4%

        \[\leadsto \color{blue}{\left(c0 \cdot {\ell}^{-0.5}\right) \cdot \sqrt{\frac{A}{V}}} \]
      13. *-commutative33.4%

        \[\leadsto \color{blue}{\left({\ell}^{-0.5} \cdot c0\right)} \cdot \sqrt{\frac{A}{V}} \]
      14. metadata-eval33.4%

        \[\leadsto \left({\ell}^{\color{blue}{\left(-0.5\right)}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      15. pow-flip33.4%

        \[\leadsto \left(\color{blue}{\frac{1}{{\ell}^{0.5}}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      16. pow1/233.4%

        \[\leadsto \left(\frac{1}{\color{blue}{\sqrt{\ell}}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      17. associate-/r/33.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{\ell}}{c0}}} \cdot \sqrt{\frac{A}{V}} \]
      18. associate-*l/33.5%

        \[\leadsto \color{blue}{\frac{1 \cdot \sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]
      19. *-un-lft-identity33.5%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{A}{V}}}}{\frac{\sqrt{\ell}}{c0}} \]
    8. Applied egg-rr33.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]

    if -1e138 < (*.f64 V l) < -1.00000000000000006e-158

    1. Initial program 95.8%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity95.8%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac69.8%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr69.8%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times95.8%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity95.8%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num95.8%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr95.8%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div95.8%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval95.8%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv95.9%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*68.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr68.3%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]
    9. Step-by-step derivation
      1. *-commutative68.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell}{A} \cdot V}}} \]
      2. associate-*l/95.9%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
      3. associate-*r/77.5%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\ell \cdot \frac{V}{A}}}} \]
    10. Simplified77.5%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}} \]
    11. Step-by-step derivation
      1. associate-*r/95.9%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
    12. Applied egg-rr95.9%

      \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]

    if -1.00000000000000006e-158 < (*.f64 V l) < -0.0

    1. Initial program 52.0%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity52.0%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac70.1%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr70.1%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times52.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity52.0%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num52.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr52.0%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div52.1%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval52.1%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv52.0%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*70.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr70.3%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]

    if -0.0 < (*.f64 V l) < 4.9999999999999997e304

    1. Initial program 77.9%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sqrt-div98.2%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{A}}{\sqrt{V \cdot \ell}}} \]
      2. clear-num98.2%

        \[\leadsto c0 \cdot \color{blue}{\frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}} \]
    4. Applied egg-rr98.2%

      \[\leadsto c0 \cdot \color{blue}{\frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}} \]

    if 4.9999999999999997e304 < (*.f64 V l)

    1. Initial program 46.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. *-commutative46.3%

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\ell \cdot V}}} \]
      2. associate-/l/76.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]
    3. Simplified76.0%

      \[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}} \]
    4. Add Preprocessing
  3. Recombined 5 regimes into one program.
  4. Final simplification80.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+138}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-158}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\ \;\;\;\;c0 \cdot \frac{1}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 85.5% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+138}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-158}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* V l) -1e+138)
   (/ (sqrt (/ A V)) (/ (sqrt l) c0))
   (if (<= (* V l) -1e-158)
     (/ c0 (sqrt (/ (* V l) A)))
     (if (<= (* V l) 0.0)
       (/ c0 (sqrt (* V (/ l A))))
       (if (<= (* V l) 5e+304)
         (/ (* c0 (sqrt A)) (sqrt (* V l)))
         (* c0 (sqrt (/ (/ A V) l))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -1e+138) {
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	} else if ((V * l) <= -1e-158) {
		tmp = c0 / sqrt(((V * l) / A));
	} else if ((V * l) <= 0.0) {
		tmp = c0 / sqrt((V * (l / A)));
	} else if ((V * l) <= 5e+304) {
		tmp = (c0 * sqrt(A)) / sqrt((V * l));
	} else {
		tmp = c0 * sqrt(((A / V) / l));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: tmp
    if ((v * l) <= (-1d+138)) then
        tmp = sqrt((a / v)) / (sqrt(l) / c0)
    else if ((v * l) <= (-1d-158)) then
        tmp = c0 / sqrt(((v * l) / a))
    else if ((v * l) <= 0.0d0) then
        tmp = c0 / sqrt((v * (l / a)))
    else if ((v * l) <= 5d+304) then
        tmp = (c0 * sqrt(a)) / sqrt((v * l))
    else
        tmp = c0 * sqrt(((a / v) / l))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -1e+138) {
		tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
	} else if ((V * l) <= -1e-158) {
		tmp = c0 / Math.sqrt(((V * l) / A));
	} else if ((V * l) <= 0.0) {
		tmp = c0 / Math.sqrt((V * (l / A)));
	} else if ((V * l) <= 5e+304) {
		tmp = (c0 * Math.sqrt(A)) / Math.sqrt((V * l));
	} else {
		tmp = c0 * Math.sqrt(((A / V) / l));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if (V * l) <= -1e+138:
		tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0)
	elif (V * l) <= -1e-158:
		tmp = c0 / math.sqrt(((V * l) / A))
	elif (V * l) <= 0.0:
		tmp = c0 / math.sqrt((V * (l / A)))
	elif (V * l) <= 5e+304:
		tmp = (c0 * math.sqrt(A)) / math.sqrt((V * l))
	else:
		tmp = c0 * math.sqrt(((A / V) / l))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= -1e+138)
		tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0));
	elseif (Float64(V * l) <= -1e-158)
		tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A)));
	elseif (Float64(V * l) <= 0.0)
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	elseif (Float64(V * l) <= 5e+304)
		tmp = Float64(Float64(c0 * sqrt(A)) / sqrt(Float64(V * l)));
	else
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if ((V * l) <= -1e+138)
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	elseif ((V * l) <= -1e-158)
		tmp = c0 / sqrt(((V * l) / A));
	elseif ((V * l) <= 0.0)
		tmp = c0 / sqrt((V * (l / A)));
	elseif ((V * l) <= 5e+304)
		tmp = (c0 * sqrt(A)) / sqrt((V * l));
	else
		tmp = c0 * sqrt(((A / V) / l));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], -1e+138], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-158], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e+304], N[(N[(c0 * N[Sqrt[A], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+138}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\

\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-158}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\

\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\

\mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\
\;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 V l) < -1e138

    1. Initial program 51.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity51.2%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac58.3%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr58.3%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times51.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity51.2%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num51.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr51.2%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. clear-num51.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{A}{V \cdot \ell}}} \]
      2. *-un-lft-identity51.2%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      3. *-commutative51.2%

        \[\leadsto c0 \cdot \sqrt{\frac{1 \cdot A}{\color{blue}{\ell \cdot V}}} \]
      4. times-frac60.7%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}} \]
      5. inv-pow60.7%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{{\ell}^{-1}} \cdot \frac{A}{V}} \]
      6. metadata-eval60.7%

        \[\leadsto c0 \cdot \sqrt{{\ell}^{\color{blue}{\left(-0.5 + -0.5\right)}} \cdot \frac{A}{V}} \]
      7. pow-prod-up24.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\left({\ell}^{-0.5} \cdot {\ell}^{-0.5}\right)} \cdot \frac{A}{V}} \]
      8. add-sqr-sqrt23.9%

        \[\leadsto c0 \cdot \sqrt{\left({\ell}^{-0.5} \cdot {\ell}^{-0.5}\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{A}{V}}\right)}} \]
      9. swap-sqr23.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right) \cdot \left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)}} \]
      10. sqrt-unprod33.3%

        \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{{\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}} \cdot \sqrt{{\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}}\right)} \]
      11. add-sqr-sqrt33.5%

        \[\leadsto c0 \cdot \color{blue}{\left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)} \]
      12. associate-*r*33.4%

        \[\leadsto \color{blue}{\left(c0 \cdot {\ell}^{-0.5}\right) \cdot \sqrt{\frac{A}{V}}} \]
      13. *-commutative33.4%

        \[\leadsto \color{blue}{\left({\ell}^{-0.5} \cdot c0\right)} \cdot \sqrt{\frac{A}{V}} \]
      14. metadata-eval33.4%

        \[\leadsto \left({\ell}^{\color{blue}{\left(-0.5\right)}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      15. pow-flip33.4%

        \[\leadsto \left(\color{blue}{\frac{1}{{\ell}^{0.5}}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      16. pow1/233.4%

        \[\leadsto \left(\frac{1}{\color{blue}{\sqrt{\ell}}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      17. associate-/r/33.5%

        \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{\ell}}{c0}}} \cdot \sqrt{\frac{A}{V}} \]
      18. associate-*l/33.5%

        \[\leadsto \color{blue}{\frac{1 \cdot \sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]
      19. *-un-lft-identity33.5%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{A}{V}}}}{\frac{\sqrt{\ell}}{c0}} \]
    8. Applied egg-rr33.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]

    if -1e138 < (*.f64 V l) < -1.00000000000000006e-158

    1. Initial program 95.8%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity95.8%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac69.8%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr69.8%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times95.8%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity95.8%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num95.8%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr95.8%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div95.8%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval95.8%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv95.9%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*68.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr68.3%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]
    9. Step-by-step derivation
      1. *-commutative68.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell}{A} \cdot V}}} \]
      2. associate-*l/95.9%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
      3. associate-*r/77.5%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\ell \cdot \frac{V}{A}}}} \]
    10. Simplified77.5%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}} \]
    11. Step-by-step derivation
      1. associate-*r/95.9%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
    12. Applied egg-rr95.9%

      \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]

    if -1.00000000000000006e-158 < (*.f64 V l) < -0.0

    1. Initial program 52.0%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity52.0%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac70.1%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr70.1%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times52.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity52.0%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num52.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr52.0%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div52.1%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval52.1%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv52.0%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*70.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr70.3%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]

    if -0.0 < (*.f64 V l) < 4.9999999999999997e304

    1. Initial program 77.9%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative77.9%

        \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
      2. sqrt-div98.2%

        \[\leadsto \color{blue}{\frac{\sqrt{A}}{\sqrt{V \cdot \ell}}} \cdot c0 \]
      3. associate-*l/96.7%

        \[\leadsto \color{blue}{\frac{\sqrt{A} \cdot c0}{\sqrt{V \cdot \ell}}} \]
    4. Applied egg-rr96.7%

      \[\leadsto \color{blue}{\frac{\sqrt{A} \cdot c0}{\sqrt{V \cdot \ell}}} \]

    if 4.9999999999999997e304 < (*.f64 V l)

    1. Initial program 46.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. *-commutative46.3%

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\ell \cdot V}}} \]
      2. associate-/l/76.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]
    3. Simplified76.0%

      \[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}} \]
    4. Add Preprocessing
  3. Recombined 5 regimes into one program.
  4. Final simplification80.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+138}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-158}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+304}:\\ \;\;\;\;\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 77.3% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* V l))))
   (if (<= t_0 0.0)
     (/ (sqrt (/ A V)) (/ (sqrt l) c0))
     (if (<= t_0 4e+301)
       (* c0 (sqrt t_0))
       (sqrt (/ (* c0 (* A (/ c0 l))) V))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	} else if (t_0 <= 4e+301) {
		tmp = c0 * sqrt(t_0);
	} else {
		tmp = sqrt(((c0 * (A * (c0 / l))) / V));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a / (v * l)
    if (t_0 <= 0.0d0) then
        tmp = sqrt((a / v)) / (sqrt(l) / c0)
    else if (t_0 <= 4d+301) then
        tmp = c0 * sqrt(t_0)
    else
        tmp = sqrt(((c0 * (a * (c0 / l))) / v))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
	} else if (t_0 <= 4e+301) {
		tmp = c0 * Math.sqrt(t_0);
	} else {
		tmp = Math.sqrt(((c0 * (A * (c0 / l))) / V));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	tmp = 0
	if t_0 <= 0.0:
		tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0)
	elif t_0 <= 4e+301:
		tmp = c0 * math.sqrt(t_0)
	else:
		tmp = math.sqrt(((c0 * (A * (c0 / l))) / V))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	tmp = 0.0
	if (t_0 <= 0.0)
		tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0));
	elseif (t_0 <= 4e+301)
		tmp = Float64(c0 * sqrt(t_0));
	else
		tmp = sqrt(Float64(Float64(c0 * Float64(A * Float64(c0 / l))) / V));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	tmp = 0.0;
	if (t_0 <= 0.0)
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	elseif (t_0 <= 4e+301)
		tmp = c0 * sqrt(t_0);
	else
		tmp = sqrt(((c0 * (A * (c0 / l))) / V));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+301], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0 * N[(A * N[(c0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\

\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 A (*.f64 V l)) < 0.0

    1. Initial program 34.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity34.5%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac49.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr49.0%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times34.5%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity34.5%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num34.5%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr34.5%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. clear-num34.5%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{A}{V \cdot \ell}}} \]
      2. *-un-lft-identity34.5%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      3. *-commutative34.5%

        \[\leadsto c0 \cdot \sqrt{\frac{1 \cdot A}{\color{blue}{\ell \cdot V}}} \]
      4. times-frac49.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}} \]
      5. inv-pow49.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{{\ell}^{-1}} \cdot \frac{A}{V}} \]
      6. metadata-eval49.0%

        \[\leadsto c0 \cdot \sqrt{{\ell}^{\color{blue}{\left(-0.5 + -0.5\right)}} \cdot \frac{A}{V}} \]
      7. pow-prod-up21.9%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\left({\ell}^{-0.5} \cdot {\ell}^{-0.5}\right)} \cdot \frac{A}{V}} \]
      8. add-sqr-sqrt22.0%

        \[\leadsto c0 \cdot \sqrt{\left({\ell}^{-0.5} \cdot {\ell}^{-0.5}\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{A}{V}}\right)}} \]
      9. swap-sqr22.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right) \cdot \left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)}} \]
      10. sqrt-unprod39.7%

        \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{{\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}} \cdot \sqrt{{\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}}\right)} \]
      11. add-sqr-sqrt39.9%

        \[\leadsto c0 \cdot \color{blue}{\left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)} \]
      12. associate-*r*39.9%

        \[\leadsto \color{blue}{\left(c0 \cdot {\ell}^{-0.5}\right) \cdot \sqrt{\frac{A}{V}}} \]
      13. *-commutative39.9%

        \[\leadsto \color{blue}{\left({\ell}^{-0.5} \cdot c0\right)} \cdot \sqrt{\frac{A}{V}} \]
      14. metadata-eval39.9%

        \[\leadsto \left({\ell}^{\color{blue}{\left(-0.5\right)}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      15. pow-flip39.8%

        \[\leadsto \left(\color{blue}{\frac{1}{{\ell}^{0.5}}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      16. pow1/239.8%

        \[\leadsto \left(\frac{1}{\color{blue}{\sqrt{\ell}}} \cdot c0\right) \cdot \sqrt{\frac{A}{V}} \]
      17. associate-/r/39.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{\ell}}{c0}}} \cdot \sqrt{\frac{A}{V}} \]
      18. associate-*l/39.8%

        \[\leadsto \color{blue}{\frac{1 \cdot \sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]
      19. *-un-lft-identity39.8%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{A}{V}}}}{\frac{\sqrt{\ell}}{c0}} \]
    8. Applied egg-rr39.8%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]

    if 0.0 < (/.f64 A (*.f64 V l)) < 4.00000000000000021e301

    1. Initial program 98.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing

    if 4.00000000000000021e301 < (/.f64 A (*.f64 V l))

    1. Initial program 35.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt20.5%

        \[\leadsto \color{blue}{\sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}}} \]
      2. sqrt-unprod20.7%

        \[\leadsto \color{blue}{\sqrt{\left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)}} \]
      3. *-commutative20.7%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)} \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)} \]
      4. *-commutative20.7%

        \[\leadsto \sqrt{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)}} \]
      5. swap-sqr20.4%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot c0\right)}} \]
      6. add-sqr-sqrt20.4%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{V \cdot \ell}} \cdot \left(c0 \cdot c0\right)} \]
      7. pow220.4%

        \[\leadsto \sqrt{\frac{A}{V \cdot \ell} \cdot \color{blue}{{c0}^{2}}} \]
    4. Applied egg-rr20.4%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell} \cdot {c0}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*l/26.0%

        \[\leadsto \sqrt{\color{blue}{\frac{A \cdot {c0}^{2}}{V \cdot \ell}}} \]
      2. *-commutative26.0%

        \[\leadsto \sqrt{\frac{A \cdot {c0}^{2}}{\color{blue}{\ell \cdot V}}} \]
      3. times-frac31.3%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    6. Simplified31.3%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    7. Step-by-step derivation
      1. unpow231.3%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \frac{\color{blue}{c0 \cdot c0}}{V}} \]
      2. associate-/l*31.3%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    8. Applied egg-rr31.3%

      \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*33.2%

        \[\leadsto \sqrt{\color{blue}{\left(\frac{A}{\ell} \cdot c0\right) \cdot \frac{c0}{V}}} \]
      2. associate-*r/33.3%

        \[\leadsto \sqrt{\color{blue}{\frac{\left(\frac{A}{\ell} \cdot c0\right) \cdot c0}{V}}} \]
      3. *-commutative33.3%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right)} \cdot c0}{V}} \]
    10. Applied egg-rr33.3%

      \[\leadsto \sqrt{\color{blue}{\frac{\left(c0 \cdot \frac{A}{\ell}\right) \cdot c0}{V}}} \]
    11. Taylor expanded in c0 around 0 40.5%

      \[\leadsto \sqrt{\frac{\color{blue}{\frac{A \cdot c0}{\ell}} \cdot c0}{V}} \]
    12. Step-by-step derivation
      1. associate-/l*38.8%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(A \cdot \frac{c0}{\ell}\right)} \cdot c0}{V}} \]
    13. Simplified38.8%

      \[\leadsto \sqrt{\frac{\color{blue}{\left(A \cdot \frac{c0}{\ell}\right)} \cdot c0}{V}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 0:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;\frac{A}{V \cdot \ell} \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 77.3% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* V l))))
   (if (<= t_0 0.0)
     (* (/ c0 (sqrt l)) (sqrt (/ A V)))
     (if (<= t_0 4e+301)
       (* c0 (sqrt t_0))
       (sqrt (/ (* c0 (* A (/ c0 l))) V))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	} else if (t_0 <= 4e+301) {
		tmp = c0 * sqrt(t_0);
	} else {
		tmp = sqrt(((c0 * (A * (c0 / l))) / V));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a / (v * l)
    if (t_0 <= 0.0d0) then
        tmp = (c0 / sqrt(l)) * sqrt((a / v))
    else if (t_0 <= 4d+301) then
        tmp = c0 * sqrt(t_0)
    else
        tmp = sqrt(((c0 * (a * (c0 / l))) / v))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
	} else if (t_0 <= 4e+301) {
		tmp = c0 * Math.sqrt(t_0);
	} else {
		tmp = Math.sqrt(((c0 * (A * (c0 / l))) / V));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	tmp = 0
	if t_0 <= 0.0:
		tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V))
	elif t_0 <= 4e+301:
		tmp = c0 * math.sqrt(t_0)
	else:
		tmp = math.sqrt(((c0 * (A * (c0 / l))) / V))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	tmp = 0.0
	if (t_0 <= 0.0)
		tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V)));
	elseif (t_0 <= 4e+301)
		tmp = Float64(c0 * sqrt(t_0));
	else
		tmp = sqrt(Float64(Float64(c0 * Float64(A * Float64(c0 / l))) / V));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	tmp = 0.0;
	if (t_0 <= 0.0)
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	elseif (t_0 <= 4e+301)
		tmp = c0 * sqrt(t_0);
	else
		tmp = sqrt(((c0 * (A * (c0 / l))) / V));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+301], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0 * N[(A * N[(c0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\

\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 A (*.f64 V l)) < 0.0

    1. Initial program 34.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*49.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]
      2. sqrt-div39.8%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
      3. associate-*r/38.3%

        \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
    4. Applied egg-rr38.3%

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
    5. Step-by-step derivation
      1. *-commutative38.3%

        \[\leadsto \frac{\color{blue}{\sqrt{\frac{A}{V}} \cdot c0}}{\sqrt{\ell}} \]
      2. associate-/l*39.8%

        \[\leadsto \color{blue}{\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}} \]
    6. Simplified39.8%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}} \]

    if 0.0 < (/.f64 A (*.f64 V l)) < 4.00000000000000021e301

    1. Initial program 98.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing

    if 4.00000000000000021e301 < (/.f64 A (*.f64 V l))

    1. Initial program 35.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt20.5%

        \[\leadsto \color{blue}{\sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}}} \]
      2. sqrt-unprod20.7%

        \[\leadsto \color{blue}{\sqrt{\left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)}} \]
      3. *-commutative20.7%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)} \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)} \]
      4. *-commutative20.7%

        \[\leadsto \sqrt{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)}} \]
      5. swap-sqr20.4%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot c0\right)}} \]
      6. add-sqr-sqrt20.4%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{V \cdot \ell}} \cdot \left(c0 \cdot c0\right)} \]
      7. pow220.4%

        \[\leadsto \sqrt{\frac{A}{V \cdot \ell} \cdot \color{blue}{{c0}^{2}}} \]
    4. Applied egg-rr20.4%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell} \cdot {c0}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*l/26.0%

        \[\leadsto \sqrt{\color{blue}{\frac{A \cdot {c0}^{2}}{V \cdot \ell}}} \]
      2. *-commutative26.0%

        \[\leadsto \sqrt{\frac{A \cdot {c0}^{2}}{\color{blue}{\ell \cdot V}}} \]
      3. times-frac31.3%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    6. Simplified31.3%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    7. Step-by-step derivation
      1. unpow231.3%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \frac{\color{blue}{c0 \cdot c0}}{V}} \]
      2. associate-/l*31.3%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    8. Applied egg-rr31.3%

      \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*33.2%

        \[\leadsto \sqrt{\color{blue}{\left(\frac{A}{\ell} \cdot c0\right) \cdot \frac{c0}{V}}} \]
      2. associate-*r/33.3%

        \[\leadsto \sqrt{\color{blue}{\frac{\left(\frac{A}{\ell} \cdot c0\right) \cdot c0}{V}}} \]
      3. *-commutative33.3%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right)} \cdot c0}{V}} \]
    10. Applied egg-rr33.3%

      \[\leadsto \sqrt{\color{blue}{\frac{\left(c0 \cdot \frac{A}{\ell}\right) \cdot c0}{V}}} \]
    11. Taylor expanded in c0 around 0 40.5%

      \[\leadsto \sqrt{\frac{\color{blue}{\frac{A \cdot c0}{\ell}} \cdot c0}{V}} \]
    12. Step-by-step derivation
      1. associate-/l*38.8%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(A \cdot \frac{c0}{\ell}\right)} \cdot c0}{V}} \]
    13. Simplified38.8%

      \[\leadsto \sqrt{\frac{\color{blue}{\left(A \cdot \frac{c0}{\ell}\right)} \cdot c0}{V}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 0:\\ \;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\ \mathbf{elif}\;\frac{A}{V \cdot \ell} \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 77.4% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* V l))))
   (if (<= t_0 0.0)
     (* c0 (/ (sqrt (/ A V)) (sqrt l)))
     (if (<= t_0 4e+301)
       (* c0 (sqrt t_0))
       (sqrt (/ (* c0 (* A (/ c0 l))) V))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = c0 * (sqrt((A / V)) / sqrt(l));
	} else if (t_0 <= 4e+301) {
		tmp = c0 * sqrt(t_0);
	} else {
		tmp = sqrt(((c0 * (A * (c0 / l))) / V));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a / (v * l)
    if (t_0 <= 0.0d0) then
        tmp = c0 * (sqrt((a / v)) / sqrt(l))
    else if (t_0 <= 4d+301) then
        tmp = c0 * sqrt(t_0)
    else
        tmp = sqrt(((c0 * (a * (c0 / l))) / v))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
	} else if (t_0 <= 4e+301) {
		tmp = c0 * Math.sqrt(t_0);
	} else {
		tmp = Math.sqrt(((c0 * (A * (c0 / l))) / V));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	tmp = 0
	if t_0 <= 0.0:
		tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l))
	elif t_0 <= 4e+301:
		tmp = c0 * math.sqrt(t_0)
	else:
		tmp = math.sqrt(((c0 * (A * (c0 / l))) / V))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	tmp = 0.0
	if (t_0 <= 0.0)
		tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l)));
	elseif (t_0 <= 4e+301)
		tmp = Float64(c0 * sqrt(t_0));
	else
		tmp = sqrt(Float64(Float64(c0 * Float64(A * Float64(c0 / l))) / V));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	tmp = 0.0;
	if (t_0 <= 0.0)
		tmp = c0 * (sqrt((A / V)) / sqrt(l));
	elseif (t_0 <= 4e+301)
		tmp = c0 * sqrt(t_0);
	else
		tmp = sqrt(((c0 * (A * (c0 / l))) / V));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+301], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0 * N[(A * N[(c0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\

\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 A (*.f64 V l)) < 0.0

    1. Initial program 34.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*49.0%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]
      2. sqrt-div39.8%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
      3. associate-*r/38.3%

        \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
    4. Applied egg-rr38.3%

      \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
    5. Step-by-step derivation
      1. associate-/l*39.8%

        \[\leadsto \color{blue}{c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
    6. Simplified39.8%

      \[\leadsto \color{blue}{c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]

    if 0.0 < (/.f64 A (*.f64 V l)) < 4.00000000000000021e301

    1. Initial program 98.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing

    if 4.00000000000000021e301 < (/.f64 A (*.f64 V l))

    1. Initial program 35.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt20.5%

        \[\leadsto \color{blue}{\sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}}} \]
      2. sqrt-unprod20.7%

        \[\leadsto \color{blue}{\sqrt{\left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)}} \]
      3. *-commutative20.7%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)} \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)} \]
      4. *-commutative20.7%

        \[\leadsto \sqrt{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)}} \]
      5. swap-sqr20.4%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot c0\right)}} \]
      6. add-sqr-sqrt20.4%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{V \cdot \ell}} \cdot \left(c0 \cdot c0\right)} \]
      7. pow220.4%

        \[\leadsto \sqrt{\frac{A}{V \cdot \ell} \cdot \color{blue}{{c0}^{2}}} \]
    4. Applied egg-rr20.4%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell} \cdot {c0}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*l/26.0%

        \[\leadsto \sqrt{\color{blue}{\frac{A \cdot {c0}^{2}}{V \cdot \ell}}} \]
      2. *-commutative26.0%

        \[\leadsto \sqrt{\frac{A \cdot {c0}^{2}}{\color{blue}{\ell \cdot V}}} \]
      3. times-frac31.3%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    6. Simplified31.3%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    7. Step-by-step derivation
      1. unpow231.3%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \frac{\color{blue}{c0 \cdot c0}}{V}} \]
      2. associate-/l*31.3%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    8. Applied egg-rr31.3%

      \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*33.2%

        \[\leadsto \sqrt{\color{blue}{\left(\frac{A}{\ell} \cdot c0\right) \cdot \frac{c0}{V}}} \]
      2. associate-*r/33.3%

        \[\leadsto \sqrt{\color{blue}{\frac{\left(\frac{A}{\ell} \cdot c0\right) \cdot c0}{V}}} \]
      3. *-commutative33.3%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right)} \cdot c0}{V}} \]
    10. Applied egg-rr33.3%

      \[\leadsto \sqrt{\color{blue}{\frac{\left(c0 \cdot \frac{A}{\ell}\right) \cdot c0}{V}}} \]
    11. Taylor expanded in c0 around 0 40.5%

      \[\leadsto \sqrt{\frac{\color{blue}{\frac{A \cdot c0}{\ell}} \cdot c0}{V}} \]
    12. Step-by-step derivation
      1. associate-/l*38.8%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(A \cdot \frac{c0}{\ell}\right)} \cdot c0}{V}} \]
    13. Simplified38.8%

      \[\leadsto \sqrt{\frac{\color{blue}{\left(A \cdot \frac{c0}{\ell}\right)} \cdot c0}{V}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 0:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;\frac{A}{V \cdot \ell} \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 71.4% accurate, 0.8× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t\_0 \leq 2 \cdot 10^{-235} \lor \neg \left(t\_0 \leq 10^{+308}\right):\\ \;\;\;\;\sqrt{\left(c0 \cdot \frac{A}{\ell}\right) \cdot \frac{c0}{V}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* V l))))
   (if (or (<= t_0 2e-235) (not (<= t_0 1e+308)))
     (sqrt (* (* c0 (/ A l)) (/ c0 V)))
     (/ c0 (sqrt (/ (* V l) A))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if ((t_0 <= 2e-235) || !(t_0 <= 1e+308)) {
		tmp = sqrt(((c0 * (A / l)) * (c0 / V)));
	} else {
		tmp = c0 / sqrt(((V * l) / A));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a / (v * l)
    if ((t_0 <= 2d-235) .or. (.not. (t_0 <= 1d+308))) then
        tmp = sqrt(((c0 * (a / l)) * (c0 / v)))
    else
        tmp = c0 / sqrt(((v * l) / a))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if ((t_0 <= 2e-235) || !(t_0 <= 1e+308)) {
		tmp = Math.sqrt(((c0 * (A / l)) * (c0 / V)));
	} else {
		tmp = c0 / Math.sqrt(((V * l) / A));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	tmp = 0
	if (t_0 <= 2e-235) or not (t_0 <= 1e+308):
		tmp = math.sqrt(((c0 * (A / l)) * (c0 / V)))
	else:
		tmp = c0 / math.sqrt(((V * l) / A))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	tmp = 0.0
	if ((t_0 <= 2e-235) || !(t_0 <= 1e+308))
		tmp = sqrt(Float64(Float64(c0 * Float64(A / l)) * Float64(c0 / V)));
	else
		tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	tmp = 0.0;
	if ((t_0 <= 2e-235) || ~((t_0 <= 1e+308)))
		tmp = sqrt(((c0 * (A / l)) * (c0 / V)));
	else
		tmp = c0 / sqrt(((V * l) / A));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 2e-235], N[Not[LessEqual[t$95$0, 1e+308]], $MachinePrecision]], N[Sqrt[N[(N[(c0 * N[(A / l), $MachinePrecision]), $MachinePrecision] * N[(c0 / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-235} \lor \neg \left(t\_0 \leq 10^{+308}\right):\\
\;\;\;\;\sqrt{\left(c0 \cdot \frac{A}{\ell}\right) \cdot \frac{c0}{V}}\\

\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 A (*.f64 V l)) < 1.9999999999999999e-235 or 1e308 < (/.f64 A (*.f64 V l))

    1. Initial program 38.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt29.4%

        \[\leadsto \color{blue}{\sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}}} \]
      2. sqrt-unprod29.5%

        \[\leadsto \color{blue}{\sqrt{\left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)}} \]
      3. *-commutative29.5%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)} \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)} \]
      4. *-commutative29.5%

        \[\leadsto \sqrt{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)}} \]
      5. swap-sqr27.4%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot c0\right)}} \]
      6. add-sqr-sqrt27.4%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{V \cdot \ell}} \cdot \left(c0 \cdot c0\right)} \]
      7. pow227.4%

        \[\leadsto \sqrt{\frac{A}{V \cdot \ell} \cdot \color{blue}{{c0}^{2}}} \]
    4. Applied egg-rr27.4%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell} \cdot {c0}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*l/32.9%

        \[\leadsto \sqrt{\color{blue}{\frac{A \cdot {c0}^{2}}{V \cdot \ell}}} \]
      2. *-commutative32.9%

        \[\leadsto \sqrt{\frac{A \cdot {c0}^{2}}{\color{blue}{\ell \cdot V}}} \]
      3. times-frac35.2%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    6. Simplified35.2%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    7. Step-by-step derivation
      1. unpow235.2%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \frac{\color{blue}{c0 \cdot c0}}{V}} \]
      2. associate-/l*36.9%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    8. Applied egg-rr36.9%

      \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*41.0%

        \[\leadsto \sqrt{\color{blue}{\left(\frac{A}{\ell} \cdot c0\right) \cdot \frac{c0}{V}}} \]
      2. associate-*r/39.9%

        \[\leadsto \sqrt{\color{blue}{\frac{\left(\frac{A}{\ell} \cdot c0\right) \cdot c0}{V}}} \]
      3. *-commutative39.9%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right)} \cdot c0}{V}} \]
    10. Applied egg-rr39.9%

      \[\leadsto \sqrt{\color{blue}{\frac{\left(c0 \cdot \frac{A}{\ell}\right) \cdot c0}{V}}} \]
    11. Step-by-step derivation
      1. associate-/l*41.0%

        \[\leadsto \sqrt{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right) \cdot \frac{c0}{V}}} \]
    12. Applied egg-rr41.0%

      \[\leadsto \sqrt{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right) \cdot \frac{c0}{V}}} \]

    if 1.9999999999999999e-235 < (/.f64 A (*.f64 V l)) < 1e308

    1. Initial program 99.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity99.3%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac84.5%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr84.5%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times99.3%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity99.3%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num99.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr99.2%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div99.2%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval99.2%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv99.3%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*84.2%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr84.2%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]
    9. Step-by-step derivation
      1. *-commutative84.2%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell}{A} \cdot V}}} \]
      2. associate-*l/99.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
      3. associate-*r/86.5%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\ell \cdot \frac{V}{A}}}} \]
    10. Simplified86.5%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}} \]
    11. Step-by-step derivation
      1. associate-*r/99.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
    12. Applied egg-rr99.3%

      \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 2 \cdot 10^{-235} \lor \neg \left(\frac{A}{V \cdot \ell} \leq 10^{+308}\right):\\ \;\;\;\;\sqrt{\left(c0 \cdot \frac{A}{\ell}\right) \cdot \frac{c0}{V}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 71.5% accurate, 0.8× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t\_0 \leq 2 \cdot 10^{-235}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \frac{A}{\ell}}{\frac{V}{c0}}}\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* V l))))
   (if (<= t_0 2e-235)
     (sqrt (/ (* c0 (/ A l)) (/ V c0)))
     (if (<= t_0 4e+301)
       (/ c0 (sqrt (/ (* V l) A)))
       (sqrt (/ (* c0 (* A (/ c0 l))) V))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 2e-235) {
		tmp = sqrt(((c0 * (A / l)) / (V / c0)));
	} else if (t_0 <= 4e+301) {
		tmp = c0 / sqrt(((V * l) / A));
	} else {
		tmp = sqrt(((c0 * (A * (c0 / l))) / V));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a / (v * l)
    if (t_0 <= 2d-235) then
        tmp = sqrt(((c0 * (a / l)) / (v / c0)))
    else if (t_0 <= 4d+301) then
        tmp = c0 / sqrt(((v * l) / a))
    else
        tmp = sqrt(((c0 * (a * (c0 / l))) / v))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 2e-235) {
		tmp = Math.sqrt(((c0 * (A / l)) / (V / c0)));
	} else if (t_0 <= 4e+301) {
		tmp = c0 / Math.sqrt(((V * l) / A));
	} else {
		tmp = Math.sqrt(((c0 * (A * (c0 / l))) / V));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	tmp = 0
	if t_0 <= 2e-235:
		tmp = math.sqrt(((c0 * (A / l)) / (V / c0)))
	elif t_0 <= 4e+301:
		tmp = c0 / math.sqrt(((V * l) / A))
	else:
		tmp = math.sqrt(((c0 * (A * (c0 / l))) / V))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	tmp = 0.0
	if (t_0 <= 2e-235)
		tmp = sqrt(Float64(Float64(c0 * Float64(A / l)) / Float64(V / c0)));
	elseif (t_0 <= 4e+301)
		tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A)));
	else
		tmp = sqrt(Float64(Float64(c0 * Float64(A * Float64(c0 / l))) / V));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	tmp = 0.0;
	if (t_0 <= 2e-235)
		tmp = sqrt(((c0 * (A / l)) / (V / c0)));
	elseif (t_0 <= 4e+301)
		tmp = c0 / sqrt(((V * l) / A));
	else
		tmp = sqrt(((c0 * (A * (c0 / l))) / V));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-235], N[Sqrt[N[(N[(c0 * N[(A / l), $MachinePrecision]), $MachinePrecision] / N[(V / c0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 4e+301], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(c0 * N[(A * N[(c0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-235}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \frac{A}{\ell}}{\frac{V}{c0}}}\\

\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 A (*.f64 V l)) < 1.9999999999999999e-235

    1. Initial program 41.7%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt35.9%

        \[\leadsto \color{blue}{\sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}}} \]
      2. sqrt-unprod36.0%

        \[\leadsto \color{blue}{\sqrt{\left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)}} \]
      3. *-commutative36.0%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)} \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)} \]
      4. *-commutative36.0%

        \[\leadsto \sqrt{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)}} \]
      5. swap-sqr32.5%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot c0\right)}} \]
      6. add-sqr-sqrt32.5%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{V \cdot \ell}} \cdot \left(c0 \cdot c0\right)} \]
      7. pow232.5%

        \[\leadsto \sqrt{\frac{A}{V \cdot \ell} \cdot \color{blue}{{c0}^{2}}} \]
    4. Applied egg-rr32.5%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell} \cdot {c0}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*l/37.8%

        \[\leadsto \sqrt{\color{blue}{\frac{A \cdot {c0}^{2}}{V \cdot \ell}}} \]
      2. *-commutative37.8%

        \[\leadsto \sqrt{\frac{A \cdot {c0}^{2}}{\color{blue}{\ell \cdot V}}} \]
      3. times-frac37.9%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    6. Simplified37.9%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    7. Step-by-step derivation
      1. unpow237.9%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \frac{\color{blue}{c0 \cdot c0}}{V}} \]
      2. associate-/l*40.7%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    8. Applied egg-rr40.7%

      \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*46.6%

        \[\leadsto \sqrt{\color{blue}{\left(\frac{A}{\ell} \cdot c0\right) \cdot \frac{c0}{V}}} \]
      2. clear-num46.5%

        \[\leadsto \sqrt{\left(\frac{A}{\ell} \cdot c0\right) \cdot \color{blue}{\frac{1}{\frac{V}{c0}}}} \]
      3. un-div-inv46.6%

        \[\leadsto \sqrt{\color{blue}{\frac{\frac{A}{\ell} \cdot c0}{\frac{V}{c0}}}} \]
      4. *-commutative46.6%

        \[\leadsto \sqrt{\frac{\color{blue}{c0 \cdot \frac{A}{\ell}}}{\frac{V}{c0}}} \]
    10. Applied egg-rr46.6%

      \[\leadsto \sqrt{\color{blue}{\frac{c0 \cdot \frac{A}{\ell}}{\frac{V}{c0}}}} \]

    if 1.9999999999999999e-235 < (/.f64 A (*.f64 V l)) < 4.00000000000000021e301

    1. Initial program 99.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity99.3%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac84.4%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr84.4%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times99.3%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity99.3%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num99.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr99.2%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div99.2%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval99.2%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv99.3%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*84.1%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr84.1%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]
    9. Step-by-step derivation
      1. *-commutative84.1%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell}{A} \cdot V}}} \]
      2. associate-*l/99.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
      3. associate-*r/86.9%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\ell \cdot \frac{V}{A}}}} \]
    10. Simplified86.9%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}} \]
    11. Step-by-step derivation
      1. associate-*r/99.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
    12. Applied egg-rr99.3%

      \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]

    if 4.00000000000000021e301 < (/.f64 A (*.f64 V l))

    1. Initial program 35.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt20.5%

        \[\leadsto \color{blue}{\sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}}} \]
      2. sqrt-unprod20.7%

        \[\leadsto \color{blue}{\sqrt{\left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)}} \]
      3. *-commutative20.7%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)} \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)} \]
      4. *-commutative20.7%

        \[\leadsto \sqrt{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)}} \]
      5. swap-sqr20.4%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot c0\right)}} \]
      6. add-sqr-sqrt20.4%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{V \cdot \ell}} \cdot \left(c0 \cdot c0\right)} \]
      7. pow220.4%

        \[\leadsto \sqrt{\frac{A}{V \cdot \ell} \cdot \color{blue}{{c0}^{2}}} \]
    4. Applied egg-rr20.4%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell} \cdot {c0}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*l/26.0%

        \[\leadsto \sqrt{\color{blue}{\frac{A \cdot {c0}^{2}}{V \cdot \ell}}} \]
      2. *-commutative26.0%

        \[\leadsto \sqrt{\frac{A \cdot {c0}^{2}}{\color{blue}{\ell \cdot V}}} \]
      3. times-frac31.3%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    6. Simplified31.3%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    7. Step-by-step derivation
      1. unpow231.3%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \frac{\color{blue}{c0 \cdot c0}}{V}} \]
      2. associate-/l*31.3%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    8. Applied egg-rr31.3%

      \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*33.2%

        \[\leadsto \sqrt{\color{blue}{\left(\frac{A}{\ell} \cdot c0\right) \cdot \frac{c0}{V}}} \]
      2. associate-*r/33.3%

        \[\leadsto \sqrt{\color{blue}{\frac{\left(\frac{A}{\ell} \cdot c0\right) \cdot c0}{V}}} \]
      3. *-commutative33.3%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right)} \cdot c0}{V}} \]
    10. Applied egg-rr33.3%

      \[\leadsto \sqrt{\color{blue}{\frac{\left(c0 \cdot \frac{A}{\ell}\right) \cdot c0}{V}}} \]
    11. Taylor expanded in c0 around 0 40.5%

      \[\leadsto \sqrt{\frac{\color{blue}{\frac{A \cdot c0}{\ell}} \cdot c0}{V}} \]
    12. Step-by-step derivation
      1. associate-/l*38.8%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(A \cdot \frac{c0}{\ell}\right)} \cdot c0}{V}} \]
    13. Simplified38.8%

      \[\leadsto \sqrt{\frac{\color{blue}{\left(A \cdot \frac{c0}{\ell}\right)} \cdot c0}{V}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 2 \cdot 10^{-235}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \frac{A}{\ell}}{\frac{V}{c0}}}\\ \mathbf{elif}\;\frac{A}{V \cdot \ell} \leq 4 \cdot 10^{+301}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \left(A \cdot \frac{c0}{\ell}\right)}{V}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 71.4% accurate, 0.8× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ t_1 := c0 \cdot \frac{A}{\ell}\\ \mathbf{if}\;t\_0 \leq 2 \cdot 10^{-235}:\\ \;\;\;\;\sqrt{\frac{t\_1}{\frac{V}{c0}}}\\ \mathbf{elif}\;t\_0 \leq 10^{+308}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t\_1 \cdot \frac{c0}{V}}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* V l))) (t_1 (* c0 (/ A l))))
   (if (<= t_0 2e-235)
     (sqrt (/ t_1 (/ V c0)))
     (if (<= t_0 1e+308)
       (/ c0 (sqrt (/ (* V l) A)))
       (sqrt (* t_1 (/ c0 V)))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double t_1 = c0 * (A / l);
	double tmp;
	if (t_0 <= 2e-235) {
		tmp = sqrt((t_1 / (V / c0)));
	} else if (t_0 <= 1e+308) {
		tmp = c0 / sqrt(((V * l) / A));
	} else {
		tmp = sqrt((t_1 * (c0 / V)));
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = a / (v * l)
    t_1 = c0 * (a / l)
    if (t_0 <= 2d-235) then
        tmp = sqrt((t_1 / (v / c0)))
    else if (t_0 <= 1d+308) then
        tmp = c0 / sqrt(((v * l) / a))
    else
        tmp = sqrt((t_1 * (c0 / v)))
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double t_1 = c0 * (A / l);
	double tmp;
	if (t_0 <= 2e-235) {
		tmp = Math.sqrt((t_1 / (V / c0)));
	} else if (t_0 <= 1e+308) {
		tmp = c0 / Math.sqrt(((V * l) / A));
	} else {
		tmp = Math.sqrt((t_1 * (c0 / V)));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	t_1 = c0 * (A / l)
	tmp = 0
	if t_0 <= 2e-235:
		tmp = math.sqrt((t_1 / (V / c0)))
	elif t_0 <= 1e+308:
		tmp = c0 / math.sqrt(((V * l) / A))
	else:
		tmp = math.sqrt((t_1 * (c0 / V)))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	t_1 = Float64(c0 * Float64(A / l))
	tmp = 0.0
	if (t_0 <= 2e-235)
		tmp = sqrt(Float64(t_1 / Float64(V / c0)));
	elseif (t_0 <= 1e+308)
		tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A)));
	else
		tmp = sqrt(Float64(t_1 * Float64(c0 / V)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	t_1 = c0 * (A / l);
	tmp = 0.0;
	if (t_0 <= 2e-235)
		tmp = sqrt((t_1 / (V / c0)));
	elseif (t_0 <= 1e+308)
		tmp = c0 / sqrt(((V * l) / A));
	else
		tmp = sqrt((t_1 * (c0 / V)));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c0 * N[(A / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-235], N[Sqrt[N[(t$95$1 / N[(V / c0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$0, 1e+308], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(t$95$1 * N[(c0 / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
t_1 := c0 \cdot \frac{A}{\ell}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-235}:\\
\;\;\;\;\sqrt{\frac{t\_1}{\frac{V}{c0}}}\\

\mathbf{elif}\;t\_0 \leq 10^{+308}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{t\_1 \cdot \frac{c0}{V}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 A (*.f64 V l)) < 1.9999999999999999e-235

    1. Initial program 41.7%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt35.9%

        \[\leadsto \color{blue}{\sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}}} \]
      2. sqrt-unprod36.0%

        \[\leadsto \color{blue}{\sqrt{\left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)}} \]
      3. *-commutative36.0%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)} \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)} \]
      4. *-commutative36.0%

        \[\leadsto \sqrt{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)}} \]
      5. swap-sqr32.5%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot c0\right)}} \]
      6. add-sqr-sqrt32.5%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{V \cdot \ell}} \cdot \left(c0 \cdot c0\right)} \]
      7. pow232.5%

        \[\leadsto \sqrt{\frac{A}{V \cdot \ell} \cdot \color{blue}{{c0}^{2}}} \]
    4. Applied egg-rr32.5%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell} \cdot {c0}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*l/37.8%

        \[\leadsto \sqrt{\color{blue}{\frac{A \cdot {c0}^{2}}{V \cdot \ell}}} \]
      2. *-commutative37.8%

        \[\leadsto \sqrt{\frac{A \cdot {c0}^{2}}{\color{blue}{\ell \cdot V}}} \]
      3. times-frac37.9%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    6. Simplified37.9%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    7. Step-by-step derivation
      1. unpow237.9%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \frac{\color{blue}{c0 \cdot c0}}{V}} \]
      2. associate-/l*40.7%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    8. Applied egg-rr40.7%

      \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*46.6%

        \[\leadsto \sqrt{\color{blue}{\left(\frac{A}{\ell} \cdot c0\right) \cdot \frac{c0}{V}}} \]
      2. clear-num46.5%

        \[\leadsto \sqrt{\left(\frac{A}{\ell} \cdot c0\right) \cdot \color{blue}{\frac{1}{\frac{V}{c0}}}} \]
      3. un-div-inv46.6%

        \[\leadsto \sqrt{\color{blue}{\frac{\frac{A}{\ell} \cdot c0}{\frac{V}{c0}}}} \]
      4. *-commutative46.6%

        \[\leadsto \sqrt{\frac{\color{blue}{c0 \cdot \frac{A}{\ell}}}{\frac{V}{c0}}} \]
    10. Applied egg-rr46.6%

      \[\leadsto \sqrt{\color{blue}{\frac{c0 \cdot \frac{A}{\ell}}{\frac{V}{c0}}}} \]

    if 1.9999999999999999e-235 < (/.f64 A (*.f64 V l)) < 1e308

    1. Initial program 99.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-un-lft-identity99.3%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}} \]
      2. times-frac84.5%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    4. Applied egg-rr84.5%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{V} \cdot \frac{A}{\ell}}} \]
    5. Step-by-step derivation
      1. frac-times99.3%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1 \cdot A}{V \cdot \ell}}} \]
      2. *-un-lft-identity99.3%

        \[\leadsto c0 \cdot \sqrt{\frac{\color{blue}{A}}{V \cdot \ell}} \]
      3. clear-num99.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    6. Applied egg-rr99.2%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{1}{\frac{V \cdot \ell}{A}}}} \]
    7. Step-by-step derivation
      1. sqrt-div99.2%

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      2. metadata-eval99.2%

        \[\leadsto c0 \cdot \frac{\color{blue}{1}}{\sqrt{\frac{V \cdot \ell}{A}}} \]
      3. un-div-inv99.3%

        \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      4. associate-/l*84.2%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{V \cdot \frac{\ell}{A}}}} \]
    8. Applied egg-rr84.2%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}} \]
    9. Step-by-step derivation
      1. *-commutative84.2%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell}{A} \cdot V}}} \]
      2. associate-*l/99.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
      3. associate-*r/86.5%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\ell \cdot \frac{V}{A}}}} \]
    10. Simplified86.5%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}} \]
    11. Step-by-step derivation
      1. associate-*r/99.3%

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]
    12. Applied egg-rr99.3%

      \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}} \]

    if 1e308 < (/.f64 A (*.f64 V l))

    1. Initial program 33.9%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. add-sqr-sqrt20.9%

        \[\leadsto \color{blue}{\sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}} \cdot \sqrt{c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}}} \]
      2. sqrt-unprod21.1%

        \[\leadsto \color{blue}{\sqrt{\left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)}} \]
      3. *-commutative21.1%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)} \cdot \left(c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\right)} \]
      4. *-commutative21.1%

        \[\leadsto \sqrt{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right) \cdot \color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot c0\right)}} \]
      5. swap-sqr20.7%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt{\frac{A}{V \cdot \ell}} \cdot \sqrt{\frac{A}{V \cdot \ell}}\right) \cdot \left(c0 \cdot c0\right)}} \]
      6. add-sqr-sqrt20.7%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{V \cdot \ell}} \cdot \left(c0 \cdot c0\right)} \]
      7. pow220.7%

        \[\leadsto \sqrt{\frac{A}{V \cdot \ell} \cdot \color{blue}{{c0}^{2}}} \]
    4. Applied egg-rr20.7%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell} \cdot {c0}^{2}}} \]
    5. Step-by-step derivation
      1. associate-*l/26.4%

        \[\leadsto \sqrt{\color{blue}{\frac{A \cdot {c0}^{2}}{V \cdot \ell}}} \]
      2. *-commutative26.4%

        \[\leadsto \sqrt{\frac{A \cdot {c0}^{2}}{\color{blue}{\ell \cdot V}}} \]
      3. times-frac31.8%

        \[\leadsto \sqrt{\color{blue}{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    6. Simplified31.8%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{\ell} \cdot \frac{{c0}^{2}}{V}}} \]
    7. Step-by-step derivation
      1. unpow231.8%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \frac{\color{blue}{c0 \cdot c0}}{V}} \]
      2. associate-/l*31.8%

        \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    8. Applied egg-rr31.8%

      \[\leadsto \sqrt{\frac{A}{\ell} \cdot \color{blue}{\left(c0 \cdot \frac{c0}{V}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*33.8%

        \[\leadsto \sqrt{\color{blue}{\left(\frac{A}{\ell} \cdot c0\right) \cdot \frac{c0}{V}}} \]
      2. associate-*r/33.9%

        \[\leadsto \sqrt{\color{blue}{\frac{\left(\frac{A}{\ell} \cdot c0\right) \cdot c0}{V}}} \]
      3. *-commutative33.9%

        \[\leadsto \sqrt{\frac{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right)} \cdot c0}{V}} \]
    10. Applied egg-rr33.9%

      \[\leadsto \sqrt{\color{blue}{\frac{\left(c0 \cdot \frac{A}{\ell}\right) \cdot c0}{V}}} \]
    11. Step-by-step derivation
      1. associate-/l*33.8%

        \[\leadsto \sqrt{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right) \cdot \frac{c0}{V}}} \]
    12. Applied egg-rr33.8%

      \[\leadsto \sqrt{\color{blue}{\left(c0 \cdot \frac{A}{\ell}\right) \cdot \frac{c0}{V}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 2 \cdot 10^{-235}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \frac{A}{\ell}}{\frac{V}{c0}}}\\ \mathbf{elif}\;\frac{A}{V \cdot \ell} \leq 10^{+308}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(c0 \cdot \frac{A}{\ell}\right) \cdot \frac{c0}{V}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 78.7% accurate, 0.9× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t\_0 \leq 10^{-204} \lor \neg \left(t\_0 \leq 10^{+308}\right):\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{t\_0}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* V l))))
   (if (or (<= t_0 1e-204) (not (<= t_0 1e+308)))
     (* c0 (sqrt (/ (/ A l) V)))
     (* c0 (sqrt t_0)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if ((t_0 <= 1e-204) || !(t_0 <= 1e+308)) {
		tmp = c0 * sqrt(((A / l) / V));
	} else {
		tmp = c0 * sqrt(t_0);
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a / (v * l)
    if ((t_0 <= 1d-204) .or. (.not. (t_0 <= 1d+308))) then
        tmp = c0 * sqrt(((a / l) / v))
    else
        tmp = c0 * sqrt(t_0)
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if ((t_0 <= 1e-204) || !(t_0 <= 1e+308)) {
		tmp = c0 * Math.sqrt(((A / l) / V));
	} else {
		tmp = c0 * Math.sqrt(t_0);
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	tmp = 0
	if (t_0 <= 1e-204) or not (t_0 <= 1e+308):
		tmp = c0 * math.sqrt(((A / l) / V))
	else:
		tmp = c0 * math.sqrt(t_0)
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	tmp = 0.0
	if ((t_0 <= 1e-204) || !(t_0 <= 1e+308))
		tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V)));
	else
		tmp = Float64(c0 * sqrt(t_0));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	tmp = 0.0;
	if ((t_0 <= 1e-204) || ~((t_0 <= 1e+308)))
		tmp = c0 * sqrt(((A / l) / V));
	else
		tmp = c0 * sqrt(t_0);
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 1e-204], N[Not[LessEqual[t$95$0, 1e+308]], $MachinePrecision]], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 10^{-204} \lor \neg \left(t\_0 \leq 10^{+308}\right):\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 A (*.f64 V l)) < 1e-204 or 1e308 < (/.f64 A (*.f64 V l))

    1. Initial program 40.7%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Taylor expanded in c0 around 0 40.7%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
    4. Step-by-step derivation
      1. *-commutative40.7%

        \[\leadsto \sqrt{\frac{A}{\color{blue}{\ell \cdot V}}} \cdot c0 \]
      2. associate-/r*52.6%

        \[\leadsto \sqrt{\color{blue}{\frac{\frac{A}{\ell}}{V}}} \cdot c0 \]
    5. Simplified52.6%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0} \]

    if 1e-204 < (/.f64 A (*.f64 V l)) < 1e308

    1. Initial program 99.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification76.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 10^{-204} \lor \neg \left(\frac{A}{V \cdot \ell} \leq 10^{+308}\right):\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 79.9% accurate, 0.9× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t\_0 \leq 5 \cdot 10^{-323} \lor \neg \left(t\_0 \leq 5 \cdot 10^{+294}\right):\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{t\_0}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* V l))))
   (if (or (<= t_0 5e-323) (not (<= t_0 5e+294)))
     (* c0 (sqrt (/ (/ A V) l)))
     (* c0 (sqrt t_0)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if ((t_0 <= 5e-323) || !(t_0 <= 5e+294)) {
		tmp = c0 * sqrt(((A / V) / l));
	} else {
		tmp = c0 * sqrt(t_0);
	}
	return tmp;
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a / (v * l)
    if ((t_0 <= 5d-323) .or. (.not. (t_0 <= 5d+294))) then
        tmp = c0 * sqrt(((a / v) / l))
    else
        tmp = c0 * sqrt(t_0)
    end if
    code = tmp
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if ((t_0 <= 5e-323) || !(t_0 <= 5e+294)) {
		tmp = c0 * Math.sqrt(((A / V) / l));
	} else {
		tmp = c0 * Math.sqrt(t_0);
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	tmp = 0
	if (t_0 <= 5e-323) or not (t_0 <= 5e+294):
		tmp = c0 * math.sqrt(((A / V) / l))
	else:
		tmp = c0 * math.sqrt(t_0)
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	tmp = 0.0
	if ((t_0 <= 5e-323) || !(t_0 <= 5e+294))
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	else
		tmp = Float64(c0 * sqrt(t_0));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	tmp = 0.0;
	if ((t_0 <= 5e-323) || ~((t_0 <= 5e+294)))
		tmp = c0 * sqrt(((A / V) / l));
	else
		tmp = c0 * sqrt(t_0);
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 5e-323], N[Not[LessEqual[t$95$0, 5e+294]], $MachinePrecision]], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{-323} \lor \neg \left(t\_0 \leq 5 \cdot 10^{+294}\right):\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{t\_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 A (*.f64 V l)) < 4.94066e-323 or 4.9999999999999999e294 < (/.f64 A (*.f64 V l))

    1. Initial program 35.7%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. *-commutative35.7%

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\ell \cdot V}}} \]
      2. associate-/l/49.4%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]
    3. Simplified49.4%

      \[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}} \]
    4. Add Preprocessing

    if 4.94066e-323 < (/.f64 A (*.f64 V l)) < 4.9999999999999999e294

    1. Initial program 99.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification76.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{-323} \lor \neg \left(\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{+294}\right):\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 73.8% accurate, 1.0× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	return c0 * sqrt((A / (V * l)));
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    code = c0 * sqrt((a / (v * l)))
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	return c0 * Math.sqrt((A / (V * l)));
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	return c0 * math.sqrt((A / (V * l)))
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	return Float64(c0 * sqrt(Float64(A / Float64(V * l))))
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp = code(c0, A, V, l)
	tmp = c0 * sqrt((A / (V * l)));
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Derivation
  1. Initial program 70.2%

    \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
  2. Add Preprocessing
  3. Add Preprocessing

Reproduce

?
herbie shell --seed 2024181 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  :precision binary64
  (* c0 (sqrt (/ A (* V l)))))