Henrywood and Agarwal, Equation (3)

Percentage Accurate: 74.9% → 96.8%
Time: 13.2s
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: 74.9% 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: 96.8% accurate, 0.3× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ c0 \cdot {\left(\frac{\sqrt[3]{A} \cdot \sqrt[3]{\frac{1}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5} \end{array} \]
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (* c0 (pow (/ (* (cbrt A) (cbrt (/ 1.0 V))) (cbrt l)) 1.5)))
assert(V < l);
double code(double c0, double A, double V, double l) {
	return c0 * pow(((cbrt(A) * cbrt((1.0 / V))) / cbrt(l)), 1.5);
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
	return c0 * Math.pow(((Math.cbrt(A) * Math.cbrt((1.0 / V))) / Math.cbrt(l)), 1.5);
}
V, l = sort([V, l])
function code(c0, A, V, l)
	return Float64(c0 * (Float64(Float64(cbrt(A) * cbrt(Float64(1.0 / V))) / cbrt(l)) ^ 1.5))
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := N[(c0 * N[Power[N[(N[(N[Power[A, 1/3], $MachinePrecision] * N[Power[N[(1.0 / V), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
c0 \cdot {\left(\frac{\sqrt[3]{A} \cdot \sqrt[3]{\frac{1}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}
\end{array}
Derivation
  1. Initial program 73.2%

    \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
  2. Step-by-step derivation
    1. pow1/273.2%

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
    2. add-cube-cbrt72.7%

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

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

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

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

    \[\leadsto c0 \cdot \color{blue}{{\left(\sqrt[3]{\frac{A}{V \cdot \ell}}\right)}^{1.5}} \]
  4. Step-by-step derivation
    1. cbrt-div83.9%

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

      \[\leadsto c0 \cdot {\left(\frac{\sqrt[3]{\color{blue}{A \cdot 1}}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5} \]
    3. cbrt-div72.6%

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

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

      \[\leadsto c0 \cdot {\left(\sqrt[3]{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}}\right)}^{1.5} \]
    6. cbrt-prod84.2%

      \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{1}{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}}^{1.5} \]
    7. cbrt-div84.1%

      \[\leadsto c0 \cdot {\left(\color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{\ell}}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
    8. metadata-eval84.1%

      \[\leadsto c0 \cdot {\left(\frac{\color{blue}{1}}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
  5. Applied egg-rr84.1%

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

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

      \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\sqrt[3]{\frac{A}{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
  7. Simplified84.1%

    \[\leadsto c0 \cdot {\color{blue}{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}}^{1.5} \]
  8. Step-by-step derivation
    1. div-inv84.1%

      \[\leadsto c0 \cdot {\left(\frac{\sqrt[3]{\color{blue}{A \cdot \frac{1}{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
    2. cbrt-prod96.7%

      \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\sqrt[3]{A} \cdot \sqrt[3]{\frac{1}{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
  9. Applied egg-rr96.7%

    \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\sqrt[3]{A} \cdot \sqrt[3]{\frac{1}{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
  10. Final simplification96.7%

    \[\leadsto c0 \cdot {\left(\frac{\sqrt[3]{A} \cdot \sqrt[3]{\frac{1}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]

Alternative 2: 96.8% accurate, 0.3× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ c0 \cdot {\left(\frac{\frac{\sqrt[3]{A}}{\sqrt[3]{V}}}{\sqrt[3]{\ell}}\right)}^{1.5} \end{array} \]
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (* c0 (pow (/ (/ (cbrt A) (cbrt V)) (cbrt l)) 1.5)))
assert(V < l);
double code(double c0, double A, double V, double l) {
	return c0 * pow(((cbrt(A) / cbrt(V)) / cbrt(l)), 1.5);
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
	return c0 * Math.pow(((Math.cbrt(A) / Math.cbrt(V)) / Math.cbrt(l)), 1.5);
}
V, l = sort([V, l])
function code(c0, A, V, l)
	return Float64(c0 * (Float64(Float64(cbrt(A) / cbrt(V)) / cbrt(l)) ^ 1.5))
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := N[(c0 * N[Power[N[(N[(N[Power[A, 1/3], $MachinePrecision] / N[Power[V, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
c0 \cdot {\left(\frac{\frac{\sqrt[3]{A}}{\sqrt[3]{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}
\end{array}
Derivation
  1. Initial program 73.2%

    \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
  2. Step-by-step derivation
    1. pow1/273.2%

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
    2. add-cube-cbrt72.7%

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

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

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

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

    \[\leadsto c0 \cdot \color{blue}{{\left(\sqrt[3]{\frac{A}{V \cdot \ell}}\right)}^{1.5}} \]
  4. Step-by-step derivation
    1. cbrt-div83.9%

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

      \[\leadsto c0 \cdot {\left(\frac{\sqrt[3]{\color{blue}{A \cdot 1}}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5} \]
    3. cbrt-div72.6%

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

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

      \[\leadsto c0 \cdot {\left(\sqrt[3]{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}}\right)}^{1.5} \]
    6. cbrt-prod84.2%

      \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{1}{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}}^{1.5} \]
    7. cbrt-div84.1%

      \[\leadsto c0 \cdot {\left(\color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{\ell}}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
    8. metadata-eval84.1%

      \[\leadsto c0 \cdot {\left(\frac{\color{blue}{1}}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
  5. Applied egg-rr84.1%

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

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

      \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\sqrt[3]{\frac{A}{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
  7. Simplified84.1%

    \[\leadsto c0 \cdot {\color{blue}{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}}^{1.5} \]
  8. Step-by-step derivation
    1. cbrt-div96.6%

      \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\frac{\sqrt[3]{A}}{\sqrt[3]{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
    2. div-inv96.6%

      \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\sqrt[3]{A} \cdot \frac{1}{\sqrt[3]{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
  9. Applied egg-rr96.6%

    \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\sqrt[3]{A} \cdot \frac{1}{\sqrt[3]{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
  10. Step-by-step derivation
    1. associate-*r/96.6%

      \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\frac{\sqrt[3]{A} \cdot 1}{\sqrt[3]{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
    2. *-rgt-identity96.6%

      \[\leadsto c0 \cdot {\left(\frac{\frac{\color{blue}{\sqrt[3]{A}}}{\sqrt[3]{V}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
  11. Simplified96.6%

    \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\frac{\sqrt[3]{A}}{\sqrt[3]{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
  12. Final simplification96.6%

    \[\leadsto c0 \cdot {\left(\frac{\frac{\sqrt[3]{A}}{\sqrt[3]{V}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]

Alternative 3: 95.1% accurate, 0.3× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-301} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \end{array} \end{array} \]
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* V l) (- INFINITY))
   (/ (/ c0 (sqrt (/ V A))) (sqrt l))
   (if (<= (* V l) -1e-306)
     (* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
     (if (or (<= (* V l) 2e-301) (not (<= (* V l) 1e+298)))
       (* c0 (pow (/ (cbrt (/ A V)) (cbrt l)) 1.5))
       (/ c0 (/ (sqrt (* V l)) (sqrt A)))))))
assert(V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -((double) INFINITY)) {
		tmp = (c0 / sqrt((V / A))) / sqrt(l);
	} else if ((V * l) <= -1e-306) {
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	} else if (((V * l) <= 2e-301) || !((V * l) <= 1e+298)) {
		tmp = c0 * pow((cbrt((A / V)) / cbrt(l)), 1.5);
	} else {
		tmp = c0 / (sqrt((V * l)) / sqrt(A));
	}
	return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -Double.POSITIVE_INFINITY) {
		tmp = (c0 / Math.sqrt((V / A))) / Math.sqrt(l);
	} else if ((V * l) <= -1e-306) {
		tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
	} else if (((V * l) <= 2e-301) || !((V * l) <= 1e+298)) {
		tmp = c0 * Math.pow((Math.cbrt((A / V)) / Math.cbrt(l)), 1.5);
	} else {
		tmp = c0 / (Math.sqrt((V * l)) / Math.sqrt(A));
	}
	return tmp;
}
V, l = sort([V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= Float64(-Inf))
		tmp = Float64(Float64(c0 / sqrt(Float64(V / A))) / sqrt(l));
	elseif (Float64(V * l) <= -1e-306)
		tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l)))));
	elseif ((Float64(V * l) <= 2e-301) || !(Float64(V * l) <= 1e+298))
		tmp = Float64(c0 * (Float64(cbrt(Float64(A / V)) / cbrt(l)) ^ 1.5));
	else
		tmp = Float64(c0 / Float64(sqrt(Float64(V * l)) / sqrt(A)));
	end
	return tmp
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(N[(c0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-306], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 2e-301], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+298]], $MachinePrecision]], N[(c0 * N[Power[N[(N[Power[N[(A / V), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\

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

\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-301} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}\\

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


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

    1. Initial program 41.1%

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

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

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

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

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

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

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

        \[\leadsto \left(c0 \cdot \sqrt{\frac{A}{V}}\right) \cdot \frac{\color{blue}{1}}{\sqrt{\ell}} \]
      5. div-inv37.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{c0}{\frac{\sqrt{V}}{\sqrt{A}}}}}{\sqrt{\ell}} \]
      4. sqrt-undiv38.0%

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

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

    if -inf.0 < (*.f64 V l) < -1.00000000000000003e-306

    1. Initial program 87.5%

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

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

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

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

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

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

    if -1.00000000000000003e-306 < (*.f64 V l) < 2.00000000000000013e-301 or 9.9999999999999996e297 < (*.f64 V l)

    1. Initial program 34.0%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. pow1/234.0%

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt34.0%

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\sqrt[3]{\frac{A}{V \cdot \ell}}\right)}^{1.5}} \]
    4. Step-by-step derivation
      1. cbrt-div36.8%

        \[\leadsto c0 \cdot {\color{blue}{\left(\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right)}}^{1.5} \]
      2. *-rgt-identity36.8%

        \[\leadsto c0 \cdot {\left(\frac{\sqrt[3]{\color{blue}{A \cdot 1}}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5} \]
      3. cbrt-div34.0%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{A \cdot 1}{V \cdot \ell}}\right)}}^{1.5} \]
      4. frac-times53.7%

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

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}}\right)}^{1.5} \]
      6. cbrt-prod75.3%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{1}{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}}^{1.5} \]
      7. cbrt-div75.3%

        \[\leadsto c0 \cdot {\left(\color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{\ell}}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
      8. metadata-eval75.3%

        \[\leadsto c0 \cdot {\left(\frac{\color{blue}{1}}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
    5. Applied egg-rr75.3%

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

        \[\leadsto c0 \cdot {\color{blue}{\left(\frac{1 \cdot \sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}}^{1.5} \]
      2. *-lft-identity75.4%

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

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

    if 2.00000000000000013e-301 < (*.f64 V l) < 9.9999999999999996e297

    1. Initial program 82.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-301} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \end{array} \]

Alternative 4: 95.2% accurate, 0.3× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{-318} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{\ell}}}{\sqrt[3]{V}}\right)}^{1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \end{array} \end{array} \]
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* V l) (- INFINITY))
   (/ (/ c0 (sqrt (/ V A))) (sqrt l))
   (if (<= (* V l) -1e-306)
     (* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
     (if (or (<= (* V l) 1e-318) (not (<= (* V l) 1e+298)))
       (* c0 (pow (/ (cbrt (/ A l)) (cbrt V)) 1.5))
       (/ c0 (/ (sqrt (* V l)) (sqrt A)))))))
assert(V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -((double) INFINITY)) {
		tmp = (c0 / sqrt((V / A))) / sqrt(l);
	} else if ((V * l) <= -1e-306) {
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	} else if (((V * l) <= 1e-318) || !((V * l) <= 1e+298)) {
		tmp = c0 * pow((cbrt((A / l)) / cbrt(V)), 1.5);
	} else {
		tmp = c0 / (sqrt((V * l)) / sqrt(A));
	}
	return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -Double.POSITIVE_INFINITY) {
		tmp = (c0 / Math.sqrt((V / A))) / Math.sqrt(l);
	} else if ((V * l) <= -1e-306) {
		tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
	} else if (((V * l) <= 1e-318) || !((V * l) <= 1e+298)) {
		tmp = c0 * Math.pow((Math.cbrt((A / l)) / Math.cbrt(V)), 1.5);
	} else {
		tmp = c0 / (Math.sqrt((V * l)) / Math.sqrt(A));
	}
	return tmp;
}
V, l = sort([V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= Float64(-Inf))
		tmp = Float64(Float64(c0 / sqrt(Float64(V / A))) / sqrt(l));
	elseif (Float64(V * l) <= -1e-306)
		tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l)))));
	elseif ((Float64(V * l) <= 1e-318) || !(Float64(V * l) <= 1e+298))
		tmp = Float64(c0 * (Float64(cbrt(Float64(A / l)) / cbrt(V)) ^ 1.5));
	else
		tmp = Float64(c0 / Float64(sqrt(Float64(V * l)) / sqrt(A)));
	end
	return tmp
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(N[(c0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-306], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 1e-318], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+298]], $MachinePrecision]], N[(c0 * N[Power[N[(N[Power[N[(A / l), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[V, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\

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

\mathbf{elif}\;V \cdot \ell \leq 10^{-318} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{\ell}}}{\sqrt[3]{V}}\right)}^{1.5}\\

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


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

    1. Initial program 41.1%

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

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

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

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

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

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

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

        \[\leadsto \left(c0 \cdot \sqrt{\frac{A}{V}}\right) \cdot \frac{\color{blue}{1}}{\sqrt{\ell}} \]
      5. div-inv37.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{c0}{\frac{\sqrt{V}}{\sqrt{A}}}}}{\sqrt{\ell}} \]
      4. sqrt-undiv38.0%

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

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

    if -inf.0 < (*.f64 V l) < -1.00000000000000003e-306

    1. Initial program 87.5%

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

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

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

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

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

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

    if -1.00000000000000003e-306 < (*.f64 V l) < 9.9999875e-319 or 9.9999999999999996e297 < (*.f64 V l)

    1. Initial program 34.6%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. pow1/234.6%

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt34.6%

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\sqrt[3]{\frac{A}{V \cdot \ell}}\right)}^{1.5}} \]
    4. Step-by-step derivation
      1. *-un-lft-identity34.6%

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}}\right)}^{1.5} \]
      2. frac-times54.7%

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

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\color{blue}{\frac{A}{\ell} \cdot \frac{1}{V}}}\right)}^{1.5} \]
      4. cbrt-prod80.0%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{A}{\ell}} \cdot \sqrt[3]{\frac{1}{V}}\right)}}^{1.5} \]
      5. cbrt-div80.1%

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\frac{A}{\ell}} \cdot \color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{V}}}\right)}^{1.5} \]
      6. metadata-eval80.1%

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\frac{A}{\ell}} \cdot \frac{\color{blue}{1}}{\sqrt[3]{V}}\right)}^{1.5} \]
    5. Applied egg-rr80.1%

      \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{A}{\ell}} \cdot \frac{1}{\sqrt[3]{V}}\right)}}^{1.5} \]
    6. Step-by-step derivation
      1. associate-*r/80.3%

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

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

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

    if 9.9999875e-319 < (*.f64 V l) < 9.9999999999999996e297

    1. Initial program 81.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{-318} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{\ell}}}{\sqrt[3]{V}}\right)}^{1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \end{array} \]

Alternative 5: 96.0% accurate, 0.3× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\ \;\;\;\;c0 \cdot \frac{\frac{\sqrt{-A}}{\sqrt{-V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{-318} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{\ell}}}{\sqrt[3]{V}}\right)}^{1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \end{array} \end{array} \]
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* V l) -1e-306)
   (* c0 (/ (/ (sqrt (- A)) (sqrt (- V))) (sqrt l)))
   (if (or (<= (* V l) 1e-318) (not (<= (* V l) 1e+298)))
     (* c0 (pow (/ (cbrt (/ A l)) (cbrt V)) 1.5))
     (/ c0 (/ (sqrt (* V l)) (sqrt A))))))
