| Alternative 1 | |
|---|---|
| Error | 19.0 |
| Cost | 21384 |
(FPCore (d h l M D) :precision binary64 (* (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))) (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(*
(* (pow (/ d h) 0.5) (pow (/ d l) 0.5))
(+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) -0.5))))))
(if (<= t_0 -1e-134)
(*
(* (sqrt (/ d h)) (sqrt (/ d l)))
(-
1.0
(* 0.5 (/ (* h (* M (/ 0.5 (/ d D)))) (* l (/ (/ d D) (* 0.5 M)))))))
(if (or (<= t_0 4e-300) (not (<= t_0 2e+286)))
(fabs (* d (pow (* h l) -0.5)))
t_0))))double code(double d, double h, double l, double M, double D) {
return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
double code(double d, double h, double l, double M, double D) {
double t_0 = (pow((d / h), 0.5) * pow((d / l), 0.5)) * (1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * -0.5)));
double tmp;
if (t_0 <= -1e-134) {
tmp = (sqrt((d / h)) * sqrt((d / l))) * (1.0 - (0.5 * ((h * (M * (0.5 / (d / D)))) / (l * ((d / D) / (0.5 * M))))));
} else if ((t_0 <= 4e-300) || !(t_0 <= 2e+286)) {
tmp = fabs((d * pow((h * l), -0.5)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
end function
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = (((d / h) ** 0.5d0) * ((d / l) ** 0.5d0)) * (1.0d0 + ((h / l) * ((((m * d_1) / (d * 2.0d0)) ** 2.0d0) * (-0.5d0))))
if (t_0 <= (-1d-134)) then
tmp = (sqrt((d / h)) * sqrt((d / l))) * (1.0d0 - (0.5d0 * ((h * (m * (0.5d0 / (d / d_1)))) / (l * ((d / d_1) / (0.5d0 * m))))))
else if ((t_0 <= 4d-300) .or. (.not. (t_0 <= 2d+286))) then
tmp = abs((d * ((h * l) ** (-0.5d0))))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
return (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (Math.pow((d / h), 0.5) * Math.pow((d / l), 0.5)) * (1.0 + ((h / l) * (Math.pow(((M * D) / (d * 2.0)), 2.0) * -0.5)));
double tmp;
if (t_0 <= -1e-134) {
tmp = (Math.sqrt((d / h)) * Math.sqrt((d / l))) * (1.0 - (0.5 * ((h * (M * (0.5 / (d / D)))) / (l * ((d / D) / (0.5 * M))))));
} else if ((t_0 <= 4e-300) || !(t_0 <= 2e+286)) {
tmp = Math.abs((d * Math.pow((h * l), -0.5)));
} else {
tmp = t_0;
}
return tmp;
}
def code(d, h, l, M, D): return (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
def code(d, h, l, M, D): t_0 = (math.pow((d / h), 0.5) * math.pow((d / l), 0.5)) * (1.0 + ((h / l) * (math.pow(((M * D) / (d * 2.0)), 2.0) * -0.5))) tmp = 0 if t_0 <= -1e-134: tmp = (math.sqrt((d / h)) * math.sqrt((d / l))) * (1.0 - (0.5 * ((h * (M * (0.5 / (d / D)))) / (l * ((d / D) / (0.5 * M)))))) elif (t_0 <= 4e-300) or not (t_0 <= 2e+286): tmp = math.fabs((d * math.pow((h * l), -0.5))) else: tmp = t_0 return tmp
function code(d, h, l, M, D) return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) end
function code(d, h, l, M, D) t_0 = Float64(Float64((Float64(d / h) ^ 0.5) * (Float64(d / l) ^ 0.5)) * Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * -0.5)))) tmp = 0.0 if (t_0 <= -1e-134) tmp = Float64(Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))) * Float64(1.0 - Float64(0.5 * Float64(Float64(h * Float64(M * Float64(0.5 / Float64(d / D)))) / Float64(l * Float64(Float64(d / D) / Float64(0.5 * M))))))); elseif ((t_0 <= 4e-300) || !(t_0 <= 2e+286)) tmp = abs(Float64(d * (Float64(h * l) ^ -0.5))); else tmp = t_0; end return tmp end
function tmp = code(d, h, l, M, D) tmp = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l))); end
function tmp_2 = code(d, h, l, M, D) t_0 = (((d / h) ^ 0.5) * ((d / l) ^ 0.5)) * (1.0 + ((h / l) * ((((M * D) / (d * 2.0)) ^ 2.0) * -0.5))); tmp = 0.0; if (t_0 <= -1e-134) tmp = (sqrt((d / h)) * sqrt((d / l))) * (1.0 - (0.5 * ((h * (M * (0.5 / (d / D)))) / (l * ((d / D) / (0.5 * M)))))); elseif ((t_0 <= 4e-300) || ~((t_0 <= 2e+286))) tmp = abs((d * ((h * l) ^ -0.5))); else tmp = t_0; end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-134], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.5 * N[(N[(h * N[(M * N[(0.5 / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(N[(d / D), $MachinePrecision] / N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$0, 4e-300], N[Not[LessEqual[t$95$0, 2e+286]], $MachinePrecision]], N[Abs[N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$0]]]
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\begin{array}{l}
t_0 := \left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right)\\
\mathbf{if}\;t_0 \leq -1 \cdot 10^{-134}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \frac{h \cdot \left(M \cdot \frac{0.5}{\frac{d}{D}}\right)}{\ell \cdot \frac{\frac{d}{D}}{0.5 \cdot M}}\right)\\
\mathbf{elif}\;t_0 \leq 4 \cdot 10^{-300} \lor \neg \left(t_0 \leq 2 \cdot 10^{+286}\right):\\
\;\;\;\;\left|d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right|\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
Results
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < -1.00000000000000004e-134Initial program 29.3
Simplified30.5
[Start]29.3 | \[ \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
|---|---|
metadata-eval [=>]29.3 | \[ \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
unpow1/2 [=>]29.3 | \[ \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
metadata-eval [=>]29.3 | \[ \left(\sqrt{\frac{d}{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
unpow1/2 [=>]29.3 | \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
associate-*l* [=>]29.3 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)
\] |
metadata-eval [=>]29.3 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.5} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
times-frac [=>]30.5 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
Applied egg-rr32.9
Simplified30.4
[Start]32.9 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(e^{\mathsf{log1p}\left({\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \frac{h}{\ell}\right)} - 1\right)\right)
\] |
|---|---|
expm1-def [=>]32.9 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \frac{h}{\ell}\right)\right)}\right)
\] |
expm1-log1p [=>]30.5 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\left({\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)
\] |
associate-*r/ [=>]31.3 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot h}{\ell}}\right)
\] |
associate-*l/ [<=]30.4 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}}{\ell} \cdot h\right)}\right)
\] |
*-commutative [=>]30.4 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\left(h \cdot \frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}}{\ell}\right)}\right)
\] |
*-commutative [=>]30.4 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\left(M \cdot \color{blue}{\left(\frac{D}{d} \cdot 0.5\right)}\right)}^{2}}{\ell}\right)\right)
\] |
associate-*r* [=>]30.4 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\color{blue}{\left(\left(M \cdot \frac{D}{d}\right) \cdot 0.5\right)}}^{2}}{\ell}\right)\right)
\] |
Applied egg-rr22.3
Applied egg-rr22.2
if -1.00000000000000004e-134 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < 4.0000000000000001e-300 or 2.00000000000000007e286 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) Initial program 56.5
Simplified57.0
[Start]56.5 | \[ \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
|---|---|
metadata-eval [=>]56.5 | \[ \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
unpow1/2 [=>]56.5 | \[ \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
metadata-eval [=>]56.5 | \[ \left(\sqrt{\frac{d}{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
unpow1/2 [=>]56.5 | \[ \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\] |
associate-*l* [=>]56.5 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{1}{2} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)}\right)
\] |
metadata-eval [=>]56.5 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.5} \cdot \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
times-frac [=>]57.0 | \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{h}{\ell}\right)\right)
\] |
Taylor expanded in d around inf 41.0
Simplified41.0
[Start]41.0 | \[ \sqrt{\frac{1}{\ell \cdot h}} \cdot d
\] |
|---|---|
*-commutative [=>]41.0 | \[ \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}}
\] |
associate-/r* [=>]41.0 | \[ d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}}
\] |
Applied egg-rr41.0
Taylor expanded in l around 0 44.6
Simplified41.0
[Start]44.6 | \[ d \cdot {\left(e^{0.25 \cdot \left(-1 \cdot \log \ell + \log \left(\frac{1}{h}\right)\right)}\right)}^{2}
\] |
|---|---|
distribute-rgt-in [=>]44.6 | \[ d \cdot {\left(e^{\color{blue}{\left(-1 \cdot \log \ell\right) \cdot 0.25 + \log \left(\frac{1}{h}\right) \cdot 0.25}}\right)}^{2}
\] |
mul-1-neg [=>]44.6 | \[ d \cdot {\left(e^{\color{blue}{\left(-\log \ell\right)} \cdot 0.25 + \log \left(\frac{1}{h}\right) \cdot 0.25}\right)}^{2}
\] |
log-rec [<=]44.6 | \[ d \cdot {\left(e^{\color{blue}{\log \left(\frac{1}{\ell}\right)} \cdot 0.25 + \log \left(\frac{1}{h}\right) \cdot 0.25}\right)}^{2}
\] |
log-rec [=>]44.6 | \[ d \cdot {\left(e^{\log \left(\frac{1}{\ell}\right) \cdot 0.25 + \color{blue}{\left(-\log h\right)} \cdot 0.25}\right)}^{2}
\] |
mul-1-neg [<=]44.6 | \[ d \cdot {\left(e^{\log \left(\frac{1}{\ell}\right) \cdot 0.25 + \color{blue}{\left(-1 \cdot \log h\right)} \cdot 0.25}\right)}^{2}
\] |
distribute-rgt-in [<=]44.6 | \[ d \cdot {\left(e^{\color{blue}{0.25 \cdot \left(\log \left(\frac{1}{\ell}\right) + -1 \cdot \log h\right)}}\right)}^{2}
\] |
distribute-lft-in [=>]44.6 | \[ d \cdot {\left(e^{\color{blue}{0.25 \cdot \log \left(\frac{1}{\ell}\right) + 0.25 \cdot \left(-1 \cdot \log h\right)}}\right)}^{2}
\] |
log-rec [=>]44.6 | \[ d \cdot {\left(e^{0.25 \cdot \color{blue}{\left(-\log \ell\right)} + 0.25 \cdot \left(-1 \cdot \log h\right)}\right)}^{2}
\] |
mul-1-neg [<=]44.6 | \[ d \cdot {\left(e^{0.25 \cdot \color{blue}{\left(-1 \cdot \log \ell\right)} + 0.25 \cdot \left(-1 \cdot \log h\right)}\right)}^{2}
\] |
associate-*r* [=>]44.6 | \[ d \cdot {\left(e^{\color{blue}{\left(0.25 \cdot -1\right) \cdot \log \ell} + 0.25 \cdot \left(-1 \cdot \log h\right)}\right)}^{2}
\] |
metadata-eval [=>]44.6 | \[ d \cdot {\left(e^{\color{blue}{-0.25} \cdot \log \ell + 0.25 \cdot \left(-1 \cdot \log h\right)}\right)}^{2}
\] |
associate-*r* [=>]44.6 | \[ d \cdot {\left(e^{-0.25 \cdot \log \ell + \color{blue}{\left(0.25 \cdot -1\right) \cdot \log h}}\right)}^{2}
\] |
metadata-eval [=>]44.6 | \[ d \cdot {\left(e^{-0.25 \cdot \log \ell + \color{blue}{-0.25} \cdot \log h}\right)}^{2}
\] |
distribute-lft-in [<=]44.6 | \[ d \cdot {\left(e^{\color{blue}{-0.25 \cdot \left(\log \ell + \log h\right)}}\right)}^{2}
\] |
log-prod [<=]41.9 | \[ d \cdot {\left(e^{-0.25 \cdot \color{blue}{\log \left(\ell \cdot h\right)}}\right)}^{2}
\] |
log-pow [<=]41.9 | \[ d \cdot {\left(e^{\color{blue}{\log \left({\left(\ell \cdot h\right)}^{-0.25}\right)}}\right)}^{2}
\] |
rem-exp-log [=>]41.0 | \[ d \cdot {\color{blue}{\left({\left(\ell \cdot h\right)}^{-0.25}\right)}}^{2}
\] |
Applied egg-rr24.8
if 4.0000000000000001e-300 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < 2.00000000000000007e286Initial program 0.8
Final simplification13.6
| Alternative 1 | |
|---|---|
| Error | 19.0 |
| Cost | 21384 |
| Alternative 2 | |
|---|---|
| Error | 19.8 |
| Cost | 21320 |
| Alternative 3 | |
|---|---|
| Error | 22.3 |
| Cost | 15308 |
| Alternative 4 | |
|---|---|
| Error | 22.4 |
| Cost | 15180 |
| Alternative 5 | |
|---|---|
| Error | 22.1 |
| Cost | 15180 |
| Alternative 6 | |
|---|---|
| Error | 22.1 |
| Cost | 15180 |
| Alternative 7 | |
|---|---|
| Error | 21.9 |
| Cost | 15180 |
| Alternative 8 | |
|---|---|
| Error | 23.6 |
| Cost | 14988 |
| Alternative 9 | |
|---|---|
| Error | 22.4 |
| Cost | 14988 |
| Alternative 10 | |
|---|---|
| Error | 21.5 |
| Cost | 14856 |
| Alternative 11 | |
|---|---|
| Error | 22.2 |
| Cost | 14792 |
| Alternative 12 | |
|---|---|
| Error | 25.6 |
| Cost | 14468 |
| Alternative 13 | |
|---|---|
| Error | 24.9 |
| Cost | 13644 |
| Alternative 14 | |
|---|---|
| Error | 24.6 |
| Cost | 13380 |
| Alternative 15 | |
|---|---|
| Error | 24.5 |
| Cost | 13380 |
| Alternative 16 | |
|---|---|
| Error | 24.6 |
| Cost | 13316 |
| Alternative 17 | |
|---|---|
| Error | 29.9 |
| Cost | 13252 |
| Alternative 18 | |
|---|---|
| Error | 33.9 |
| Cost | 7377 |
| Alternative 19 | |
|---|---|
| Error | 33.8 |
| Cost | 7245 |
| Alternative 20 | |
|---|---|
| Error | 35.1 |
| Cost | 6980 |
| Alternative 21 | |
|---|---|
| Error | 44.4 |
| Cost | 6784 |
| Alternative 22 | |
|---|---|
| Error | 44.4 |
| Cost | 6720 |
herbie shell --seed 2023054
(FPCore (d h l M D)
:name "Henrywood and Agarwal, Equation (12)"
:precision binary64
(* (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))) (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))