Henrywood and Agarwal, Equation (3)

Percentage Accurate: 74.3% → 91.3%
Time: 10.4s
Alternatives: 12
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 12 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 91.3% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 33.4%

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

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

        \[\leadsto \sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0 \]
      3. sqrt-divN/A

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

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

        \[\leadsto \sqrt{\frac{A}{V}} \cdot \color{blue}{\frac{c0}{\sqrt{\ell}}} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \color{blue}{\left(\frac{c0}{\sqrt{\ell}}\right)}\right) \]
      7. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{A}{V}\right)}^{\frac{1}{2}}\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{1}{\frac{V}{A}}\right)}^{\frac{1}{2}}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      9. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{V}{A}\right)}^{-1}\right)}^{\frac{1}{2}}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      10. pow-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{V}{A}\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      11. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{V}{A}\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \frac{-1}{2}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\ell}\right)}\right)\right) \]
      15. sqrt-lowering-sqrt.f6439.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
    4. Applied egg-rr39.3%

      \[\leadsto \color{blue}{{\left(\frac{V}{A}\right)}^{-0.5} \cdot \frac{c0}{\sqrt{\ell}}} \]
    5. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{V}{A}\right)}^{\left(\frac{-1}{2}\right)}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      2. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(\frac{V}{A}\right)}^{-1}}\right), \mathsf{/.f64}\left(\color{blue}{c0}, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{\frac{V}{A}}}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), \mathsf{/.f64}\left(\color{blue}{c0}, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      6. /-lowering-/.f6439.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
    6. Applied egg-rr39.3%

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

    if -inf.0 < (*.f64 V l) < -3.9999999e-318

    1. Initial program 84.0%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6476.2%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr76.2%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{V}{A} \cdot \ell}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\ell \cdot \frac{V}{A}}\right)\right) \]
      3. /-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\ell}{1} \cdot \frac{V}{A}}\right)\right) \]
      4. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\ell}{\frac{1}{\frac{V}{A}}}}\right)\right) \]
      5. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\ell}{\frac{1}{\frac{\mathsf{neg}\left(V\right)}{\mathsf{neg}\left(A\right)}}}}\right)\right) \]
      6. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\ell}{\frac{1}{\mathsf{neg}\left(V\right)} \cdot \left(\mathsf{neg}\left(A\right)\right)}}\right)\right) \]
      7. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\frac{\ell}{\frac{1}{\mathsf{neg}\left(V\right)}}}{\mathsf{neg}\left(A\right)}}\right)\right) \]
      8. sqrt-divN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\frac{\sqrt{\frac{\ell}{\frac{1}{\mathsf{neg}\left(V\right)}}}}{\color{blue}{\sqrt{\mathsf{neg}\left(A\right)}}}\right)\right) \]
      9. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\frac{\sqrt{\frac{\ell}{\frac{1}{\mathsf{neg}\left(V\right)}}}}{{\left(\mathsf{neg}\left(A\right)\right)}^{\color{blue}{\frac{1}{2}}}}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{\frac{\ell}{\frac{1}{\mathsf{neg}\left(V\right)}}}\right), \color{blue}{\left({\left(\mathsf{neg}\left(A\right)\right)}^{\frac{1}{2}}\right)}\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\ell}{\frac{1}{\mathsf{neg}\left(V\right)}}\right)\right), \left({\color{blue}{\left(\mathsf{neg}\left(A\right)\right)}}^{\frac{1}{2}}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \left(\frac{1}{\mathsf{neg}\left(V\right)}\right)\right)\right), \left({\left(\mathsf{neg}\left(\color{blue}{A}\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \left(\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(V\right)}\right)\right)\right), \left({\left(\mathsf{neg}\left(A\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      14. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \left(\frac{-1}{V}\right)\right)\right), \left({\left(\mathsf{neg}\left(A\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(-1, V\right)\right)\right), \left({\left(\mathsf{neg}\left(A\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      16. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(-1, V\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(A\right)\right), \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      17. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(-1, V\right)\right)\right), \mathsf{pow.f64}\left(\left(0 - A\right), \frac{1}{2}\right)\right)\right) \]
      18. --lowering--.f6498.9%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(-1, V\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, A\right), \frac{1}{2}\right)\right)\right) \]
    6. Applied egg-rr98.9%

      \[\leadsto \frac{c0}{\color{blue}{\frac{\sqrt{\frac{\ell}{\frac{-1}{V}}}}{{\left(0 - A\right)}^{0.5}}}} \]

    if -3.9999999e-318 < (*.f64 V l) < 1.9999999999999999e-302

    1. Initial program 77.1%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6484.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr84.6%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{1}{\frac{\ell}{A}}\right)\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{1}{\ell} \cdot A\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{*.f64}\left(\left(\frac{1}{\ell}\right), A\right)\right)\right)\right) \]
      4. /-lowering-/.f6484.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \ell\right), A\right)\right)\right)\right) \]
    6. Applied egg-rr84.6%

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

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{\frac{1}{\ell} \cdot A}{V}}}\right)\right) \]
      2. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{-1}}\right)\right) \]
      3. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{\frac{-1}{2}}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{\frac{1}{\ell} \cdot A}{V}\right), \color{blue}{\frac{-1}{2}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell} \cdot A\right), V\right), \frac{-1}{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(A \cdot \frac{1}{\ell}\right), V\right), \frac{-1}{2}\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right), \frac{-1}{2}\right)\right) \]
      9. /-lowering-/.f6484.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right), \frac{-1}{2}\right)\right) \]
    8. Applied egg-rr84.6%

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

    if 1.9999999999999999e-302 < (*.f64 V l) < 1.99999999999999991e271

    1. Initial program 76.6%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{A}}{\color{blue}{\sqrt{V \cdot \ell}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{A}\right), \color{blue}{\left(\sqrt{V \cdot \ell}\right)}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\color{blue}{V \cdot \ell}}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(V \cdot \ell\right)\right)\right)\right) \]
      5. *-lowering-*.f6499.5%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr99.5%

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

    if 1.99999999999999991e271 < (*.f64 V l)

    1. Initial program 62.4%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6483.2%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr83.2%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{A}{\ell}}{V}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{A}{\ell}} \cdot V\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell}{A} \cdot V\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{\ell}{A}\right), V\right)\right)\right) \]
      5. /-lowering-/.f6483.4%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, A\right), V\right)\right)\right) \]
    6. Applied egg-rr83.4%

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

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