assert(V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -1e-306) {
		tmp = c0 * ((sqrt(-A) / sqrt(-V)) / sqrt(l));
	} else if (((V * l) <= 1e-318) || !((V * l) <= 1e+298)) {
		tmp = c0 * pow((cbrt((A / l)) / cbrt(V)), 1.5);
	} else {
		tmp = c0 / (sqrt((V * l)) / sqrt(A));
	}
	return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -1e-306) {
		tmp = c0 * ((Math.sqrt(-A) / Math.sqrt(-V)) / Math.sqrt(l));
	} else if (((V * l) <= 1e-318) || !((V * l) <= 1e+298)) {
		tmp = c0 * Math.pow((Math.cbrt((A / l)) / Math.cbrt(V)), 1.5);
	} else {
		tmp = c0 / (Math.sqrt((V * l)) / Math.sqrt(A));
	}
	return tmp;
}
V, l = sort([V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= -1e-306)
		tmp = Float64(c0 * Float64(Float64(sqrt(Float64(-A)) / sqrt(Float64(-V))) / sqrt(l)));
	elseif ((Float64(V * l) <= 1e-318) || !(Float64(V * l) <= 1e+298))
		tmp = Float64(c0 * (Float64(cbrt(Float64(A / l)) / cbrt(V)) ^ 1.5));
	else
		tmp = Float64(c0 / Float64(sqrt(Float64(V * l)) / sqrt(A)));
	end
	return tmp
end
NOTE: 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-306], N[(c0 * N[(N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(V * l), $MachinePrecision], 1e-318], N[Not[LessEqual[N[(V * l), $MachinePrecision], 1e+298]], $MachinePrecision]], N[(c0 * N[Power[N[(N[Power[N[(A / l), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[V, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\
\;\;\;\;c0 \cdot \frac{\frac{\sqrt{-A}}{\sqrt{-V}}}{\sqrt{\ell}}\\

\mathbf{elif}\;V \cdot \ell \leq 10^{-318} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{\ell}}}{\sqrt[3]{V}}\right)}^{1.5}\\

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


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

    1. Initial program 81.1%

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

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

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

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

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

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

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

    if -1.00000000000000003e-306 < (*.f64 V l) < 9.9999875e-319 or 9.9999999999999996e297 < (*.f64 V l)

    1. Initial program 34.6%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. pow1/234.6%

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt34.6%

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\sqrt[3]{\frac{A}{V \cdot \ell}}\right)}^{1.5}} \]
    4. Step-by-step derivation
      1. *-un-lft-identity34.6%

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\frac{\color{blue}{1 \cdot A}}{V \cdot \ell}}\right)}^{1.5} \]
      2. frac-times54.7%

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

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\color{blue}{\frac{A}{\ell} \cdot \frac{1}{V}}}\right)}^{1.5} \]
      4. cbrt-prod80.0%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{A}{\ell}} \cdot \sqrt[3]{\frac{1}{V}}\right)}}^{1.5} \]
      5. cbrt-div80.1%

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\frac{A}{\ell}} \cdot \color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{V}}}\right)}^{1.5} \]
      6. metadata-eval80.1%

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\frac{A}{\ell}} \cdot \frac{\color{blue}{1}}{\sqrt[3]{V}}\right)}^{1.5} \]
    5. Applied egg-rr80.1%

      \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{A}{\ell}} \cdot \frac{1}{\sqrt[3]{V}}\right)}}^{1.5} \]
    6. Step-by-step derivation
      1. associate-*r/80.3%

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

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

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

    if 9.9999875e-319 < (*.f64 V l) < 9.9999999999999996e297

    1. Initial program 81.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{-306}:\\ \;\;\;\;c0 \cdot \frac{\frac{\sqrt{-A}}{\sqrt{-V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{-318} \lor \neg \left(V \cdot \ell \leq 10^{+298}\right):\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{\ell}}}{\sqrt[3]{V}}\right)}^{1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \end{array} \]

