Average Error: 19.0 → 6.4
Time: 2.3min
Precision: binary64
Cost: 14352
\[ \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 -\infty:\\ \;\;\;\;c0 \cdot \frac{\sqrt{\frac{-A}{\ell}}}{\sqrt{-V}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-266}:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \left(-\ell\right)\right)}^{-0.5} \cdot {\left(\frac{-1}{A}\right)}^{-0.5}\right)\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+295}:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
(FPCore (c0 A V l) :precision binary64 (* c0 (sqrt (/ A (* V l)))))
(FPCore (c0 A V l)
 :precision binary64
 (if (<= (* V l) (- INFINITY))
   (* c0 (/ (sqrt (/ (- A) l)) (sqrt (- V))))
   (if (<= (* V l) -1e-266)
     (* c0 (* (pow (* V (- l)) -0.5) (pow (/ -1.0 A) -0.5)))
     (if (<= (* V l) 5e-315)
       (/ c0 (* (sqrt (/ V A)) (sqrt l)))
       (if (<= (* V l) 1e+295)
         (* c0 (* (pow (* V l) -0.5) (sqrt A)))
         (* (sqrt (/ A V)) (/ c0 (sqrt l))))))))
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) <= -((double) INFINITY)) {
		tmp = c0 * (sqrt((-A / l)) / sqrt(-V));
	} else if ((V * l) <= -1e-266) {
		tmp = c0 * (pow((V * -l), -0.5) * pow((-1.0 / A), -0.5));
	} else if ((V * l) <= 5e-315) {
		tmp = c0 / (sqrt((V / A)) * sqrt(l));
	} else if ((V * l) <= 1e+295) {
		tmp = c0 * (pow((V * l), -0.5) * sqrt(A));
	} else {
		tmp = sqrt((A / V)) * (c0 / sqrt(l));
	}
	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 tmp;
	if ((V * l) <= -Double.POSITIVE_INFINITY) {
		tmp = c0 * (Math.sqrt((-A / l)) / Math.sqrt(-V));
	} else if ((V * l) <= -1e-266) {
		tmp = c0 * (Math.pow((V * -l), -0.5) * Math.pow((-1.0 / A), -0.5));
	} else if ((V * l) <= 5e-315) {
		tmp = c0 / (Math.sqrt((V / A)) * Math.sqrt(l));
	} else if ((V * l) <= 1e+295) {
		tmp = c0 * (Math.pow((V * l), -0.5) * Math.sqrt(A));
	} else {
		tmp = Math.sqrt((A / V)) * (c0 / Math.sqrt(l));
	}
	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) <= -math.inf:
		tmp = c0 * (math.sqrt((-A / l)) / math.sqrt(-V))
	elif (V * l) <= -1e-266:
		tmp = c0 * (math.pow((V * -l), -0.5) * math.pow((-1.0 / A), -0.5))
	elif (V * l) <= 5e-315:
		tmp = c0 / (math.sqrt((V / A)) * math.sqrt(l))
	elif (V * l) <= 1e+295:
		tmp = c0 * (math.pow((V * l), -0.5) * math.sqrt(A))
	else:
		tmp = math.sqrt((A / V)) * (c0 / math.sqrt(l))
	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) <= Float64(-Inf))
		tmp = Float64(c0 * Float64(sqrt(Float64(Float64(-A) / l)) / sqrt(Float64(-V))));
	elseif (Float64(V * l) <= -1e-266)
		tmp = Float64(c0 * Float64((Float64(V * Float64(-l)) ^ -0.5) * (Float64(-1.0 / A) ^ -0.5)));
	elseif (Float64(V * l) <= 5e-315)
		tmp = Float64(c0 / Float64(sqrt(Float64(V / A)) * sqrt(l)));
	elseif (Float64(V * l) <= 1e+295)
		tmp = Float64(c0 * Float64((Float64(V * l) ^ -0.5) * sqrt(A)));
	else
		tmp = Float64(sqrt(Float64(A / V)) * Float64(c0 / sqrt(l)));
	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) <= -Inf)
		tmp = c0 * (sqrt((-A / l)) / sqrt(-V));
	elseif ((V * l) <= -1e-266)
		tmp = c0 * (((V * -l) ^ -0.5) * ((-1.0 / A) ^ -0.5));
	elseif ((V * l) <= 5e-315)
		tmp = c0 / (sqrt((V / A)) * sqrt(l));
	elseif ((V * l) <= 1e+295)
		tmp = c0 * (((V * l) ^ -0.5) * sqrt(A));
	else
		tmp = sqrt((A / V)) * (c0 / sqrt(l));
	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], (-Infinity)], N[(c0 * N[(N[Sqrt[N[((-A) / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-V)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], -1e-266], N[(c0 * N[(N[Power[N[(V * (-l)), $MachinePrecision], -0.5], $MachinePrecision] * N[Power[N[(-1.0 / A), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 5e-315], N[(c0 / N[(N[Sqrt[N[(V / A), $MachinePrecision]], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(V * l), $MachinePrecision], 1e+295], N[(c0 * N[(N[Power[N[(V * l), $MachinePrecision], -0.5], $MachinePrecision] * N[Sqrt[A], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(A / V), $MachinePrecision]], $MachinePrecision] * N[(c0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}
\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^{-266}:\\
\;\;\;\;c0 \cdot \left({\left(V \cdot \left(-\ell\right)\right)}^{-0.5} \cdot {\left(\frac{-1}{A}\right)}^{-0.5}\right)\\

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

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

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


\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 40.4

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

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

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

      \[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}} \]
      Proof
      (*.f64 c0 (sqrt.f64 (/.f64 (/.f64 A l) V))): 0 points increase in error, 0 points decrease in error
      (*.f64 c0 (sqrt.f64 (Rewrite=> associate-/l/_binary64 (/.f64 A (*.f64 V l))))): 32 points increase in error, 31 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (sqrt.f64 (/.f64 A (*.f64 V l))) c0)): 0 points increase in error, 0 points decrease in error
    5. Applied egg-rr9.4

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

    if -inf.0 < (*.f64 V l) < -9.9999999999999998e-267

    1. Initial program 9.5

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Taylor expanded in c0 around 0 9.5

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

      \[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}} \]
      Proof
      (*.f64 c0 (sqrt.f64 (/.f64 (/.f64 A V) l))): 0 points increase in error, 0 points decrease in error
      (*.f64 c0 (sqrt.f64 (Rewrite<= associate-/r*_binary64 (/.f64 A (*.f64 V l))))): 35 points increase in error, 23 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (sqrt.f64 (/.f64 A (*.f64 V l))) c0)): 0 points increase in error, 0 points decrease in error
    4. Applied egg-rr16.0

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

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

      \[\leadsto \color{blue}{\left({\left(\ell \cdot \left(-V\right)\right)}^{-0.5} \cdot {\left(\frac{-1}{A}\right)}^{-0.5}\right) \cdot c0} \]
      Proof
      (*.f64 (*.f64 (pow.f64 (*.f64 l (neg.f64 V)) -1/2) (pow.f64 (/.f64 -1 A) -1/2)) c0): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (Rewrite<= exp-to-pow_binary64 (exp.f64 (*.f64 (log.f64 (*.f64 l (neg.f64 V))) -1/2))) (pow.f64 (/.f64 -1 A) -1/2)) c0): 86 points increase in error, 1 points decrease in error
      (*.f64 (*.f64 (exp.f64 (*.f64 (log.f64 (Rewrite=> *-commutative_binary64 (*.f64 (neg.f64 V) l))) -1/2)) (pow.f64 (/.f64 -1 A) -1/2)) c0): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (exp.f64 (*.f64 (log.f64 (Rewrite=> distribute-lft-neg-out_binary64 (neg.f64 (*.f64 V l)))) -1/2)) (pow.f64 (/.f64 -1 A) -1/2)) c0): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (exp.f64 (*.f64 (log.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 V l)))) -1/2)) (pow.f64 (/.f64 -1 A) -1/2)) c0): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (exp.f64 (*.f64 (log.f64 (*.f64 -1 (*.f64 V l))) -1/2)) (Rewrite<= exp-to-pow_binary64 (exp.f64 (*.f64 (log.f64 (/.f64 -1 A)) -1/2)))) c0): 60 points increase in error, 27 points decrease in error
      (*.f64 (Rewrite<= exp-sum_binary64 (exp.f64 (+.f64 (*.f64 (log.f64 (*.f64 -1 (*.f64 V l))) -1/2) (*.f64 (log.f64 (/.f64 -1 A)) -1/2)))) c0): 37 points increase in error, 19 points decrease in error
      (*.f64 (exp.f64 (Rewrite<= distribute-rgt-in_binary64 (*.f64 -1/2 (+.f64 (log.f64 (*.f64 -1 (*.f64 V l))) (log.f64 (/.f64 -1 A)))))) c0): 0 points increase in error, 0 points decrease in error

    if -9.9999999999999998e-267 < (*.f64 V l) < 5.0000000023e-315

    1. Initial program 57.1

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

      \[\leadsto \color{blue}{\frac{\sqrt{A} \cdot c0}{\sqrt{V \cdot \ell}}} \]
    3. Simplified63.1

      \[\leadsto \color{blue}{\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0} \]
      Proof
      (*.f64 (/.f64 (sqrt.f64 A) (sqrt.f64 (*.f64 V l))) c0): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r/_binary64 (/.f64 (sqrt.f64 A) (/.f64 (sqrt.f64 (*.f64 V l)) c0))): 19 points increase in error, 13 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (sqrt.f64 A) c0) (sqrt.f64 (*.f64 V l)))): 22 points increase in error, 21 points decrease in error
    4. Applied egg-rr57.0

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V \cdot \ell}{A}}}} \]
    5. Simplified35.6

      \[\leadsto \color{blue}{\frac{c0}{\sqrt{\frac{V}{A} \cdot \ell}}} \]
      Proof
      (/.f64 c0 (sqrt.f64 (*.f64 (/.f64 V A) l))): 0 points increase in error, 0 points decrease in error
      (/.f64 c0 (sqrt.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 V l) A)))): 30 points increase in error, 20 points decrease in error
    6. Applied egg-rr26.8

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

    if 5.0000000023e-315 < (*.f64 V l) < 9.9999999999999998e294

    1. Initial program 10.0

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

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

      \[\leadsto \color{blue}{\frac{\sqrt{A}}{\sqrt{V \cdot \ell}} \cdot c0} \]
      Proof
      (*.f64 (/.f64 (sqrt.f64 A) (sqrt.f64 (*.f64 V l))) c0): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r/_binary64 (/.f64 (sqrt.f64 A) (/.f64 (sqrt.f64 (*.f64 V l)) c0))): 19 points increase in error, 13 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (sqrt.f64 A) c0) (sqrt.f64 (*.f64 V l)))): 22 points increase in error, 21 points decrease in error
    4. Applied egg-rr0.4

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

    if 9.9999999999999998e294 < (*.f64 V l)

    1. Initial program 38.7

      \[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]
    2. Taylor expanded in c0 around 0 38.7

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V \cdot \ell}} \cdot c0} \]
    3. Simplified21.7

      \[\leadsto \color{blue}{c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}} \]
      Proof
      (*.f64 c0 (sqrt.f64 (/.f64 (/.f64 A V) l))): 0 points increase in error, 0 points decrease in error
      (*.f64 c0 (sqrt.f64 (Rewrite<= associate-/r*_binary64 (/.f64 A (*.f64 V l))))): 35 points increase in error, 23 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (sqrt.f64 (/.f64 A (*.f64 V l))) c0)): 0 points increase in error, 0 points decrease in error
    4. Applied egg-rr36.7

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{A}{V}} \cdot c0}{\sqrt{\ell}}} \]
    5. Simplified37.1

      \[\leadsto \color{blue}{\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}} \]
      Proof
      (*.f64 (sqrt.f64 (/.f64 A V)) (/.f64 c0 (sqrt.f64 l))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 c0 (sqrt.f64 l)) (sqrt.f64 (/.f64 A V)))): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 c0 (sqrt.f64 (/.f64 A V))) (sqrt.f64 l))): 33 points increase in error, 38 points decrease in error
      (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (sqrt.f64 (/.f64 A V)) c0)) (sqrt.f64 l)): 0 points increase in error, 0 points decrease in error
  3. Recombined 5 regimes into one program.
  4. Final simplification6.4

    \[\leadsto \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^{-266}:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \left(-\ell\right)\right)}^{-0.5} \cdot {\left(\frac{-1}{A}\right)}^{-0.5}\right)\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+295}:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]