Alternative 2: 88.5% accurate, 0.3× speedup?

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

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


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

    1. Initial program 73.0%

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

        \[\leadsto c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}} \]
      2. sqrt-divN/A

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

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

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

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{\mathsf{neg}\left(A\right)}{\mathsf{neg}\left(V\right)}} \]
      6. sqrt-divN/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \frac{\sqrt{\mathsf{neg}\left(A\right)}}{\color{blue}{\sqrt{\mathsf{neg}\left(V\right)}}} \]
      7. pow1/2N/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \frac{\sqrt{\mathsf{neg}\left(A\right)}}{{\left(\mathsf{neg}\left(V\right)\right)}^{\color{blue}{\frac{1}{2}}}} \]
      8. associate-*r/N/A

        \[\leadsto \frac{\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\mathsf{neg}\left(A\right)}}{\color{blue}{{\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}}} \]
      9. div-invN/A

        \[\leadsto \left(\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\mathsf{neg}\left(A\right)}\right) \cdot \color{blue}{\frac{1}{{\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}}} \]
      10. pow-flipN/A

        \[\leadsto \left(\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\mathsf{neg}\left(A\right)}\right) \cdot {\left(\mathsf{neg}\left(V\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      11. metadata-evalN/A

        \[\leadsto \left(\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\mathsf{neg}\left(A\right)}\right) \cdot {\left(\mathsf{neg}\left(V\right)\right)}^{\frac{-1}{2}} \]
      12. metadata-evalN/A

        \[\leadsto \left(\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\mathsf{neg}\left(A\right)}\right) \cdot {\left(\mathsf{neg}\left(V\right)\right)}^{\left(-1 \cdot \color{blue}{\frac{1}{2}}\right)} \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\mathsf{neg}\left(A\right)}\right), \color{blue}{\left({\left(\mathsf{neg}\left(V\right)\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right)}\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{c0}{\sqrt{\ell}}\right), \left(\sqrt{\mathsf{neg}\left(A\right)}\right)\right), \left({\color{blue}{\left(\mathsf{neg}\left(V\right)\right)}}^{\left(-1 \cdot \frac{1}{2}\right)}\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \left(\sqrt{\ell}\right)\right), \left(\sqrt{\mathsf{neg}\left(A\right)}\right)\right), \left({\left(\mathsf{neg}\left(\color{blue}{V}\right)\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right)\right) \]
      16. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right), \left(\sqrt{\mathsf{neg}\left(A\right)}\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right)\right) \]
      17. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right), \left({\left(\mathsf{neg}\left(A\right)\right)}^{\frac{1}{2}}\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(A\right)\right), \frac{1}{2}\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right)\right) \]
      19. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right), \mathsf{pow.f64}\left(\left(0 - A\right), \frac{1}{2}\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right)\right) \]
      20. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, A\right), \frac{1}{2}\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right)\right) \]
    4. Applied egg-rr45.6%

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

    if -4.999999999999985e-310 < A

    1. Initial program 75.1%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{A}}{\color{blue}{\sqrt{V \cdot \ell}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{A}\right), \color{blue}{\left(\sqrt{V \cdot \ell}\right)}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\color{blue}{V \cdot \ell}}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(V \cdot \ell\right)\right)\right)\right) \]
      5. *-lowering-*.f6491.0%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr91.0%

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

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

