Henrywood and Agarwal, Equation (3)

Percentage Accurate: 73.3% → 96.9%
Time: 10.9s
Alternatives: 11
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 11 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 96.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{V}}\right)}^{1.5} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (* c0 (pow (/ (cbrt A) (* (cbrt l) (cbrt V))) 1.5)))
double code(double c0, double A, double V, double l) {
	return c0 * pow((cbrt(A) / (cbrt(l) * cbrt(V))), 1.5);
}
public static double code(double c0, double A, double V, double l) {
	return c0 * Math.pow((Math.cbrt(A) / (Math.cbrt(l) * Math.cbrt(V))), 1.5);
}
function code(c0, A, V, l)
	return Float64(c0 * (Float64(cbrt(A) / Float64(cbrt(l) * cbrt(V))) ^ 1.5))
end
code[c0_, A_, V_, l_] := N[(c0 * N[Power[N[(N[Power[A, 1/3], $MachinePrecision] / N[(N[Power[l, 1/3], $MachinePrecision] * N[Power[V, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{\ell} \cdot \sqrt[3]{V}}\right)}^{1.5}
\end{array}
Derivation
  1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \cdot V \leq -1 \cdot 10^{+282}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\frac{-\ell}{A}}}{\sqrt{\frac{-1}{V}}}}\\ \mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-320}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318} \lor \neg \left(\ell \cdot V \leq 2 \cdot 10^{+304}\right):\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{\frac{A}{V}}}{\sqrt[3]{\ell}}\right)}^{1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* l V) -1e+282)
   (/ c0 (/ (sqrt (/ (- l) A)) (sqrt (/ -1.0 V))))
   (if (<= (* l V) -5e-320)
     (* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
     (if (or (<= (* l V) 2e-318) (not (<= (* l V) 2e+304)))
       (* c0 (pow (/ (cbrt (/ A V)) (cbrt l)) 1.5))
       (/ c0 (/ (sqrt (* l V)) (sqrt A)))))))
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -1e+282) {
		tmp = c0 / (sqrt((-l / A)) / sqrt((-1.0 / V)));
	} else if ((l * V) <= -5e-320) {
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	} else if (((l * V) <= 2e-318) || !((l * V) <= 2e+304)) {
		tmp = c0 * pow((cbrt((A / V)) / cbrt(l)), 1.5);
	} else {
		tmp = c0 / (sqrt((l * V)) / sqrt(A));
	}
	return tmp;
}
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -1e+282) {
		tmp = c0 / (Math.sqrt((-l / A)) / Math.sqrt((-1.0 / V)));
	} else if ((l * V) <= -5e-320) {
		tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
	} else if (((l * V) <= 2e-318) || !((l * V) <= 2e+304)) {
		tmp = c0 * Math.pow((Math.cbrt((A / V)) / Math.cbrt(l)), 1.5);
	} else {
		tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
	}
	return tmp;
}
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(l * V) <= -1e+282)
		tmp = Float64(c0 / Float64(sqrt(Float64(Float64(-l) / A)) / sqrt(Float64(-1.0 / V))));
	elseif (Float64(l * V) <= -5e-320)
		tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l)))));
	elseif ((Float64(l * V) <= 2e-318) || !(Float64(l * V) <= 2e+304))
		tmp = Float64(c0 * (Float64(cbrt(Float64(A / V)) / cbrt(l)) ^ 1.5));
	else
		tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(A)));
	end
	return tmp