Alternative 6: 87.4% accurate, 0.3× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \leq -5 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A} \cdot {\ell}^{-0.5}}{\sqrt{V}}\\ \end{array} \end{array} \]
NOTE: V and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (if (<= V -5e-310)
   (* c0 (pow (/ (cbrt A) (cbrt (* V l))) 1.5))
   (* c0 (/ (* (sqrt A) (pow l -0.5)) (sqrt V)))))
assert(V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if (V <= -5e-310) {
		tmp = c0 * pow((cbrt(A) / cbrt((V * l))), 1.5);
	} else {
		tmp = c0 * ((sqrt(A) * pow(l, -0.5)) / sqrt(V));
	}
	return tmp;
}
assert V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if (V <= -5e-310) {
		tmp = c0 * Math.pow((Math.cbrt(A) / Math.cbrt((V * l))), 1.5);
	} else {
		tmp = c0 * ((Math.sqrt(A) * Math.pow(l, -0.5)) / Math.sqrt(V));
	}
	return tmp;
}
V, l = sort([V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (V <= -5e-310)
		tmp = Float64(c0 * (Float64(cbrt(A) / cbrt(Float64(V * l))) ^ 1.5));
	else
		tmp = Float64(c0 * Float64(Float64(sqrt(A) * (l ^ -0.5)) / sqrt(V)));
	end
	return tmp
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := If[LessEqual[V, -5e-310], N[(c0 * N[Power[N[(N[Power[A, 1/3], $MachinePrecision] / N[Power[N[(V * l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[(N[Sqrt[A], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision] / N[Sqrt[V], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \leq -5 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5}\\

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


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

    1. Initial program 75.0%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. pow1/275.0%

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt74.4%

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\sqrt[3]{\frac{A}{V \cdot \ell}}\right)}^{1.5}} \]
    4. Step-by-step derivation
      1. cbrt-div84.2%

        \[\leadsto c0 \cdot {\color{blue}{\left(\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right)}}^{1.5} \]
      2. div-inv84.1%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{A} \cdot \frac{1}{\sqrt[3]{V \cdot \ell}}\right)}}^{1.5} \]
    5. Applied egg-rr84.1%

      \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{A} \cdot \frac{1}{\sqrt[3]{V \cdot \ell}}\right)}}^{1.5} \]
    6. Step-by-step derivation
      1. associate-*r/84.2%

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

        \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\sqrt[3]{A}}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5} \]
    7. Simplified84.2%

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

    if -4.999999999999985e-310 < V

    1. Initial program 71.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. pow1/271.1%

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt70.6%

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\sqrt[3]{\frac{A}{V \cdot \ell}}\right)}^{1.5}} \]
    4. Step-by-step derivation
      1. cbrt-div83.5%

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

        \[\leadsto c0 \cdot {\left(\frac{\sqrt[3]{\color{blue}{A \cdot 1}}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5} \]
      3. cbrt-div70.6%

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

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

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}}\right)}^{1.5} \]
      6. cbrt-prod82.1%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{1}{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}}^{1.5} \]
      7. cbrt-div82.0%

        \[\leadsto c0 \cdot {\left(\color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{\ell}}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
      8. metadata-eval82.0%

        \[\leadsto c0 \cdot {\left(\frac{\color{blue}{1}}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
    5. Applied egg-rr82.0%

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

        \[\leadsto c0 \cdot {\color{blue}{\left(\frac{1 \cdot \sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}}^{1.5} \]
      2. *-lft-identity82.0%

        \[\leadsto c0 \cdot {\left(\frac{\color{blue}{\sqrt[3]{\frac{A}{V}}}}{\sqrt[3]{\ell}}\right)}^{1.5} \]
    7. Simplified82.0%

      \[\leadsto c0 \cdot {\color{blue}{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}}^{1.5} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt82.0%

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

        \[\leadsto c0 \cdot \color{blue}{\sqrt{{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5} \cdot {\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}}} \]
      3. pow-prod-up70.2%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{\left(1.5 + 1.5\right)}}} \]
      4. metadata-eval70.2%

        \[\leadsto c0 \cdot \sqrt{{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{\color{blue}{3}}} \]
      5. pow370.2%

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

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

        \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\left(\sqrt[3]{\frac{A}{V}} \cdot \sqrt[3]{\frac{A}{V}}\right) \cdot \sqrt[3]{\frac{A}{V}}}{\left(\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}\right) \cdot \sqrt[3]{\ell}}}} \]
      8. add-cube-cbrt70.4%

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

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

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
      11. div-inv40.9%

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

        \[\leadsto c0 \cdot \left(\color{blue}{\frac{\sqrt{A}}{\sqrt{V}}} \cdot \frac{1}{\sqrt{\ell}}\right) \]
      13. associate-*l/47.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \leq -5 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A} \cdot {\ell}^{-0.5}}{\sqrt{V}}\\ \end{array} \]

