Henrywood and Agarwal, Equation (3)

Percentage Accurate: 73.9% → 90.3%
Time: 11.9s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 73.9% accurate, 1.0× speedup?

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

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

Alternative 1: 90.3% accurate, 0.3× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{-1}{V}}\\ \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;\frac{\left({\left(0 - A\right)}^{0.5} \cdot c0\right) \cdot t\_0}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-253}:\\ \;\;\;\;\frac{c0}{{\left(0 - V \cdot \ell\right)}^{0.5} \cdot \sqrt{\frac{-1}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \left(t\_0 \cdot \sqrt{0 - \frac{A}{\ell}}\right)\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{A}}{V} \cdot \left(c0 \cdot {\left(\frac{V}{\ell}\right)}^{0.5}\right)\\ \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 (sqrt (/ -1.0 V))))
   (if (<= (* V l) (- INFINITY))
     (/ (* (* (pow (- 0.0 A) 0.5) c0) t_0) (sqrt l))
     (if (<= (* V l) -5e-253)
       (/ c0 (* (pow (- 0.0 (* V l)) 0.5) (sqrt (/ -1.0 A))))
       (if (<= (* V l) 2e-313)
         (* c0 (* t_0 (sqrt (- 0.0 (/ A l)))))
         (if (<= (* V l) INFINITY)
           (* c0 (* (pow (* V l) -0.5) (sqrt A)))
           (* (/ (sqrt A) V) (* c0 (pow (/ V l) 0.5)))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = sqrt((-1.0 / V));
	double tmp;
	if ((V * l) <= -((double) INFINITY)) {
		tmp = ((pow((0.0 - A), 0.5) * c0) * t_0) / sqrt(l);
	} else if ((V * l) <= -5e-253) {
		tmp = c0 / (pow((0.0 - (V * l)), 0.5) * sqrt((-1.0 / A)));
	} else if ((V * l) <= 2e-313) {
		tmp = c0 * (t_0 * sqrt((0.0 - (A / l))));
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (pow((V * l), -0.5) * sqrt(A));
	} else {
		tmp = (sqrt(A) / V) * (c0 * pow((V / l), 0.5));
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = Math.sqrt((-1.0 / V));
	double tmp;
	if ((V * l) <= -Double.POSITIVE_INFINITY) {
		tmp = ((Math.pow((0.0 - A), 0.5) * c0) * t_0) / Math.sqrt(l);
	} else if ((V * l) <= -5e-253) {
		tmp = c0 / (Math.pow((0.0 - (V * l)), 0.5) * Math.sqrt((-1.0 / A)));
	} else if ((V * l) <= 2e-313) {
		tmp = c0 * (t_0 * Math.sqrt((0.0 - (A / l))));
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.pow((V * l), -0.5) * Math.sqrt(A));
	} else {
		tmp = (Math.sqrt(A) / V) * (c0 * Math.pow((V / l), 0.5));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = math.sqrt((-1.0 / V))
	tmp = 0
	if (V * l) <= -math.inf:
		tmp = ((math.pow((0.0 - A), 0.5) * c0) * t_0) / math.sqrt(l)
	elif (V * l) <= -5e-253:
		tmp = c0 / (math.pow((0.0 - (V * l)), 0.5) * math.sqrt((-1.0 / A)))
	elif (V * l) <= 2e-313:
		tmp = c0 * (t_0 * math.sqrt((0.0 - (A / l))))
	elif (V * l) <= math.inf:
		tmp = c0 * (math.pow((V * l), -0.5) * math.sqrt(A))
	else:
		tmp = (math.sqrt(A) / V) * (c0 * math.pow((V / l), 0.5))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = sqrt(Float64(-1.0 / V))
	tmp = 0.0
	if (Float64(V * l) <= Float64(-Inf))
		tmp = Float64(Float64(Float64((Float64(0.0 - A) ^ 0.5) * c0) * t_0) / sqrt(l));
	elseif (Float64(V * l) <= -5e-253)
		tmp = Float64(c0 / Float64((Float64(0.0 - Float64(V * l)) ^ 0.5) * sqrt(Float64(-1.0 / A))));
	elseif (Float64(V * l) <= 2e-313)
		tmp = Float64(c0 * Float64(t_0 * sqrt(Float64(0.0 - Float64(A / l)))));
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64((Float64(V * l) ^ -0.5) * sqrt(A)));
	else
		tmp = Float64(Float64(sqrt(A) / V) * Float64(c0 * (Float64(V / l) ^ 0.5)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = sqrt((-1.0 / V));
	tmp = 0.0;
	if ((V * l) <= -Inf)
		tmp = ((((0.0 - A) ^ 0.5) * c0) * t_0) / sqrt(l);
	elseif ((V * l) <= -5e-253)
		tmp = c0 / (((0.0 - (V * l)) ^ 0.5) * sqrt((-1.0 / A)));
	elseif ((V * l) <= 2e-313)
		tmp = c0 * (t_0 * sqrt((0.0 - (A / l))));
	elseif ((V * l) <= Inf)
		tmp = c0 * (((V * l) ^ -0.5) * sqrt(A));
	else
		tmp = (sqrt(A) / V) * (c0 * ((V / l) ^ 0.5));
	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[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(N[(N[(N[Power[N[(0.0 - A), $MachinePrecision], 0.5], $MachinePrecision] * c0), $MachinePrecision] * t$95$0), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-253], N[(c0 / N[(N[Power[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(-1.0 / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-313], N[(c0 * N[(t$95$0 * N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[A], $MachinePrecision] / V), $MachinePrecision] * N[(c0 * N[Power[N[(V / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{-1}{V}}\\
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{\left({\left(0 - A\right)}^{0.5} \cdot c0\right) \cdot t\_0}{\sqrt{\ell}}\\

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

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

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\

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


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

    1. Initial program 34.7%

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 V l) < -4.99999999999999971e-253

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval86.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(\left(\sqrt{\mathsf{neg}\left(\ell \cdot V\right)}\right), \color{blue}{\left(\sqrt{\frac{1}{0 - A}}\right)}\right)\right) \]
    8. Applied egg-rr99.4%

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999971e-253 < (*.f64 V l) < 1.99999999998e-313

    1. Initial program 39.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(-1, V\right)\right), \left(\sqrt{\frac{\color{blue}{A}}{\mathsf{neg}\left(\ell\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(-1, V\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{A}{\mathsf{neg}\left(\ell\right)}\right)\right)\right)\right) \]
      14. remove-double-negN/A

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

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

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

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

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

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

    if 1.99999999998e-313 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot 1\right) \cdot c0}{\sqrt{\ell}} \]
      6. metadata-evalN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{1}\right) \cdot c0}{\sqrt{\ell}} \]
      7. *-inversesN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{V}{V}}\right) \cdot c0}{\sqrt{\ell}} \]
      8. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{\frac{A}{V} \cdot \frac{V}{V}} \cdot c0}{\sqrt{\ell}} \]
      9. times-fracN/A

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

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

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

        \[\leadsto \sqrt{\frac{\frac{A}{V \cdot V} \cdot V}{\ell}} \cdot c0 \]
      13. pow1/2N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{A}{V \cdot V}\right)}^{\frac{1}{2}}\right), \color{blue}{\left({\left(\frac{V}{\ell}\right)}^{\frac{1}{2}} \cdot c0\right)}\right) \]
    10. Applied egg-rr20.2%

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

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

Alternative 2: 77.5% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+276}:\\
\;\;\;\;\frac{c0}{{t\_0}^{-0.5}}\\

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


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

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval68.0%

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

      \[\leadsto \color{blue}{\frac{c0}{{\left(\frac{A}{\ell \cdot V}\right)}^{-0.5}}} \]
    7. Taylor expanded in A around 0

      \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
    8. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \mathsf{/.f64}\left(\ell, A\right)\right)\right)\right) \]
    9. Simplified64.8%

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

    if 3.99999999999999999e-305 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.0000000000000001e276

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval98.2%

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

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

    if 2.0000000000000001e276 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l))))

    1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.5% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval68.0%

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

      \[\leadsto \color{blue}{\frac{c0}{{\left(\frac{A}{\ell \cdot V}\right)}^{-0.5}}} \]
    7. Taylor expanded in A around 0

      \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
    8. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \mathsf{/.f64}\left(\ell, A\right)\right)\right)\right) \]
    9. Simplified64.8%

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

    if 3.99999999999999999e-305 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 2.0000000000000001e276

    1. Initial program 98.1%

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

    if 2.0000000000000001e276 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l))))

    1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 88.5% accurate, 0.3× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \sqrt{0 - V}\\ \mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{-193}:\\ \;\;\;\;\frac{\frac{{\left(0 - A\right)}^{0.5}}{t\_0}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{t\_0}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{A}}{V} \cdot \left(c0 \cdot {\left(\frac{V}{\ell}\right)}^{0.5}\right)\\ \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 (sqrt (- 0.0 V))))
   (if (<= (* V l) -5e-193)
     (/ (/ (pow (- 0.0 A) 0.5) t_0) (/ (sqrt l) c0))
     (if (<= (* V l) 2e-313)
       (* c0 (/ (sqrt (- 0.0 (/ A l))) t_0))
       (if (<= (* V l) INFINITY)
         (* c0 (* (pow (* V l) -0.5) (sqrt A)))
         (* (/ (sqrt A) V) (* c0 (pow (/ V l) 0.5))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = sqrt((0.0 - V));
	double tmp;
	if ((V * l) <= -5e-193) {
		tmp = (pow((0.0 - A), 0.5) / t_0) / (sqrt(l) / c0);
	} else if ((V * l) <= 2e-313) {
		tmp = c0 * (sqrt((0.0 - (A / l))) / t_0);
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (pow((V * l), -0.5) * sqrt(A));
	} else {
		tmp = (sqrt(A) / V) * (c0 * pow((V / l), 0.5));
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = Math.sqrt((0.0 - V));
	double tmp;
	if ((V * l) <= -5e-193) {
		tmp = (Math.pow((0.0 - A), 0.5) / t_0) / (Math.sqrt(l) / c0);
	} else if ((V * l) <= 2e-313) {
		tmp = c0 * (Math.sqrt((0.0 - (A / l))) / t_0);
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.pow((V * l), -0.5) * Math.sqrt(A));
	} else {
		tmp = (Math.sqrt(A) / V) * (c0 * Math.pow((V / l), 0.5));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = math.sqrt((0.0 - V))
	tmp = 0
	if (V * l) <= -5e-193:
		tmp = (math.pow((0.0 - A), 0.5) / t_0) / (math.sqrt(l) / c0)
	elif (V * l) <= 2e-313:
		tmp = c0 * (math.sqrt((0.0 - (A / l))) / t_0)
	elif (V * l) <= math.inf:
		tmp = c0 * (math.pow((V * l), -0.5) * math.sqrt(A))
	else:
		tmp = (math.sqrt(A) / V) * (c0 * math.pow((V / l), 0.5))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = sqrt(Float64(0.0 - V))
	tmp = 0.0
	if (Float64(V * l) <= -5e-193)
		tmp = Float64(Float64((Float64(0.0 - A) ^ 0.5) / t_0) / Float64(sqrt(l) / c0));
	elseif (Float64(V * l) <= 2e-313)
		tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - Float64(A / l))) / t_0));
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64((Float64(V * l) ^ -0.5) * sqrt(A)));
	else
		tmp = Float64(Float64(sqrt(A) / V) * Float64(c0 * (Float64(V / l) ^ 0.5)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = sqrt((0.0 - V));
	tmp = 0.0;
	if ((V * l) <= -5e-193)
		tmp = (((0.0 - A) ^ 0.5) / t_0) / (sqrt(l) / c0);
	elseif ((V * l) <= 2e-313)
		tmp = c0 * (sqrt((0.0 - (A / l))) / t_0);
	elseif ((V * l) <= Inf)
		tmp = c0 * (((V * l) ^ -0.5) * sqrt(A));
	else
		tmp = (sqrt(A) / V) * (c0 * ((V / l) ^ 0.5));
	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[Sqrt[N[(0.0 - V), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], -5e-193], N[(N[(N[Power[N[(0.0 - A), $MachinePrecision], 0.5], $MachinePrecision] / t$95$0), $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-313], N[(c0 * N[(N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[A], $MachinePrecision] / V), $MachinePrecision] * N[(c0 * N[Power[N[(V / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \sqrt{0 - V}\\
\mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{-193}:\\
\;\;\;\;\frac{\frac{{\left(0 - A\right)}^{0.5}}{t\_0}}{\frac{\sqrt{\ell}}{c0}}\\

\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{t\_0}\\

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\

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


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

    1. Initial program 76.7%

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

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

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

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

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

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

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

        \[\leadsto c0 \cdot \frac{\sqrt{A}}{\color{blue}{\sqrt{\frac{\ell}{\frac{1}{V}}}}} \]
      2. pow1/2N/A

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

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

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

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\frac{\ell}{1}} \cdot \color{blue}{\sqrt{V}}} \]
      6. /-rgt-identityN/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\ell} \cdot \sqrt{V}} \]
      7. times-fracN/A

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

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

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}} \]
      10. unpow1/2N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{/.f64}\left(\left(\sqrt{\ell}\right), \color{blue}{c0}\right)\right) \]
      19. sqrt-lowering-sqrt.f6445.9%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{0 - A}{\mathsf{neg}\left(V\right)}}\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), c0\right)\right) \]
      3. sub0-negN/A

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

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

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

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

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

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

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

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

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

    if -5.0000000000000005e-193 < (*.f64 V l) < 1.99999999998e-313

    1. Initial program 47.1%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{\mathsf{neg}\left(\frac{A}{\ell}\right)}}{\color{blue}{\sqrt{\mathsf{neg}\left(V\right)}}}\right)\right) \]
      4. distribute-frac-neg2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(0 - A\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(V\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(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      13. pow-lowering-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999998e-313 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot 1\right) \cdot c0}{\sqrt{\ell}} \]
      6. metadata-evalN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{1}\right) \cdot c0}{\sqrt{\ell}} \]
      7. *-inversesN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{V}{V}}\right) \cdot c0}{\sqrt{\ell}} \]
      8. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{\frac{A}{V} \cdot \frac{V}{V}} \cdot c0}{\sqrt{\ell}} \]
      9. times-fracN/A

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

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

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

        \[\leadsto \sqrt{\frac{\frac{A}{V \cdot V} \cdot V}{\ell}} \cdot c0 \]
      13. pow1/2N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{A}{V \cdot V}\right)}^{\frac{1}{2}}\right), \color{blue}{\left({\left(\frac{V}{\ell}\right)}^{\frac{1}{2}} \cdot c0\right)}\right) \]
    10. Applied egg-rr20.2%

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

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

