Average Error: 19.4 → 4.9
Time: 15.1s
Precision: binary64
Cost: 20036
\[ \begin{array}{c}[V, l] = \mathsf{sort}([V, l])\\ \end{array} \]
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
\[\begin{array}{l} t_0 := \sqrt{-A}\\ \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;\frac{t_0 \cdot \frac{c0}{\sqrt{-V}}}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot \frac{t_0}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-321}:\\ \;\;\;\;c0 \cdot \left({\left(\frac{-\ell}{A}\right)}^{-0.5} \cdot {\left(\frac{-1}{V}\right)}^{0.5}\right)\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+301}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{c0}{V} \cdot \frac{c0}{\ell}}}{{A}^{-0.5}}\\ \end{array} \]
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
(FPCore (c0 A V l)
 :precision binary64
 (let* ((t_0 (sqrt (- A))))
   (if (<= (* V l) (- INFINITY))
     (/ (* t_0 (/ c0 (sqrt (- V)))) (sqrt l))
     (if (<= (* V l) -2e-310)
       (* c0 (/ t_0 (sqrt (* V (- l)))))
       (if (<= (* V l) 2e-321)
         (* c0 (* (pow (/ (- l) A) -0.5) (pow (/ -1.0 V) 0.5)))
         (if (<= (* V l) 1e+301)
           (* c0 (/ (sqrt A) (sqrt (* V l))))
           (/ (sqrt (* (/ c0 V) (/ c0 l))) (pow A -0.5))))))))
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 t_0 = sqrt(-A);
	double tmp;
	if ((V * l) <= -((double) INFINITY)) {
		tmp = (t_0 * (c0 / sqrt(-V))) / sqrt(l);
	} else if ((V * l) <= -2e-310) {
		tmp = c0 * (t_0 / sqrt((V * -l)));
	} else if ((V * l) <= 2e-321) {
		tmp = c0 * (pow((-l / A), -0.5) * pow((-1.0 / V), 0.5));
	} else if ((V * l) <= 1e+301) {
		tmp = c0 * (sqrt(A) / sqrt((V * l)));
	} else {
		tmp = sqrt(((c0 / V) * (c0 / l))) / pow(A, -0.5);
	}
	return tmp;
}
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 t_0 = Math.sqrt(-A);
	double tmp;
	if ((V * l) <= -Double.POSITIVE_INFINITY) {
		tmp = (t_0 * (c0 / Math.sqrt(-V))) / Math.sqrt(l);
	} else if ((V * l) <= -2e-310) {
		tmp = c0 * (t_0 / Math.sqrt((V * -l)));
	} else if ((V * l) <= 2e-321) {
		tmp = c0 * (Math.pow((-l / A), -0.5) * Math.pow((-1.0 / V), 0.5));
	} else if ((V * l) <= 1e+301) {
		tmp = c0 * (Math.sqrt(A) / Math.sqrt((V * l)));
	} else {
		tmp = Math.sqrt(((c0 / V) * (c0 / l))) / Math.pow(A, -0.5);
	}
	return tmp;
}
def code(c0, A, V, l):
	return c0 * math.sqrt((A / (V * l)))
def code(c0, A, V, l):
	t_0 = math.sqrt(-A)
	tmp = 0
	if (V * l) <= -math.inf:
		tmp = (t_0 * (c0 / math.sqrt(-V))) / math.sqrt(l)
	elif (V * l) <= -2e-310:
		tmp = c0 * (t_0 / math.sqrt((V * -l)))
	elif (V * l) <= 2e-321:
		tmp = c0 * (math.pow((-l / A), -0.5) * math.pow((-1.0 / V), 0.5))
	elif (V * l) <= 1e+301:
		tmp = c0 * (math.sqrt(A) / math.sqrt((V * l)))
	else:
		tmp = math.sqrt(((c0 / V) * (c0 / l))) / math.pow(A, -0.5)
	return tmp
function code(c0, A, V, l)
	return Float64(c0 * sqrt(Float64(A / Float64(V * l))))
