?

Average Accuracy: 63.2% → 82.3%
Time: 17.2s
Precision: binary64
Cost: 14348

?

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

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

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

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

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 5 regimes
  2. if (*.f64 V l) < -4.00000000000000018e264

    1. Initial program 56.7%

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

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

      [Start]56.7

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

      *-un-lft-identity [=>]56.7

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

      times-frac [=>]70.4

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

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

      [Start]70.4

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

      associate-*l/ [=>]70.3

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

      *-un-lft-identity [<=]70.3

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

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

      [Start]70.3

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

      frac-2neg [=>]70.3

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

      sqrt-div [=>]37.0

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

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

      [Start]37.0

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

      distribute-neg-frac [=>]37.0

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

    if -4.00000000000000018e264 < (*.f64 V l) < -9.9999999999999996e-281

    1. Initial program 76.6%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Applied egg-rr62.8%

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

      [Start]76.6

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

      pow1/2 [=>]76.6

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

      clear-num [=>]76.0

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

      inv-pow [=>]76.0

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

      pow-pow [=>]76.1

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

      associate-/l* [=>]62.8

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

      metadata-eval [=>]62.8

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

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

      [Start]62.8

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

      associate-/l* [<=]76.1

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

      *-lft-identity [<=]76.1

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

      times-frac [=>]61.7

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

      /-rgt-identity [=>]61.7

      \[ c0 \cdot {\left(\color{blue}{V} \cdot \frac{\ell}{A}\right)}^{-0.5} \]
    4. Taylor expanded in A around -inf 84.4%

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

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

      [Start]84.4

      \[ c0 \cdot e^{-0.5 \cdot \left(\log \left(-1 \cdot \left(V \cdot \ell\right)\right) + \log \left(\frac{-1}{A}\right)\right)} \]

      distribute-lft-in [=>]84.4

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

      exp-sum [=>]85.0

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

      *-commutative [=>]85.0

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

      neg-mul-1 [<=]85.0

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

      exp-to-pow [=>]86.0

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

      distribute-rgt-neg-in [=>]86.0

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

      *-commutative [=>]86.0

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

      exp-to-pow [=>]91.4

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

      \[\leadsto c0 \cdot \left({\left(V \cdot \left(-\ell\right)\right)}^{-0.5} \cdot \color{blue}{\left(0 + \sqrt{A \cdot -1}\right)}\right) \]
      Step-by-step derivation

      [Start]91.4

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

      add-log-exp [=>]15.2

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

      *-un-lft-identity [=>]15.2

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

      log-prod [=>]15.2

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

      metadata-eval [=>]15.2

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

      add-log-exp [<=]91.4

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

      add-sqr-sqrt [=>]91.2

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

      sqrt-unprod [=>]91.4

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

      pow-prod-up [=>]91.4

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

      metadata-eval [=>]91.4

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

      inv-pow [<=]91.4

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

      clear-num [<=]91.5

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

      div-inv [=>]91.5

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

      metadata-eval [=>]91.5

      \[ c0 \cdot \left({\left(V \cdot \left(-\ell\right)\right)}^{-0.5} \cdot \left(0 + \sqrt{A \cdot \color{blue}{-1}}\right)\right) \]
    7. Simplified91.5%

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

      [Start]91.5

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

      +-lft-identity [=>]91.5

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

      *-commutative [=>]91.5

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

      neg-mul-1 [<=]91.5

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

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

    1. Initial program 3.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Applied egg-rr23.2%

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

      [Start]3.3

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

      pow1/2 [=>]3.3

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

      clear-num [=>]3.3

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

      inv-pow [=>]3.3

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

      pow-pow [=>]3.3

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

      associate-/l* [=>]23.2

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

      metadata-eval [=>]23.2

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

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

      [Start]23.2

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

      associate-/l* [<=]3.3

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

      *-lft-identity [<=]3.3

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

      times-frac [=>]23.3

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

      /-rgt-identity [=>]23.3

      \[ c0 \cdot {\left(\color{blue}{V} \cdot \frac{\ell}{A}\right)}^{-0.5} \]
    4. Taylor expanded in V around -inf 29.8%

      \[\leadsto c0 \cdot \color{blue}{e^{-0.5 \cdot \left(\log \left(-1 \cdot \frac{\ell}{A}\right) + -1 \cdot \log \left(\frac{-1}{V}\right)\right)}} \]
    5. Simplified32.8%

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

      [Start]29.8

      \[ c0 \cdot e^{-0.5 \cdot \left(\log \left(-1 \cdot \frac{\ell}{A}\right) + -1 \cdot \log \left(\frac{-1}{V}\right)\right)} \]

      +-commutative [=>]29.8

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

      distribute-lft-in [=>]29.8

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

      *-commutative [<=]29.8

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

      exp-sum [=>]30.6

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

      associate-*r* [=>]30.6

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

      metadata-eval [=>]30.6

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

      *-commutative [<=]30.6

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

      exp-to-pow [=>]30.2

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

      exp-to-pow [=>]32.8

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

      associate-*r/ [=>]32.8

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

      neg-mul-1 [<=]32.8

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

    if 0.0 < (*.f64 V l) < 4.00000000000000007e306

    1. Initial program 71.5%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Applied egg-rr85.3%

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

      [Start]71.5

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

      sqrt-div [=>]90.0

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

      associate-*r/ [=>]85.3

      \[ \color{blue}{\frac{c0 \cdot \sqrt{A}}{\sqrt{V \cdot \ell}}} \]
    3. Simplified90.0%

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

      [Start]85.3

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

      associate-/l* [=>]90.0

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

    if 4.00000000000000007e306 < (*.f64 V l)

    1. Initial program 20.3%

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Applied egg-rr52.5%

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

      [Start]20.3

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

      *-un-lft-identity [=>]20.3

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

      times-frac [=>]52.5

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

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

      [Start]52.5

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

      associate-*l/ [=>]52.5

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

      *-un-lft-identity [<=]52.5

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

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