end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -1e+282], N[(c0 / N[(N[Sqrt[N[((-l) / A), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-320], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[Not[LessEqual[N[(l * V), $MachinePrecision], 2e+304]], $MachinePrecision]], N[(c0 * N[Power[N[(N[Power[N[(A / V), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -1 \cdot 10^{+282}:\\
\;\;\;\;\frac{c0}{\frac{\sqrt{\frac{-\ell}{A}}}{\sqrt{\frac{-1}{V}}}}\\

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

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

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


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

    1. Initial program 28.4%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{\frac{\sqrt{-\frac{\ell}{A}}}{\sqrt{-\frac{1}{V}}}}} \]
      8. distribute-neg-frac29.2%

        \[\leadsto \frac{c0}{\frac{\sqrt{\color{blue}{\frac{-\ell}{A}}}}{\sqrt{-\frac{1}{V}}}} \]
      9. distribute-neg-frac29.2%

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

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

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

    if -1.00000000000000003e282 < (*.f64 V l) < -4.99994e-320

    1. Initial program 87.5%

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

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

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

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

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

    if -4.99994e-320 < (*.f64 V l) < 2.0000024e-318 or 1.9999999999999999e304 < (*.f64 V l)

    1. Initial program 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304

    1. Initial program 79.9%

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

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

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

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

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

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

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

Alternative 3: 80.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+251}:\\ \;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\ \mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-76}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\ \;\;\;\;\sqrt{A} \cdot \frac{c0}{\sqrt{\ell \cdot V}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* l V) -2e+251)
   (* (/ c0 (sqrt l)) (sqrt (/ A V)))
   (if (<= (* l V) -5e-76)
     (* c0 (sqrt (/ A (* l V))))
     (if (<= (* l V) 2e-318)
       (/ c0 (sqrt (/ V (/ A l))))
       (if (<= (* l V) 2e+304)
         (* (sqrt A) (/ c0 (sqrt (* l V))))
         (* c0 (pow (/ (/ A V) l) 0.5)))))))
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -2e+251) {
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	} else if ((l * V) <= -5e-76) {
		tmp = c0 * sqrt((A / (l * V)));
	} else if ((l * V) <= 2e-318) {
		tmp = c0 / sqrt((V / (A / l)));
	} else if ((l * V) <= 2e+304) {
		tmp = sqrt(A) * (c0 / sqrt((l * V)));
	} else {
		tmp = c0 * pow(((A / V) / l), 0.5);
	}
	return tmp;
}
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: tmp
    if ((l * v) <= (-2d+251)) then
        tmp = (c0 / sqrt(l)) * sqrt((a / v))
    else if ((l * v) <= (-5d-76)) then
        tmp = c0 * sqrt((a / (l * v)))
    else if ((l * v) <= 2d-318) then
        tmp = c0 / sqrt((v / (a / l)))
    else if ((l * v) <= 2d+304) then
        tmp = sqrt(a) * (c0 / sqrt((l * v)))
    else
        tmp = c0 * (((a / v) / l) ** 0.5d0)
    end if
    code = tmp
end function
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -2e+251) {
		tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
	} else if ((l * V) <= -5e-76) {
		tmp = c0 * Math.sqrt((A / (l * V)));
	} else if ((l * V) <= 2e-318) {
		tmp = c0 / Math.sqrt((V / (A / l)));
	} else if ((l * V) <= 2e+304) {
		tmp = Math.sqrt(A) * (c0 / Math.sqrt((l * V)));
	} else {
		tmp = c0 * Math.pow(((A / V) / l), 0.5);
	}
	return tmp;
}
def code(c0, A, V, l):
	tmp = 0
	if (l * V) <= -2e+251:
		tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V))
	elif (l * V) <= -5e-76:
		tmp = c0 * math.sqrt((A / (l * V)))
	elif (l * V) <= 2e-318:
		tmp = c0 / math.sqrt((V / (A / l)))
	elif (l * V) <= 2e+304:
		tmp = math.sqrt(A) * (c0 / math.sqrt((l * V)))
	else:
		tmp = c0 * math.pow(((A / V) / l), 0.5)
	return tmp
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(l * V) <= -2e+251)
		tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V)));
	elseif (Float64(l * V) <= -5e-76)
		tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V))));
	elseif (Float64(l * V) <= 2e-318)
		tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l))));
	elseif (Float64(l * V) <= 2e+304)
		tmp = Float64(sqrt(A) * Float64(c0 / sqrt(Float64(l * V))));
	else
		tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5));
	end
	return tmp
end
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if ((l * V) <= -2e+251)
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	elseif ((l * V) <= -5e-76)
		tmp = c0 * sqrt((A / (l * V)));
	elseif ((l * V) <= 2e-318)
		tmp = c0 / sqrt((V / (A / l)));
	elseif ((l * V) <= 2e+304)
		tmp = sqrt(A) * (c0 / sqrt((l * V)));
	else
		tmp = c0 * (((A / V) / l) ^ 0.5);
	end
	tmp_2 = tmp;