Alternative 7: 91.4% accurate, 0.5× speedup?

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

\mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-291}:\\
\;\;\;\;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 10^{+298}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\

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


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

    1. Initial program 38.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 V l) < -5.0000000000000003e-291

    1. Initial program 87.2%

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

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

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

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

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

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

    if -0.0 < (*.f64 V l) < 9.9999999999999996e297

    1. Initial program 81.4%

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

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

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

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

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

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

    if 9.9999999999999996e297 < (*.f64 V l)

    1. Initial program 36.8%

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

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

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

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

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

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

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

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

Alternative 8: 91.0% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 41.1%

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

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

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

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

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

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

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

        \[\leadsto \left(c0 \cdot \sqrt{\frac{A}{V}}\right) \cdot \frac{\color{blue}{1}}{\sqrt{\ell}} \]
      5. div-inv37.9%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{c0}{\frac{\sqrt{V}}{\sqrt{A}}}}}{\sqrt{\ell}} \]
      4. sqrt-undiv38.0%

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

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

    if -inf.0 < (*.f64 V l) < -2.0000000000000001e-270

    1. Initial program 87.8%

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

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

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

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

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

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

    if -2.0000000000000001e-270 < (*.f64 V l) < 2.00000000000000013e-301

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000013e-301 < (*.f64 V l) < 9.9999999999999996e297

    1. Initial program 82.6%

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

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

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

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

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

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

    if 9.9999999999999996e297 < (*.f64 V l)

    1. Initial program 36.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-270}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-301}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{-A}{\ell}}}{\sqrt{-V}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+298}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \end{array} \]