Alternative 3: 91.3% accurate, 0.5× speedup?

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

\mathbf{elif}\;\ell \cdot V \leq -4 \cdot 10^{-318}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{0 - \ell \cdot V}}{\sqrt{0 - A}}}\\

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

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

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


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

    1. Initial program 33.4%

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

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

        \[\leadsto \sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0 \]
      3. sqrt-divN/A

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

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

        \[\leadsto \sqrt{\frac{A}{V}} \cdot \color{blue}{\frac{c0}{\sqrt{\ell}}} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \color{blue}{\left(\frac{c0}{\sqrt{\ell}}\right)}\right) \]
      7. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{A}{V}\right)}^{\frac{1}{2}}\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{1}{\frac{V}{A}}\right)}^{\frac{1}{2}}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      9. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{V}{A}\right)}^{-1}\right)}^{\frac{1}{2}}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      10. pow-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{V}{A}\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      11. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{V}{A}\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \frac{-1}{2}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\ell}\right)}\right)\right) \]
      15. sqrt-lowering-sqrt.f6439.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
    4. Applied egg-rr39.3%

      \[\leadsto \color{blue}{{\left(\frac{V}{A}\right)}^{-0.5} \cdot \frac{c0}{\sqrt{\ell}}} \]
    5. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{V}{A}\right)}^{\left(\frac{-1}{2}\right)}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      2. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(\frac{V}{A}\right)}^{-1}}\right), \mathsf{/.f64}\left(\color{blue}{c0}, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{\frac{V}{A}}}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), \mathsf{/.f64}\left(\color{blue}{c0}, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      6. /-lowering-/.f6439.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
    6. Applied egg-rr39.3%

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

    if -inf.0 < (*.f64 V l) < -3.9999999e-318

    1. Initial program 84.0%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6476.2%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr76.2%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{V}{A}\right), \ell\right)\right)\right) \]
      3. /-lowering-/.f6479.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(V, A\right), \ell\right)\right)\right) \]
    6. Applied egg-rr79.6%

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

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right)\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{V}{A \cdot \frac{1}{\ell}}}\right)\right) \]
      3. associate-/l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\frac{V}{\frac{1}{\ell}}}{A}}\right)\right) \]
      4. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\mathsf{neg}\left(\frac{V}{\frac{1}{\ell}}\right)}{\mathsf{neg}\left(A\right)}}\right)\right) \]
      5. sqrt-divN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\frac{\sqrt{\mathsf{neg}\left(\frac{V}{\frac{1}{\ell}}\right)}}{\color{blue}{\sqrt{\mathsf{neg}\left(A\right)}}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{\mathsf{neg}\left(\frac{V}{\frac{1}{\ell}}\right)}\right), \color{blue}{\left(\sqrt{\mathsf{neg}\left(A\right)}\right)}\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(\frac{V}{\frac{1}{\ell}}\right)\right)\right), \left(\sqrt{\color{blue}{\mathsf{neg}\left(A\right)}}\right)\right)\right) \]
      8. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(0 - \frac{V}{\frac{1}{\ell}}\right)\right), \left(\sqrt{\mathsf{neg}\left(\color{blue}{A}\right)}\right)\right)\right) \]
      9. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \left(\frac{V}{\frac{1}{\ell}}\right)\right)\right), \left(\sqrt{\mathsf{neg}\left(\color{blue}{A}\right)}\right)\right)\right) \]
      10. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \left(\frac{V}{1} \cdot \ell\right)\right)\right), \left(\sqrt{\mathsf{neg}\left(A\right)}\right)\right)\right) \]
      11. /-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \left(V \cdot \ell\right)\right)\right), \left(\sqrt{\mathsf{neg}\left(A\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(V, \ell\right)\right)\right), \left(\sqrt{\mathsf{neg}\left(A\right)}\right)\right)\right) \]
      13. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(V, \ell\right)\right)\right), \mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(A\right)\right)\right)\right)\right) \]
      14. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(V, \ell\right)\right)\right), \mathsf{sqrt.f64}\left(\left(0 - A\right)\right)\right)\right) \]
      15. --lowering--.f6498.9%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(V, \ell\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, A\right)\right)\right)\right) \]
    8. Applied egg-rr98.9%

      \[\leadsto \frac{c0}{\color{blue}{\frac{\sqrt{0 - V \cdot \ell}}{\sqrt{0 - A}}}} \]
    9. Step-by-step derivation
      1. sub0-negN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(V \cdot \ell\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\color{blue}{0}, A\right)\right)\right)\right) \]
      2. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(V \cdot \ell\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\color{blue}{0}, A\right)\right)\right)\right) \]
      3. *-lowering-*.f6498.9%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(V, \ell\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, A\right)\right)\right)\right) \]
    10. Applied egg-rr98.9%

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

    if -3.9999999e-318 < (*.f64 V l) < 1.9999999999999999e-302

    1. Initial program 77.1%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6484.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr84.6%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{1}{\frac{\ell}{A}}\right)\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{1}{\ell} \cdot A\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{*.f64}\left(\left(\frac{1}{\ell}\right), A\right)\right)\right)\right) \]
      4. /-lowering-/.f6484.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \ell\right), A\right)\right)\right)\right) \]
    6. Applied egg-rr84.6%

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

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{\frac{1}{\ell} \cdot A}{V}}}\right)\right) \]
      2. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{-1}}\right)\right) \]
      3. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{\frac{-1}{2}}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{\frac{1}{\ell} \cdot A}{V}\right), \color{blue}{\frac{-1}{2}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell} \cdot A\right), V\right), \frac{-1}{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(A \cdot \frac{1}{\ell}\right), V\right), \frac{-1}{2}\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right), \frac{-1}{2}\right)\right) \]
      9. /-lowering-/.f6484.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right), \frac{-1}{2}\right)\right) \]
    8. Applied egg-rr84.6%

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

    if 1.9999999999999999e-302 < (*.f64 V l) < 1.99999999999999991e271

    1. Initial program 76.6%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{A}}{\color{blue}{\sqrt{V \cdot \ell}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{A}\right), \color{blue}{\left(\sqrt{V \cdot \ell}\right)}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\color{blue}{V \cdot \ell}}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(V \cdot \ell\right)\right)\right)\right) \]
      5. *-lowering-*.f6499.5%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr99.5%

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

    if 1.99999999999999991e271 < (*.f64 V l)

    1. Initial program 62.4%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6483.2%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr83.2%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{A}{\ell}}{V}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{A}{\ell}} \cdot V\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell}{A} \cdot V\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{\ell}{A}\right), V\right)\right)\right) \]
      5. /-lowering-/.f6483.4%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, A\right), V\right)\right)\right) \]
    6. Applied egg-rr83.4%

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

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