end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -2e+251], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-76], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(N[Sqrt[A], $MachinePrecision] * N[(c0 / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+251}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\

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

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

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

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


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

    1. Initial program 30.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e251 < (*.f64 V l) < -4.9999999999999998e-76

    1. Initial program 93.6%

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

    if -4.9999999999999998e-76 < (*.f64 V l) < 2.0000024e-318

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e304 < (*.f64 V l)

    1. Initial program 34.0%

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

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

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

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

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

Alternative 4: 81.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+251}:\\ \;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\ \mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-76}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell \cdot V}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* l V) -2e+251)
   (* (/ c0 (sqrt l)) (sqrt (/ A V)))
   (if (<= (* l V) -5e-76)
     (* c0 (sqrt (/ A (* l V))))
     (if (<= (* l V) 2e-318)
       (/ c0 (sqrt (/ V (/ A l))))
       (if (<= (* l V) 2e+304)
         (* c0 (/ (sqrt A) (sqrt (* l V))))
         (* c0 (pow (/ (/ A V) l) 0.5)))))))
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -2e+251) {
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	} else if ((l * V) <= -5e-76) {
		tmp = c0 * sqrt((A / (l * V)));
	} else if ((l * V) <= 2e-318) {
		tmp = c0 / sqrt((V / (A / l)));
	} else if ((l * V) <= 2e+304) {
		tmp = c0 * (sqrt(A) / sqrt((l * V)));
	} else {
		tmp = c0 * pow(((A / V) / l), 0.5);
	}
	return tmp;
}
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: tmp
    if ((l * v) <= (-2d+251)) then
        tmp = (c0 / sqrt(l)) * sqrt((a / v))
    else if ((l * v) <= (-5d-76)) then
        tmp = c0 * sqrt((a / (l * v)))
    else if ((l * v) <= 2d-318) then
        tmp = c0 / sqrt((v / (a / l)))
    else if ((l * v) <= 2d+304) then
        tmp = c0 * (sqrt(a) / sqrt((l * v)))
    else
        tmp = c0 * (((a / v) / l) ** 0.5d0)
    end if
    code = tmp
end function
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -2e+251) {
		tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
	} else if ((l * V) <= -5e-76) {
		tmp = c0 * Math.sqrt((A / (l * V)));
	} else if ((l * V) <= 2e-318) {
		tmp = c0 / Math.sqrt((V / (A / l)));
	} else if ((l * V) <= 2e+304) {
		tmp = c0 * (Math.sqrt(A) / Math.sqrt((l * V)));
	} else {
		tmp = c0 * Math.pow(((A / V) / l), 0.5);
	}
	return tmp;
}
def code(c0, A, V, l):
	tmp = 0
	if (l * V) <= -2e+251:
		tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V))
	elif (l * V) <= -5e-76:
		tmp = c0 * math.sqrt((A / (l * V)))
	elif (l * V) <= 2e-318:
		tmp = c0 / math.sqrt((V / (A / l)))
	elif (l * V) <= 2e+304:
		tmp = c0 * (math.sqrt(A) / math.sqrt((l * V)))
	else:
		tmp = c0 * math.pow(((A / V) / l), 0.5)
	return tmp
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(l * V) <= -2e+251)
		tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V)));
	elseif (Float64(l * V) <= -5e-76)
		tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V))));
	elseif (Float64(l * V) <= 2e-318)
		tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l))));
	elseif (Float64(l * V) <= 2e+304)
		tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(l * V))));
	else
		tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5));
	end
	return tmp
end
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if ((l * V) <= -2e+251)
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	elseif ((l * V) <= -5e-76)
		tmp = c0 * sqrt((A / (l * V)));
	elseif ((l * V) <= 2e-318)
		tmp = c0 / sqrt((V / (A / l)));
	elseif ((l * V) <= 2e+304)
		tmp = c0 * (sqrt(A) / sqrt((l * V)));
	else
		tmp = c0 * (((A / V) / l) ^ 0.5);
	end
	tmp_2 = tmp;
end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -2e+251], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-76], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+251}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\

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

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

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

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


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

    1. Initial program 30.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e251 < (*.f64 V l) < -4.9999999999999998e-76

    1. Initial program 93.6%

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

    if -4.9999999999999998e-76 < (*.f64 V l) < 2.0000024e-318

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

    if 1.9999999999999999e304 < (*.f64 V l)

    1. Initial program 34.0%

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

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

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

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

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

Alternative 5: 81.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+251}:\\ \;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\ \mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-76}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* l V) -2e+251)
   (* (/ c0 (sqrt l)) (sqrt (/ A V)))
   (if (<= (* l V) -5e-76)
     (* c0 (sqrt (/ A (* l V))))
     (if (<= (* l V) 2e-318)
       (/ c0 (sqrt (/ V (/ A l))))
       (if (<= (* l V) 2e+304)
         (/ c0 (/ (sqrt (* l V)) (sqrt A)))
         (* c0 (pow (/ (/ A V) l) 0.5)))))))
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -2e+251) {
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	} else if ((l * V) <= -5e-76) {
		tmp = c0 * sqrt((A / (l * V)));
	} else if ((l * V) <= 2e-318) {
		tmp = c0 / sqrt((V / (A / l)));
	} else if ((l * V) <= 2e+304) {
		tmp = c0 / (sqrt((l * V)) / sqrt(A));
	} else {
		tmp = c0 * pow(((A / V) / l), 0.5);
	}
	return tmp;
}
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: tmp
    if ((l * v) <= (-2d+251)) then
        tmp = (c0 / sqrt(l)) * sqrt((a / v))
    else if ((l * v) <= (-5d-76)) then
        tmp = c0 * sqrt((a / (l * v)))
    else if ((l * v) <= 2d-318) then
        tmp = c0 / sqrt((v / (a / l)))
    else if ((l * v) <= 2d+304) then
        tmp = c0 / (sqrt((l * v)) / sqrt(a))
    else
        tmp = c0 * (((a / v) / l) ** 0.5d0)
    end if
    code = tmp