Alternative 9: 81.5% accurate, 0.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -9.999999999999969e-311

    1. Initial program 74.7%

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

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

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

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

    if -9.999999999999969e-311 < l

    1. Initial program 71.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V} \cdot \frac{1}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \end{array} \]

Alternative 10: 83.9% accurate, 0.5× speedup?

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

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


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

    1. Initial program 75.4%

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

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

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

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

    if 2.90000000000000015e-295 < A

    1. Initial program 70.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq 2.9 \cdot 10^{-295}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \end{array} \]

Alternative 11: 83.9% accurate, 0.5× speedup?

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

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


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

    1. Initial program 75.4%

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

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

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

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

    if 2.90000000000000015e-295 < A

    1. Initial program 70.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;A \leq 2.9 \cdot 10^{-295}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \end{array} \]

Alternative 12: 80.6% accurate, 0.9× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 5 \cdot 10^{-317}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;t_0 \leq 10^{+280}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\ \end{array} \end{array} \]
NOTE: 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 5e-317)
     (* c0 (sqrt (/ (/ A V) l)))
     (if (<= t_0 1e+280)
       (/ c0 (sqrt (/ (* V l) A)))
       (* c0 (pow (/ V (/ A l)) -0.5))))))
assert(V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 5e-317) {
		tmp = c0 * sqrt(((A / V) / l));
	} else if (t_0 <= 1e+280) {
		tmp = c0 / sqrt(((V * l) / A));
	} else {
		tmp = c0 * pow((V / (A / l)), -0.5);
	}
	return tmp;
}
NOTE: 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-317) then
        tmp = c0 * sqrt(((a / v) / l))
    else if (t_0 <= 1d+280) then
        tmp = c0 / sqrt(((v * l) / a))
    else
        tmp = c0 * ((v / (a / l)) ** (-0.5d0))
    end if
    code = tmp