Alternative 4: 81.6% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 74.4%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{V}}{\ell}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{V}\right), \ell\right)\right)\right) \]
      3. /-lowering-/.f6478.5%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, V\right), \ell\right)\right)\right) \]
    4. Applied egg-rr78.5%

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

    if 1.9999999999999999e-302 < (*.f64 V l) < 1.99999999999999991e271

    1. Initial program 76.6%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{A}}{\color{blue}{\sqrt{V \cdot \ell}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{A}\right), \color{blue}{\left(\sqrt{V \cdot \ell}\right)}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\color{blue}{V \cdot \ell}}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(V \cdot \ell\right)\right)\right)\right) \]
      5. *-lowering-*.f6499.5%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr99.5%

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

    if 1.99999999999999991e271 < (*.f64 V l)

    1. Initial program 62.4%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6483.2%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr83.2%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{\frac{A}{\ell}}{V}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{A}{\ell}} \cdot V\right)\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell}{A} \cdot V\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{\ell}{A}\right), V\right)\right)\right) \]
      5. /-lowering-/.f6483.4%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, A\right), V\right)\right)\right) \]
    6. Applied egg-rr83.4%

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

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

Alternative 5: 84.3% accurate, 0.5× speedup?

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

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


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

    1. Initial program 73.0%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6475.7%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr75.7%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{\frac{A}{\ell}}{V}}}\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{A}{\ell}} \cdot V}\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\ell}{A} \cdot V}\right)\right) \]
      4. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\ell}{\frac{A}{V}}}\right)\right) \]
      5. sqrt-divN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\frac{\sqrt{\ell}}{\color{blue}{\sqrt{\frac{A}{V}}}}\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\frac{\sqrt{\ell}}{\sqrt{\frac{1}{\frac{V}{A}}}}\right)\right) \]
      7. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\frac{\sqrt{\ell}}{\sqrt{{\left(\frac{V}{A}\right)}^{-1}}}\right)\right) \]
      8. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\frac{\sqrt{\ell}}{{\left(\frac{V}{A}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\frac{\sqrt{\ell}}{{\left(\frac{V}{A}\right)}^{\frac{-1}{2}}}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{\ell}\right), \color{blue}{\left({\left(\frac{V}{A}\right)}^{\frac{-1}{2}}\right)}\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), \left({\color{blue}{\left(\frac{V}{A}\right)}}^{\frac{-1}{2}}\right)\right)\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), \left({\left(\frac{1}{\frac{A}{V}}\right)}^{\frac{-1}{2}}\right)\right)\right) \]
      13. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), \left({\left({\left(\frac{A}{V}\right)}^{-1}\right)}^{\frac{-1}{2}}\right)\right)\right) \]
      14. pow-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), \left({\left(\frac{A}{V}\right)}^{\color{blue}{\left(-1 \cdot \frac{-1}{2}\right)}}\right)\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), \left({\left(\frac{A}{V}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      16. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), \mathsf{pow.f64}\left(\left(\frac{A}{V}\right), \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      17. /-lowering-/.f6442.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right)\right)\right) \]
    6. Applied egg-rr42.6%

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

    if -4.999999999999985e-310 < A

    1. Initial program 75.1%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{A}}{\color{blue}{\sqrt{V \cdot \ell}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{A}\right), \color{blue}{\left(\sqrt{V \cdot \ell}\right)}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\color{blue}{V \cdot \ell}}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(V \cdot \ell\right)\right)\right)\right) \]
      5. *-lowering-*.f6491.0%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr91.0%

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

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