Alternative 5: 89.8% accurate, 0.4× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := 0 - \frac{A}{\ell}\\ \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;\frac{\frac{c0}{{t\_0}^{-0.5}}}{\sqrt{0 - V}}\\ \mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-253}:\\ \;\;\;\;\frac{c0}{{\left(0 - V \cdot \ell\right)}^{0.5} \cdot \sqrt{\frac{-1}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{-1}{V}} \cdot \sqrt{t\_0}\right)\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{A}}{V} \cdot \left(c0 \cdot {\left(\frac{V}{\ell}\right)}^{0.5}\right)\\ \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 (- 0.0 (/ A l))))
   (if (<= (* V l) (- INFINITY))
     (/ (/ c0 (pow t_0 -0.5)) (sqrt (- 0.0 V)))
     (if (<= (* V l) -5e-253)
       (/ c0 (* (pow (- 0.0 (* V l)) 0.5) (sqrt (/ -1.0 A))))
       (if (<= (* V l) 2e-313)
         (* c0 (* (sqrt (/ -1.0 V)) (sqrt t_0)))
         (if (<= (* V l) INFINITY)
           (* c0 (* (pow (* V l) -0.5) (sqrt A)))
           (* (/ (sqrt A) V) (* c0 (pow (/ V l) 0.5)))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = 0.0 - (A / l);
	double tmp;
	if ((V * l) <= -((double) INFINITY)) {
		tmp = (c0 / pow(t_0, -0.5)) / sqrt((0.0 - V));
	} else if ((V * l) <= -5e-253) {
		tmp = c0 / (pow((0.0 - (V * l)), 0.5) * sqrt((-1.0 / A)));
	} else if ((V * l) <= 2e-313) {
		tmp = c0 * (sqrt((-1.0 / V)) * sqrt(t_0));
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (pow((V * l), -0.5) * sqrt(A));
	} else {
		tmp = (sqrt(A) / V) * (c0 * pow((V / l), 0.5));
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = 0.0 - (A / l);
	double tmp;
	if ((V * l) <= -Double.POSITIVE_INFINITY) {
		tmp = (c0 / Math.pow(t_0, -0.5)) / Math.sqrt((0.0 - V));
	} else if ((V * l) <= -5e-253) {
		tmp = c0 / (Math.pow((0.0 - (V * l)), 0.5) * Math.sqrt((-1.0 / A)));
	} else if ((V * l) <= 2e-313) {
		tmp = c0 * (Math.sqrt((-1.0 / V)) * Math.sqrt(t_0));
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.pow((V * l), -0.5) * Math.sqrt(A));
	} else {
		tmp = (Math.sqrt(A) / V) * (c0 * Math.pow((V / l), 0.5));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = 0.0 - (A / l)
	tmp = 0
	if (V * l) <= -math.inf:
		tmp = (c0 / math.pow(t_0, -0.5)) / math.sqrt((0.0 - V))
	elif (V * l) <= -5e-253:
		tmp = c0 / (math.pow((0.0 - (V * l)), 0.5) * math.sqrt((-1.0 / A)))
	elif (V * l) <= 2e-313:
		tmp = c0 * (math.sqrt((-1.0 / V)) * math.sqrt(t_0))
	elif (V * l) <= math.inf:
		tmp = c0 * (math.pow((V * l), -0.5) * math.sqrt(A))
	else:
		tmp = (math.sqrt(A) / V) * (c0 * math.pow((V / l), 0.5))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(0.0 - Float64(A / l))
	tmp = 0.0
	if (Float64(V * l) <= Float64(-Inf))
		tmp = Float64(Float64(c0 / (t_0 ^ -0.5)) / sqrt(Float64(0.0 - V)));
	elseif (Float64(V * l) <= -5e-253)
		tmp = Float64(c0 / Float64((Float64(0.0 - Float64(V * l)) ^ 0.5) * sqrt(Float64(-1.0 / A))));
	elseif (Float64(V * l) <= 2e-313)
		tmp = Float64(c0 * Float64(sqrt(Float64(-1.0 / V)) * sqrt(t_0)));
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64((Float64(V * l) ^ -0.5) * sqrt(A)));
	else
		tmp = Float64(Float64(sqrt(A) / V) * Float64(c0 * (Float64(V / l) ^ 0.5)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = 0.0 - (A / l);
	tmp = 0.0;
	if ((V * l) <= -Inf)
		tmp = (c0 / (t_0 ^ -0.5)) / sqrt((0.0 - V));
	elseif ((V * l) <= -5e-253)
		tmp = c0 / (((0.0 - (V * l)) ^ 0.5) * sqrt((-1.0 / A)));
	elseif ((V * l) <= 2e-313)
		tmp = c0 * (sqrt((-1.0 / V)) * sqrt(t_0));
	elseif ((V * l) <= Inf)
		tmp = c0 * (((V * l) ^ -0.5) * sqrt(A));
	else
		tmp = (sqrt(A) / V) * (c0 * ((V / l) ^ 0.5));
	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[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(N[(c0 / N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(0.0 - V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-253], N[(c0 / N[(N[Power[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(-1.0 / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-313], N[(c0 * N[(N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[A], $MachinePrecision] / V), $MachinePrecision] * N[(c0 * N[Power[N[(V / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := 0 - \frac{A}{\ell}\\
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{\frac{c0}{{t\_0}^{-0.5}}}{\sqrt{0 - V}}\\

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

\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\
\;\;\;\;c0 \cdot \left(\sqrt{\frac{-1}{V}} \cdot \sqrt{t\_0}\right)\\

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\

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


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

    1. Initial program 34.7%

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 V l) < -4.99999999999999971e-253

    1. Initial program 86.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval86.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(\left(\sqrt{\mathsf{neg}\left(\ell \cdot V\right)}\right), \color{blue}{\left(\sqrt{\frac{1}{0 - A}}\right)}\right)\right) \]
    8. Applied egg-rr99.4%

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999971e-253 < (*.f64 V l) < 1.99999999998e-313

    1. Initial program 39.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(-1, V\right)\right), \left(\sqrt{\frac{\color{blue}{A}}{\mathsf{neg}\left(\ell\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(-1, V\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{A}{\mathsf{neg}\left(\ell\right)}\right)\right)\right)\right) \]
      14. remove-double-negN/A

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

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

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

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

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

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

    if 1.99999999998e-313 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot 1\right) \cdot c0}{\sqrt{\ell}} \]
      6. metadata-evalN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{1}\right) \cdot c0}{\sqrt{\ell}} \]
      7. *-inversesN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{V}{V}}\right) \cdot c0}{\sqrt{\ell}} \]
      8. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{\frac{A}{V} \cdot \frac{V}{V}} \cdot c0}{\sqrt{\ell}} \]
      9. times-fracN/A

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

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

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

        \[\leadsto \sqrt{\frac{\frac{A}{V \cdot V} \cdot V}{\ell}} \cdot c0 \]
      13. pow1/2N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{A}{V \cdot V}\right)}^{\frac{1}{2}}\right), \color{blue}{\left({\left(\frac{V}{\ell}\right)}^{\frac{1}{2}} \cdot c0\right)}\right) \]
    10. Applied egg-rr20.2%

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

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

Alternative 6: 89.7% accurate, 0.4× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \sqrt{0 - \frac{A}{\ell}}\\ \mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{+266}:\\ \;\;\;\;c0 \cdot \frac{t\_0}{\sqrt{0 - V}}\\ \mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-253}:\\ \;\;\;\;\frac{c0}{{\left(0 - V \cdot \ell\right)}^{0.5} \cdot \sqrt{\frac{-1}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \left(\sqrt{\frac{-1}{V}} \cdot t\_0\right)\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{A}}{V} \cdot \left(c0 \cdot {\left(\frac{V}{\ell}\right)}^{0.5}\right)\\ \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 (sqrt (- 0.0 (/ A l)))))
   (if (<= (* V l) -5e+266)
     (* c0 (/ t_0 (sqrt (- 0.0 V))))
     (if (<= (* V l) -5e-253)
       (/ c0 (* (pow (- 0.0 (* V l)) 0.5) (sqrt (/ -1.0 A))))
       (if (<= (* V l) 2e-313)
         (* c0 (* (sqrt (/ -1.0 V)) t_0))
         (if (<= (* V l) INFINITY)
           (* c0 (* (pow (* V l) -0.5) (sqrt A)))
           (* (/ (sqrt A) V) (* c0 (pow (/ V l) 0.5)))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = sqrt((0.0 - (A / l)));
	double tmp;
	if ((V * l) <= -5e+266) {
		tmp = c0 * (t_0 / sqrt((0.0 - V)));
	} else if ((V * l) <= -5e-253) {
		tmp = c0 / (pow((0.0 - (V * l)), 0.5) * sqrt((-1.0 / A)));
	} else if ((V * l) <= 2e-313) {
		tmp = c0 * (sqrt((-1.0 / V)) * t_0);
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (pow((V * l), -0.5) * sqrt(A));
	} else {
		tmp = (sqrt(A) / V) * (c0 * pow((V / l), 0.5));
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = Math.sqrt((0.0 - (A / l)));
	double tmp;
	if ((V * l) <= -5e+266) {
		tmp = c0 * (t_0 / Math.sqrt((0.0 - V)));
	} else if ((V * l) <= -5e-253) {
		tmp = c0 / (Math.pow((0.0 - (V * l)), 0.5) * Math.sqrt((-1.0 / A)));
	} else if ((V * l) <= 2e-313) {
		tmp = c0 * (Math.sqrt((-1.0 / V)) * t_0);
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.pow((V * l), -0.5) * Math.sqrt(A));
	} else {
		tmp = (Math.sqrt(A) / V) * (c0 * Math.pow((V / l), 0.5));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = math.sqrt((0.0 - (A / l)))
	tmp = 0
	if (V * l) <= -5e+266:
		tmp = c0 * (t_0 / math.sqrt((0.0 - V)))
	elif (V * l) <= -5e-253:
		tmp = c0 / (math.pow((0.0 - (V * l)), 0.5) * math.sqrt((-1.0 / A)))
	elif (V * l) <= 2e-313:
		tmp = c0 * (math.sqrt((-1.0 / V)) * t_0)
	elif (V * l) <= math.inf:
		tmp = c0 * (math.pow((V * l), -0.5) * math.sqrt(A))
	else:
		tmp = (math.sqrt(A) / V) * (c0 * math.pow((V / l), 0.5))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = sqrt(Float64(0.0 - Float64(A / l)))
	tmp = 0.0
	if (Float64(V * l) <= -5e+266)
		tmp = Float64(c0 * Float64(t_0 / sqrt(Float64(0.0 - V))));
	elseif (Float64(V * l) <= -5e-253)
		tmp = Float64(c0 / Float64((Float64(0.0 - Float64(V * l)) ^ 0.5) * sqrt(Float64(-1.0 / A))));
	elseif (Float64(V * l) <= 2e-313)
		tmp = Float64(c0 * Float64(sqrt(Float64(-1.0 / V)) * t_0));
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64((Float64(V * l) ^ -0.5) * sqrt(A)));
	else
		tmp = Float64(Float64(sqrt(A) / V) * Float64(c0 * (Float64(V / l) ^ 0.5)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = sqrt((0.0 - (A / l)));
	tmp = 0.0;
	if ((V * l) <= -5e+266)
		tmp = c0 * (t_0 / sqrt((0.0 - V)));
	elseif ((V * l) <= -5e-253)
		tmp = c0 / (((0.0 - (V * l)) ^ 0.5) * sqrt((-1.0 / A)));
	elseif ((V * l) <= 2e-313)
		tmp = c0 * (sqrt((-1.0 / V)) * t_0);
	elseif ((V * l) <= Inf)
		tmp = c0 * (((V * l) ^ -0.5) * sqrt(A));
	else
		tmp = (sqrt(A) / V) * (c0 * ((V / l) ^ 0.5));
	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[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], -5e+266], N[(c0 * N[(t$95$0 / N[Sqrt[N[(0.0 - V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -5e-253], N[(c0 / N[(N[Power[N[(0.0 - N[(V * l), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(-1.0 / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-313], N[(c0 * N[(N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[A], $MachinePrecision] / V), $MachinePrecision] * N[(c0 * N[Power[N[(V / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \sqrt{0 - \frac{A}{\ell}}\\
\mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{+266}:\\
\;\;\;\;c0 \cdot \frac{t\_0}{\sqrt{0 - V}}\\

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

\mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\
\;\;\;\;c0 \cdot \left(\sqrt{\frac{-1}{V}} \cdot t\_0\right)\\

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\

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


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

    1. Initial program 38.0%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{\mathsf{neg}\left(\frac{A}{\ell}\right)}}{\color{blue}{\sqrt{\mathsf{neg}\left(V\right)}}}\right)\right) \]
      4. distribute-frac-neg2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(0 - A\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(V\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(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      13. pow-lowering-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999999e266 < (*.f64 V l) < -4.99999999999999971e-253

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval86.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(\left(\sqrt{\mathsf{neg}\left(\ell \cdot V\right)}\right), \color{blue}{\left(\sqrt{\frac{1}{0 - A}}\right)}\right)\right) \]
    8. Applied egg-rr99.4%

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999971e-253 < (*.f64 V l) < 1.99999999998e-313

    1. Initial program 39.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(-1, V\right)\right), \left(\sqrt{\frac{\color{blue}{A}}{\mathsf{neg}\left(\ell\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(-1, V\right)\right), \mathsf{sqrt.f64}\left(\left(\frac{A}{\mathsf{neg}\left(\ell\right)}\right)\right)\right)\right) \]
      14. remove-double-negN/A

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

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

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

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

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

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

    if 1.99999999998e-313 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

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

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot 1\right) \cdot c0}{\sqrt{\ell}} \]
      6. metadata-evalN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{1}\right) \cdot c0}{\sqrt{\ell}} \]
      7. *-inversesN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{V}{V}}\right) \cdot c0}{\sqrt{\ell}} \]
      8. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{\frac{A}{V} \cdot \frac{V}{V}} \cdot c0}{\sqrt{\ell}} \]
      9. times-fracN/A

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

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

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

        \[\leadsto \sqrt{\frac{\frac{A}{V \cdot V} \cdot V}{\ell}} \cdot c0 \]
      13. pow1/2N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{A}{V \cdot V}\right)}^{\frac{1}{2}}\right), \color{blue}{\left({\left(\frac{V}{\ell}\right)}^{\frac{1}{2}} \cdot c0\right)}\right) \]
    10. Applied egg-rr20.2%

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

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

Alternative 7: 86.7% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{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 (<= (* V l) -2e+160)
   (/ (sqrt (/ A V)) (/ (sqrt l) c0))
   (if (<= (* V l) -1e-128)
     (* c0 (sqrt (/ A (* V l))))
     (if (<= (* V l) 0.0)
       (/ (/ c0 (sqrt (/ V A))) (sqrt l))
       (if (<= (* V l) INFINITY)
         (* c0 (* (pow (* V l) -0.5) (sqrt A)))
         (* c0 (/ (sqrt (/ A (/ l V))) V)))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -2e+160) {
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	} else if ((V * l) <= -1e-128) {
		tmp = c0 * sqrt((A / (V * l)));
	} else if ((V * l) <= 0.0) {
		tmp = (c0 / sqrt((V / A))) / sqrt(l);
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (pow((V * l), -0.5) * sqrt(A));
	} else {
		tmp = c0 * (sqrt((A / (l / V))) / V);
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -2e+160) {
		tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
	} else if ((V * l) <= -1e-128) {
		tmp = c0 * Math.sqrt((A / (V * l)));
	} else if ((V * l) <= 0.0) {
		tmp = (c0 / Math.sqrt((V / A))) / Math.sqrt(l);
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.pow((V * l), -0.5) * Math.sqrt(A));
	} else {
		tmp = c0 * (Math.sqrt((A / (l / V))) / V);
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if (V * l) <= -2e+160:
		tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0)
	elif (V * l) <= -1e-128:
		tmp = c0 * math.sqrt((A / (V * l)))
	elif (V * l) <= 0.0:
		tmp = (c0 / math.sqrt((V / A))) / math.sqrt(l)
	elif (V * l) <= math.inf:
		tmp = c0 * (math.pow((V * l), -0.5) * math.sqrt(A))
	else:
		tmp = c0 * (math.sqrt((A / (l / V))) / V)
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= -2e+160)
		tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0));
	elseif (Float64(V * l) <= -1e-128)
		tmp = Float64(c0 * sqrt(Float64(A / Float64(V * l))));
	elseif (Float64(V * l) <= 0.0)
		tmp = Float64(Float64(c0 / sqrt(Float64(V / A))) / sqrt(l));
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64((Float64(V * l) ^ -0.5) * sqrt(A)));
	else
		tmp = Float64(c0 * Float64(sqrt(Float64(A / Float64(l / V))) / 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 ((V * l) <= -2e+160)
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	elseif ((V * l) <= -1e-128)
		tmp = c0 * sqrt((A / (V * l)));
	elseif ((V * l) <= 0.0)
		tmp = (c0 / sqrt((V / A))) / sqrt(l);
	elseif ((V * l) <= Inf)
		tmp = c0 * (((V * l) ^ -0.5) * sqrt(A));
	else
		tmp = c0 * (sqrt((A / (l / V))) / 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[N[(V * l), $MachinePrecision], -2e+160], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-128], N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(N[(c0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(A / N[(l / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / V), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\

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

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

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\

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


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

    1. Initial program 50.5%

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

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

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

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

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

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

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

        \[\leadsto c0 \cdot \frac{\sqrt{A}}{\color{blue}{\sqrt{\frac{\ell}{\frac{1}{V}}}}} \]
      2. pow1/2N/A

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

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

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

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\frac{\ell}{1}} \cdot \color{blue}{\sqrt{V}}} \]
      6. /-rgt-identityN/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\ell} \cdot \sqrt{V}} \]
      7. times-fracN/A

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

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

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}} \]
      10. unpow1/2N/A

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000001e160 < (*.f64 V l) < -1.00000000000000005e-128

    1. Initial program 92.5%

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

    if -1.00000000000000005e-128 < (*.f64 V l) < 0.0

    1. Initial program 52.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{A}}{\sqrt{\frac{\ell}{1}} \cdot \sqrt{V}} \cdot c0 \]
      5. /-rgt-identityN/A

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

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

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

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

        \[\leadsto \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}} \cdot c0 \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\frac{A}{V}\right)}^{\frac{1}{2}} \cdot c0\right), \color{blue}{\left(\sqrt{\ell}\right)}\right) \]
    6. Applied egg-rr30.8%

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

    if 0.0 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

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

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

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

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

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

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

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Taylor expanded in c0 around 0

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right)\right), c0\right) \]
    7. Simplified68.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{1}{V}}{\ell}}\right), c0\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      4. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      5. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{\frac{V}{V}}{V}}{\ell}}\right), c0\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{V}{V \cdot V}}{\ell}}\right), c0\right) \]
      7. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{V \cdot \frac{1}{V \cdot V}}{\ell}}\right), c0\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V \cdot V} \cdot V}{\ell}}\right), c0\right) \]
      9. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      10. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \left(\frac{1}{V \cdot V} \cdot \frac{V}{\ell}\right)}\right), c0\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\left(A \cdot \frac{1}{V \cdot V}\right) \cdot \frac{V}{\ell}}\right), c0\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      13. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{V}{\ell}}{V \cdot V}}\right), c0\right) \]
      14. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \frac{V}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      15. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \left(V \cdot \frac{1}{\ell}\right)}}{\sqrt{V \cdot V}}\right), c0\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{{V}^{2}}}\right), c0\right) \]
      18. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{\left(\frac{2}{2}\right)}}\right), c0\right) \]
      19. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{1}}\right), c0\right) \]
      20. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{V}\right), c0\right) \]
    11. Applied egg-rr35.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}} \cdot c0 \]
  3. Recombined 5 regimes into one program.
  4. Final simplification75.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 86.7% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{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 (<= (* V l) -2e+160)
   (/ (sqrt (/ A V)) (/ (sqrt l) c0))
   (if (<= (* V l) -1e-128)
     (* c0 (sqrt (/ A (* V l))))
     (if (<= (* V l) 0.0)
       (/ (/ c0 (sqrt (/ V A))) (sqrt l))
       (if (<= (* V l) INFINITY)
         (* c0 (/ (sqrt A) (sqrt (* V l))))
         (* c0 (/ (sqrt (/ A (/ l V))) V)))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -2e+160) {
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	} else if ((V * l) <= -1e-128) {
		tmp = c0 * sqrt((A / (V * l)));
	} else if ((V * l) <= 0.0) {
		tmp = (c0 / sqrt((V / A))) / sqrt(l);
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (sqrt(A) / sqrt((V * l)));
	} else {
		tmp = c0 * (sqrt((A / (l / V))) / V);
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= -2e+160) {
		tmp = Math.sqrt((A / V)) / (Math.sqrt(l) / c0);
	} else if ((V * l) <= -1e-128) {
		tmp = c0 * Math.sqrt((A / (V * l)));
	} else if ((V * l) <= 0.0) {
		tmp = (c0 / Math.sqrt((V / A))) / Math.sqrt(l);
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
	} else {
		tmp = c0 * (Math.sqrt((A / (l / V))) / V);
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if (V * l) <= -2e+160:
		tmp = math.sqrt((A / V)) / (math.sqrt(l) / c0)
	elif (V * l) <= -1e-128:
		tmp = c0 * math.sqrt((A / (V * l)))
	elif (V * l) <= 0.0:
		tmp = (c0 / math.sqrt((V / A))) / math.sqrt(l)
	elif (V * l) <= math.inf:
		tmp = c0 * (math.sqrt(A) / math.sqrt((V * l)))
	else:
		tmp = c0 * (math.sqrt((A / (l / V))) / V)
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= -2e+160)
		tmp = Float64(sqrt(Float64(A / V)) / Float64(sqrt(l) / c0));
	elseif (Float64(V * l) <= -1e-128)
		tmp = Float64(c0 * sqrt(Float64(A / Float64(V * l))));
	elseif (Float64(V * l) <= 0.0)
		tmp = Float64(Float64(c0 / sqrt(Float64(V / A))) / sqrt(l));
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l))));
	else
		tmp = Float64(c0 * Float64(sqrt(Float64(A / Float64(l / V))) / 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 ((V * l) <= -2e+160)
		tmp = sqrt((A / V)) / (sqrt(l) / c0);
	elseif ((V * l) <= -1e-128)
		tmp = c0 * sqrt((A / (V * l)));
	elseif ((V * l) <= 0.0)
		tmp = (c0 / sqrt((V / A))) / sqrt(l);
	elseif ((V * l) <= Inf)
		tmp = c0 * (sqrt(A) / sqrt((V * l)));
	else
		tmp = c0 * (sqrt((A / (l / V))) / 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[N[(V * l), $MachinePrecision], -2e+160], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-128], N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(N[(c0 / N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(A / N[(l / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / V), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\
\;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\

\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\

\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 V l) < -2.00000000000000001e160

    1. Initial program 50.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6450.5%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr50.5%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{A}}{\color{blue}{\sqrt{\frac{\ell}{\frac{1}{V}}}}} \]
      2. pow1/2N/A

        \[\leadsto c0 \cdot \frac{{A}^{\frac{1}{2}}}{\sqrt{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
      3. associate-*r/N/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\color{blue}{\sqrt{\frac{\ell}{\frac{1}{V}}}}} \]
      4. associate-/r/N/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\frac{\ell}{1} \cdot V}} \]
      5. sqrt-prodN/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\frac{\ell}{1}} \cdot \color{blue}{\sqrt{V}}} \]
      6. /-rgt-identityN/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\ell} \cdot \sqrt{V}} \]
      7. times-fracN/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \color{blue}{\frac{{A}^{\frac{1}{2}}}{\sqrt{V}}} \]
      8. pow1/2N/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \frac{\sqrt{A}}{\sqrt{\color{blue}{V}}} \]
      9. sqrt-divN/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}} \]
      10. unpow1/2N/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot {\left(\frac{A}{V}\right)}^{\color{blue}{\frac{1}{2}}} \]
      11. *-commutativeN/A

        \[\leadsto {\left(\frac{A}{V}\right)}^{\frac{1}{2}} \cdot \color{blue}{\frac{c0}{\sqrt{\ell}}} \]
      12. clear-numN/A

        \[\leadsto {\left(\frac{A}{V}\right)}^{\frac{1}{2}} \cdot \frac{1}{\color{blue}{\frac{\sqrt{\ell}}{c0}}} \]
      13. un-div-invN/A

        \[\leadsto \frac{{\left(\frac{A}{V}\right)}^{\frac{1}{2}}}{\color{blue}{\frac{\sqrt{\ell}}{c0}}} \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\frac{A}{V}\right)}^{\frac{1}{2}}\right), \color{blue}{\left(\frac{\sqrt{\ell}}{c0}\right)}\right) \]
      15. unpow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \left(\frac{\color{blue}{\sqrt{\ell}}}{c0}\right)\right) \]
      16. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), \left(\frac{\color{blue}{\sqrt{\ell}}}{c0}\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \left(\frac{\sqrt{\color{blue}{\ell}}}{c0}\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{/.f64}\left(\left(\sqrt{\ell}\right), \color{blue}{c0}\right)\right) \]
      19. sqrt-lowering-sqrt.f6444.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), c0\right)\right) \]
    6. Applied egg-rr44.3%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]

    if -2.00000000000000001e160 < (*.f64 V l) < -1.00000000000000005e-128

    1. Initial program 92.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing

    if -1.00000000000000005e-128 < (*.f64 V l) < 0.0

    1. Initial program 52.6%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6452.7%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr52.7%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{A}{\frac{\ell}{\frac{1}{V}}}} \cdot \color{blue}{c0} \]
      2. sqrt-divN/A

        \[\leadsto \frac{\sqrt{A}}{\sqrt{\frac{\ell}{\frac{1}{V}}}} \cdot c0 \]
      3. associate-/r/N/A

        \[\leadsto \frac{\sqrt{A}}{\sqrt{\frac{\ell}{1} \cdot V}} \cdot c0 \]
      4. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{A}}{\sqrt{\frac{\ell}{1}} \cdot \sqrt{V}} \cdot c0 \]
      5. /-rgt-identityN/A

        \[\leadsto \frac{\sqrt{A}}{\sqrt{\ell} \cdot \sqrt{V}} \cdot c0 \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{A}}{\sqrt{\ell \cdot V}} \cdot c0 \]
      7. sqrt-divN/A

        \[\leadsto \sqrt{\frac{A}{\ell \cdot V}} \cdot c0 \]
      8. associate-/l/N/A

        \[\leadsto \sqrt{\frac{\frac{A}{V}}{\ell}} \cdot c0 \]
      9. sqrt-divN/A

        \[\leadsto \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}} \cdot c0 \]
      10. unpow1/2N/A

        \[\leadsto \frac{{\left(\frac{A}{V}\right)}^{\frac{1}{2}}}{\sqrt{\ell}} \cdot c0 \]
      11. associate-*l/N/A

        \[\leadsto \frac{{\left(\frac{A}{V}\right)}^{\frac{1}{2}} \cdot c0}{\color{blue}{\sqrt{\ell}}} \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\frac{A}{V}\right)}^{\frac{1}{2}} \cdot c0\right), \color{blue}{\left(\sqrt{\ell}\right)}\right) \]
    6. Applied egg-rr30.8%

      \[\leadsto \color{blue}{\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}} \]

    if 0.0 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6478.2%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr78.2%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), \color{blue}{c0}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V \cdot \ell}\right)\right), c0\right) \]
      3. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right)\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right)\right), c0\right) \]
      5. /-lowering-/.f6468.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right)\right), c0\right) \]
    7. Simplified68.3%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0} \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{\ell \cdot V}}\right), c0\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\right), c0\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{A}\right), \left(\sqrt{\ell \cdot V}\right)\right), c0\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\ell \cdot V}\right)\right), c0\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(\ell \cdot V\right)\right)\right), c0\right) \]
      6. *-lowering-*.f6488.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\ell, V\right)\right)\right), c0\right) \]
    9. Applied egg-rr88.2%

      \[\leadsto \color{blue}{\frac{\sqrt{A}}{\sqrt{\ell \cdot V}}} \cdot c0 \]

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6474.1%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr74.1%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), \color{blue}{c0}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V \cdot \ell}\right)\right), c0\right) \]
      3. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right)\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right)\right), c0\right) \]
      5. /-lowering-/.f6468.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right)\right), c0\right) \]
    7. Simplified68.7%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0} \]
    8. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), c0\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{A}{V}}{\ell}}\right), c0\right) \]
      3. sqrt-undivN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      7. sqrt-lowering-sqrt.f6444.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right), c0\right) \]
    9. Applied egg-rr44.0%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \cdot c0 \]
    10. Step-by-step derivation
      1. sqrt-undivN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{A}{V}}{\ell}}\right), c0\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{1}{V}}{\ell}}\right), c0\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      4. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      5. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{\frac{V}{V}}{V}}{\ell}}\right), c0\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{V}{V \cdot V}}{\ell}}\right), c0\right) \]
      7. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{V \cdot \frac{1}{V \cdot V}}{\ell}}\right), c0\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V \cdot V} \cdot V}{\ell}}\right), c0\right) \]
      9. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      10. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \left(\frac{1}{V \cdot V} \cdot \frac{V}{\ell}\right)}\right), c0\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\left(A \cdot \frac{1}{V \cdot V}\right) \cdot \frac{V}{\ell}}\right), c0\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      13. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{V}{\ell}}{V \cdot V}}\right), c0\right) \]
      14. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \frac{V}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      15. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \left(V \cdot \frac{1}{\ell}\right)}}{\sqrt{V \cdot V}}\right), c0\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{{V}^{2}}}\right), c0\right) \]
      18. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{\left(\frac{2}{2}\right)}}\right), c0\right) \]
      19. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{1}}\right), c0\right) \]
      20. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{V}\right), c0\right) \]
    11. Applied egg-rr35.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}} \cdot c0 \]
  3. Recombined 5 regimes into one program.
  4. Final simplification75.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{\frac{c0}{\sqrt{\frac{V}{A}}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 86.5% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{A}{V}}\\ \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\ \;\;\;\;\frac{t\_0}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;t\_0 \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (sqrt (/ A V))))
   (if (<= (* V l) -2e+160)
     (/ t_0 (/ (sqrt l) c0))
     (if (<= (* V l) -1e-128)
       (* c0 (sqrt (/ A (* V l))))
       (if (<= (* V l) 0.0)
         (* t_0 (/ c0 (sqrt l)))
         (if (<= (* V l) INFINITY)
           (* c0 (/ (sqrt A) (sqrt (* V l))))
           (* c0 (/ (sqrt (/ A (/ l V))) V))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = sqrt((A / V));
	double tmp;
	if ((V * l) <= -2e+160) {
		tmp = t_0 / (sqrt(l) / c0);
	} else if ((V * l) <= -1e-128) {
		tmp = c0 * sqrt((A / (V * l)));
	} else if ((V * l) <= 0.0) {
		tmp = t_0 * (c0 / sqrt(l));
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (sqrt(A) / sqrt((V * l)));
	} else {
		tmp = c0 * (sqrt((A / (l / V))) / V);
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = Math.sqrt((A / V));
	double tmp;
	if ((V * l) <= -2e+160) {
		tmp = t_0 / (Math.sqrt(l) / c0);
	} else if ((V * l) <= -1e-128) {
		tmp = c0 * Math.sqrt((A / (V * l)));
	} else if ((V * l) <= 0.0) {
		tmp = t_0 * (c0 / Math.sqrt(l));
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
	} else {
		tmp = c0 * (Math.sqrt((A / (l / V))) / V);
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = math.sqrt((A / V))
	tmp = 0
	if (V * l) <= -2e+160:
		tmp = t_0 / (math.sqrt(l) / c0)
	elif (V * l) <= -1e-128:
		tmp = c0 * math.sqrt((A / (V * l)))
	elif (V * l) <= 0.0:
		tmp = t_0 * (c0 / math.sqrt(l))
	elif (V * l) <= math.inf:
		tmp = c0 * (math.sqrt(A) / math.sqrt((V * l)))
	else:
		tmp = c0 * (math.sqrt((A / (l / V))) / V)
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = sqrt(Float64(A / V))
	tmp = 0.0
	if (Float64(V * l) <= -2e+160)
		tmp = Float64(t_0 / Float64(sqrt(l) / c0));
	elseif (Float64(V * l) <= -1e-128)
		tmp = Float64(c0 * sqrt(Float64(A / Float64(V * l))));
	elseif (Float64(V * l) <= 0.0)
		tmp = Float64(t_0 * Float64(c0 / sqrt(l)));
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l))));
	else
		tmp = Float64(c0 * Float64(sqrt(Float64(A / Float64(l / V))) / V));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = sqrt((A / V));
	tmp = 0.0;
	if ((V * l) <= -2e+160)
		tmp = t_0 / (sqrt(l) / c0);
	elseif ((V * l) <= -1e-128)
		tmp = c0 * sqrt((A / (V * l)));
	elseif ((V * l) <= 0.0)
		tmp = t_0 * (c0 / sqrt(l));
	elseif ((V * l) <= Inf)
		tmp = c0 * (sqrt(A) / sqrt((V * l)));
	else
		tmp = c0 * (sqrt((A / (l / V))) / V);
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], -2e+160], N[(t$95$0 / N[(N[Sqrt[l], $MachinePrecision] / c0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-128], N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], N[(t$95$0 * N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(A / N[(l / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / V), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{A}{V}}\\
\mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\
\;\;\;\;\frac{t\_0}{\frac{\sqrt{\ell}}{c0}}\\

\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\

\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t\_0 \cdot \frac{c0}{\sqrt{\ell}}\\

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 V l) < -2.00000000000000001e160

    1. Initial program 50.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6450.5%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr50.5%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{A}}{\color{blue}{\sqrt{\frac{\ell}{\frac{1}{V}}}}} \]
      2. pow1/2N/A

        \[\leadsto c0 \cdot \frac{{A}^{\frac{1}{2}}}{\sqrt{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
      3. associate-*r/N/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\color{blue}{\sqrt{\frac{\ell}{\frac{1}{V}}}}} \]
      4. associate-/r/N/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\frac{\ell}{1} \cdot V}} \]
      5. sqrt-prodN/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\frac{\ell}{1}} \cdot \color{blue}{\sqrt{V}}} \]
      6. /-rgt-identityN/A

        \[\leadsto \frac{c0 \cdot {A}^{\frac{1}{2}}}{\sqrt{\ell} \cdot \sqrt{V}} \]
      7. times-fracN/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \color{blue}{\frac{{A}^{\frac{1}{2}}}{\sqrt{V}}} \]
      8. pow1/2N/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \frac{\sqrt{A}}{\sqrt{\color{blue}{V}}} \]
      9. sqrt-divN/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}} \]
      10. unpow1/2N/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot {\left(\frac{A}{V}\right)}^{\color{blue}{\frac{1}{2}}} \]
      11. *-commutativeN/A

        \[\leadsto {\left(\frac{A}{V}\right)}^{\frac{1}{2}} \cdot \color{blue}{\frac{c0}{\sqrt{\ell}}} \]
      12. clear-numN/A

        \[\leadsto {\left(\frac{A}{V}\right)}^{\frac{1}{2}} \cdot \frac{1}{\color{blue}{\frac{\sqrt{\ell}}{c0}}} \]
      13. un-div-invN/A

        \[\leadsto \frac{{\left(\frac{A}{V}\right)}^{\frac{1}{2}}}{\color{blue}{\frac{\sqrt{\ell}}{c0}}} \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\left(\frac{A}{V}\right)}^{\frac{1}{2}}\right), \color{blue}{\left(\frac{\sqrt{\ell}}{c0}\right)}\right) \]
      15. unpow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \left(\frac{\color{blue}{\sqrt{\ell}}}{c0}\right)\right) \]
      16. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), \left(\frac{\color{blue}{\sqrt{\ell}}}{c0}\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \left(\frac{\sqrt{\color{blue}{\ell}}}{c0}\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{/.f64}\left(\left(\sqrt{\ell}\right), \color{blue}{c0}\right)\right) \]
      19. sqrt-lowering-sqrt.f6444.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\ell\right), c0\right)\right) \]
    6. Applied egg-rr44.3%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}} \]

    if -2.00000000000000001e160 < (*.f64 V l) < -1.00000000000000005e-128

    1. Initial program 92.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing

    if -1.00000000000000005e-128 < (*.f64 V l) < 0.0

    1. Initial program 52.6%

      \[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. *-commutativeN/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. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{A}{V}\right), \frac{1}{2}\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right), \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\ell}\right)}\right)\right) \]
      11. sqrt-lowering-sqrt.f6430.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
    4. Applied egg-rr30.7%

      \[\leadsto \color{blue}{{\left(\frac{A}{V}\right)}^{0.5} \cdot \frac{c0}{\sqrt{\ell}}} \]
    5. Step-by-step derivation
      1. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \mathsf{/.f64}\left(\color{blue}{c0}, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      2. 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) \]
      3. /-lowering-/.f6430.7%

        \[\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-rr30.7%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V}}} \cdot \frac{c0}{\sqrt{\ell}} \]

    if 0.0 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6478.2%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr78.2%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), \color{blue}{c0}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V \cdot \ell}\right)\right), c0\right) \]
      3. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right)\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right)\right), c0\right) \]
      5. /-lowering-/.f6468.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right)\right), c0\right) \]
    7. Simplified68.3%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0} \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{\ell \cdot V}}\right), c0\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\right), c0\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{A}\right), \left(\sqrt{\ell \cdot V}\right)\right), c0\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\ell \cdot V}\right)\right), c0\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(\ell \cdot V\right)\right)\right), c0\right) \]
      6. *-lowering-*.f6488.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\ell, V\right)\right)\right), c0\right) \]
    9. Applied egg-rr88.2%

      \[\leadsto \color{blue}{\frac{\sqrt{A}}{\sqrt{\ell \cdot V}}} \cdot c0 \]

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6474.1%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr74.1%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), \color{blue}{c0}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V \cdot \ell}\right)\right), c0\right) \]
      3. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right)\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right)\right), c0\right) \]
      5. /-lowering-/.f6468.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right)\right), c0\right) \]
    7. Simplified68.7%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0} \]
    8. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), c0\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{A}{V}}{\ell}}\right), c0\right) \]
      3. sqrt-undivN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      7. sqrt-lowering-sqrt.f6444.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right), c0\right) \]
    9. Applied egg-rr44.0%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \cdot c0 \]
    10. Step-by-step derivation
      1. sqrt-undivN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{A}{V}}{\ell}}\right), c0\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{1}{V}}{\ell}}\right), c0\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      4. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      5. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{\frac{V}{V}}{V}}{\ell}}\right), c0\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{V}{V \cdot V}}{\ell}}\right), c0\right) \]
      7. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{V \cdot \frac{1}{V \cdot V}}{\ell}}\right), c0\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V \cdot V} \cdot V}{\ell}}\right), c0\right) \]
      9. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      10. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \left(\frac{1}{V \cdot V} \cdot \frac{V}{\ell}\right)}\right), c0\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\left(A \cdot \frac{1}{V \cdot V}\right) \cdot \frac{V}{\ell}}\right), c0\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      13. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{V}{\ell}}{V \cdot V}}\right), c0\right) \]
      14. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \frac{V}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      15. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \left(V \cdot \frac{1}{\ell}\right)}}{\sqrt{V \cdot V}}\right), c0\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{{V}^{2}}}\right), c0\right) \]
      18. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{\left(\frac{2}{2}\right)}}\right), c0\right) \]
      19. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{1}}\right), c0\right) \]
      20. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{V}\right), c0\right) \]
    11. Applied egg-rr35.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}} \cdot c0 \]
  3. Recombined 5 regimes into one program.
  4. Final simplification75.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\ \;\;\;\;\frac{\sqrt{\frac{A}{V}}}{\frac{\sqrt{\ell}}{c0}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 86.5% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (* (sqrt (/ A V)) (/ c0 (sqrt l)))))
   (if (<= (* V l) -2e+160)
     t_0
     (if (<= (* V l) -1e-128)
       (* c0 (sqrt (/ A (* V l))))
       (if (<= (* V l) 0.0)
         t_0
         (if (<= (* V l) INFINITY)
           (* c0 (/ (sqrt A) (sqrt (* V l))))
           (* c0 (/ (sqrt (/ A (/ l V))) V))))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = sqrt((A / V)) * (c0 / sqrt(l));
	double tmp;
	if ((V * l) <= -2e+160) {
		tmp = t_0;
	} else if ((V * l) <= -1e-128) {
		tmp = c0 * sqrt((A / (V * l)));
	} else if ((V * l) <= 0.0) {
		tmp = t_0;
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (sqrt(A) / sqrt((V * l)));
	} else {
		tmp = c0 * (sqrt((A / (l / V))) / V);
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double t_0 = Math.sqrt((A / V)) * (c0 / Math.sqrt(l));
	double tmp;
	if ((V * l) <= -2e+160) {
		tmp = t_0;
	} else if ((V * l) <= -1e-128) {
		tmp = c0 * Math.sqrt((A / (V * l)));
	} else if ((V * l) <= 0.0) {
		tmp = t_0;
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
	} else {
		tmp = c0 * (Math.sqrt((A / (l / V))) / V);
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = math.sqrt((A / V)) * (c0 / math.sqrt(l))
	tmp = 0
	if (V * l) <= -2e+160:
		tmp = t_0
	elif (V * l) <= -1e-128:
		tmp = c0 * math.sqrt((A / (V * l)))
	elif (V * l) <= 0.0:
		tmp = t_0
	elif (V * l) <= math.inf:
		tmp = c0 * (math.sqrt(A) / math.sqrt((V * l)))
	else:
		tmp = c0 * (math.sqrt((A / (l / V))) / V)
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(sqrt(Float64(A / V)) * Float64(c0 / sqrt(l)))
	tmp = 0.0
	if (Float64(V * l) <= -2e+160)
		tmp = t_0;
	elseif (Float64(V * l) <= -1e-128)
		tmp = Float64(c0 * sqrt(Float64(A / Float64(V * l))));
	elseif (Float64(V * l) <= 0.0)
		tmp = t_0;
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l))));
	else
		tmp = Float64(c0 * Float64(sqrt(Float64(A / Float64(l / V))) / V));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	t_0 = sqrt((A / V)) * (c0 / sqrt(l));
	tmp = 0.0;
	if ((V * l) <= -2e+160)
		tmp = t_0;
	elseif ((V * l) <= -1e-128)
		tmp = c0 * sqrt((A / (V * l)));
	elseif ((V * l) <= 0.0)
		tmp = t_0;
	elseif ((V * l) <= Inf)
		tmp = c0 * (sqrt(A) / sqrt((V * l)));
	else
		tmp = c0 * (sqrt((A / (l / V))) / V);
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] * N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], -2e+160], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], -1e-128], N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 0.0], t$95$0, If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(A / N[(l / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / V), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := \sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\
\mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\

\mathbf{elif}\;V \cdot \ell \leq 0:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 V l) < -2.00000000000000001e160 or -1.00000000000000005e-128 < (*.f64 V l) < 0.0

    1. Initial program 51.7%

      \[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. *-commutativeN/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. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{A}{V}\right), \frac{1}{2}\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right), \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\ell}\right)}\right)\right) \]
      11. sqrt-lowering-sqrt.f6437.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
    4. Applied egg-rr37.0%

      \[\leadsto \color{blue}{{\left(\frac{A}{V}\right)}^{0.5} \cdot \frac{c0}{\sqrt{\ell}}} \]
    5. Step-by-step derivation
      1. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \mathsf{/.f64}\left(\color{blue}{c0}, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      2. 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) \]
      3. /-lowering-/.f6437.0%

        \[\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-rr37.0%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V}}} \cdot \frac{c0}{\sqrt{\ell}} \]

    if -2.00000000000000001e160 < (*.f64 V l) < -1.00000000000000005e-128

    1. Initial program 92.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing

    if 0.0 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6478.2%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr78.2%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), \color{blue}{c0}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V \cdot \ell}\right)\right), c0\right) \]
      3. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right)\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right)\right), c0\right) \]
      5. /-lowering-/.f6468.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right)\right), c0\right) \]
    7. Simplified68.3%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0} \]
    8. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{\ell \cdot V}}\right), c0\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\right), c0\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{A}\right), \left(\sqrt{\ell \cdot V}\right)\right), c0\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \left(\sqrt{\ell \cdot V}\right)\right), c0\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\left(\ell \cdot V\right)\right)\right), c0\right) \]
      6. *-lowering-*.f6488.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(A\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\ell, V\right)\right)\right), c0\right) \]
    9. Applied egg-rr88.2%

      \[\leadsto \color{blue}{\frac{\sqrt{A}}{\sqrt{\ell \cdot V}}} \cdot c0 \]

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6474.1%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr74.1%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), \color{blue}{c0}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V \cdot \ell}\right)\right), c0\right) \]
      3. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right)\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right)\right), c0\right) \]
      5. /-lowering-/.f6468.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right)\right), c0\right) \]
    7. Simplified68.7%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0} \]
    8. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), c0\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{A}{V}}{\ell}}\right), c0\right) \]
      3. sqrt-undivN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      7. sqrt-lowering-sqrt.f6444.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right), c0\right) \]
    9. Applied egg-rr44.0%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \cdot c0 \]
    10. Step-by-step derivation
      1. sqrt-undivN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{A}{V}}{\ell}}\right), c0\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{1}{V}}{\ell}}\right), c0\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      4. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      5. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{\frac{V}{V}}{V}}{\ell}}\right), c0\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{V}{V \cdot V}}{\ell}}\right), c0\right) \]
      7. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{V \cdot \frac{1}{V \cdot V}}{\ell}}\right), c0\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V \cdot V} \cdot V}{\ell}}\right), c0\right) \]
      9. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      10. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \left(\frac{1}{V \cdot V} \cdot \frac{V}{\ell}\right)}\right), c0\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\left(A \cdot \frac{1}{V \cdot V}\right) \cdot \frac{V}{\ell}}\right), c0\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      13. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{V}{\ell}}{V \cdot V}}\right), c0\right) \]
      14. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \frac{V}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      15. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \left(V \cdot \frac{1}{\ell}\right)}}{\sqrt{V \cdot V}}\right), c0\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{{V}^{2}}}\right), c0\right) \]
      18. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{\left(\frac{2}{2}\right)}}\right), c0\right) \]
      19. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{1}}\right), c0\right) \]
      20. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{V}\right), c0\right) \]
    11. Applied egg-rr35.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}} \cdot c0 \]
  3. Recombined 4 regimes into one program.
  4. Final simplification75.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+160}:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-128}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 84.5% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{\sqrt{0 - V}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{A}}{V} \cdot \left(c0 \cdot {\left(\frac{V}{\ell}\right)}^{0.5}\right)\\ \end{array} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* V l) 2e-313)
   (* c0 (/ (sqrt (- 0.0 (/ A l))) (sqrt (- 0.0 V))))
   (if (<= (* V l) INFINITY)
     (* c0 (* (pow (* V l) -0.5) (sqrt A)))
     (* (/ (sqrt A) V) (* c0 (pow (/ V l) 0.5))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= 2e-313) {
		tmp = c0 * (sqrt((0.0 - (A / l))) / sqrt((0.0 - V)));
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (pow((V * l), -0.5) * sqrt(A));
	} else {
		tmp = (sqrt(A) / V) * (c0 * pow((V / l), 0.5));
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= 2e-313) {
		tmp = c0 * (Math.sqrt((0.0 - (A / l))) / Math.sqrt((0.0 - V)));
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.pow((V * l), -0.5) * Math.sqrt(A));
	} else {
		tmp = (Math.sqrt(A) / V) * (c0 * Math.pow((V / l), 0.5));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if (V * l) <= 2e-313:
		tmp = c0 * (math.sqrt((0.0 - (A / l))) / math.sqrt((0.0 - V)))
	elif (V * l) <= math.inf:
		tmp = c0 * (math.pow((V * l), -0.5) * math.sqrt(A))
	else:
		tmp = (math.sqrt(A) / V) * (c0 * math.pow((V / l), 0.5))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= 2e-313)
		tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - Float64(A / l))) / sqrt(Float64(0.0 - V))));
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64((Float64(V * l) ^ -0.5) * sqrt(A)));
	else
		tmp = Float64(Float64(sqrt(A) / V) * Float64(c0 * (Float64(V / l) ^ 0.5)));
	end
	return tmp
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if ((V * l) <= 2e-313)
		tmp = c0 * (sqrt((0.0 - (A / l))) / sqrt((0.0 - V)));
	elseif ((V * l) <= Inf)
		tmp = c0 * (((V * l) ^ -0.5) * sqrt(A));
	else
		tmp = (sqrt(A) / V) * (c0 * ((V / l) ^ 0.5));
	end
	tmp_2 = tmp;
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := If[LessEqual[N[(V * l), $MachinePrecision], 2e-313], N[(c0 * N[(N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.0 - V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[A], $MachinePrecision] / V), $MachinePrecision] * N[(c0 * N[Power[N[(V / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{\sqrt{0 - V}}\\

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{A}}{V} \cdot \left(c0 \cdot {\left(\frac{V}{\ell}\right)}^{0.5}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 V l) < 1.99999999998e-313

    1. Initial program 69.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{\frac{\frac{A}{\ell}}{V}}\right)\right) \]
      2. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{\frac{\mathsf{neg}\left(\frac{A}{\ell}\right)}{\mathsf{neg}\left(V\right)}}\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{\mathsf{neg}\left(\frac{A}{\ell}\right)}}{\color{blue}{\sqrt{\mathsf{neg}\left(V\right)}}}\right)\right) \]
      4. distribute-frac-neg2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{\frac{A}{\mathsf{neg}\left(\ell\right)}}}{\sqrt{\mathsf{neg}\left(\color{blue}{V}\right)}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{\frac{A}{\mathsf{neg}\left(\ell\right)}}}{{\left(\mathsf{neg}\left(V\right)\right)}^{\color{blue}{\frac{1}{2}}}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{\frac{A}{\mathsf{neg}\left(\ell\right)}}\right), \color{blue}{\left({\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}\right)}\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{\mathsf{neg}\left(\ell\right)}\right)\right), \left({\color{blue}{\left(\mathsf{neg}\left(V\right)\right)}}^{\frac{1}{2}}\right)\right)\right) \]
      8. remove-double-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)}{\mathsf{neg}\left(\ell\right)}\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      9. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(A\right)}{\ell}\right)\right), \left({\left(\mathsf{neg}\left(\color{blue}{V}\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(A\right)\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(\color{blue}{V}\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(0 - A\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(V\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(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      13. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(V\right)\right), \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      14. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{pow.f64}\left(\left(0 - V\right), \frac{1}{2}\right)\right)\right) \]
      15. --lowering--.f6447.6%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, V\right), \frac{1}{2}\right)\right)\right) \]
    4. Applied egg-rr47.6%

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{0 - A}{\ell}}}{{\left(0 - V\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \left(\sqrt{0 - V}\right)\right)\right) \]
      2. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \left(\sqrt{\mathsf{neg}\left(V\right)}\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(V\right)\right)\right)\right)\right) \]
      4. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{sqrt.f64}\left(\left(0 - V\right)\right)\right)\right) \]
      5. --lowering--.f6447.6%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, V\right)\right)\right)\right) \]
    6. Applied egg-rr47.6%

      \[\leadsto c0 \cdot \frac{\sqrt{\frac{0 - A}{\ell}}}{\color{blue}{\sqrt{0 - V}}} \]
    7. Step-by-step derivation
      1. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(A\right)}{\ell}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, V\right)\right)\right)\right) \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(\frac{A}{\ell}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\color{blue}{0}, V\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{A}{\ell}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\color{blue}{0}, V\right)\right)\right)\right) \]
      4. /-lowering-/.f6447.6%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(A, \ell\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, V\right)\right)\right)\right) \]
    8. Applied egg-rr47.6%

      \[\leadsto c0 \cdot \frac{\sqrt{\color{blue}{-\frac{A}{\ell}}}}{\sqrt{0 - V}} \]

    if 1.99999999998e-313 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{A \cdot \frac{1}{V \cdot \ell}}\right)\right) \]
      2. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{A} \cdot \color{blue}{\sqrt{\frac{1}{V \cdot \ell}}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{A} \cdot {\left(\frac{1}{V \cdot \ell}\right)}^{\color{blue}{\frac{1}{2}}}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left({\left(\frac{1}{V \cdot \ell}\right)}^{\frac{1}{2}} \cdot \color{blue}{\sqrt{A}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\left({\left(\frac{1}{V \cdot \ell}\right)}^{\frac{1}{2}}\right), \color{blue}{\left(\sqrt{A}\right)}\right)\right) \]
      6. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\left({\left({\left(V \cdot \ell\right)}^{-1}\right)}^{\frac{1}{2}}\right), \left(\sqrt{A}\right)\right)\right) \]
      7. pow-powN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\left({\left(V \cdot \ell\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right), \left(\sqrt{\color{blue}{A}}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(V \cdot \ell\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\sqrt{\color{blue}{A}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(V, \ell\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\sqrt{A}\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(V, \ell\right), \frac{-1}{2}\right), \left(\sqrt{A}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f6488.3%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(V, \ell\right), \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(A\right)\right)\right) \]
    4. Applied egg-rr88.3%

      \[\leadsto c0 \cdot \color{blue}{\left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)} \]

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6474.1%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr74.1%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Step-by-step derivation
      1. associate-/r/N/A

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}} \]
      2. div-invN/A

        \[\leadsto c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}} \]
      3. clear-numN/A

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V}{\frac{A}{\ell}}}} \]
      4. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
      5. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V}{\frac{A}{\ell}}}}} \]
      6. div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right)}\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{\frac{A}{\ell}}{V}}}\right)\right) \]
      9. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{\frac{A}{\ell}}{V}\right)}^{-1}}\right)\right) \]
      10. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\frac{-1}{2}}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right) \]
      13. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right) \]
      14. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{A}{\ell} \cdot \frac{1}{V}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      15. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{A}{\frac{\ell}{\frac{1}{V}}}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      17. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      19. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval74.2%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \frac{-1}{2}\right)\right) \]
    6. Applied egg-rr74.2%

      \[\leadsto \color{blue}{\frac{c0}{{\left(\frac{A}{\ell \cdot V}\right)}^{-0.5}}} \]
    7. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{A}{\ell \cdot V}\right)}^{\left(\frac{-1}{\color{blue}{2}}\right)}\right)\right) \]
      2. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{A}{\ell \cdot V}\right)}^{-1}}\right)\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{A}{\ell \cdot V}}}\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\ell \cdot V}{A}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell \cdot V}{A}\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\ell \cdot \frac{V}{A}\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\ell \cdot \frac{1}{\frac{A}{V}}\right)\right)\right) \]
      8. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell}{\frac{A}{V}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \left(\frac{A}{V}\right)\right)\right)\right) \]
      10. /-lowering-/.f6472.9%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(A, V\right)\right)\right)\right) \]
    8. Applied egg-rr72.9%

      \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{\ell}{\frac{A}{V}}}}} \]
    9. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto \frac{c0}{\frac{\sqrt{\ell}}{\color{blue}{\sqrt{\frac{A}{V}}}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{c0}{\sqrt{\ell}} \cdot \color{blue}{\sqrt{\frac{A}{V}}} \]
      3. associate-*l/N/A

        \[\leadsto \frac{c0 \cdot \sqrt{\frac{A}{V}}}{\color{blue}{\sqrt{\ell}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\sqrt{\frac{A}{V}} \cdot c0}{\sqrt{\color{blue}{\ell}}} \]
      5. *-rgt-identityN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot 1\right) \cdot c0}{\sqrt{\ell}} \]
      6. metadata-evalN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{1}\right) \cdot c0}{\sqrt{\ell}} \]
      7. *-inversesN/A

        \[\leadsto \frac{\left(\sqrt{\frac{A}{V}} \cdot \sqrt{\frac{V}{V}}\right) \cdot c0}{\sqrt{\ell}} \]
      8. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{\frac{A}{V} \cdot \frac{V}{V}} \cdot c0}{\sqrt{\ell}} \]
      9. times-fracN/A

        \[\leadsto \frac{\sqrt{\frac{A \cdot V}{V \cdot V}} \cdot c0}{\sqrt{\ell}} \]
      10. associate-*l/N/A

        \[\leadsto \frac{\sqrt{\frac{A}{V \cdot V} \cdot V} \cdot c0}{\sqrt{\ell}} \]
      11. associate-*l/N/A

        \[\leadsto \frac{\sqrt{\frac{A}{V \cdot V} \cdot V}}{\sqrt{\ell}} \cdot \color{blue}{c0} \]
      12. sqrt-divN/A

        \[\leadsto \sqrt{\frac{\frac{A}{V \cdot V} \cdot V}{\ell}} \cdot c0 \]
      13. pow1/2N/A

        \[\leadsto {\left(\frac{\frac{A}{V \cdot V} \cdot V}{\ell}\right)}^{\frac{1}{2}} \cdot c0 \]
      14. associate-/l*N/A

        \[\leadsto {\left(\frac{A}{V \cdot V} \cdot \frac{V}{\ell}\right)}^{\frac{1}{2}} \cdot c0 \]
      15. unpow-prod-downN/A

        \[\leadsto \left({\left(\frac{A}{V \cdot V}\right)}^{\frac{1}{2}} \cdot {\left(\frac{V}{\ell}\right)}^{\frac{1}{2}}\right) \cdot c0 \]
      16. associate-*l*N/A

        \[\leadsto {\left(\frac{A}{V \cdot V}\right)}^{\frac{1}{2}} \cdot \color{blue}{\left({\left(\frac{V}{\ell}\right)}^{\frac{1}{2}} \cdot c0\right)} \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{A}{V \cdot V}\right)}^{\frac{1}{2}}\right), \color{blue}{\left({\left(\frac{V}{\ell}\right)}^{\frac{1}{2}} \cdot c0\right)}\right) \]
    10. Applied egg-rr20.2%

      \[\leadsto \color{blue}{\frac{\sqrt{A}}{V} \cdot \left({\left(\frac{V}{\ell}\right)}^{0.5} \cdot c0\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification69.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{\sqrt{0 - V}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{A}}{V} \cdot \left(c0 \cdot {\left(\frac{V}{\ell}\right)}^{0.5}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 84.5% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{\sqrt{0 - V}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{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 (<= (* V l) 2e-313)
   (* c0 (/ (sqrt (- 0.0 (/ A l))) (sqrt (- 0.0 V))))
   (if (<= (* V l) INFINITY)
     (* c0 (* (pow (* V l) -0.5) (sqrt A)))
     (* c0 (/ (sqrt (/ A (/ l V))) V)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= 2e-313) {
		tmp = c0 * (sqrt((0.0 - (A / l))) / sqrt((0.0 - V)));
	} else if ((V * l) <= ((double) INFINITY)) {
		tmp = c0 * (pow((V * l), -0.5) * sqrt(A));
	} else {
		tmp = c0 * (sqrt((A / (l / V))) / V);
	}
	return tmp;
}
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((V * l) <= 2e-313) {
		tmp = c0 * (Math.sqrt((0.0 - (A / l))) / Math.sqrt((0.0 - V)));
	} else if ((V * l) <= Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.pow((V * l), -0.5) * Math.sqrt(A));
	} else {
		tmp = c0 * (Math.sqrt((A / (l / V))) / V);
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if (V * l) <= 2e-313:
		tmp = c0 * (math.sqrt((0.0 - (A / l))) / math.sqrt((0.0 - V)))
	elif (V * l) <= math.inf:
		tmp = c0 * (math.pow((V * l), -0.5) * math.sqrt(A))
	else:
		tmp = c0 * (math.sqrt((A / (l / V))) / V)
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(V * l) <= 2e-313)
		tmp = Float64(c0 * Float64(sqrt(Float64(0.0 - Float64(A / l))) / sqrt(Float64(0.0 - V))));
	elseif (Float64(V * l) <= Inf)
		tmp = Float64(c0 * Float64((Float64(V * l) ^ -0.5) * sqrt(A)));
	else
		tmp = Float64(c0 * Float64(sqrt(Float64(A / Float64(l / V))) / 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 ((V * l) <= 2e-313)
		tmp = c0 * (sqrt((0.0 - (A / l))) / sqrt((0.0 - V)));
	elseif ((V * l) <= Inf)
		tmp = c0 * (((V * l) ^ -0.5) * sqrt(A));
	else
		tmp = c0 * (sqrt((A / (l / V))) / 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[N[(V * l), $MachinePrecision], 2e-313], N[(c0 * N[(N[Sqrt[N[(0.0 - N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.0 - V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], Infinity], N[(c0 * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[(N[Sqrt[N[(A / N[(l / V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / V), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{\sqrt{0 - V}}\\

\mathbf{elif}\;V \cdot \ell \leq \infty:\\
\;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 V l) < 1.99999999998e-313

    1. Initial program 69.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{\frac{\frac{A}{\ell}}{V}}\right)\right) \]
      2. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{\frac{\mathsf{neg}\left(\frac{A}{\ell}\right)}{\mathsf{neg}\left(V\right)}}\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{\mathsf{neg}\left(\frac{A}{\ell}\right)}}{\color{blue}{\sqrt{\mathsf{neg}\left(V\right)}}}\right)\right) \]
      4. distribute-frac-neg2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{\frac{A}{\mathsf{neg}\left(\ell\right)}}}{\sqrt{\mathsf{neg}\left(\color{blue}{V}\right)}}\right)\right) \]
      5. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\frac{\sqrt{\frac{A}{\mathsf{neg}\left(\ell\right)}}}{{\left(\mathsf{neg}\left(V\right)\right)}^{\color{blue}{\frac{1}{2}}}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\left(\sqrt{\frac{A}{\mathsf{neg}\left(\ell\right)}}\right), \color{blue}{\left({\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}\right)}\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{\mathsf{neg}\left(\ell\right)}\right)\right), \left({\color{blue}{\left(\mathsf{neg}\left(V\right)\right)}}^{\frac{1}{2}}\right)\right)\right) \]
      8. remove-double-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(A\right)\right)\right)}{\mathsf{neg}\left(\ell\right)}\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      9. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(A\right)}{\ell}\right)\right), \left({\left(\mathsf{neg}\left(\color{blue}{V}\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(A\right)\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(\color{blue}{V}\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(0 - A\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(V\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(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \left({\left(\mathsf{neg}\left(V\right)\right)}^{\frac{1}{2}}\right)\right)\right) \]
      13. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(V\right)\right), \color{blue}{\frac{1}{2}}\right)\right)\right) \]
      14. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{pow.f64}\left(\left(0 - V\right), \frac{1}{2}\right)\right)\right) \]
      15. --lowering--.f6447.6%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, V\right), \frac{1}{2}\right)\right)\right) \]
    4. Applied egg-rr47.6%

      \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{0 - A}{\ell}}}{{\left(0 - V\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \left(\sqrt{0 - V}\right)\right)\right) \]
      2. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \left(\sqrt{\mathsf{neg}\left(V\right)}\right)\right)\right) \]
      3. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(V\right)\right)\right)\right)\right) \]
      4. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{sqrt.f64}\left(\left(0 - V\right)\right)\right)\right) \]
      5. --lowering--.f6447.6%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(0, A\right), \ell\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, V\right)\right)\right)\right) \]
    6. Applied egg-rr47.6%

      \[\leadsto c0 \cdot \frac{\sqrt{\frac{0 - A}{\ell}}}{\color{blue}{\sqrt{0 - V}}} \]
    7. Step-by-step derivation
      1. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(A\right)}{\ell}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, V\right)\right)\right)\right) \]
      2. distribute-frac-negN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(\frac{A}{\ell}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\color{blue}{0}, V\right)\right)\right)\right) \]
      3. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\left(\frac{A}{\ell}\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\color{blue}{0}, V\right)\right)\right)\right) \]
      4. /-lowering-/.f6447.6%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(A, \ell\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, V\right)\right)\right)\right) \]
    8. Applied egg-rr47.6%

      \[\leadsto c0 \cdot \frac{\sqrt{\color{blue}{-\frac{A}{\ell}}}}{\sqrt{0 - V}} \]

    if 1.99999999998e-313 < (*.f64 V l) < +inf.0

    1. Initial program 78.2%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{A \cdot \frac{1}{V \cdot \ell}}\right)\right) \]
      2. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{A} \cdot \color{blue}{\sqrt{\frac{1}{V \cdot \ell}}}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left(\sqrt{A} \cdot {\left(\frac{1}{V \cdot \ell}\right)}^{\color{blue}{\frac{1}{2}}}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \left({\left(\frac{1}{V \cdot \ell}\right)}^{\frac{1}{2}} \cdot \color{blue}{\sqrt{A}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\left({\left(\frac{1}{V \cdot \ell}\right)}^{\frac{1}{2}}\right), \color{blue}{\left(\sqrt{A}\right)}\right)\right) \]
      6. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\left({\left({\left(V \cdot \ell\right)}^{-1}\right)}^{\frac{1}{2}}\right), \left(\sqrt{A}\right)\right)\right) \]
      7. pow-powN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\left({\left(V \cdot \ell\right)}^{\left(-1 \cdot \frac{1}{2}\right)}\right), \left(\sqrt{\color{blue}{A}}\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(V \cdot \ell\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\sqrt{\color{blue}{A}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(V, \ell\right), \left(-1 \cdot \frac{1}{2}\right)\right), \left(\sqrt{A}\right)\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(V, \ell\right), \frac{-1}{2}\right), \left(\sqrt{A}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f6488.3%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(V, \ell\right), \frac{-1}{2}\right), \mathsf{sqrt.f64}\left(A\right)\right)\right) \]
    4. Applied egg-rr88.3%

      \[\leadsto c0 \cdot \color{blue}{\left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)} \]

    if +inf.0 < (*.f64 V l)

    1. Initial program 74.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6474.1%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr74.1%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), \color{blue}{c0}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V \cdot \ell}\right)\right), c0\right) \]
      3. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right)\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right)\right), c0\right) \]
      5. /-lowering-/.f6468.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right)\right), c0\right) \]
    7. Simplified68.7%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{A}{\ell}}{V}} \cdot c0} \]
    8. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot \ell}}\right), c0\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{A}{V}}{\ell}}\right), c0\right) \]
      3. sqrt-undivN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\right), c0\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{A}{V}\right)\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \left(\sqrt{\ell}\right)\right), c0\right) \]
      7. sqrt-lowering-sqrt.f6444.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, V\right)\right), \mathsf{sqrt.f64}\left(\ell\right)\right), c0\right) \]
    9. Applied egg-rr44.0%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \cdot c0 \]
    10. Step-by-step derivation
      1. sqrt-undivN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\frac{A}{V}}{\ell}}\right), c0\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{1}{V}}{\ell}}\right), c0\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      4. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V}}{\ell}}\right), c0\right) \]
      5. *-inversesN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{\frac{V}{V}}{V}}{\ell}}\right), c0\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{V}{V \cdot V}}{\ell}}\right), c0\right) \]
      7. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{V \cdot \frac{1}{V \cdot V}}{\ell}}\right), c0\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{\frac{1}{V \cdot V} \cdot V}{\ell}}\right), c0\right) \]
      9. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A} \cdot \sqrt{\frac{1}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      10. sqrt-prodN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{A \cdot \left(\frac{1}{V \cdot V} \cdot \frac{V}{\ell}\right)}\right), c0\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\left(A \cdot \frac{1}{V \cdot V}\right) \cdot \frac{V}{\ell}}\right), c0\right) \]
      12. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V \cdot V} \cdot \frac{V}{\ell}}\right), c0\right) \]
      13. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A \cdot \frac{V}{\ell}}{V \cdot V}}\right), c0\right) \]
      14. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \frac{V}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      15. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{A \cdot \left(V \cdot \frac{1}{\ell}\right)}}{\sqrt{V \cdot V}}\right), c0\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{V \cdot V}}\right), c0\right) \]
      17. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{\sqrt{{V}^{2}}}\right), c0\right) \]
      18. sqrt-pow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{\left(\frac{2}{2}\right)}}\right), c0\right) \]
      19. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{{V}^{1}}\right), c0\right) \]
      20. unpow1N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\left(A \cdot V\right) \cdot \frac{1}{\ell}}}{V}\right), c0\right) \]
    11. Applied egg-rr35.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}} \cdot c0 \]
  3. Recombined 3 regimes into one program.
  4. Final simplification69.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \cdot \ell \leq 2 \cdot 10^{-313}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{0 - \frac{A}{\ell}}}{\sqrt{0 - V}}\\ \mathbf{elif}\;V \cdot \ell \leq \infty:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{\frac{\ell}{V}}}}{V}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 76.0% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq 4 \cdot 10^{-305}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;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 (* c0 (sqrt (/ A (* V l))))))
   (if (<= t_0 4e-305) (/ c0 (sqrt (* V (/ l A)))) t_0)))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = c0 * sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 4e-305) {
		tmp = c0 / sqrt((V * (l / A)));
	} else {
		tmp = 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 = c0 * sqrt((a / (v * l)))
    if (t_0 <= 4d-305) then
        tmp = c0 / sqrt((v * (l / a)))
    else
        tmp = 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 = c0 * Math.sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 4e-305) {
		tmp = c0 / Math.sqrt((V * (l / A)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = c0 * math.sqrt((A / (V * l)))
	tmp = 0
	if t_0 <= 4e-305:
		tmp = c0 / math.sqrt((V * (l / A)))
	else:
		tmp = t_0
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l))))
	tmp = 0.0
	if (t_0 <= 4e-305)
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	else
		tmp = 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 = c0 * sqrt((A / (V * l)));
	tmp = 0.0;
	if (t_0 <= 4e-305)
		tmp = c0 / sqrt((V * (l / A)));
	else
		tmp = 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[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e-305], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 4 \cdot 10^{-305}:\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 3.99999999999999999e-305

    1. Initial program 68.0%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6468.0%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr68.0%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Step-by-step derivation
      1. associate-/r/N/A

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}} \]
      2. div-invN/A

        \[\leadsto c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}} \]
      3. clear-numN/A

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V}{\frac{A}{\ell}}}} \]
      4. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
      5. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V}{\frac{A}{\ell}}}}} \]
      6. div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right)}\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{\frac{A}{\ell}}{V}}}\right)\right) \]
      9. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{\frac{A}{\ell}}{V}\right)}^{-1}}\right)\right) \]
      10. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\frac{-1}{2}}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right) \]
      13. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right) \]
      14. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{A}{\ell} \cdot \frac{1}{V}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      15. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{A}{\frac{\ell}{\frac{1}{V}}}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      17. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      19. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval68.0%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \frac{-1}{2}\right)\right) \]
    6. Applied egg-rr68.0%

      \[\leadsto \color{blue}{\frac{c0}{{\left(\frac{A}{\ell \cdot V}\right)}^{-0.5}}} \]
    7. Taylor expanded in A around 0

      \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V \cdot \ell}{A}}\right)}\right) \]
    8. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{V \cdot \ell}{A}\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(V \cdot \frac{\ell}{A}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \left(\frac{\ell}{A}\right)\right)\right)\right) \]
      4. /-lowering-/.f6464.8%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(V, \mathsf{/.f64}\left(\ell, A\right)\right)\right)\right) \]
    9. Simplified64.8%

      \[\leadsto \frac{c0}{\color{blue}{\sqrt{V \cdot \frac{\ell}{A}}}} \]

    if 3.99999999999999999e-305 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l))))

    1. Initial program 85.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 76.2% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq 4 \cdot 10^{-305}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{else}:\\ \;\;\;\;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 (* c0 (sqrt (/ A (* V l))))))
   (if (<= t_0 4e-305) (* c0 (sqrt (/ (/ A l) V))) t_0)))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = c0 * sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 4e-305) {
		tmp = c0 * sqrt(((A / l) / V));
	} else {
		tmp = 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 = c0 * sqrt((a / (v * l)))
    if (t_0 <= 4d-305) then
        tmp = c0 * sqrt(((a / l) / v))
    else
        tmp = 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 = c0 * Math.sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 4e-305) {
		tmp = c0 * Math.sqrt(((A / l) / V));
	} else {
		tmp = t_0;
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = c0 * math.sqrt((A / (V * l)))
	tmp = 0
	if t_0 <= 4e-305:
		tmp = c0 * math.sqrt(((A / l) / V))
	else:
		tmp = t_0
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l))))
	tmp = 0.0
	if (t_0 <= 4e-305)
		tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V)));
	else
		tmp = 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 = c0 * sqrt((A / (V * l)));
	tmp = 0.0;
	if (t_0 <= 4e-305)
		tmp = c0 * sqrt(((A / l) / V));
	else
		tmp = 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[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e-305], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 4 \cdot 10^{-305}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 3.99999999999999999e-305

    1. Initial program 68.0%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{A}{\ell}\right), V\right)\right)\right) \]
      3. /-lowering-/.f6465.3%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(A, \ell\right), V\right)\right)\right) \]
    4. Applied egg-rr65.3%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{\ell}}{V}}} \]

    if 3.99999999999999999e-305 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l))))

    1. Initial program 85.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 76.2% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq 4 \cdot 10^{-305}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;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 (* c0 (sqrt (/ A (* V l))))))
   (if (<= t_0 4e-305) (* c0 (sqrt (/ (/ A V) l))) t_0)))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double t_0 = c0 * sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 4e-305) {
		tmp = c0 * sqrt(((A / V) / l));
	} else {
		tmp = 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 = c0 * sqrt((a / (v * l)))
    if (t_0 <= 4d-305) then
        tmp = c0 * sqrt(((a / v) / l))
    else
        tmp = 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 = c0 * Math.sqrt((A / (V * l)));
	double tmp;
	if (t_0 <= 4e-305) {
		tmp = c0 * Math.sqrt(((A / V) / l));
	} else {
		tmp = t_0;
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	t_0 = c0 * math.sqrt((A / (V * l)))
	tmp = 0
	if t_0 <= 4e-305:
		tmp = c0 * math.sqrt(((A / V) / l))
	else:
		tmp = t_0
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	t_0 = Float64(c0 * sqrt(Float64(A / Float64(V * l))))
	tmp = 0.0
	if (t_0 <= 4e-305)
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	else
		tmp = 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 = c0 * sqrt((A / (V * l)));
	tmp = 0.0;
	if (t_0 <= 4e-305)
		tmp = c0 * sqrt(((A / V) / l));
	else
		tmp = 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[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e-305], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 4 \cdot 10^{-305}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 3.99999999999999999e-305

    1. Initial program 68.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-/.f6469.7%

        \[\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-rr69.7%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{A}{V}}{\ell}}} \]

    if 3.99999999999999999e-305 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l))))

    1. Initial program 85.1%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 79.1% accurate, 0.5× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{-1}{A} \cdot \frac{\ell}{\frac{-1}{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 (* V l)) 5e-309)
   (* (sqrt (/ A V)) (/ c0 (sqrt l)))
   (/ c0 (sqrt (* (/ -1.0 A) (/ l (/ -1.0 V)))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((A / (V * l)) <= 5e-309) {
		tmp = sqrt((A / V)) * (c0 / sqrt(l));
	} else {
		tmp = c0 / sqrt(((-1.0 / A) * (l / (-1.0 / 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 / (v * l)) <= 5d-309) then
        tmp = sqrt((a / v)) * (c0 / sqrt(l))
    else
        tmp = c0 / sqrt((((-1.0d0) / a) * (l / ((-1.0d0) / 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 / (V * l)) <= 5e-309) {
		tmp = Math.sqrt((A / V)) * (c0 / Math.sqrt(l));
	} else {
		tmp = c0 / Math.sqrt(((-1.0 / A) * (l / (-1.0 / V))));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if (A / (V * l)) <= 5e-309:
		tmp = math.sqrt((A / V)) * (c0 / math.sqrt(l))
	else:
		tmp = c0 / math.sqrt(((-1.0 / A) * (l / (-1.0 / V))))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(A / Float64(V * l)) <= 5e-309)
		tmp = Float64(sqrt(Float64(A / V)) * Float64(c0 / sqrt(l)));
	else
		tmp = Float64(c0 / sqrt(Float64(Float64(-1.0 / A) * Float64(l / Float64(-1.0 / 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 / (V * l)) <= 5e-309)
		tmp = sqrt((A / V)) * (c0 / sqrt(l));
	else
		tmp = c0 / sqrt(((-1.0 / A) * (l / (-1.0 / 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[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision], 5e-309], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] * N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(N[(-1.0 / A), $MachinePrecision] * N[(l / N[(-1.0 / V), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{-1}{A} \cdot \frac{\ell}{\frac{-1}{V}}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 A (*.f64 V l)) < 4.9999999999999995e-309

    1. Initial program 36.1%

      \[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. *-commutativeN/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. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{A}{V}\right), \frac{1}{2}\right), \left(\frac{\color{blue}{c0}}{\sqrt{\ell}}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right), \left(\frac{c0}{\sqrt{\ell}}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right), \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\ell}\right)}\right)\right) \]
      11. sqrt-lowering-sqrt.f6446.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, V\right), \frac{1}{2}\right), \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
    4. Applied egg-rr46.1%

      \[\leadsto \color{blue}{{\left(\frac{A}{V}\right)}^{0.5} \cdot \frac{c0}{\sqrt{\ell}}} \]
    5. Step-by-step derivation
      1. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{A}{V}}\right), \mathsf{/.f64}\left(\color{blue}{c0}, \mathsf{sqrt.f64}\left(\ell\right)\right)\right) \]
      2. 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) \]
      3. /-lowering-/.f6446.1%

        \[\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-rr46.1%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V}}} \cdot \frac{c0}{\sqrt{\ell}} \]

    if 4.9999999999999995e-309 < (/.f64 A (*.f64 V l))

    1. Initial program 85.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6485.5%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr85.5%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Step-by-step derivation
      1. associate-/r/N/A

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}} \]
      2. div-invN/A

        \[\leadsto c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}} \]
      3. clear-numN/A

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V}{\frac{A}{\ell}}}} \]
      4. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
      5. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V}{\frac{A}{\ell}}}}} \]
      6. div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right)}\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{\frac{A}{\ell}}{V}}}\right)\right) \]
      9. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{\frac{A}{\ell}}{V}\right)}^{-1}}\right)\right) \]
      10. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\frac{-1}{2}}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right) \]
      13. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right) \]
      14. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{A}{\ell} \cdot \frac{1}{V}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      15. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{A}{\frac{\ell}{\frac{1}{V}}}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      17. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      19. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval85.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \frac{-1}{2}\right)\right) \]
    6. Applied egg-rr85.6%

      \[\leadsto \color{blue}{\frac{c0}{{\left(\frac{A}{\ell \cdot V}\right)}^{-0.5}}} \]
    7. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{A}{\ell \cdot V}\right)}^{\left(\frac{-1}{\color{blue}{2}}\right)}\right)\right) \]
      2. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{A}{\ell \cdot V}\right)}^{-1}}\right)\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{A}{\ell \cdot V}}}\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\ell \cdot V}{A}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell \cdot V}{A}\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\ell \cdot \frac{V}{A}\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\ell \cdot \frac{1}{\frac{A}{V}}\right)\right)\right) \]
      8. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell}{\frac{A}{V}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \left(\frac{A}{V}\right)\right)\right)\right) \]
      10. /-lowering-/.f6480.2%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(A, V\right)\right)\right)\right) \]
    8. Applied egg-rr80.2%

      \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{\ell}{\frac{A}{V}}}}} \]
    9. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{\mathsf{neg}\left(\frac{A}{V}\right)}\right)\right)\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{\mathsf{neg}\left(A \cdot \frac{1}{V}\right)}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{A \cdot \left(\mathsf{neg}\left(\frac{1}{V}\right)\right)}\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{A \cdot \left(-1 \cdot \frac{1}{V}\right)}\right)\right)\right) \]
      5. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{A \cdot \frac{-1}{V}}\right)\right)\right) \]
      6. neg-mul-1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{-1 \cdot \ell}{A \cdot \frac{-1}{V}}\right)\right)\right) \]
      7. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{-1}{A} \cdot \frac{\ell}{\frac{-1}{V}}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell}{\frac{-1}{V}} \cdot \frac{-1}{A}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{\ell}{\frac{-1}{V}}\right), \left(\frac{-1}{A}\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \left(\frac{-1}{V}\right)\right), \left(\frac{-1}{A}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(-1, V\right)\right), \left(\frac{-1}{A}\right)\right)\right)\right) \]
      12. /-lowering-/.f6486.0%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(-1, V\right)\right), \mathsf{/.f64}\left(-1, A\right)\right)\right)\right) \]
    10. Applied egg-rr86.0%

      \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell}{\frac{-1}{V}} \cdot \frac{-1}{A}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{-1}{A} \cdot \frac{\ell}{\frac{-1}{V}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 78.2% accurate, 0.9× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{-309}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{1}{\ell}}{\frac{V}{A}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{-1}{A} \cdot \frac{\ell}{\frac{-1}{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 (* V l)) 5e-309)
   (* c0 (sqrt (/ (/ 1.0 l) (/ V A))))
   (/ c0 (sqrt (* (/ -1.0 A) (/ l (/ -1.0 V)))))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((A / (V * l)) <= 5e-309) {
		tmp = c0 * sqrt(((1.0 / l) / (V / A)));
	} else {
		tmp = c0 / sqrt(((-1.0 / A) * (l / (-1.0 / 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 / (v * l)) <= 5d-309) then
        tmp = c0 * sqrt(((1.0d0 / l) / (v / a)))
    else
        tmp = c0 / sqrt((((-1.0d0) / a) * (l / ((-1.0d0) / 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 / (V * l)) <= 5e-309) {
		tmp = c0 * Math.sqrt(((1.0 / l) / (V / A)));
	} else {
		tmp = c0 / Math.sqrt(((-1.0 / A) * (l / (-1.0 / V))));
	}
	return tmp;
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	tmp = 0
	if (A / (V * l)) <= 5e-309:
		tmp = c0 * math.sqrt(((1.0 / l) / (V / A)))
	else:
		tmp = c0 / math.sqrt(((-1.0 / A) * (l / (-1.0 / V))))
	return tmp
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(A / Float64(V * l)) <= 5e-309)
		tmp = Float64(c0 * sqrt(Float64(Float64(1.0 / l) / Float64(V / A))));
	else
		tmp = Float64(c0 / sqrt(Float64(Float64(-1.0 / A) * Float64(l / Float64(-1.0 / 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 / (V * l)) <= 5e-309)
		tmp = c0 * sqrt(((1.0 / l) / (V / A)));
	else
		tmp = c0 / sqrt(((-1.0 / A) * (l / (-1.0 / 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[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision], 5e-309], N[(c0 * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / N[(V / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(N[(-1.0 / A), $MachinePrecision] * N[(l / N[(-1.0 / V), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{-309}:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{1}{\ell}}{\frac{V}{A}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{c0}{\sqrt{\frac{-1}{A} \cdot \frac{\ell}{\frac{-1}{V}}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 A (*.f64 V l)) < 4.9999999999999995e-309

    1. Initial program 36.1%

      \[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. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\frac{V}{A}}}{\ell}\right)\right)\right) \]
      3. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{1}{\frac{V}{A} \cdot \ell}\right)\right)\right) \]
      4. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{\frac{V}{A}}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), \left(\frac{V}{A}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), \left(\frac{V}{A}\right)\right)\right)\right) \]
      7. /-lowering-/.f6450.6%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), \mathsf{/.f64}\left(V, A\right)\right)\right)\right) \]
    4. Applied egg-rr50.6%

      \[\leadsto c0 \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{\frac{V}{A}}}} \]

    if 4.9999999999999995e-309 < (/.f64 A (*.f64 V l))

    1. Initial program 85.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right)\right)\right) \]
      2. /-rgt-identityN/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right)\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \left(\frac{1}{V}\right)\right)\right)\right)\right) \]
      5. /-lowering-/.f6485.5%

        \[\leadsto \mathsf{*.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(A, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(1, V\right)\right)\right)\right)\right) \]
    4. Applied egg-rr85.5%

      \[\leadsto c0 \cdot \sqrt{\frac{A}{\color{blue}{\frac{\ell}{\frac{1}{V}}}}} \]
    5. Step-by-step derivation
      1. associate-/r/N/A

        \[\leadsto c0 \cdot \sqrt{\frac{A}{\ell} \cdot \frac{1}{V}} \]
      2. div-invN/A

        \[\leadsto c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}} \]
      3. clear-numN/A

        \[\leadsto c0 \cdot \sqrt{\frac{1}{\frac{V}{\frac{A}{\ell}}}} \]
      4. sqrt-divN/A

        \[\leadsto c0 \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
      5. metadata-evalN/A

        \[\leadsto c0 \cdot \frac{1}{\sqrt{\color{blue}{\frac{V}{\frac{A}{\ell}}}}} \]
      6. div-invN/A

        \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \color{blue}{\left(\sqrt{\frac{V}{\frac{A}{\ell}}}\right)}\right) \]
      8. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{\frac{A}{\ell}}{V}}}\right)\right) \]
      9. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{\frac{A}{\ell}}{V}\right)}^{-1}}\right)\right) \]
      10. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\color{blue}{\left(\frac{-1}{2}\right)}}\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\frac{-1}{2}}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{\frac{A}{\ell}}{V}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right) \]
      13. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{\frac{A}{\ell}}{V}\right), \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right) \]
      14. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{A}{\ell} \cdot \frac{1}{V}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      15. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\left(\frac{A}{\frac{\ell}{\frac{1}{V}}}\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      16. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{\frac{1}{V}}\right)\right), \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      17. associate-/r/N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\frac{\ell}{1} \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      18. /-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \left(\ell \cdot V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      19. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right) \]
      20. metadata-eval85.6%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(A, \mathsf{*.f64}\left(\ell, V\right)\right), \frac{-1}{2}\right)\right) \]
    6. Applied egg-rr85.6%

      \[\leadsto \color{blue}{\frac{c0}{{\left(\frac{A}{\ell \cdot V}\right)}^{-0.5}}} \]
    7. Step-by-step derivation
      1. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left({\left(\frac{A}{\ell \cdot V}\right)}^{\left(\frac{-1}{\color{blue}{2}}\right)}\right)\right) \]
      2. sqrt-pow1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{{\left(\frac{A}{\ell \cdot V}\right)}^{-1}}\right)\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{1}{\frac{A}{\ell \cdot V}}}\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \left(\sqrt{\frac{\ell \cdot V}{A}}\right)\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell \cdot V}{A}\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\ell \cdot \frac{V}{A}\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\ell \cdot \frac{1}{\frac{A}{V}}\right)\right)\right) \]
      8. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell}{\frac{A}{V}}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \left(\frac{A}{V}\right)\right)\right)\right) \]
      10. /-lowering-/.f6480.2%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(A, V\right)\right)\right)\right) \]
    8. Applied egg-rr80.2%

      \[\leadsto \frac{c0}{\color{blue}{\sqrt{\frac{\ell}{\frac{A}{V}}}}} \]
    9. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{\mathsf{neg}\left(\frac{A}{V}\right)}\right)\right)\right) \]
      2. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{\mathsf{neg}\left(A \cdot \frac{1}{V}\right)}\right)\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{A \cdot \left(\mathsf{neg}\left(\frac{1}{V}\right)\right)}\right)\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{A \cdot \left(-1 \cdot \frac{1}{V}\right)}\right)\right)\right) \]
      5. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\mathsf{neg}\left(\ell\right)}{A \cdot \frac{-1}{V}}\right)\right)\right) \]
      6. neg-mul-1N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{-1 \cdot \ell}{A \cdot \frac{-1}{V}}\right)\right)\right) \]
      7. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{-1}{A} \cdot \frac{\ell}{\frac{-1}{V}}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\left(\frac{\ell}{\frac{-1}{V}} \cdot \frac{-1}{A}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{\ell}{\frac{-1}{V}}\right), \left(\frac{-1}{A}\right)\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \left(\frac{-1}{V}\right)\right), \left(\frac{-1}{A}\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(-1, V\right)\right), \left(\frac{-1}{A}\right)\right)\right)\right) \]
      12. /-lowering-/.f6486.0%

        \[\leadsto \mathsf{/.f64}\left(c0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(-1, V\right)\right), \mathsf{/.f64}\left(-1, A\right)\right)\right)\right) \]
    10. Applied egg-rr86.0%

      \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{\ell}{\frac{-1}{V}} \cdot \frac{-1}{A}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{A}{V \cdot \ell} \leq 5 \cdot 10^{-309}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{1}{\ell}}{\frac{V}{A}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{-1}{A} \cdot \frac{\ell}{\frac{-1}{V}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 73.9% accurate, 1.0× speedup?

\[\begin{array}{l} [c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\ \\ c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \end{array} \]
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
assert(c0 < A && A < V && V < l);
double code(double c0, double A, double V, double l) {
	return c0 * sqrt((A / (V * l)));
}
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    code = c0 * sqrt((a / (v * l)))
end function
assert c0 < A && A < V && V < l;
public static double code(double c0, double A, double V, double l) {
	return c0 * Math.sqrt((A / (V * l)));
}
[c0, A, V, l] = sort([c0, A, V, l])
def code(c0, A, V, l):
	return c0 * math.sqrt((A / (V * l)))
c0, A, V, l = sort([c0, A, V, l])
function code(c0, A, V, l)
	return Float64(c0 * sqrt(Float64(A / Float64(V * l))))
end
c0, A, V, l = num2cell(sort([c0, A, V, l])){:}
function tmp = code(c0, A, V, l)
	tmp = c0 * sqrt((A / (V * l)));
end
NOTE: c0, A, V, and l should be sorted in increasing order before calling this function.
code[c0_, A_, V_, l_] := N[(c0 * N[Sqrt[N[(A / N[(V * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[c0, A, V, l] = \mathsf{sort}([c0, A, V, l])\\
\\
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\end{array}
Derivation
  1. Initial program 74.1%

    \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
  2. Add Preprocessing
  3. Add Preprocessing

Reproduce

?
herbie shell --seed 2024163 
(FPCore (c0 A V l)
  :name "Henrywood and Agarwal, Equation (3)"
  :precision binary64
  (* c0 (sqrt (/ A (* V l)))))