end function
assert 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-317) {
		tmp = c0 * Math.sqrt(((A / V) / l));
	} else if (t_0 <= 1e+280) {
		tmp = c0 / Math.sqrt(((V * l) / A));
	} else {
		tmp = c0 * Math.pow((V / (A / l)), -0.5);
	}
	return tmp;
}
[V, l] = sort([V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	tmp = 0
	if t_0 <= 5e-317:
		tmp = c0 * math.sqrt(((A / V) / l))
	elif t_0 <= 1e+280:
		tmp = c0 / math.sqrt(((V * l) / A))
	else:
		tmp = c0 * math.pow((V / (A / l)), -0.5)
	return tmp
V, l = sort([V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	tmp = 0.0
	if (t_0 <= 5e-317)
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	elseif (t_0 <= 1e+280)
		tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A)));
	else
		tmp = Float64(c0 * (Float64(V / Float64(A / l)) ^ -0.5));
	end
	return tmp
end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	tmp = 0.0;
	if (t_0 <= 5e-317)
		tmp = c0 * sqrt(((A / V) / l));
	elseif (t_0 <= 1e+280)
		tmp = c0 / sqrt(((V * l) / A));
	else
		tmp = c0 * ((V / (A / l)) ^ -0.5);
	end
	tmp_2 = tmp;
end
NOTE: 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, 5e-317], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+280], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-317}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

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

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


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

    1. Initial program 44.3%

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

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

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

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

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

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

    if 5.00000017e-317 < (/.f64 A (*.f64 V l)) < 1e280

    1. Initial program 99.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. pow1/299.5%

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt98.7%

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\sqrt[3]{\frac{A}{V \cdot \ell}}\right)}^{1.5}} \]
    4. Step-by-step derivation
      1. cbrt-div98.4%

        \[\leadsto c0 \cdot {\color{blue}{\left(\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right)}}^{1.5} \]
      2. *-rgt-identity98.4%

        \[\leadsto c0 \cdot {\left(\frac{\sqrt[3]{\color{blue}{A \cdot 1}}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5} \]
      3. cbrt-div98.6%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{A \cdot 1}{V \cdot \ell}}\right)}}^{1.5} \]
      4. frac-times92.7%

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

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}}\right)}^{1.5} \]
      6. cbrt-prod92.7%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{1}{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}}^{1.5} \]
      7. cbrt-div92.5%

        \[\leadsto c0 \cdot {\left(\color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{\ell}}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
      8. metadata-eval92.5%

        \[\leadsto c0 \cdot {\left(\frac{\color{blue}{1}}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
    5. Applied egg-rr92.5%

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

        \[\leadsto c0 \cdot {\color{blue}{\left(\frac{1 \cdot \sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}}^{1.5} \]
      2. *-lft-identity92.5%

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

      \[\leadsto c0 \cdot {\color{blue}{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}}^{1.5} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt92.5%

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

        \[\leadsto c0 \cdot \color{blue}{\sqrt{{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5} \cdot {\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}}} \]
      3. pow-prod-up92.6%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{\left(1.5 + 1.5\right)}}} \]
      4. metadata-eval92.6%

        \[\leadsto c0 \cdot \sqrt{{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{\color{blue}{3}}} \]
      5. pow392.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\frac{\sqrt{\ell \cdot \frac{V}{A}}}{c0}}\right)\right)} \]
      2. expm1-udef29.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{1}{\frac{\sqrt{\ell \cdot \frac{V}{A}}}{c0}}\right)} - 1} \]
      3. associate-*r/31.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\frac{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}}{c0}}\right)} - 1 \]
      4. *-commutative31.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\frac{\sqrt{\frac{\color{blue}{V \cdot \ell}}{A}}}{c0}}\right)} - 1 \]
      5. sqrt-undiv16.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\frac{\color{blue}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}}{c0}}\right)} - 1 \]
      6. clear-num16.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}}\right)} - 1 \]
      7. sqrt-undiv31.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}}\right)} - 1 \]
      8. *-commutative31.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\sqrt{\frac{\color{blue}{\ell \cdot V}}{A}}}\right)} - 1 \]
      9. associate-*r/29.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\sqrt{\color{blue}{\ell \cdot \frac{V}{A}}}}\right)} - 1 \]
    11. Applied egg-rr29.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def63.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\right)\right)} \]
      2. expm1-log1p92.8%

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

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

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

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

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

    1. Initial program 34.0%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. pow1/234.0%

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

        \[\leadsto c0 \cdot {\color{blue}{\left(\frac{1}{\frac{V \cdot \ell}{A}}\right)}}^{0.5} \]
      3. inv-pow34.0%

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

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{V \cdot \ell}{A}\right)}^{\left(-1 \cdot 0.5\right)}} \]
      5. associate-/l*44.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{-317}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;\frac{A}{V \cdot \ell} \leq 10^{+280}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot {\left(\frac{V}{\frac{A}{\ell}}\right)}^{-0.5}\\ \end{array} \]