end function
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -2e+251) {
		tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
	} else if ((l * V) <= -5e-76) {
		tmp = c0 * Math.sqrt((A / (l * V)));
	} else if ((l * V) <= 2e-318) {
		tmp = c0 / Math.sqrt((V / (A / l)));
	} else if ((l * V) <= 2e+304) {
		tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
	} else {
		tmp = c0 * Math.pow(((A / V) / l), 0.5);
	}
	return tmp;
}
def code(c0, A, V, l):
	tmp = 0
	if (l * V) <= -2e+251:
		tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V))
	elif (l * V) <= -5e-76:
		tmp = c0 * math.sqrt((A / (l * V)))
	elif (l * V) <= 2e-318:
		tmp = c0 / math.sqrt((V / (A / l)))
	elif (l * V) <= 2e+304:
		tmp = c0 / (math.sqrt((l * V)) / math.sqrt(A))
	else:
		tmp = c0 * math.pow(((A / V) / l), 0.5)
	return tmp
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(l * V) <= -2e+251)
		tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V)));
	elseif (Float64(l * V) <= -5e-76)
		tmp = Float64(c0 * sqrt(Float64(A / Float64(l * V))));
	elseif (Float64(l * V) <= 2e-318)
		tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l))));
	elseif (Float64(l * V) <= 2e+304)
		tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(A)));
	else
		tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5));
	end
	return tmp
end
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if ((l * V) <= -2e+251)
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	elseif ((l * V) <= -5e-76)
		tmp = c0 * sqrt((A / (l * V)));
	elseif ((l * V) <= 2e-318)
		tmp = c0 / sqrt((V / (A / l)));
	elseif ((l * V) <= 2e+304)
		tmp = c0 / (sqrt((l * V)) / sqrt(A));
	else
		tmp = c0 * (((A / V) / l) ^ 0.5);
	end
	tmp_2 = tmp;
end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], -2e+251], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-76], N[(c0 * N[Sqrt[N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -2 \cdot 10^{+251}:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\

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

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

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

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


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

    1. Initial program 30.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e251 < (*.f64 V l) < -4.9999999999999998e-76

    1. Initial program 93.6%

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

    if -4.9999999999999998e-76 < (*.f64 V l) < 2.0000024e-318

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304

    1. Initial program 79.9%

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

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

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

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

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

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

    if 1.9999999999999999e304 < (*.f64 V l)

    1. Initial program 34.0%

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

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

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

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

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

Alternative 6: 88.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \cdot V \leq -\infty:\\ \;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\ \mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-320}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* l V) (- INFINITY))
   (* (/ c0 (sqrt l)) (sqrt (/ A V)))
   (if (<= (* l V) -5e-320)
     (* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
     (if (<= (* l V) 2e-318)
       (/ c0 (sqrt (* V (/ l A))))
       (if (<= (* l V) 2e+304)
         (/ c0 (/ (sqrt (* l V)) (sqrt A)))
         (* c0 (pow (/ (/ A V) l) 0.5)))))))
double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -((double) INFINITY)) {
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	} else if ((l * V) <= -5e-320) {
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	} else if ((l * V) <= 2e-318) {
		tmp = c0 / sqrt((V * (l / A)));
	} else if ((l * V) <= 2e+304) {
		tmp = c0 / (sqrt((l * V)) / sqrt(A));
	} else {
		tmp = c0 * pow(((A / V) / l), 0.5);
	}
	return tmp;
}
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if ((l * V) <= -Double.POSITIVE_INFINITY) {
		tmp = (c0 / Math.sqrt(l)) * Math.sqrt((A / V));
	} else if ((l * V) <= -5e-320) {
		tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
	} else if ((l * V) <= 2e-318) {
		tmp = c0 / Math.sqrt((V * (l / A)));
	} else if ((l * V) <= 2e+304) {
		tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
	} else {
		tmp = c0 * Math.pow(((A / V) / l), 0.5);
	}
	return tmp;
}
def code(c0, A, V, l):
	tmp = 0
	if (l * V) <= -math.inf:
		tmp = (c0 / math.sqrt(l)) * math.sqrt((A / V))
	elif (l * V) <= -5e-320:
		tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l)))
	elif (l * V) <= 2e-318:
		tmp = c0 / math.sqrt((V * (l / A)))
	elif (l * V) <= 2e+304:
		tmp = c0 / (math.sqrt((l * V)) / math.sqrt(A))
	else:
		tmp = c0 * math.pow(((A / V) / l), 0.5)
	return tmp
