Henrywood and Agarwal, Equation (3)

Percentage Accurate: 73.9% → 96.9%
Time: 13.6s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 73.9% accurate, 1.0× speedup?

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

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

Alternative 1: 96.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 74.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.2% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999982e-298 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999997e307

    1. Initial program 96.7%

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

    if 1.99999999999999997e307 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l))))

    1. Initial program 59.9%

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}} \]
    5. Step-by-step derivation
      1. clear-num70.0%

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

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

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

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

Alternative 3: 77.3% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := c0 \cdot \sqrt{\frac{A}{\ell \cdot V}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

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

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


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

    1. Initial program 67.2%

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

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

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

    if 0.0 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l)))) < 1.99999999999999997e307

    1. Initial program 96.8%

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

    if 1.99999999999999997e307 < (*.f64 c0 (sqrt.f64 (/.f64 A (*.f64 V l))))

    1. Initial program 59.9%

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}} \]
    5. Step-by-step derivation
      1. clear-num70.0%

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

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

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

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

Alternative 4: 77.1% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_0\\


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

    1. Initial program 66.5%

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

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

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

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

    1. Initial program 96.7%

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

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

Alternative 5: 67.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := c0 \cdot \frac{\sqrt{-\frac{A}{\ell}}}{\sqrt{-V}}\\ \mathbf{if}\;V \leq -3.5 \cdot 10^{+215}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;V \leq -6 \cdot 10^{-96}:\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{\ell \cdot V}}\right)}^{1.5}\\ \mathbf{elif}\;V \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell}}}{\sqrt{V}}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (* c0 (/ (sqrt (- (/ A l))) (sqrt (- V))))))
   (if (<= V -3.5e+215)
     t_0
     (if (<= V -6e-96)
       (* c0 (pow (/ (cbrt A) (cbrt (* l V))) 1.5))
       (if (<= V -1e-310) t_0 (/ (* c0 (/ (sqrt A) (sqrt l))) (sqrt V)))))))
double code(double c0, double A, double V, double l) {
	double t_0 = c0 * (sqrt(-(A / l)) / sqrt(-V));
	double tmp;
	if (V <= -3.5e+215) {
		tmp = t_0;
	} else if (V <= -6e-96) {
		tmp = c0 * pow((cbrt(A) / cbrt((l * V))), 1.5);
	} else if (V <= -1e-310) {
		tmp = t_0;
	} else {
		tmp = (c0 * (sqrt(A) / sqrt(l))) / sqrt(V);
	}
	return tmp;
}
public static double code(double c0, double A, double V, double l) {
	double t_0 = c0 * (Math.sqrt(-(A / l)) / Math.sqrt(-V));
	double tmp;
	if (V <= -3.5e+215) {
		tmp = t_0;
	} else if (V <= -6e-96) {
		tmp = c0 * Math.pow((Math.cbrt(A) / Math.cbrt((l * V))), 1.5);
	} else if (V <= -1e-310) {
		tmp = t_0;
	} else {
		tmp = (c0 * (Math.sqrt(A) / Math.sqrt(l))) / Math.sqrt(V);
	}
	return tmp;
}
function code(c0, A, V, l)
	t_0 = Float64(c0 * Float64(sqrt(Float64(-Float64(A / l))) / sqrt(Float64(-V))))
	tmp = 0.0
	if (V <= -3.5e+215)
		tmp = t_0;
	elseif (V <= -6e-96)
		tmp = Float64(c0 * (Float64(cbrt(A) / cbrt(Float64(l * V))) ^ 1.5));
	elseif (V <= -1e-310)
		tmp = t_0;
	else
		tmp = Float64(Float64(c0 * Float64(sqrt(A) / sqrt(l))) / sqrt(V));
	end
	return tmp