Alternative 6: 84.2% accurate, 0.5× speedup?

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

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


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

    1. Initial program 73.0%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{V}}{\ell}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{V}\right), \ell\right)\right)\right) \]
      3. /-lowering-/.f6477.6%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, V\right), \ell\right)\right)\right) \]
    4. Applied egg-rr77.6%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{\frac{A}{V \cdot \ell}}\right)\right) \]
      2. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{\frac{\frac{A}{\ell}}{V}}\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{V}{\frac{A}{\ell}}}}\right)\right) \]
      4. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V}{\frac{A}{\ell}}}}}\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{1}{\sqrt{\color{blue}{\frac{V}{\frac{A}{\ell}}}}}\right)\right) \]
      6. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left({\left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right)}^{\color{blue}{-1}}\right)\right) \]
      7. pow-to-expN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(e^{\log \left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right) \cdot -1}\right)\right) \]
      8. rem-log-expN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(e^{\log \left(e^{\log \left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right) \cdot -1}\right)}\right)\right) \]
      9. pow-to-expN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(e^{\log \left({\left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right)}^{-1}\right)}\right)\right) \]
      10. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(e^{\log \left(\frac{1}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\right)}\right)\right) \]
      11. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{exp.f64}\left(\log \left(\frac{1}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\right)\right)\right) \]
      12. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{exp.f64}\left(\log \left({\left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right)}^{-1}\right)\right)\right) \]
      13. sqrt-pow2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{exp.f64}\left(\log \left({\left(\frac{V}{\frac{A}{\ell}}\right)}^{\left(\frac{-1}{2}\right)}\right)\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{exp.f64}\left(\log \left({\left(\frac{V}{\frac{A}{\ell}}\right)}^{\frac{-1}{2}}\right)\right)\right) \]
      15. log-powN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{exp.f64}\left(\left(\frac{-1}{2} \cdot \log \left(\frac{V}{\frac{A}{\ell}}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \log \left(\frac{V}{\frac{A}{\ell}}\right)\right)\right)\right) \]
      17. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{log.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right)\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{log.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right)\right)\right) \]
      19. /-lowering-/.f6472.2%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{log.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right)\right)\right) \]
    6. Applied egg-rr72.2%

      \[\leadsto c0 \cdot \color{blue}{e^{-0.5 \cdot \log \left(\frac{V}{\frac{A}{\ell}}\right)}} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(e^{\log \left(\frac{V}{\frac{A}{\ell}}\right) \cdot \frac{-1}{2}}\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(e^{\log \left(\frac{V}{A} \cdot \ell\right) \cdot \frac{-1}{2}}\right)\right) \]
      3. exp-to-powN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left({\left(\frac{V}{A} \cdot \ell\right)}^{\color{blue}{\frac{-1}{2}}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left({\left(\frac{V}{A} \cdot \ell\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right) \]
      5. pow-flipN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{1}{\color{blue}{{\left(\frac{V}{A} \cdot \ell\right)}^{\frac{1}{2}}}}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{1}{{\left(\frac{V}{A}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\ell}^{\frac{1}{2}}}}\right)\right) \]
      7. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\frac{1}{{\left(\frac{V}{A}\right)}^{\frac{1}{2}}}}{\color{blue}{{\ell}^{\frac{1}{2}}}}\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{1}{\color{blue}{{\ell}^{\frac{1}{2}} \cdot {\left(\frac{V}{A}\right)}^{\frac{1}{2}}}}\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\frac{1}{{\ell}^{\frac{1}{2}}}}{\color{blue}{{\left(\frac{V}{A}\right)}^{\frac{1}{2}}}}\right)\right) \]
      10. pow-flipN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{{\ell}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}{{\color{blue}{\left(\frac{V}{A}\right)}}^{\frac{1}{2}}}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{{\ell}^{\frac{-1}{2}}}{{\left(\frac{V}{\color{blue}{A}}\right)}^{\frac{1}{2}}}\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left({\ell}^{\frac{-1}{2}}\right), \color{blue}{\left({\left(\frac{V}{A}\right)}^{\frac{1}{2}}\right)}\right)\right) \]
      13. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \frac{-1}{2}\right), \left({\color{blue}{\left(\frac{V}{A}\right)}}^{\frac{1}{2}}\right)\right)\right) \]
      14. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \frac{-1}{2}\right), \left(\sqrt{\frac{V}{A}}\right)\right)\right) \]
      15. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(\left(\frac{V}{A}\right)\right)\right)\right) \]
      16. /-lowering-/.f6442.6%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\ell, \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, A\right)\right)\right)\right) \]
    8. Applied egg-rr42.6%

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

    if -4.999999999999985e-310 < A

    1. Initial program 75.1%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{A}}{\color{blue}{\sqrt{V \cdot \ell}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{A}\right), \color{blue}{\left(\sqrt{V \cdot \ell}\right)}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\color{blue}{V \cdot \ell}}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(V \cdot \ell\right)\right)\right)\right) \]
      5. *-lowering-*.f6491.0%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr91.0%

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

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