function code(c0, A, V, l)
	tmp = 0.0
	if (Float64(l * V) <= Float64(-Inf))
		tmp = Float64(Float64(c0 / sqrt(l)) * sqrt(Float64(A / V)));
	elseif (Float64(l * V) <= -5e-320)
		tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l)))));
	elseif (Float64(l * V) <= 2e-318)
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	elseif (Float64(l * V) <= 2e+304)
		tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(A)));
	else
		tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5));
	end
	return tmp
end
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if ((l * V) <= -Inf)
		tmp = (c0 / sqrt(l)) * sqrt((A / V));
	elseif ((l * V) <= -5e-320)
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	elseif ((l * V) <= 2e-318)
		tmp = c0 / sqrt((V * (l / A)));
	elseif ((l * V) <= 2e+304)
		tmp = c0 / (sqrt((l * V)) / sqrt(A));
	else
		tmp = c0 * (((A / V) / l) ^ 0.5);
	end
	tmp_2 = tmp;
end
code[c0_, A_, V_, l_] := If[LessEqual[N[(l * V), $MachinePrecision], (-Infinity)], N[(N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], -5e-320], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot V \leq -\infty:\\
\;\;\;\;\frac{c0}{\sqrt{\ell}} \cdot \sqrt{\frac{A}{V}}\\

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

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

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

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


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

    1. Initial program 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 V l) < -4.99994e-320

    1. Initial program 86.8%

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

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

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

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

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

    if -4.99994e-320 < (*.f64 V l) < 2.0000024e-318

    1. Initial program 40.7%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/76.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304

    1. Initial program 79.9%

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

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

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

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

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

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

    if 1.9999999999999999e304 < (*.f64 V l)

    1. Initial program 34.0%

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

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

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

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

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

Alternative 7: 85.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c0}{\frac{\sqrt{\frac{-\ell}{A}}}{\sqrt{\frac{-1}{V}}}}\\ \mathbf{if}\;\ell \cdot V \leq -1 \cdot 10^{+282}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\ell \cdot V \leq -5 \cdot 10^{-299}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{+304}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell \cdot V}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ c0 (/ (sqrt (/ (- l) A)) (sqrt (/ -1.0 V))))))
   (if (<= (* l V) -1e+282)
     t_0
     (if (<= (* l V) -5e-299)
       (* c0 (/ (sqrt (- A)) (sqrt (* V (- l)))))
       (if (<= (* l V) 2e-318)
         t_0
         (if (<= (* l V) 2e+304)
           (/ c0 (/ (sqrt (* l V)) (sqrt A)))
           (* c0 (pow (/ (/ A V) l) 0.5))))))))
double code(double c0, double A, double V, double l) {
	double t_0 = c0 / (sqrt((-l / A)) / sqrt((-1.0 / V)));
	double tmp;
	if ((l * V) <= -1e+282) {
		tmp = t_0;
	} else if ((l * V) <= -5e-299) {
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	} else if ((l * V) <= 2e-318) {
		tmp = t_0;
	} else if ((l * V) <= 2e+304) {
		tmp = c0 / (sqrt((l * V)) / sqrt(A));
	} else {
		tmp = c0 * pow(((A / V) / l), 0.5);
	}
	return tmp;
}
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((-l / a)) / sqrt(((-1.0d0) / v)))
    if ((l * v) <= (-1d+282)) then
        tmp = t_0
    else if ((l * v) <= (-5d-299)) then
        tmp = c0 * (sqrt(-a) / sqrt((v * -l)))
    else if ((l * v) <= 2d-318) then
        tmp = t_0
    else if ((l * v) <= 2d+304) then
        tmp = c0 / (sqrt((l * v)) / sqrt(a))
    else
        tmp = c0 * (((a / v) / l) ** 0.5d0)
    end if
    code = tmp
