
(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) {
return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (/ (* M D) (* 2.0 d)) 5e+120)
(* w0 (sqrt (+ 1.0 (* (* h (pow (* 0.5 (* D (/ M d))) 2.0)) (/ -1.0 l)))))
(*
w0
(sqrt (+ 1.0 (* -0.25 (* (* (/ M d) (/ M d)) (* (/ D l) (* D h)))))))))M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (((M * D) / (2.0 * d)) <= 5e+120) {
tmp = w0 * sqrt((1.0 + ((h * pow((0.5 * (D * (M / d))), 2.0)) * (-1.0 / l))));
} else {
tmp = w0 * sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (((m * d) / (2.0d0 * d_1)) <= 5d+120) then
tmp = w0 * sqrt((1.0d0 + ((h * ((0.5d0 * (d * (m / d_1))) ** 2.0d0)) * ((-1.0d0) / l))))
else
tmp = w0 * sqrt((1.0d0 + ((-0.25d0) * (((m / d_1) * (m / d_1)) * ((d / l) * (d * h))))))
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (((M * D) / (2.0 * d)) <= 5e+120) {
tmp = w0 * Math.sqrt((1.0 + ((h * Math.pow((0.5 * (D * (M / d))), 2.0)) * (-1.0 / l))));
} else {
tmp = w0 * Math.sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if ((M * D) / (2.0 * d)) <= 5e+120: tmp = w0 * math.sqrt((1.0 + ((h * math.pow((0.5 * (D * (M / d))), 2.0)) * (-1.0 / l)))) else: tmp = w0 * math.sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h)))))) return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(Float64(M * D) / Float64(2.0 * d)) <= 5e+120) tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(h * (Float64(0.5 * Float64(D * Float64(M / d))) ^ 2.0)) * Float64(-1.0 / l))))); else tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(-0.25 * Float64(Float64(Float64(M / d) * Float64(M / d)) * Float64(Float64(D / l) * Float64(D * h))))))); end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (((M * D) / (2.0 * d)) <= 5e+120)
tmp = w0 * sqrt((1.0 + ((h * ((0.5 * (D * (M / d))) ^ 2.0)) * (-1.0 / l))));
else
tmp = w0 * sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 5e+120], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(h * N[Power[N[(0.5 * N[(D * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(-0.25 * N[(N[(N[(M / d), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] * N[(N[(D / l), $MachinePrecision] * N[(D * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq 5 \cdot 10^{+120}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \left(h \cdot {\left(0.5 \cdot \left(D \cdot \frac{M}{d}\right)\right)}^{2}\right) \cdot \frac{-1}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\left(\frac{M}{d} \cdot \frac{M}{d}\right) \cdot \left(\frac{D}{\ell} \cdot \left(D \cdot h\right)\right)\right)}\\
\end{array}
\end{array}
if (/.f64 (*.f64 M D) (*.f64 2 d)) < 5.00000000000000019e120Initial program 84.3%
times-frac83.9%
Simplified83.9%
associate-*r/90.5%
clear-num90.5%
div-inv90.5%
metadata-eval90.5%
Applied egg-rr90.5%
associate-/r/90.5%
*-commutative90.5%
*-commutative90.5%
associate-*r*90.5%
associate-*r/90.9%
associate-*l/90.1%
*-commutative90.1%
Simplified90.1%
if 5.00000000000000019e120 < (/.f64 (*.f64 M D) (*.f64 2 d)) Initial program 49.4%
times-frac49.4%
Simplified49.4%
Taylor expanded in w0 around 0 26.8%
cancel-sign-sub-inv26.8%
*-commutative26.8%
cancel-sign-sub-inv26.8%
Simplified21.8%
*-un-lft-identity21.8%
*-commutative21.8%
*-commutative21.8%
times-frac30.0%
associate-/l*33.4%
*-commutative33.4%
Applied egg-rr33.4%
*-lft-identity33.4%
*-commutative33.4%
associate-/r/33.9%
*-commutative33.9%
Simplified33.9%
Final simplification84.6%
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))) 2e+288)
(* w0 (sqrt (- 1.0 (* (/ h l) (pow (* (/ M d) (/ D 2.0)) 2.0)))))
(*
w0
(sqrt (+ 1.0 (* -0.25 (/ (* (* (/ M d) (/ M d)) (* D (* D h))) l)))))))M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))) <= 2e+288) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((M / d) * (D / 2.0)), 2.0))));
} else {
tmp = w0 * sqrt((1.0 + (-0.25 * ((((M / d) * (M / d)) * (D * (D * h))) / l))));
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if ((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))) <= 2d+288) then
tmp = w0 * sqrt((1.0d0 - ((h / l) * (((m / d_1) * (d / 2.0d0)) ** 2.0d0))))
else
tmp = w0 * sqrt((1.0d0 + ((-0.25d0) * ((((m / d_1) * (m / d_1)) * (d * (d * h))) / l))))
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))) <= 2e+288) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((M / d) * (D / 2.0)), 2.0))));
} else {
tmp = w0 * Math.sqrt((1.0 + (-0.25 * ((((M / d) * (M / d)) * (D * (D * h))) / l))));
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))) <= 2e+288: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((M / d) * (D / 2.0)), 2.0)))) else: tmp = w0 * math.sqrt((1.0 + (-0.25 * ((((M / d) * (M / d)) * (D * (D * h))) / l)))) return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))) <= 2e+288) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(M / d) * Float64(D / 2.0)) ^ 2.0))))); else tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(-0.25 * Float64(Float64(Float64(Float64(M / d) * Float64(M / d)) * Float64(D * Float64(D * h))) / l))))); end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l))) <= 2e+288)
tmp = w0 * sqrt((1.0 - ((h / l) * (((M / d) * (D / 2.0)) ^ 2.0))));
else
tmp = w0 * sqrt((1.0 + (-0.25 * ((((M / d) * (M / d)) * (D * (D * h))) / l))));
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+288], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(M / d), $MachinePrecision] * N[(D / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(-0.25 * N[(N[(N[(N[(M / d), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] * N[(D * N[(D * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq 2 \cdot 10^{+288}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \frac{\left(\frac{M}{d} \cdot \frac{M}{d}\right) \cdot \left(D \cdot \left(D \cdot h\right)\right)}{\ell}}\\
\end{array}
\end{array}
if (-.f64 1 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))) < 2e288Initial program 99.9%
*-commutative99.9%
times-frac97.7%
Simplified97.7%
if 2e288 < (-.f64 1 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 h l))) Initial program 34.1%
times-frac34.1%
Simplified34.1%
Taylor expanded in w0 around 0 40.8%
cancel-sign-sub-inv40.8%
*-commutative40.8%
cancel-sign-sub-inv40.8%
Simplified45.8%
associate-*l/47.3%
*-commutative47.3%
times-frac57.0%
Applied egg-rr57.0%
Final simplification86.0%
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (/ h l) (- INFINITY))
(* w0 (sqrt (+ 1.0 (* -0.25 (* (* h (/ M (/ l M))) (/ (* D D) (* d d)))))))
(if (<= (/ h l) -1e-296)
(* w0 (sqrt (- 1.0 (* (/ h l) (pow (* (/ D d) (/ M 2.0)) 2.0)))))
w0)))M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -((double) INFINITY)) {
tmp = w0 * sqrt((1.0 + (-0.25 * ((h * (M / (l / M))) * ((D * D) / (d * d))))));
} else if ((h / l) <= -1e-296) {
tmp = w0 * sqrt((1.0 - ((h / l) * pow(((D / d) * (M / 2.0)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((h / l) <= -Double.POSITIVE_INFINITY) {
tmp = w0 * Math.sqrt((1.0 + (-0.25 * ((h * (M / (l / M))) * ((D * D) / (d * d))))));
} else if ((h / l) <= -1e-296) {
tmp = w0 * Math.sqrt((1.0 - ((h / l) * Math.pow(((D / d) * (M / 2.0)), 2.0))));
} else {
tmp = w0;
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (h / l) <= -math.inf: tmp = w0 * math.sqrt((1.0 + (-0.25 * ((h * (M / (l / M))) * ((D * D) / (d * d)))))) elif (h / l) <= -1e-296: tmp = w0 * math.sqrt((1.0 - ((h / l) * math.pow(((D / d) * (M / 2.0)), 2.0)))) else: tmp = w0 return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(h / l) <= Float64(-Inf)) tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(-0.25 * Float64(Float64(h * Float64(M / Float64(l / M))) * Float64(Float64(D * D) / Float64(d * d))))))); elseif (Float64(h / l) <= -1e-296) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h / l) * (Float64(Float64(D / d) * Float64(M / 2.0)) ^ 2.0))))); else tmp = w0; end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((h / l) <= -Inf)
tmp = w0 * sqrt((1.0 + (-0.25 * ((h * (M / (l / M))) * ((D * D) / (d * d))))));
elseif ((h / l) <= -1e-296)
tmp = w0 * sqrt((1.0 - ((h / l) * (((D / d) * (M / 2.0)) ^ 2.0))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(h / l), $MachinePrecision], (-Infinity)], N[(w0 * N[Sqrt[N[(1.0 + N[(-0.25 * N[(N[(h * N[(M / N[(l / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(h / l), $MachinePrecision], -1e-296], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(D / d), $MachinePrecision] * N[(M / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{h}{\ell} \leq -\infty:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\left(h \cdot \frac{M}{\frac{\ell}{M}}\right) \cdot \frac{D \cdot D}{d \cdot d}\right)}\\
\mathbf{elif}\;\frac{h}{\ell} \leq -1 \cdot 10^{-296}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if (/.f64 h l) < -inf.0Initial program 26.2%
times-frac26.2%
Simplified26.2%
Taylor expanded in w0 around 0 38.3%
cancel-sign-sub-inv38.3%
*-commutative38.3%
cancel-sign-sub-inv38.3%
Simplified54.9%
associate-*l/59.5%
*-commutative59.5%
times-frac80.3%
Applied egg-rr80.3%
Taylor expanded in D around 0 46.9%
unpow246.9%
unpow246.9%
associate-/l*46.9%
unpow246.9%
associate-/r/46.5%
times-frac51.3%
unpow251.3%
Simplified51.3%
Taylor expanded in D around 0 38.3%
*-commutative38.3%
unpow238.3%
times-frac42.4%
associate-*r/42.4%
associate-/l*54.5%
unpow254.5%
unpow254.5%
Simplified54.5%
if -inf.0 < (/.f64 h l) < -1e-296Initial program 84.5%
times-frac84.6%
Simplified84.6%
if -1e-296 < (/.f64 h l) Initial program 88.9%
times-frac88.0%
Simplified88.0%
Taylor expanded in M around 0 94.7%
Final simplification86.0%
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (w0 M D h l d)
:precision binary64
(if (<= (/ (* M D) (* 2.0 d)) 5e+120)
(* w0 (sqrt (- 1.0 (/ (* h (pow (* (/ M d) (* D 0.5)) 2.0)) l))))
(*
w0
(sqrt (+ 1.0 (* -0.25 (* (* (/ M d) (/ M d)) (* (/ D l) (* D h)))))))))M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (((M * D) / (2.0 * d)) <= 5e+120) {
tmp = w0 * sqrt((1.0 - ((h * pow(((M / d) * (D * 0.5)), 2.0)) / l)));
} else {
tmp = w0 * sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (((m * d) / (2.0d0 * d_1)) <= 5d+120) then
tmp = w0 * sqrt((1.0d0 - ((h * (((m / d_1) * (d * 0.5d0)) ** 2.0d0)) / l)))
else
tmp = w0 * sqrt((1.0d0 + ((-0.25d0) * (((m / d_1) * (m / d_1)) * ((d / l) * (d * h))))))
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (((M * D) / (2.0 * d)) <= 5e+120) {
tmp = w0 * Math.sqrt((1.0 - ((h * Math.pow(((M / d) * (D * 0.5)), 2.0)) / l)));
} else {
tmp = w0 * Math.sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if ((M * D) / (2.0 * d)) <= 5e+120: tmp = w0 * math.sqrt((1.0 - ((h * math.pow(((M / d) * (D * 0.5)), 2.0)) / l))) else: tmp = w0 * math.sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h)))))) return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(Float64(M * D) / Float64(2.0 * d)) <= 5e+120) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * (Float64(Float64(M / d) * Float64(D * 0.5)) ^ 2.0)) / l)))); else tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(-0.25 * Float64(Float64(Float64(M / d) * Float64(M / d)) * Float64(Float64(D / l) * Float64(D * h))))))); end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (((M * D) / (2.0 * d)) <= 5e+120)
tmp = w0 * sqrt((1.0 - ((h * (((M / d) * (D * 0.5)) ^ 2.0)) / l)));
else
tmp = w0 * sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 5e+120], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[Power[N[(N[(M / d), $MachinePrecision] * N[(D * 0.5), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(-0.25 * N[(N[(N[(M / d), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] * N[(N[(D / l), $MachinePrecision] * N[(D * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\frac{M \cdot D}{2 \cdot d} \leq 5 \cdot 10^{+120}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h \cdot {\left(\frac{M}{d} \cdot \left(D \cdot 0.5\right)\right)}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\left(\frac{M}{d} \cdot \frac{M}{d}\right) \cdot \left(\frac{D}{\ell} \cdot \left(D \cdot h\right)\right)\right)}\\
\end{array}
\end{array}
if (/.f64 (*.f64 M D) (*.f64 2 d)) < 5.00000000000000019e120Initial program 84.3%
*-commutative84.3%
times-frac83.4%
Simplified83.4%
associate-*r/90.1%
div-inv90.1%
metadata-eval90.1%
Applied egg-rr90.1%
if 5.00000000000000019e120 < (/.f64 (*.f64 M D) (*.f64 2 d)) Initial program 49.4%
times-frac49.4%
Simplified49.4%
Taylor expanded in w0 around 0 26.8%
cancel-sign-sub-inv26.8%
*-commutative26.8%
cancel-sign-sub-inv26.8%
Simplified21.8%
*-un-lft-identity21.8%
*-commutative21.8%
*-commutative21.8%
times-frac30.0%
associate-/l*33.4%
*-commutative33.4%
Applied egg-rr33.4%
*-lft-identity33.4%
*-commutative33.4%
associate-/r/33.9%
*-commutative33.9%
Simplified33.9%
Final simplification84.6%
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= (* 2.0 d) 3.5e-37) (* w0 (sqrt (+ 1.0 (* -0.25 (* (* (/ M d) (/ M d)) (* (/ D l) (* D h))))))) (* w0 (sqrt (- 1.0 (/ (* h (pow (* (* M 0.5) (/ D d)) 2.0)) l))))))
M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((2.0 * d) <= 3.5e-37) {
tmp = w0 * sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
} else {
tmp = w0 * sqrt((1.0 - ((h * pow(((M * 0.5) * (D / d)), 2.0)) / l)));
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if ((2.0d0 * d_1) <= 3.5d-37) then
tmp = w0 * sqrt((1.0d0 + ((-0.25d0) * (((m / d_1) * (m / d_1)) * ((d / l) * (d * h))))))
else
tmp = w0 * sqrt((1.0d0 - ((h * (((m * 0.5d0) * (d / d_1)) ** 2.0d0)) / l)))
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if ((2.0 * d) <= 3.5e-37) {
tmp = w0 * Math.sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
} else {
tmp = w0 * Math.sqrt((1.0 - ((h * Math.pow(((M * 0.5) * (D / d)), 2.0)) / l)));
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if (2.0 * d) <= 3.5e-37: tmp = w0 * math.sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h)))))) else: tmp = w0 * math.sqrt((1.0 - ((h * math.pow(((M * 0.5) * (D / d)), 2.0)) / l))) return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(2.0 * d) <= 3.5e-37) tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(-0.25 * Float64(Float64(Float64(M / d) * Float64(M / d)) * Float64(Float64(D / l) * Float64(D * h))))))); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(h * (Float64(Float64(M * 0.5) * Float64(D / d)) ^ 2.0)) / l)))); end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if ((2.0 * d) <= 3.5e-37)
tmp = w0 * sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
else
tmp = w0 * sqrt((1.0 - ((h * (((M * 0.5) * (D / d)) ^ 2.0)) / l)));
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(2.0 * d), $MachinePrecision], 3.5e-37], N[(w0 * N[Sqrt[N[(1.0 + N[(-0.25 * N[(N[(N[(M / d), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] * N[(N[(D / l), $MachinePrecision] * N[(D * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(h * N[Power[N[(N[(M * 0.5), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;2 \cdot d \leq 3.5 \cdot 10^{-37}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\left(\frac{M}{d} \cdot \frac{M}{d}\right) \cdot \left(\frac{D}{\ell} \cdot \left(D \cdot h\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \sqrt{1 - \frac{h \cdot {\left(\left(M \cdot 0.5\right) \cdot \frac{D}{d}\right)}^{2}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 2 d) < 3.5000000000000001e-37Initial program 78.8%
times-frac78.3%
Simplified78.3%
Taylor expanded in w0 around 0 45.3%
cancel-sign-sub-inv45.3%
*-commutative45.3%
cancel-sign-sub-inv45.3%
Simplified50.1%
*-un-lft-identity50.1%
*-commutative50.1%
*-commutative50.1%
times-frac69.7%
associate-/l*70.2%
*-commutative70.2%
Applied egg-rr70.2%
*-lft-identity70.2%
*-commutative70.2%
associate-/r/70.8%
*-commutative70.8%
Simplified70.8%
if 3.5000000000000001e-37 < (*.f64 2 d) Initial program 86.3%
times-frac86.3%
Simplified86.3%
associate-*r/92.1%
div-inv92.1%
metadata-eval92.1%
Applied egg-rr92.1%
Final simplification76.8%
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= d 3.3e+125) (* w0 (sqrt (+ 1.0 (* -0.25 (* (* (/ M d) (/ M d)) (* (/ D l) (* D h))))))) w0))
M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (d <= 3.3e+125) {
tmp = w0 * sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
} else {
tmp = w0;
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (d_1 <= 3.3d+125) then
tmp = w0 * sqrt((1.0d0 + ((-0.25d0) * (((m / d_1) * (m / d_1)) * ((d / l) * (d * h))))))
else
tmp = w0
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (d <= 3.3e+125) {
tmp = w0 * Math.sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
} else {
tmp = w0;
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if d <= 3.3e+125: tmp = w0 * math.sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h)))))) else: tmp = w0 return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (d <= 3.3e+125) tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(-0.25 * Float64(Float64(Float64(M / d) * Float64(M / d)) * Float64(Float64(D / l) * Float64(D * h))))))); else tmp = w0; end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (d <= 3.3e+125)
tmp = w0 * sqrt((1.0 + (-0.25 * (((M / d) * (M / d)) * ((D / l) * (D * h))))));
else
tmp = w0;
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[d, 3.3e+125], N[(w0 * N[Sqrt[N[(1.0 + N[(-0.25 * N[(N[(N[(M / d), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] * N[(N[(D / l), $MachinePrecision] * N[(D * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq 3.3 \cdot 10^{+125}:\\
\;\;\;\;w0 \cdot \sqrt{1 + -0.25 \cdot \left(\left(\frac{M}{d} \cdot \frac{M}{d}\right) \cdot \left(\frac{D}{\ell} \cdot \left(D \cdot h\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;w0\\
\end{array}
\end{array}
if d < 3.30000000000000005e125Initial program 79.9%
times-frac79.5%
Simplified79.5%
Taylor expanded in w0 around 0 50.5%
cancel-sign-sub-inv50.5%
*-commutative50.5%
cancel-sign-sub-inv50.5%
Simplified55.4%
*-un-lft-identity55.4%
*-commutative55.4%
*-commutative55.4%
times-frac71.9%
associate-/l*72.3%
*-commutative72.3%
Applied egg-rr72.3%
*-lft-identity72.3%
*-commutative72.3%
associate-/r/72.8%
*-commutative72.8%
Simplified72.8%
if 3.30000000000000005e125 < d Initial program 86.7%
times-frac86.7%
Simplified86.7%
Taylor expanded in M around 0 89.7%
Final simplification75.2%
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= M 2.5e-120) w0 (* w0 (+ 1.0 (* -0.125 (* (* (/ D d) (/ D d)) (* (/ h l) (* M M))))))))
M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 2.5e-120) {
tmp = w0;
} else {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M)))));
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (m <= 2.5d-120) then
tmp = w0
else
tmp = w0 * (1.0d0 + ((-0.125d0) * (((d / d_1) * (d / d_1)) * ((h / l) * (m * m)))))
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 2.5e-120) {
tmp = w0;
} else {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M)))));
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if M <= 2.5e-120: tmp = w0 else: tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M))))) return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= 2.5e-120) tmp = w0; else tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(h / l) * Float64(M * M)))))); end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (M <= 2.5e-120)
tmp = w0;
else
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * ((h / l) * (M * M)))));
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 2.5e-120], w0, N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \leq 2.5 \cdot 10^{-120}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h}{\ell} \cdot \left(M \cdot M\right)\right)\right)\right)\\
\end{array}
\end{array}
if M < 2.50000000000000003e-120Initial program 82.7%
times-frac82.2%
Simplified82.2%
Taylor expanded in M around 0 76.4%
if 2.50000000000000003e-120 < M Initial program 76.9%
times-frac76.9%
Simplified76.9%
Taylor expanded in M around 0 48.6%
associate-*r/48.6%
*-commutative48.6%
associate-*r/48.6%
associate-/l*48.7%
unpow248.7%
unpow248.7%
*-commutative48.7%
unpow248.7%
Simplified48.7%
Taylor expanded in D around 0 48.6%
unpow248.6%
*-commutative48.6%
times-frac50.1%
unpow250.1%
unpow250.1%
times-frac55.8%
unpow255.8%
*-commutative55.8%
associate-/l*55.6%
Simplified55.6%
unpow255.6%
Applied egg-rr55.6%
Taylor expanded in M around 0 55.8%
unpow255.8%
*-commutative55.8%
associate-/l*57.1%
associate-/r/55.6%
Simplified55.6%
Final simplification69.9%
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= M 1.75e-120) w0 (* w0 (+ 1.0 (* -0.125 (* (* (/ D d) (/ D d)) (* h (/ (* M M) l))))))))
M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 1.75e-120) {
tmp = w0;
} else {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * (h * ((M * M) / l)))));
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (m <= 1.75d-120) then
tmp = w0
else
tmp = w0 * (1.0d0 + ((-0.125d0) * (((d / d_1) * (d / d_1)) * (h * ((m * m) / l)))))
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 1.75e-120) {
tmp = w0;
} else {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * (h * ((M * M) / l)))));
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if M <= 1.75e-120: tmp = w0 else: tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * (h * ((M * M) / l))))) return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= 1.75e-120) tmp = w0; else tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(h * Float64(Float64(M * M) / l)))))); end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (M <= 1.75e-120)
tmp = w0;
else
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * (h * ((M * M) / l)))));
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 1.75e-120], w0, N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(h * N[(N[(M * M), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \leq 1.75 \cdot 10^{-120}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(h \cdot \frac{M \cdot M}{\ell}\right)\right)\right)\\
\end{array}
\end{array}
if M < 1.75e-120Initial program 82.7%
times-frac82.2%
Simplified82.2%
Taylor expanded in M around 0 76.4%
if 1.75e-120 < M Initial program 76.9%
times-frac76.9%
Simplified76.9%
Taylor expanded in M around 0 48.6%
associate-*r/48.6%
*-commutative48.6%
associate-*r/48.6%
associate-/l*48.7%
unpow248.7%
unpow248.7%
*-commutative48.7%
unpow248.7%
Simplified48.7%
Taylor expanded in D around 0 48.6%
unpow248.6%
*-commutative48.6%
times-frac50.1%
unpow250.1%
unpow250.1%
times-frac55.8%
unpow255.8%
*-commutative55.8%
associate-/l*55.6%
Simplified55.6%
unpow255.6%
Applied egg-rr55.6%
associate-/r/57.1%
Applied egg-rr57.1%
Final simplification70.3%
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= M 3.3e-102) w0 (* w0 (+ 1.0 (* -0.125 (* (* (/ D l) (/ D (* d d))) (* h (* M M))))))))
M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 3.3e-102) {
tmp = w0;
} else {
tmp = w0 * (1.0 + (-0.125 * (((D / l) * (D / (d * d))) * (h * (M * M)))));
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (m <= 3.3d-102) then
tmp = w0
else
tmp = w0 * (1.0d0 + ((-0.125d0) * (((d / l) * (d / (d_1 * d_1))) * (h * (m * m)))))
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 3.3e-102) {
tmp = w0;
} else {
tmp = w0 * (1.0 + (-0.125 * (((D / l) * (D / (d * d))) * (h * (M * M)))));
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if M <= 3.3e-102: tmp = w0 else: tmp = w0 * (1.0 + (-0.125 * (((D / l) * (D / (d * d))) * (h * (M * M))))) return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= 3.3e-102) tmp = w0; else tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(Float64(D / l) * Float64(D / Float64(d * d))) * Float64(h * Float64(M * M)))))); end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (M <= 3.3e-102)
tmp = w0;
else
tmp = w0 * (1.0 + (-0.125 * (((D / l) * (D / (d * d))) * (h * (M * M)))));
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 3.3e-102], w0, N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(N[(D / l), $MachinePrecision] * N[(D / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \leq 3.3 \cdot 10^{-102}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(\frac{D}{\ell} \cdot \frac{D}{d \cdot d}\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)\\
\end{array}
\end{array}
if M < 3.3e-102Initial program 82.6%
times-frac82.1%
Simplified82.1%
Taylor expanded in M around 0 76.4%
if 3.3e-102 < M Initial program 76.9%
times-frac76.9%
Simplified76.9%
Taylor expanded in M around 0 47.1%
associate-*r/47.1%
*-commutative47.1%
associate-*r/47.1%
associate-/l*47.2%
unpow247.2%
unpow247.2%
*-commutative47.2%
unpow247.2%
Simplified47.2%
associate-/r/47.2%
*-commutative47.2%
Applied egg-rr47.2%
times-frac53.0%
Applied egg-rr53.0%
Final simplification69.4%
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= d 4500000000000.0) (* w0 (+ 1.0 (* -0.125 (* (/ M d) (* (/ M d) (/ D (/ l (* D h)))))))) (* w0 (+ 1.0 (* -0.125 (* (* (/ D d) (/ D d)) (* h (/ (* M M) l))))))))
M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (d <= 4500000000000.0) {
tmp = w0 * (1.0 + (-0.125 * ((M / d) * ((M / d) * (D / (l / (D * h)))))));
} else {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * (h * ((M * M) / l)))));
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (d_1 <= 4500000000000.0d0) then
tmp = w0 * (1.0d0 + ((-0.125d0) * ((m / d_1) * ((m / d_1) * (d / (l / (d * h)))))))
else
tmp = w0 * (1.0d0 + ((-0.125d0) * (((d / d_1) * (d / d_1)) * (h * ((m * m) / l)))))
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (d <= 4500000000000.0) {
tmp = w0 * (1.0 + (-0.125 * ((M / d) * ((M / d) * (D / (l / (D * h)))))));
} else {
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * (h * ((M * M) / l)))));
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if d <= 4500000000000.0: tmp = w0 * (1.0 + (-0.125 * ((M / d) * ((M / d) * (D / (l / (D * h))))))) else: tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * (h * ((M * M) / l))))) return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (d <= 4500000000000.0) tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(M / d) * Float64(Float64(M / d) * Float64(D / Float64(l / Float64(D * h)))))))); else tmp = Float64(w0 * Float64(1.0 + Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(h * Float64(Float64(M * M) / l)))))); end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (d <= 4500000000000.0)
tmp = w0 * (1.0 + (-0.125 * ((M / d) * ((M / d) * (D / (l / (D * h)))))));
else
tmp = w0 * (1.0 + (-0.125 * (((D / d) * (D / d)) * (h * ((M * M) / l)))));
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[d, 4500000000000.0], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(M / d), $MachinePrecision] * N[(N[(M / d), $MachinePrecision] * N[(D / N[(l / N[(D * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(w0 * N[(1.0 + N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(h * N[(N[(M * M), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;d \leq 4500000000000:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\frac{M}{d} \cdot \left(\frac{M}{d} \cdot \frac{D}{\frac{\ell}{D \cdot h}}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;w0 \cdot \left(1 + -0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(h \cdot \frac{M \cdot M}{\ell}\right)\right)\right)\\
\end{array}
\end{array}
if d < 4.5e12Initial program 79.5%
times-frac79.0%
Simplified79.0%
Taylor expanded in M around 0 44.6%
associate-*r/44.6%
*-commutative44.6%
associate-*r/44.6%
associate-/l*44.7%
unpow244.7%
unpow244.7%
*-commutative44.7%
unpow244.7%
Simplified44.7%
associate-/r/44.1%
*-commutative44.1%
Applied egg-rr44.1%
associate-*l/44.6%
Applied egg-rr44.6%
associate-*r*43.4%
associate-*r*47.1%
frac-times49.3%
frac-times66.3%
associate-*r*70.2%
associate-/l*70.7%
Applied egg-rr70.7%
if 4.5e12 < d Initial program 85.0%
times-frac85.0%
Simplified85.0%
Taylor expanded in M around 0 62.5%
associate-*r/62.5%
*-commutative62.5%
associate-*r/62.5%
associate-/l*64.0%
unpow264.0%
unpow264.0%
*-commutative64.0%
unpow264.0%
Simplified64.0%
Taylor expanded in D around 0 62.5%
unpow262.5%
*-commutative62.5%
times-frac64.0%
unpow264.0%
unpow264.0%
times-frac73.2%
unpow273.2%
*-commutative73.2%
associate-/l*67.0%
Simplified67.0%
unpow267.0%
Applied egg-rr67.0%
associate-/r/73.2%
Applied egg-rr73.2%
Final simplification71.3%
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 (if (<= M 7.5e+102) w0 (* -0.125 (* (/ D (/ l D)) (/ (* w0 (* h (* M M))) (* d d))))))
M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 7.5e+102) {
tmp = w0;
} else {
tmp = -0.125 * ((D / (l / D)) * ((w0 * (h * (M * M))) / (d * d)));
}
return tmp;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
real(8) :: tmp
if (m <= 7.5d+102) then
tmp = w0
else
tmp = (-0.125d0) * ((d / (l / d)) * ((w0 * (h * (m * m))) / (d_1 * d_1)))
end if
code = tmp
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
double tmp;
if (M <= 7.5e+102) {
tmp = w0;
} else {
tmp = -0.125 * ((D / (l / D)) * ((w0 * (h * (M * M))) / (d * d)));
}
return tmp;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): tmp = 0 if M <= 7.5e+102: tmp = w0 else: tmp = -0.125 * ((D / (l / D)) * ((w0 * (h * (M * M))) / (d * d))) return tmp
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) tmp = 0.0 if (M <= 7.5e+102) tmp = w0; else tmp = Float64(-0.125 * Float64(Float64(D / Float64(l / D)) * Float64(Float64(w0 * Float64(h * Float64(M * M))) / Float64(d * d)))); end return tmp end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(w0, M, D, h, l, d)
tmp = 0.0;
if (M <= 7.5e+102)
tmp = w0;
else
tmp = -0.125 * ((D / (l / D)) * ((w0 * (h * (M * M))) / (d * d)));
end
tmp_2 = tmp;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 7.5e+102], w0, N[(-0.125 * N[(N[(D / N[(l / D), $MachinePrecision]), $MachinePrecision] * N[(N[(w0 * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;M \leq 7.5 \cdot 10^{+102}:\\
\;\;\;\;w0\\
\mathbf{else}:\\
\;\;\;\;-0.125 \cdot \left(\frac{D}{\frac{\ell}{D}} \cdot \frac{w0 \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot d}\right)\\
\end{array}
\end{array}
if M < 7.5e102Initial program 83.3%
times-frac82.9%
Simplified82.9%
Taylor expanded in M around 0 74.7%
if 7.5e102 < M Initial program 64.5%
times-frac64.5%
Simplified64.5%
Taylor expanded in M around 0 31.7%
associate-*r/31.7%
*-commutative31.7%
associate-*r/31.7%
associate-/l*31.7%
unpow231.7%
unpow231.7%
*-commutative31.7%
unpow231.7%
Simplified31.7%
Taylor expanded in D around 0 31.7%
unpow231.7%
*-commutative31.7%
times-frac31.8%
unpow231.8%
unpow231.8%
times-frac35.1%
unpow235.1%
*-commutative35.1%
associate-/l*34.5%
Simplified34.5%
unpow234.5%
Applied egg-rr34.5%
Taylor expanded in D around inf 25.8%
times-frac19.5%
unpow219.5%
associate-/l*22.6%
unpow222.6%
*-commutative22.6%
unpow222.6%
Simplified22.6%
Final simplification68.0%
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. (FPCore (w0 M D h l d) :precision binary64 w0)
M = abs(M);
D = abs(D);
d = abs(d);
assert(M < D);
double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
NOTE: M should be positive before calling this function
NOTE: D should be positive before calling this function
NOTE: d should be positive before calling this function
NOTE: M and D should be sorted in increasing order before calling this function.
real(8) function code(w0, m, d, h, l, d_1)
real(8), intent (in) :: w0
real(8), intent (in) :: m
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: d_1
code = w0
end function
M = Math.abs(M);
D = Math.abs(D);
d = Math.abs(d);
assert M < D;
public static double code(double w0, double M, double D, double h, double l, double d) {
return w0;
}
M = abs(M) D = abs(D) d = abs(d) [M, D] = sort([M, D]) def code(w0, M, D, h, l, d): return w0
M = abs(M) D = abs(D) d = abs(d) M, D = sort([M, D]) function code(w0, M, D, h, l, d) return w0 end
M = abs(M)
D = abs(D)
d = abs(d)
M, D = num2cell(sort([M, D])){:}
function tmp = code(w0, M, D, h, l, d)
tmp = w0;
end
NOTE: M should be positive before calling this function NOTE: D should be positive before calling this function NOTE: d should be positive before calling this function NOTE: M and D should be sorted in increasing order before calling this function. code[w0_, M_, D_, h_, l_, d_] := w0
\begin{array}{l}
M = |M|\\
D = |D|\\
d = |d|\\
[M, D] = \mathsf{sort}([M, D])\\
\\
w0
\end{array}
Initial program 80.9%
times-frac80.5%
Simplified80.5%
Taylor expanded in M around 0 69.8%
Final simplification69.8%
herbie shell --seed 2023257
(FPCore (w0 M D h l d)
:name "Henrywood and Agarwal, Equation (9a)"
:precision binary64
(* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))