Alternative 13: 80.9% accurate, 0.9× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;t_0 \leq 10^{+280}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \end{array} \end{array} \]
NOTE: 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) l)))
     (if (<= t_0 1e+280) (* c0 (sqrt t_0)) (/ c0 (sqrt (* V (/ l A))))))))
assert(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) / l));
	} else if (t_0 <= 1e+280) {
		tmp = c0 * sqrt(t_0);
	} else {
		tmp = c0 / sqrt((V * (l / A)));
	}
	return tmp;
}
NOTE: 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) / l))
    else if (t_0 <= 1d+280) then
        tmp = c0 * sqrt(t_0)
    else
        tmp = c0 / sqrt((v * (l / a)))
    end if
    code = tmp
end function
assert 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) / l));
	} else if (t_0 <= 1e+280) {
		tmp = c0 * Math.sqrt(t_0);
	} else {
		tmp = c0 / Math.sqrt((V * (l / A)));
	}
	return tmp;
}
[V, l] = sort([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) / l))
	elif t_0 <= 1e+280:
		tmp = c0 * math.sqrt(t_0)
	else:
		tmp = c0 / math.sqrt((V * (l / A)))
	return tmp
V, l = sort([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 * sqrt(Float64(Float64(A / V) / l)));
	elseif (t_0 <= 1e+280)
		tmp = Float64(c0 * sqrt(t_0));
	else
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	end
	return tmp
end
V, l = num2cell(sort([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) / l));
	elseif (t_0 <= 1e+280)
		tmp = c0 * sqrt(t_0);
	else
		tmp = c0 / sqrt((V * (l / A)));
	end
	tmp_2 = tmp;
end
NOTE: 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[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+280], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

\mathbf{elif}\;t_0 \leq 10^{+280}:\\
\;\;\;\;c0 \cdot \sqrt{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 A (*.f64 V l)) < 0.0

    1. Initial program 43.5%

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

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

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

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

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

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

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

    1. Initial program 99.1%

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

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

    1. Initial program 34.0%

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def23.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\right)\right)} \]
      2. expm1-log1p44.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;\frac{A}{V \cdot \ell} \leq 10^{+280}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \end{array} \]

Alternative 14: 80.6% accurate, 0.9× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ \begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 5 \cdot 10^{-317}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;t_0 \leq 10^{+280}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \end{array} \end{array} \]
NOTE: 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 5e-317)
     (* c0 (sqrt (/ (/ A V) l)))
     (if (<= t_0 1e+280)
       (/ c0 (sqrt (/ (* V l) A)))
       (/ c0 (sqrt (* V (/ l A))))))))
assert(V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = A / (V * l);
	double tmp;
	if (t_0 <= 5e-317) {
		tmp = c0 * sqrt(((A / V) / l));
	} else if (t_0 <= 1e+280) {
		tmp = c0 / sqrt(((V * l) / A));
	} else {
		tmp = c0 / sqrt((V * (l / A)));
	}
	return tmp;
}
NOTE: 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-317) then
        tmp = c0 * sqrt(((a / v) / l))
    else if (t_0 <= 1d+280) then
        tmp = c0 / sqrt(((v * l) / a))
    else
        tmp = c0 / sqrt((v * (l / a)))
    end if
    code = tmp
end function
assert 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-317) {
		tmp = c0 * Math.sqrt(((A / V) / l));
	} else if (t_0 <= 1e+280) {
		tmp = c0 / Math.sqrt(((V * l) / A));
	} else {
		tmp = c0 / Math.sqrt((V * (l / A)));
	}
	return tmp;
}
[V, l] = sort([V, l])
def code(c0, A, V, l):
	t_0 = A / (V * l)
	tmp = 0
	if t_0 <= 5e-317:
		tmp = c0 * math.sqrt(((A / V) / l))
	elif t_0 <= 1e+280:
		tmp = c0 / math.sqrt(((V * l) / A))
	else:
		tmp = c0 / math.sqrt((V * (l / A)))
	return tmp
V, l = sort([V, l])
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(V * l))
	tmp = 0.0
	if (t_0 <= 5e-317)
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	elseif (t_0 <= 1e+280)
		tmp = Float64(c0 / sqrt(Float64(Float64(V * l) / A)));
	else
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	end
	return tmp
