| Alternative 1 | |
|---|---|
| Accuracy | 72.4% |
| Cost | 34640 |
(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}
Results
if (*.f64 V l) < -4.00000000000000018e264Initial program 56.7%
Applied egg-rr70.4%
[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}}}
\] |
Applied egg-rr70.3%
[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}}
\] |
Applied egg-rr37.0%
[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}}}
\] |
Simplified37.0%
[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-281Initial program 76.6%
Applied egg-rr62.8%
[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}}
\] |
Simplified61.7%
[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}
\] |
Taylor expanded in A around -inf 84.4%
Simplified91.4%
[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)
\] |
Applied egg-rr91.5%
[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)
\] |
Simplified91.5%
[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.0Initial program 3.3%
Applied egg-rr23.2%
[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}}
\] |
Simplified23.3%
[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}
\] |
Taylor expanded in V around -inf 29.8%
Simplified32.8%
[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.00000000000000007e306Initial program 71.5%
Applied egg-rr85.3%
[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}}}
\] |
Simplified90.0%
[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) Initial program 20.3%
Applied egg-rr52.5%
[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}}}
\] |
Applied egg-rr52.5%
[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}}
\] |
Final simplification76.8%
| Alternative 1 | |
|---|---|
| Accuracy | 72.4% |
| Cost | 34640 |
| Alternative 2 | |
|---|---|
| Accuracy | 82.5% |
| Cost | 20356 |
| Alternative 3 | |
|---|---|
| Accuracy | 77.0% |
| Cost | 14288 |
| Alternative 4 | |
|---|---|
| Accuracy | 78.3% |
| Cost | 14288 |
| Alternative 5 | |
|---|---|
| Accuracy | 82.2% |
| Cost | 14288 |
| Alternative 6 | |
|---|---|
| Accuracy | 81.9% |
| Cost | 14288 |
| Alternative 7 | |
|---|---|
| Accuracy | 82.1% |
| Cost | 14288 |
| Alternative 8 | |
|---|---|
| Accuracy | 69.7% |
| Cost | 7752 |
| Alternative 9 | |
|---|---|
| Accuracy | 69.6% |
| Cost | 7752 |
| Alternative 10 | |
|---|---|
| Accuracy | 69.5% |
| Cost | 7688 |
| Alternative 11 | |
|---|---|
| Accuracy | 69.1% |
| Cost | 7625 |
| Alternative 12 | |
|---|---|
| Accuracy | 69.1% |
| Cost | 7624 |
| Alternative 13 | |
|---|---|
| Accuracy | 69.5% |
| Cost | 7624 |
| Alternative 14 | |
|---|---|
| Accuracy | 63.2% |
| Cost | 6848 |
herbie shell --seed 2023157
(FPCore (c0 A V l)
:name "Henrywood and Agarwal, Equation (3)"
:precision binary64
(* c0 (sqrt (/ A (* V l)))))