end function
public static double code(double c0, double A, double V, double l) {
	double t_0 = c0 / (Math.sqrt((-l / A)) / Math.sqrt((-1.0 / V)));
	double tmp;
	if ((l * V) <= -1e+282) {
		tmp = t_0;
	} else if ((l * V) <= -5e-299) {
		tmp = c0 * (Math.sqrt(-A) / Math.sqrt((V * -l)));
	} else if ((l * V) <= 2e-318) {
		tmp = t_0;
	} else if ((l * V) <= 2e+304) {
		tmp = c0 / (Math.sqrt((l * V)) / Math.sqrt(A));
	} else {
		tmp = c0 * Math.pow(((A / V) / l), 0.5);
	}
	return tmp;
}
def code(c0, A, V, l):
	t_0 = c0 / (math.sqrt((-l / A)) / math.sqrt((-1.0 / V)))
	tmp = 0
	if (l * V) <= -1e+282:
		tmp = t_0
	elif (l * V) <= -5e-299:
		tmp = c0 * (math.sqrt(-A) / math.sqrt((V * -l)))
	elif (l * V) <= 2e-318:
		tmp = t_0
	elif (l * V) <= 2e+304:
		tmp = c0 / (math.sqrt((l * V)) / math.sqrt(A))
	else:
		tmp = c0 * math.pow(((A / V) / l), 0.5)
	return tmp
function code(c0, A, V, l)
	t_0 = Float64(c0 / Float64(sqrt(Float64(Float64(-l) / A)) / sqrt(Float64(-1.0 / V))))
	tmp = 0.0
	if (Float64(l * V) <= -1e+282)
		tmp = t_0;
	elseif (Float64(l * V) <= -5e-299)
		tmp = Float64(c0 * Float64(sqrt(Float64(-A)) / sqrt(Float64(V * Float64(-l)))));
	elseif (Float64(l * V) <= 2e-318)
		tmp = t_0;
	elseif (Float64(l * V) <= 2e+304)
		tmp = Float64(c0 / Float64(sqrt(Float64(l * V)) / sqrt(A)));
	else
		tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5));
	end
	return tmp
end
function tmp_2 = code(c0, A, V, l)
	t_0 = c0 / (sqrt((-l / A)) / sqrt((-1.0 / V)));
	tmp = 0.0;
	if ((l * V) <= -1e+282)
		tmp = t_0;
	elseif ((l * V) <= -5e-299)
		tmp = c0 * (sqrt(-A) / sqrt((V * -l)));
	elseif ((l * V) <= 2e-318)
		tmp = t_0;
	elseif ((l * V) <= 2e+304)
		tmp = c0 / (sqrt((l * V)) / sqrt(A));
	else
		tmp = c0 * (((A / V) / l) ^ 0.5);
	end
	tmp_2 = tmp;