Alternative 7: 83.0% accurate, 0.5× speedup?

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

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


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

    1. Initial program 73.0%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6475.7%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr75.7%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{V}{A}\right), \ell\right)\right)\right) \]
      3. /-lowering-/.f6478.3%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(V, A\right), \ell\right)\right)\right) \]
    6. Applied egg-rr78.3%

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

        \[\leadsto \frac{c0}{{\left(\frac{V}{A} \cdot \ell\right)}^{\color{blue}{\frac{1}{2}}}} \]
      2. unpow-prod-downN/A

        \[\leadsto \frac{c0}{{\left(\frac{V}{A}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\ell}^{\frac{1}{2}}}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{c0}{{\left(\frac{V}{A}\right)}^{\frac{1}{2}}}}{\color{blue}{{\ell}^{\frac{1}{2}}}} \]
      4. associate-/l/N/A

        \[\leadsto \frac{c0}{\color{blue}{{\ell}^{\frac{1}{2}} \cdot {\left(\frac{V}{A}\right)}^{\frac{1}{2}}}} \]
      5. *-rgt-identityN/A

        \[\leadsto \frac{c0 \cdot 1}{\color{blue}{{\ell}^{\frac{1}{2}}} \cdot {\left(\frac{V}{A}\right)}^{\frac{1}{2}}} \]
      6. times-fracN/A

        \[\leadsto \frac{c0}{{\ell}^{\frac{1}{2}}} \cdot \color{blue}{\frac{1}{{\left(\frac{V}{A}\right)}^{\frac{1}{2}}}} \]
      7. metadata-evalN/A

        \[\leadsto \frac{c0}{{\ell}^{\frac{1}{2}}} \cdot \frac{\sqrt{1}}{{\color{blue}{\left(\frac{V}{A}\right)}}^{\frac{1}{2}}} \]
      8. pow1/2N/A

        \[\leadsto \frac{c0}{{\ell}^{\frac{1}{2}}} \cdot \frac{\sqrt{1}}{\sqrt{\frac{V}{A}}} \]
      9. sqrt-divN/A

        \[\leadsto \frac{c0}{{\ell}^{\frac{1}{2}}} \cdot \sqrt{\frac{1}{\frac{V}{A}}} \]
      10. clear-numN/A

        \[\leadsto \frac{c0}{{\ell}^{\frac{1}{2}}} \cdot \sqrt{\frac{A}{V}} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\frac{A}{V}} \cdot \color{blue}{\frac{c0}{{\ell}^{\frac{1}{2}}}} \]
      12. associate-*r/N/A

        \[\leadsto \frac{\sqrt{\frac{A}{V}} \cdot c0}{\color{blue}{{\ell}^{\frac{1}{2}}}} \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{A}{V}} \cdot c0\right), \color{blue}{\left({\ell}^{\frac{1}{2}}\right)}\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), c0\right), \left({\color{blue}{\ell}}^{\frac{1}{2}}\right)\right) \]
      15. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), c0\right), \left({\ell}^{\frac{1}{2}}\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), c0\right), \left({\ell}^{\frac{1}{2}}\right)\right) \]
      17. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), c0\right), \left(\sqrt{\ell}\right)\right) \]
      18. sqrt-lowering-sqrt.f6441.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), c0\right), \mathsf{sqrt.f64}\left(\ell\right)\right) \]
    8. Applied egg-rr41.1%

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

    if -4.999999999999985e-310 < A

    1. Initial program 75.1%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{A}}{\color{blue}{\sqrt{V \cdot \ell}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{A}\right), \color{blue}{\left(\sqrt{V \cdot \ell}\right)}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\color{blue}{V \cdot \ell}}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(V \cdot \ell\right)\right)\right)\right) \]
      5. *-lowering-*.f6491.0%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr91.0%

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

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