Alternatives

Alternative 1
Accuracy72.4%
Cost34640
\[\begin{array}{l} t_0 := c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ t_1 := \frac{A}{V \cdot \ell}\\ t_2 := c0 \cdot \sqrt{t_1}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;t_0\\ \mathbf{elif}\;t_2 \leq -1 \cdot 10^{-248}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;t_0\\ \mathbf{elif}\;t_2 \leq 10^{+305}:\\ \;\;\;\;c0 \cdot {t_1}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{A \cdot \frac{c0}{\frac{V}{\frac{c0}{\ell}}}}\\ \end{array} \]
Alternative 2
Accuracy82.5%
Cost20356
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \leq 0:\\ \;\;\;\;c0 \cdot \left(\left({\ell}^{-0.5} \cdot {\left(\frac{-1}{V}\right)}^{0.5}\right) \cdot {\left(\frac{-1}{A}\right)}^{-0.5}\right)\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \end{array} \]
Alternative 3
Accuracy77.0%
Cost14288
\[\begin{array}{l} t_0 := c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+195}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-74}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\frac{V}{\frac{1}{\ell}}}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\sqrt{A} \cdot \frac{c0}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \end{array} \]
Alternative 4
Accuracy78.3%
Cost14288
\[\begin{array}{l} t_0 := c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+195}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-74}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{\frac{V}{\frac{1}{\ell}}}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \end{array} \]
Alternative 5
Accuracy82.2%
Cost14288
\[\begin{array}{l} t_0 := \frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\ \mathbf{if}\;V \cdot \ell \leq -5 \cdot 10^{+262}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-305}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \end{array} \]
Alternative 6
Accuracy81.9%
Cost14288
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{-A}{\ell}}}{\sqrt{-V}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-239}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \end{array} \]
Alternative 7
Accuracy82.1%
Cost14288
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -4 \cdot 10^{+264}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{-A}{\ell}}}{\sqrt{-V}}\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-305}:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \left(-\ell\right)\right)}^{-0.5} \cdot \sqrt{-A}\right)\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{V \cdot \ell}}{\sqrt{A}}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \end{array} \]
Alternative 8
Accuracy69.7%
Cost7752
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{elif}\;t_0 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{A \cdot \left(\frac{c0}{\ell} \cdot \frac{c0}{V}\right)}\\ \end{array} \]
Alternative 9
Accuracy69.6%
Cost7752
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{elif}\;t_0 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{A \cdot \frac{c0}{\frac{V}{\frac{c0}{\ell}}}}\\ \end{array} \]
Alternative 10
Accuracy69.5%
Cost7688
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{elif}\;t_0 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot {\left(V \cdot \frac{\ell}{A}\right)}^{-0.5}\\ \end{array} \]
Alternative 11
Accuracy69.1%
Cost7625
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0 \lor \neg \left(t_0 \leq 4 \cdot 10^{+301}\right):\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \end{array} \]
Alternative 12
Accuracy69.1%
Cost7624
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{elif}\;t_0 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \]
Alternative 13
Accuracy69.5%
Cost7624
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{elif}\;t_0 \leq 4 \cdot 10^{+301}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \end{array} \]
Alternative 14
Accuracy63.2%
Cost6848
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]

Error

Reproduce?

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