end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 / N[(N[Sqrt[N[((-l) / A), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(-1.0 / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * V), $MachinePrecision], -1e+282], t$95$0, If[LessEqual[N[(l * V), $MachinePrecision], -5e-299], N[(c0 * N[(N[Sqrt[(-A)], $MachinePrecision] / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * V), $MachinePrecision], 2e-318], t$95$0, If[LessEqual[N[(l * V), $MachinePrecision], 2e+304], N[(c0 / N[(N[Sqrt[N[(l * V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{c0}{\frac{\sqrt{\frac{-\ell}{A}}}{\sqrt{\frac{-1}{V}}}}\\
\mathbf{if}\;\ell \cdot V \leq -1 \cdot 10^{+282}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;\ell \cdot V \leq 2 \cdot 10^{-318}:\\
\;\;\;\;t_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 V l) < -1.00000000000000003e282 or -4.99999999999999956e-299 < (*.f64 V l) < 2.0000024e-318

    1. Initial program 38.2%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\color{blue}{\frac{\sqrt{-\frac{\ell}{A}}}{\sqrt{-\frac{1}{V}}}}} \]
      8. distribute-neg-frac47.4%

        \[\leadsto \frac{c0}{\frac{\sqrt{\color{blue}{\frac{-\ell}{A}}}}{\sqrt{-\frac{1}{V}}}} \]
      9. distribute-neg-frac47.4%

        \[\leadsto \frac{c0}{\frac{\sqrt{\frac{-\ell}{A}}}{\sqrt{\color{blue}{\frac{-1}{V}}}}} \]
      10. metadata-eval47.4%

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

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

    if -1.00000000000000003e282 < (*.f64 V l) < -4.99999999999999956e-299

    1. Initial program 88.0%

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

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

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

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

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

    if 2.0000024e-318 < (*.f64 V l) < 1.9999999999999999e304

    1. Initial program 79.9%

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

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

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

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

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

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

    if 1.9999999999999999e304 < (*.f64 V l)

    1. Initial program 34.0%

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

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

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

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

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

Alternative 8: 77.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 4.3 \cdot 10^{+217}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (if (<= l -5e-310)
   (* c0 (pow (/ (/ A V) l) 0.5))
   (if (<= l 4.3e+217)
     (* c0 (/ (sqrt (/ A V)) (sqrt l)))
     (/ c0 (sqrt (/ V (/ A l)))))))
double code(double c0, double A, double V, double l) {
	double tmp;
	if (l <= -5e-310) {
		tmp = c0 * pow(((A / V) / l), 0.5);
	} else if (l <= 4.3e+217) {
		tmp = c0 * (sqrt((A / V)) / sqrt(l));
	} else {
		tmp = c0 / sqrt((V / (A / l)));
	}
	return tmp;
}
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: tmp
    if (l <= (-5d-310)) then
        tmp = c0 * (((a / v) / l) ** 0.5d0)
    else if (l <= 4.3d+217) then
        tmp = c0 * (sqrt((a / v)) / sqrt(l))
    else
        tmp = c0 / sqrt((v / (a / l)))
    end if
    code = tmp
end function
public static double code(double c0, double A, double V, double l) {
	double tmp;
	if (l <= -5e-310) {
		tmp = c0 * Math.pow(((A / V) / l), 0.5);
	} else if (l <= 4.3e+217) {
		tmp = c0 * (Math.sqrt((A / V)) / Math.sqrt(l));
	} else {
		tmp = c0 / Math.sqrt((V / (A / l)));
	}
	return tmp;
}
def code(c0, A, V, l):
	tmp = 0
	if l <= -5e-310:
		tmp = c0 * math.pow(((A / V) / l), 0.5)
	elif l <= 4.3e+217:
		tmp = c0 * (math.sqrt((A / V)) / math.sqrt(l))
	else:
		tmp = c0 / math.sqrt((V / (A / l)))
	return tmp
function code(c0, A, V, l)
	tmp = 0.0
	if (l <= -5e-310)
		tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5));
	elseif (l <= 4.3e+217)
		tmp = Float64(c0 * Float64(sqrt(Float64(A / V)) / sqrt(l)));
	else
		tmp = Float64(c0 / sqrt(Float64(V / Float64(A / l))));
	end
	return tmp
end
function tmp_2 = code(c0, A, V, l)
	tmp = 0.0;
	if (l <= -5e-310)
		tmp = c0 * (((A / V) / l) ^ 0.5);
	elseif (l <= 4.3e+217)
		tmp = c0 * (sqrt((A / V)) / sqrt(l));
	else
		tmp = c0 / sqrt((V / (A / l)));
	end
	tmp_2 = tmp;
end
code[c0_, A_, V_, l_] := If[LessEqual[l, -5e-310], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.3e+217], N[(c0 * N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V / N[(A / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\

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

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


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

    1. Initial program 65.6%

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

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

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

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

    if -4.999999999999985e-310 < l < 4.3000000000000001e217

    1. Initial program 77.0%

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

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

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

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

    if 4.3000000000000001e217 < l

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0}{\sqrt{\color{blue}{\frac{V}{\frac{A}{\ell}}}}} \]
    9. Simplified79.7%

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

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

Alternative 9: 79.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{A}{\ell \cdot V}\\ \mathbf{if}\;t_0 \leq 0 \lor \neg \left(t_0 \leq 2 \cdot 10^{+301}\right):\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* l V))))
   (if (or (<= t_0 0.0) (not (<= t_0 2e+301)))
     (/ c0 (sqrt (* V (/ l A))))
     (* c0 (sqrt t_0)))))
double code(double c0, double A, double V, double l) {
	double t_0 = A / (l * V);
	double tmp;
	if ((t_0 <= 0.0) || !(t_0 <= 2e+301)) {
		tmp = c0 / sqrt((V * (l / A)));
	} else {
		tmp = c0 * sqrt(t_0);
	}
	return tmp;
}
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a / (l * v)
    if ((t_0 <= 0.0d0) .or. (.not. (t_0 <= 2d+301))) then
        tmp = c0 / sqrt((v * (l / a)))
    else
        tmp = c0 * sqrt(t_0)
    end if
    code = tmp
end function
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (l * V);
	double tmp;
	if ((t_0 <= 0.0) || !(t_0 <= 2e+301)) {
		tmp = c0 / Math.sqrt((V * (l / A)));
	} else {
		tmp = c0 * Math.sqrt(t_0);
	}
	return tmp;
}
def code(c0, A, V, l):
	t_0 = A / (l * V)
	tmp = 0
	if (t_0 <= 0.0) or not (t_0 <= 2e+301):
		tmp = c0 / math.sqrt((V * (l / A)))
	else:
		tmp = c0 * math.sqrt(t_0)
	return tmp
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(l * V))
	tmp = 0.0
	if ((t_0 <= 0.0) || !(t_0 <= 2e+301))
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	else
		tmp = Float64(c0 * sqrt(t_0));
	end
	return tmp
end
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (l * V);
	tmp = 0.0;
	if ((t_0 <= 0.0) || ~((t_0 <= 2e+301)))
		tmp = c0 / sqrt((V * (l / A)));
	else
		tmp = c0 * sqrt(t_0);
	end
	tmp_2 = tmp;
end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 0.0], N[Not[LessEqual[t$95$0, 2e+301]], $MachinePrecision]], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t_0 \leq 0 \lor \neg \left(t_0 \leq 2 \cdot 10^{+301}\right):\\
\;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\