Alternatives

Alternative 1
Error6.8
Cost14352
\[\begin{array}{l} t_0 := \frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\ \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+249}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-266}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+295}:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
Alternative 2
Error6.4
Cost14352
\[\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^{-266}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{-A}}{\sqrt{V \cdot \left(-\ell\right)}}\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+295}:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
Alternative 3
Error12.7
Cost14024
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ t_1 := c0 \cdot \frac{\sqrt{\frac{A}{V}}}{\sqrt{\ell}}\\ \mathbf{if}\;t_0 \leq 10^{-310}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_0 \leq 10^{+246}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error12.8
Cost14024
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ t_1 := \sqrt{\frac{A}{V}}\\ \mathbf{if}\;t_0 \leq 10^{-310}:\\ \;\;\;\;t_1 \cdot \frac{c0}{\sqrt{\ell}}\\ \mathbf{elif}\;t_0 \leq 10^{+246}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \frac{t_1}{\sqrt{\ell}}\\ \end{array} \]
Alternative 5
Error10.5
Cost13832
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+295}:\\ \;\;\;\;c0 \cdot \left({\left(V \cdot \ell\right)}^{-0.5} \cdot \sqrt{A}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
Alternative 6
Error10.5
Cost13768
\[\begin{array}{l} t_0 := \sqrt{\frac{A}{V}}\\ \mathbf{if}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;c0 \cdot \frac{t_0}{\sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+295}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
Alternative 7
Error10.5
Cost13768
\[\begin{array}{l} \mathbf{if}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{A}} \cdot \sqrt{\ell}}\\ \mathbf{elif}\;V \cdot \ell \leq 10^{+295}:\\ \;\;\;\;c0 \cdot \frac{\sqrt{A}}{\sqrt{V \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{A}{V}} \cdot \frac{c0}{\sqrt{\ell}}\\ \end{array} \]
Alternative 8
Error14.6
Cost7888
\[\begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ t_1 := c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{if}\;V \cdot \ell \leq -\infty:\\ \;\;\;\;t_1\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-162}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+188}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error15.3
Cost7888
\[\begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ t_1 := c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+249}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-45}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+188}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error15.3
Cost7888
\[\begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+269}:\\ \;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-45}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq 5 \cdot 10^{-315}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{\ell}}{V}}\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+188}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \]
Alternative 11
Error15.1
Cost7888
\[\begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+269}:\\ \;\;\;\;\frac{c0}{\sqrt{\ell \cdot \frac{V}{A}}}\\ \mathbf{elif}\;V \cdot \ell \leq -1 \cdot 10^{-45}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq 10^{-251}:\\ \;\;\;\;\frac{c0}{\sqrt{\frac{V}{\frac{A}{\ell}}}}\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+188}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \]
Alternative 12
Error14.7
Cost7888
\[\begin{array}{l} t_0 := c0 \cdot \sqrt{\frac{A}{V \cdot \ell}}\\ t_1 := \ell \cdot \frac{V}{A}\\ \mathbf{if}\;V \cdot \ell \leq -2 \cdot 10^{+269}:\\ \;\;\;\;\frac{c0}{\sqrt{t_1}}\\ \mathbf{elif}\;V \cdot \ell \leq -2 \cdot 10^{-137}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{-140}:\\ \;\;\;\;c0 \cdot {t_1}^{-0.5}\\ \mathbf{elif}\;V \cdot \ell \leq 4 \cdot 10^{+188}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot \sqrt{\frac{\frac{A}{V}}{\ell}}\\ \end{array} \]
Alternative 13
Error15.0
Cost7752
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;\sqrt{c0 \cdot \frac{A \cdot \frac{c0}{V}}{\ell}}\\ \mathbf{elif}\;t_0 \leq 4 \cdot 10^{+304}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{c0 \cdot \frac{A}{\frac{\ell}{c0}}}{V}}\\ \end{array} \]
Alternative 14
Error15.5
Cost7688
\[\begin{array}{l} t_0 := \frac{A}{V \cdot \ell}\\ \mathbf{if}\;t_0 \leq 0:\\ \;\;\;\;\sqrt{c0 \cdot \frac{A \cdot \frac{c0}{V}}{\ell}}\\ \mathbf{elif}\;t_0 \leq 10^{+246}:\\ \;\;\;\;c0 \cdot \sqrt{t_0}\\ \mathbf{else}:\\ \;\;\;\;c0 \cdot {\left(\ell \cdot \frac{V}{A}\right)}^{-0.5}\\ \end{array} \]
Alternative 15
Error19.0
Cost6848
\[c0 \cdot \sqrt{\frac{A}{V \cdot \ell}} \]

Error

Reproduce

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