end
V, l = num2cell(sort([V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (V * l);
	tmp = 0.0;
	if (t_0 <= 5e-317)
		tmp = c0 * sqrt(((A / V) / l));
	elseif (t_0 <= 1e+280)
		tmp = c0 / sqrt(((V * l) / A));
	else
		tmp = c0 / sqrt((V * (l / A)));
	end
	tmp_2 = tmp;
end
NOTE: 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, 5e-317], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+280], N[(c0 / N[Sqrt[N[(N[(V * l), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
\begin{array}{l}
t_0 := \frac{A}{V \cdot \ell}\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-317}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

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

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


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

    1. Initial program 44.3%

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

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

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

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

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

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

    if 5.00000017e-317 < (/.f64 A (*.f64 V l)) < 1e280

    1. Initial program 99.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Step-by-step derivation
      1. pow1/299.5%

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt98.7%

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\sqrt[3]{\frac{A}{V \cdot \ell}}\right)}^{1.5}} \]
    4. Step-by-step derivation
      1. cbrt-div98.4%

        \[\leadsto c0 \cdot {\color{blue}{\left(\frac{\sqrt[3]{A}}{\sqrt[3]{V \cdot \ell}}\right)}}^{1.5} \]
      2. *-rgt-identity98.4%

        \[\leadsto c0 \cdot {\left(\frac{\sqrt[3]{\color{blue}{A \cdot 1}}}{\sqrt[3]{V \cdot \ell}}\right)}^{1.5} \]
      3. cbrt-div98.6%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{A \cdot 1}{V \cdot \ell}}\right)}}^{1.5} \]
      4. frac-times92.7%

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

        \[\leadsto c0 \cdot {\left(\sqrt[3]{\color{blue}{\frac{1}{\ell} \cdot \frac{A}{V}}}\right)}^{1.5} \]
      6. cbrt-prod92.7%

        \[\leadsto c0 \cdot {\color{blue}{\left(\sqrt[3]{\frac{1}{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}}^{1.5} \]
      7. cbrt-div92.5%

        \[\leadsto c0 \cdot {\left(\color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{\ell}}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
      8. metadata-eval92.5%

        \[\leadsto c0 \cdot {\left(\frac{\color{blue}{1}}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\frac{A}{V}}\right)}^{1.5} \]
    5. Applied egg-rr92.5%

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

        \[\leadsto c0 \cdot {\color{blue}{\left(\frac{1 \cdot \sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}}^{1.5} \]
      2. *-lft-identity92.5%

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

      \[\leadsto c0 \cdot {\color{blue}{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}}^{1.5} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt92.5%

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

        \[\leadsto c0 \cdot \color{blue}{\sqrt{{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5} \cdot {\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}}} \]
      3. pow-prod-up92.6%

        \[\leadsto c0 \cdot \sqrt{\color{blue}{{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{\left(1.5 + 1.5\right)}}} \]
      4. metadata-eval92.6%

        \[\leadsto c0 \cdot \sqrt{{\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{\color{blue}{3}}} \]
      5. pow392.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1}{\frac{\sqrt{\ell \cdot \frac{V}{A}}}{c0}}\right)\right)} \]
      2. expm1-udef29.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{1}{\frac{\sqrt{\ell \cdot \frac{V}{A}}}{c0}}\right)} - 1} \]
      3. associate-*r/31.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\frac{\sqrt{\color{blue}{\frac{\ell \cdot V}{A}}}}{c0}}\right)} - 1 \]
      4. *-commutative31.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\frac{\sqrt{\frac{\color{blue}{V \cdot \ell}}{A}}}{c0}}\right)} - 1 \]
      5. sqrt-undiv16.3%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{1}{\frac{\color{blue}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}}{c0}}\right)} - 1 \]
      6. clear-num16.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}}\right)} - 1 \]
      7. sqrt-undiv31.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}}\right)} - 1 \]
      8. *-commutative31.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\sqrt{\frac{\color{blue}{\ell \cdot V}}{A}}}\right)} - 1 \]
      9. associate-*r/29.9%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{c0}{\sqrt{\color{blue}{\ell \cdot \frac{V}{A}}}}\right)} - 1 \]
    11. Applied egg-rr29.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\right)} - 1} \]
    12. Step-by-step derivation
      1. expm1-def63.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\right)\right)} \]
      2. expm1-log1p92.8%

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

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

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

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

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

    1. Initial program 34.0%

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def23.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\right)\right)} \]
      2. expm1-log1p44.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{-317}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;\frac{A}{V \cdot \ell} \leq 10^{+280}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \end{array} \]

Alternative 15: 74.9% accurate, 1.0× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \end{array} \]
NOTE: 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(V < l);
double code(double c0, double A, double V, double l) {
	return c0 * sqrt((A / (V * l)));
}
NOTE: 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 V < l;
public static double code(double c0, double A, double V, double l) {
	return c0 * Math.sqrt((A / (V * l)));
}
[V, l] = sort([V, l])
def code(c0, A, V, l):
	return c0 * math.sqrt((A / (V * l)))
V, l = sort([V, l])
function code(c0, A, V, l)
	return Float64(c0 * sqrt(Float64(A / Float64(V * l))))
end
V, l = num2cell(sort([V, l])){:}
function tmp = code(c0, A, V, l)
	tmp = c0 * sqrt((A / (V * l)));
end
NOTE: 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}
[V, l] = \mathsf{sort}([V, l])\\
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Derivation
  1. Initial program 73.2%

    \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
  2. Final simplification73.2%

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

Alternative 16: 74.7% accurate, 1.0× speedup?

\[\begin{array}{l} [V, l] = \mathsf{sort}([V, l])\\ \\ c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}} \end{array} \]
NOTE: 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(V < l);
double code(double c0, double A, double V, double l) {
	return c0 * sqrt(((A / V) / l));
}
NOTE: 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 V < l;
public static double code(double c0, double A, double V, double l) {
	return c0 * Math.sqrt(((A / V) / l));
}
[V, l] = sort([V, l])
def code(c0, A, V, l):
	return c0 * math.sqrt(((A / V) / l))
V, l = sort([V, l])
function code(c0, A, V, l)
	return Float64(c0 * sqrt(Float64(Float64(A / V) / l)))
end
V, l = num2cell(sort([V, l])){:}
function tmp = code(c0, A, V, l)
	tmp = c0 * sqrt(((A / V) / l));
end
NOTE: V and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[V, l] = \mathsf{sort}([V, l])\\
\\
c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}
\end{array}
Derivation
  1. Initial program 73.2%

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

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

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

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

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

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

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

Reproduce

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