Alternative 8: 82.9% accurate, 0.5× speedup?

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

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


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

    1. Initial program 73.0%

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

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

        \[\leadsto \sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0 \]
      3. sqrt-divN/A

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

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

        \[\leadsto \sqrt{\frac{A}{V}} \cdot \color{blue}{\frac{c0}{\sqrt{\ell}}} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \color{blue}{\left(\frac{c0}{\sqrt{\ell}}\right)}\right) \]
      7. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{A}{V}\right)}^{\frac{1}{2}}\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{1}{\frac{V}{A}}\right)}^{\frac{1}{2}}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      9. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{V}{A}\right)}^{-1}\right)}^{\frac{1}{2}}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      10. pow-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{V}{A}\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      11. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{V}{A}\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \frac{-1}{2}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\ell}\right)}\right)\right) \]
      15. sqrt-lowering-sqrt.f6440.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(V, A\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
    4. Applied egg-rr40.4%

      \[\leadsto \color{blue}{{\left(\frac{V}{A}\right)}^{-0.5} \cdot \frac{c0}{\sqrt{\ell}}} \]
    5. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{V}{A}\right)}^{\left(\frac{-1}{2}\right)}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      2. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{{\left(\frac{V}{A}\right)}^{-1}}\right), \mathsf{/.f64}\left(\color{blue}{c0}, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{\frac{V}{A}}}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), \mathsf{/.f64}\left(\color{blue}{c0}, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      6. /-lowering-/.f6440.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
    6. Applied egg-rr40.4%

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

    if -4.999999999999985e-310 < A

    1. Initial program 75.1%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{A}}{\color{blue}{\sqrt{V \cdot \ell}}}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{A}\right), \color{blue}{\left(\sqrt{V \cdot \ell}\right)}\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\color{blue}{V \cdot \ell}}\right)\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(V \cdot \ell\right)\right)\right)\right) \]
      5. *-lowering-*.f6491.0%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr91.0%

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

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