end
code[c0_, A_, V_, l_] := Block[{t$95$0 = N[(c0 * N[(N[Sqrt[(-N[(A / l), $MachinePrecision])], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[V, -3.5e+215], t$95$0, If[LessEqual[V, -6e-96], N[(c0 * N[Power[N[(N[Power[A, 1/3], $MachinePrecision] / N[Power[N[(l * V), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[V, -1e-310], t$95$0, N[(N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[V], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;V \leq -6 \cdot 10^{-96}:\\
\;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{\ell \cdot V}}\right)}^{1.5}\\

\mathbf{elif}\;V \leq -1 \cdot 10^{-310}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if V < -3.49999999999999977e215 or -6e-96 < V < -9.999999999999969e-311

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

    if -3.49999999999999977e215 < V < -6e-96

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

    if -9.999999999999969e-311 < V

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;V \leq -3.5 \cdot 10^{+215}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-\frac{A}{\ell}}}{\sqrt{-V}}\\ \mathbf{elif}\;V \leq -6 \cdot 10^{-96}:\\ \;\;\;\;c0 \cdot {\left(\frac{\sqrt[3]{A}}{\sqrt[3]{\ell \cdot V}}\right)}^{1.5}\\ \mathbf{elif}\;V \leq -1 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-\frac{A}{\ell}}}{\sqrt{-V}}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot \frac{\sqrt{A}}{\sqrt{\ell}}}{\sqrt{V}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 89.5% accurate, 0.5× speedup?

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

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

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

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

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

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


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

    1. Initial program 5.7%

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

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

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

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

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

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

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

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

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

    if -inf.0 < (*.f64 V l) < -2.00000000000000003e-294

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

    if -2.00000000000000003e-294 < (*.f64 V l) < -0.0

    1. Initial program 47.6%

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}} \]
    5. Step-by-step derivation
      1. clear-num79.3%

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

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

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

    if -0.0 < (*.f64 V l) < 1.00000000000000005e301

    1. Initial program 85.2%

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

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

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

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

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

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

    if 1.00000000000000005e301 < (*.f64 V l)

    1. Initial program 29.8%

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

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt29.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. pow329.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 76.8% accurate, 0.5× speedup?

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

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

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

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

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

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


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

    1. Initial program 63.6%

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

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

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
      3. pow1/248.5%

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

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

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

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

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

    if -5.0000000000000001e132 < (*.f64 V l) < -5e-206

    1. Initial program 93.4%

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

    if -5e-206 < (*.f64 V l) < -0.0

    1. Initial program 50.6%

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}} \]
    5. Step-by-step derivation
      1. clear-num75.8%

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

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

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

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

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

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

    if -0.0 < (*.f64 V l) < 1.00000000000000005e301

    1. Initial program 85.2%

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

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

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

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

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

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

    if 1.00000000000000005e301 < (*.f64 V l)

    1. Initial program 29.8%

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

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt29.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. pow329.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 76.8% accurate, 0.5× speedup?

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

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

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

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

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

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


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

    1. Initial program 63.6%

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

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

        \[\leadsto c0 \cdot \color{blue}{\frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
      3. pow1/248.5%

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

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

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

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

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

    if -5.0000000000000001e132 < (*.f64 V l) < -5e-206

    1. Initial program 93.4%

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

    if -5e-206 < (*.f64 V l) < -0.0

    1. Initial program 50.6%

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}} \]
    5. Step-by-step derivation
      1. clear-num75.8%

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

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

      \[\leadsto c0 \cdot {\color{blue}{\left(\frac{V}{\frac{A}{\ell}}\right)}}^{-0.5} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt75.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0 < (*.f64 V l) < 1.00000000000000005e301

    1. Initial program 85.2%

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

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

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

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

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

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

    if 1.00000000000000005e301 < (*.f64 V l)

    1. Initial program 29.8%

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

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt29.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. pow329.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := c0 \cdot \left({\ell}^{-0.5} \cdot \sqrt{\frac{A}{V}}\right)\\
\mathbf{if}\;\ell \cdot V \leq -5 \cdot 10^{+132}:\\
\;\;\;\;t\_0\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 V l) < -5.0000000000000001e132 or -5e-206 < (*.f64 V l) < -0.0

    1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot {\color{blue}{\left(\frac{V}{\frac{A}{\ell}}\right)}}^{-0.5} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e132 < (*.f64 V l) < -5e-206

    1. Initial program 93.4%

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

    if -0.0 < (*.f64 V l) < 1.00000000000000005e301

    1. Initial program 85.2%

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

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

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

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

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

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

    if 1.00000000000000005e301 < (*.f64 V l)

    1. Initial program 29.8%

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

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt29.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. pow329.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 76.6% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 V l) < -5.0000000000000001e132 or -5e-206 < (*.f64 V l) < -0.0

    1. Initial program 55.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{c0 \cdot \sqrt{\frac{A}{V}}}{\sqrt{\ell}}} \]
      3. pow1/244.6%

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

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

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

        \[\leadsto \color{blue}{\sqrt{\frac{A}{V}} \cdot \frac{c0}{{\ell}^{0.5}}} \]
    8. Simplified48.0%

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V}} \cdot \frac{c0}{{\ell}^{0.5}}} \]
    9. Step-by-step derivation
      1. *-un-lft-identity48.0%

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

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

      \[\leadsto \sqrt{\frac{A}{V}} \cdot \color{blue}{\left(\frac{c0}{{\ell}^{0.5}} \cdot 1\right)} \]
    11. Step-by-step derivation
      1. *-rgt-identity48.0%

        \[\leadsto \sqrt{\frac{A}{V}} \cdot \color{blue}{\frac{c0}{{\ell}^{0.5}}} \]
      2. unpow1/248.0%

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

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

    if -5.0000000000000001e132 < (*.f64 V l) < -5e-206

    1. Initial program 93.4%

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

    if -0.0 < (*.f64 V l) < 1.00000000000000005e301

    1. Initial program 85.2%

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

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

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

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

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

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

    if 1.00000000000000005e301 < (*.f64 V l)

    1. Initial program 29.8%

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

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt29.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. pow329.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 66.2% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if l < -5.5999999999999998e-220

    1. Initial program 76.1%

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

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

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

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

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

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

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

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

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

    if -5.5999999999999998e-220 < l < -1.999999999999994e-310

    1. Initial program 67.1%

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < l < 2.00000000000000009e42

    1. Initial program 78.0%

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}} \]
    5. Step-by-step derivation
      1. clear-num79.9%

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

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

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

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

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

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

    if 2.00000000000000009e42 < l < 3.3e130

    1. Initial program 81.9%

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

    if 3.3e130 < l

    1. Initial program 63.7%

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}} \]
    5. Step-by-step derivation
      1. clear-num68.3%

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

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

      \[\leadsto c0 \cdot {\color{blue}{\left(\frac{V}{\frac{A}{\ell}}\right)}}^{-0.5} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 82.2% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

    if -0.0 < (*.f64 V l) < 1.00000000000000005e301

    1. Initial program 85.2%

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

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

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

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

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

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

    if 1.00000000000000005e301 < (*.f64 V l)

    1. Initial program 29.8%

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

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt29.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. pow329.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 78.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-318}:\\
\;\;\;\;\sqrt{c0 \cdot \frac{\frac{c0 \cdot A}{\ell}}{V}}\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+261}:\\
\;\;\;\;\frac{c0}{{\left(\frac{\ell \cdot V}{A}\right)}^{0.5}}\\

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


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

    1. Initial program 30.2%

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

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt30.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. pow330.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000024e-318 < (/.f64 A (*.f64 V l)) < 5.0000000000000001e261

    1. Initial program 99.5%

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

        \[\leadsto c0 \cdot \color{blue}{{\left(\frac{A}{V \cdot \ell}\right)}^{0.5}} \]
      2. add-cube-cbrt98.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. pow398.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000001e261 < (/.f64 A (*.f64 V l))

    1. Initial program 45.6%

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

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

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

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

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

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

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

      \[\leadsto c0 \cdot \color{blue}{{\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}} \]
    5. Step-by-step derivation
      1. clear-num59.2%

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

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

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

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