\mathbf{else}:\\
\;\;\;\;c0 \cdot \sqrt{t_0}\\


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

    1. Initial program 32.7%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/51.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 98.8%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.8%

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

Alternative 10: 79.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{A}{\ell \cdot V}\\ \mathbf{if}\;t_0 \leq 2 \cdot 10^{-282}:\\ \;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\ \mathbf{elif}\;t_0 \leq 2 \cdot 10^{+301}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{\ell \cdot V}{A}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* l V))))
   (if (<= t_0 2e-282)
     (* c0 (pow (/ (/ A V) l) 0.5))
     (if (<= t_0 2e+301)
       (/ c0 (sqrt (/ (* l V) A)))
       (/ c0 (sqrt (* V (/ l A))))))))
double code(double c0, double A, double V, double l) {
	double t_0 = A / (l * V);
	double tmp;
	if (t_0 <= 2e-282) {
		tmp = c0 * pow(((A / V) / l), 0.5);
	} else if (t_0 <= 2e+301) {
		tmp = c0 / sqrt(((l * V) / A));
	} else {
		tmp = c0 / sqrt((V * (l / A)));
	}
	return tmp;
}
real(8) function code(c0, a, v, l)
    real(8), intent (in) :: c0
    real(8), intent (in) :: a
    real(8), intent (in) :: v
    real(8), intent (in) :: l
    real(8) :: t_0
    real(8) :: tmp
    t_0 = a / (l * v)
    if (t_0 <= 2d-282) then
        tmp = c0 * (((a / v) / l) ** 0.5d0)
    else if (t_0 <= 2d+301) then
        tmp = c0 / sqrt(((l * v) / a))
    else
        tmp = c0 / sqrt((v * (l / a)))
    end if
    code = tmp
end function
public static double code(double c0, double A, double V, double l) {
	double t_0 = A / (l * V);
	double tmp;
	if (t_0 <= 2e-282) {
		tmp = c0 * Math.pow(((A / V) / l), 0.5);
	} else if (t_0 <= 2e+301) {
		tmp = c0 / Math.sqrt(((l * V) / A));
	} else {
		tmp = c0 / Math.sqrt((V * (l / A)));
	}
	return tmp;
}
def code(c0, A, V, l):
	t_0 = A / (l * V)
	tmp = 0
	if t_0 <= 2e-282:
		tmp = c0 * math.pow(((A / V) / l), 0.5)
	elif t_0 <= 2e+301:
		tmp = c0 / math.sqrt(((l * V) / A))
	else:
		tmp = c0 / math.sqrt((V * (l / A)))
	return tmp
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(l * V))
	tmp = 0.0
	if (t_0 <= 2e-282)
		tmp = Float64(c0 * (Float64(Float64(A / V) / l) ^ 0.5));
	elseif (t_0 <= 2e+301)
		tmp = Float64(c0 / sqrt(Float64(Float64(l * V) / A)));
	else
		tmp = Float64(c0 / sqrt(Float64(V * Float64(l / A))));
	end
	return tmp
end
function tmp_2 = code(c0, A, V, l)
	t_0 = A / (l * V);
	tmp = 0.0;
	if (t_0 <= 2e-282)
		tmp = c0 * (((A / V) / l) ^ 0.5);
	elseif (t_0 <= 2e+301)
		tmp = c0 / sqrt(((l * V) / A));
	else
		tmp = c0 / sqrt((V * (l / A)));
	end
	tmp_2 = tmp;
end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(A / N[(l * V), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-282], N[(c0 * N[Power[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+301], N[(c0 / N[Sqrt[N[(N[(l * V), $MachinePrecision] / A), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(c0 / N[Sqrt[N[(V * N[(l / A), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t_0 \leq 2 \cdot 10^{-282}:\\
\;\;\;\;c0 \cdot {\left(\frac{\frac{A}{V}}{\ell}\right)}^{0.5}\\

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

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


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

    1. Initial program 30.0%

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

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

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

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

    if 2e-282 < (/.f64 A (*.f64 V l)) < 2.00000000000000011e301

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(\frac{\ell}{\frac{A}{V}}\right)}^{-0.5}} \]
    4. Step-by-step derivation
      1. associate-/r/59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 73.3% accurate, 1.0× speedup?

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

\\
c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}
\end{array}
Derivation
  1. Initial program 70.7%

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

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

Reproduce

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