end
function code(c0, A, V, l)
	t_0 = sqrt(Float64(-A))
	tmp = 0.0
	if (Float64(V * l) <= Float64(-Inf))
		tmp = Float64(Float64(t_0 * Float64(c0 / sqrt(Float64(-V)))) / sqrt(l));
	elseif (Float64(V * l) <= -2e-310)
		tmp = Float64(c0 * Float64(t_0 / sqrt(Float64(V * Float64(-l)))));
	elseif (Float64(V * l) <= 2e-321)
		tmp = Float64(c0 * Float64((Float64(Float64(-l) / A) ^ -0.5) * (Float64(-1.0 / V) ^ 0.5)));
	elseif (Float64(V * l) <= 1e+301)
		tmp = Float64(c0 * Float64(sqrt(A) / sqrt(Float64(V * l))));
	else
		tmp = Float64(sqrt(Float64(Float64(c0 / V) * Float64(c0 / l))) / (A ^ -0.5));
	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)
	t_0 = sqrt(-A);
	tmp = 0.0;
	if ((V * l) <= -Inf)
		tmp = (t_0 * (c0 / sqrt(-V))) / sqrt(l);
	elseif ((V * l) <= -2e-310)
		tmp = c0 * (t_0 / sqrt((V * -l)));
	elseif ((V * l) <= 2e-321)
		tmp = c0 * (((-l / A) ^ -0.5) * ((-1.0 / V) ^ 0.5));
	elseif ((V * l) <= 1e+301)
		tmp = c0 * (sqrt(A) / sqrt((V * l)));
	else
		tmp = sqrt(((c0 / V) * (c0 / l))) / (A ^ -0.5);
	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_] := Block[{t$95$0 = N[Sqrt[(-A)], $MachinePrecision]}, If[LessEqual[N[(V * l), $MachinePrecision], (-Infinity)], N[(N[(t$95$0 * N[(c0 / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -2e-310], N[(c0 * N[(t$95$0 / N[Sqrt[N[(V * (-l)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 2e-321], N[(c0 * N[(N[Power[N[((-l) / A), $MachinePrecision], -0.5], $MachinePrecision] * N[Power[N[(-1.0 / V), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+301], N[(c0 * N[(N[Sqrt[A], $MachinePrecision] / N[Sqrt[N[(V * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(c0 / V), $MachinePrecision] * N[(c0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[A, -0.5], $MachinePrecision]), $MachinePrecision]]]]]]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\begin{array}{l}
t_0 := \sqrt{-A}\\
\mathbf{if}\;V \cdot \ell \leq -\infty:\\
\;\;\;\;\frac{t_0 \cdot \frac{c0}{\sqrt{-V}}}{\sqrt{\ell}}\\

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

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

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

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


\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) < -inf.0

    1. Initial program 42.0

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

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

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

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

      [Start]4.3

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

      *-lft-identity [<=]4.3

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

      times-frac [=>]1.5

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

      /-rgt-identity [=>]1.5

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

    if -inf.0 < (*.f64 V l) < -1.999999999999994e-310

    1. Initial program 10.4

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

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

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

      [Start]2.8

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

      *-commutative [<=]2.8

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

      associate-/l* [=>]2.6

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

      associate-/r/ [=>]0.4

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

    if -1.999999999999994e-310 < (*.f64 V l) < 2.00097e-321

    1. Initial program 63.4

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

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}} \]
    3. Simplified37.6

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

      [Start]37.6

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

      associate-/r/ [=>]37.6

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

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

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

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

      [Start]30.3

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

      distribute-rgt-in [=>]30.3

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

      exp-sum [=>]30.0

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

      exp-to-pow [=>]29.9

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

      mul-1-neg [=>]29.9

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

      distribute-neg-frac [=>]29.9

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

      *-commutative [=>]29.9

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

      associate-*l* [=>]29.9

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

      metadata-eval [=>]29.9

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

      metadata-eval [<=]29.9

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

      exp-to-pow [=>]27.0

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

      metadata-eval [=>]27.0

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

    if 2.00097e-321 < (*.f64 V l) < 1.00000000000000005e301

    1. Initial program 10.6

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

      \[\leadsto c0 \cdot \color{blue}{\left(\sqrt{A} \cdot \frac{1}{\sqrt{V \cdot \ell}}\right)} \]
    3. Simplified0.6

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

      [Start]0.6

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

      *-commutative [<=]0.6

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

      associate-*l/ [=>]0.6

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

      *-lft-identity [=>]0.6

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

    if 1.00000000000000005e301 < (*.f64 V l)

    1. Initial program 39.8

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

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

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

      [Start]64.0

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

      associate-/l* [=>]64.0

      \[ \color{blue}{\frac{c0}{\frac{\sqrt{V \cdot \left(-\ell\right)}}{\sqrt{-A}}}} \]
    4. Applied egg-rr39.2

      \[\leadsto \color{blue}{\frac{1}{\sqrt{V \cdot \ell}} \cdot \frac{c0}{{A}^{-0.5}}} \]
    5. Simplified39.0

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

      [Start]39.2

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

      associate-*r/ [=>]39.0

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

      associate-*l/ [=>]39.0

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

      *-lft-identity [=>]39.0

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

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

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

      [Start]41.2

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

      times-frac [=>]28.8

      \[ \frac{\sqrt{\color{blue}{\frac{c0}{V} \cdot \frac{c0}{\ell}}}}{{A}^{-0.5}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification4.9

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

Alternatives

Alternative 1
Error14.0
Cost34641
\[\begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;t_0 \leq -2 \cdot 10^{+268}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{elif}\;t_0 \leq -5 \cdot 10^{-293} \lor \neg \left(t_0 \leq 0\right) \land t_0 \leq 10^{+307}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{A \cdot \left(\frac{c0}{V} \cdot \frac{c0}{\ell}\right)}\\ \end{array} \]
Alternative 2
Error14.1
Cost34641
\[\begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;t_0 \leq -2 \cdot 10^{+268}:\\ \;\;\;\;\frac{c0}{\sqrt{V \cdot \frac{\ell}{A}}}\\ \mathbf{elif}\;t_0 \leq -5 \cdot 10^{-293} \lor \neg \left(t_0 \leq 0\right) \land t_0 \leq 10^{+307}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0}{\ell} \cdot \frac{A \cdot c0}{V}}\\ \end{array} \]
Alternative 3
Error5.7
Cost14480
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -4 \cdot 10^{+276}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-321}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{-V}}{\sqrt{\frac{-A}{\ell}}}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+301}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{c0}{V} \cdot \frac{c0}{\ell}}}{{A}^{-0.5}}\\ \end{array} \]
Alternative 4
Error5.6
Cost14480
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -4 \cdot 10^{+276}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{\sqrt{\frac{A}{V}}}}\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-321}:\\ \;\;\;\;c0 \cdot \left({\left(\frac{-\ell}{A}\right)}^{-0.5} \cdot {\left(\frac{-1}{V}\right)}^{0.5}\right)\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+301}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{\frac{c0}{V} \cdot \frac{c0}{\ell}}}{{A}^{-0.5}}\\ \end{array} \]
Alternative 5
Error9.5
Cost14289
\[\begin{array}{l} t_0 := \sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+76}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq -5 \cdot 10^{-141}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0 \lor \neg \left(V \cdot \ell \leq 5 \cdot 10^{+303}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \end{array} \]
Alternative 6
Error9.0
Cost14288
\[\begin{array}{l} t_0 := \sqrt{\frac{A}{V}}\\ t_1 := \frac{c0}{\frac{\sqrt{\ell}}{t_0}}\\ \mathbf{if}\;V \cdot \ell \leq -1 \cdot 10^{+76}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-108}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;t_1\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+303}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
Alternative 7
Error7.2
Cost14288
\[\begin{array}{l} t_0 := \sqrt{\frac{A}{V}}\\ \mathbf{if}\;V \cdot \ell \leq -6 \cdot 10^{+212}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{t_0}}\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{-A} \cdot \frac{c0}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{c0 \cdot t_0}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+303}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
Alternative 8
Error6.2
Cost14288
\[\begin{array}{l} t_0 := \sqrt{\frac{A}{V}}\\ \mathbf{if}\;V \cdot \ell \leq -4 \cdot 10^{+276}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{t_0}}\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 0:\\ \;\;\;\;\frac{c0 \cdot t_0}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+303}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
Alternative 9
Error6.1
Cost14288
\[\begin{array}{l} t_0 := \sqrt{\frac{A}{V}}\\ \mathbf{if}\;V \cdot \ell \leq -4 \cdot 10^{+276}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{\ell}}{t_0}}\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-310}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-321}:\\ \;\;\;\;\frac{c0}{\frac{\sqrt{-V}}{\sqrt{\frac{-A}{\ell}}}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+303}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
Alternative 10
Error13.0
Cost14028
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \leq -10000000:\\ \;\;\;\;c0 \cdot \sqrt{A \cdot \frac{\frac{1}{\ell}}{V}}\\ \mathbf{elif}\;V \cdot \ell \leq 2 \cdot 10^{-321}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{\ell}{\frac{A}{V}}}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{+303}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \]
Alternative 11
Error15.0
Cost7625
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0 \lor \neg \left(t_0 \leq 10^{+277}\right):\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \end{array} \]
Alternative 12
Error15.0
Cost7624
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{elif}\;t_0 \leq 4 \cdot 10^{+246}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\ \end{array} \]
Alternative 13
Error19.4
Cost6848
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]

Error

Reproduce

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