Alternative 14: 80.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

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

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


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

    1. Initial program 27.8%

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

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

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

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

    1. Initial program 98.4%

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

    if 1.00000000000000002e263 < (/.f64 A (*.f64 V l))

    1. Initial program 44.7%

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

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

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

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

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

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

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

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

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

Alternative 15: 80.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{A}{\ell \cdot V}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+282}:\\ \;\;\;\;c0 \cdot \sqrt{t\_0}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \end{array} \end{array} \]
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (/ A (* l V))))
   (if (<= t_0 0.0)
     (* c0 (sqrt (/ (/ A V) l)))
     (if (<= t_0 4e+282) (* c0 (sqrt t_0)) (* c0 (sqrt (/ (/ A l) V)))))))
double code(double c0, double A, double V, double l) {
	double t_0 = A / (l * V);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = c0 * sqrt(((A / V) / l));
	} else if (t_0 <= 4e+282) {
		tmp = c0 * sqrt(t_0);
	} else {
		tmp = c0 * sqrt(((A / l) / V));
	}
	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) then
        tmp = c0 * sqrt(((a / v) / l))
    else if (t_0 <= 4d+282) then
        tmp = c0 * sqrt(t_0)
    else
        tmp = c0 * sqrt(((a / l) / v))
    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) {
		tmp = c0 * Math.sqrt(((A / V) / l));
	} else if (t_0 <= 4e+282) {
		tmp = c0 * Math.sqrt(t_0);
	} else {
		tmp = c0 * Math.sqrt(((A / l) / V));
	}
	return tmp;
}
def code(c0, A, V, l):
	t_0 = A / (l * V)
	tmp = 0
	if t_0 <= 0.0:
		tmp = c0 * math.sqrt(((A / V) / l))
	elif t_0 <= 4e+282:
		tmp = c0 * math.sqrt(t_0)
	else:
		tmp = c0 * math.sqrt(((A / l) / V))
	return tmp
function code(c0, A, V, l)
	t_0 = Float64(A / Float64(l * V))
	tmp = 0.0
	if (t_0 <= 0.0)
		tmp = Float64(c0 * sqrt(Float64(Float64(A / V) / l)));
	elseif (t_0 <= 4e+282)
		tmp = Float64(c0 * sqrt(t_0));
	else
		tmp = Float64(c0 * sqrt(Float64(Float64(A / l) / V)));
	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)
		tmp = c0 * sqrt(((A / V) / l));
	elseif (t_0 <= 4e+282)
		tmp = c0 * sqrt(t_0);
	else
		tmp = c0 * sqrt(((A / l) / V));
	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, 0.0], N[(c0 * N[Sqrt[N[(N[(A / V), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+282], N[(c0 * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision], N[(c0 * N[Sqrt[N[(N[(A / l), $MachinePrecision] / V), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{A}{\ell \cdot V}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\

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

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


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

    1. Initial program 27.8%

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

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

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

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

    1. Initial program 98.4%

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

    if 4.00000000000000013e282 < (/.f64 A (*.f64 V l))

    1. Initial program 43.8%

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

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

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

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

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

Alternative 16: 73.9% 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 74.5%

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

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

Reproduce

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