Alternative 9: 77.8% accurate, 0.9× speedup?

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

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


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

    1. Initial program 44.7%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6464.5%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr64.5%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{1}{\frac{\ell}{A}}\right)\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{1}{\ell} \cdot A\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{*.f64}\left(\left(\frac{1}{\ell}\right), A\right)\right)\right)\right) \]
      4. /-lowering-/.f6464.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \ell\right), A\right)\right)\right)\right) \]
    6. Applied egg-rr64.6%

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

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{\frac{1}{\ell} \cdot A}{V}}}\right)\right) \]
      2. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{-1}}\right)\right) \]
      3. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{\frac{-1}{2}}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{\frac{1}{\ell} \cdot A}{V}\right), \color{blue}{\frac{-1}{2}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell} \cdot A\right), V\right), \frac{-1}{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(A \cdot \frac{1}{\ell}\right), V\right), \frac{-1}{2}\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right), \frac{-1}{2}\right)\right) \]
      9. /-lowering-/.f6466.7%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right), \frac{-1}{2}\right)\right) \]
    8. Applied egg-rr66.7%

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

    if 4.00193e-322 < (/.f64 A (*.f64 V l))

    1. Initial program 84.2%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6478.5%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr78.5%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{1}{\frac{\ell}{A}}}\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{1}{\ell} \cdot A}\right)\right)\right) \]
      3. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{V}{\frac{1}{\ell}}}{A}\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{V}{\frac{1}{\ell}}\right), A\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{1}{\ell}\right)\right), A\right)\right)\right) \]
      6. /-lowering-/.f6484.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(1, \ell\right)\right), A\right)\right)\right) \]
    6. Applied egg-rr84.6%

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

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

Alternative 10: 77.4% accurate, 0.9× speedup?

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

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


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

    1. Initial program 49.3%

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

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V \cdot \ell}{A}}} \]
      2. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      3. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V \cdot \ell}{A}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      7. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{A} \cdot \ell\right)\right)\right) \]
      8. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V}{\frac{A}{\ell}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{A}{\ell}\right)\right)\right)\right) \]
      10. /-lowering-/.f6467.5%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{/.f64}\left(A, \ell\right)\right)\right)\right) \]
    4. Applied egg-rr67.5%

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{1}{\frac{\ell}{A}}\right)\right)\right)\right) \]
      2. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \left(\frac{1}{\ell} \cdot A\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{*.f64}\left(\left(\frac{1}{\ell}\right), A\right)\right)\right)\right) \]
      4. /-lowering-/.f6467.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(V, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \ell\right), A\right)\right)\right)\right) \]
    6. Applied egg-rr67.6%

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

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{\frac{1}{\ell} \cdot A}{V}}}\right)\right) \]
      2. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{-1}}\right)\right) \]
      3. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{1}{\ell} \cdot A}{V}\right)}^{\frac{-1}{2}}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{\frac{1}{\ell} \cdot A}{V}\right), \color{blue}{\frac{-1}{2}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell} \cdot A\right), V\right), \frac{-1}{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(A \cdot \frac{1}{\ell}\right), V\right), \frac{-1}{2}\right)\right) \]
      8. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right), \frac{-1}{2}\right)\right) \]
      9. /-lowering-/.f6469.5%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right), \frac{-1}{2}\right)\right) \]
    8. Applied egg-rr69.5%

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

    if 5.00000000000000029e-289 < (/.f64 A (*.f64 V l))

    1. Initial program 83.7%

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

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

Alternative 11: 77.8% accurate, 0.9× speedup?

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

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


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

    1. Initial program 45.2%

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

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{V}}{\ell}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{V}\right), \ell\right)\right)\right) \]
      3. /-lowering-/.f6467.8%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, V\right), \ell\right)\right)\right) \]
    4. Applied egg-rr67.8%

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

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

    1. Initial program 83.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{\ell \cdot V} \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 74.3% accurate, 1.0× speedup?

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

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

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

Reproduce

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