
(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)))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}
\\
\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)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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)))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}
\\
\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)
\end{array}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (pow (* (* (/ D d) 0.5) M) 2.0)))
(if (<= d -1.75e-277)
(/
(* (fma (* t_0 (* -0.5 h)) (pow l -1.0) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(if (<= d -1e-310)
(/
(fma
(* -0.125 (* (* D D) (/ (* M M) d)))
(sqrt (pow (/ h l) 3.0))
(* (sqrt (/ h l)) d))
h)
(if (<= d 8.5e-182)
(/ (/ (* (fma (* (/ h l) -0.5) t_0 1.0) d) (sqrt h)) (sqrt l))
(*
(* (pow (/ d h) (pow 2.0 -1.0)) (/ (sqrt d) (sqrt l)))
(-
1.0
(*
(* (* 0.5 (* D 0.5)) (/ M d))
(* (* (* (/ 0.5 d) (* M D)) h) (pow l -1.0))))))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = pow((((D / d) * 0.5) * M), 2.0);
double tmp;
if (d <= -1.75e-277) {
tmp = (fma((t_0 * (-0.5 * h)), pow(l, -1.0), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else if (d <= -1e-310) {
tmp = fma((-0.125 * ((D * D) * ((M * M) / d))), sqrt(pow((h / l), 3.0)), (sqrt((h / l)) * d)) / h;
} else if (d <= 8.5e-182) {
tmp = ((fma(((h / l) * -0.5), t_0, 1.0) * d) / sqrt(h)) / sqrt(l);
} else {
tmp = (pow((d / h), pow(2.0, -1.0)) * (sqrt(d) / sqrt(l))) * (1.0 - (((0.5 * (D * 0.5)) * (M / d)) * ((((0.5 / d) * (M * D)) * h) * pow(l, -1.0))));
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) ^ 2.0 tmp = 0.0 if (d <= -1.75e-277) tmp = Float64(Float64(fma(Float64(t_0 * Float64(-0.5 * h)), (l ^ -1.0), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= -1e-310) tmp = Float64(fma(Float64(-0.125 * Float64(Float64(D * D) * Float64(Float64(M * M) / d))), sqrt((Float64(h / l) ^ 3.0)), Float64(sqrt(Float64(h / l)) * d)) / h); elseif (d <= 8.5e-182) tmp = Float64(Float64(Float64(fma(Float64(Float64(h / l) * -0.5), t_0, 1.0) * d) / sqrt(h)) / sqrt(l)); else tmp = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * Float64(sqrt(d) / sqrt(l))) * Float64(1.0 - Float64(Float64(Float64(0.5 * Float64(D * 0.5)) * Float64(M / d)) * Float64(Float64(Float64(Float64(0.5 / d) * Float64(M * D)) * h) * (l ^ -1.0))))); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Power[N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[d, -1.75e-277], N[(N[(N[(N[(t$95$0 * N[(-0.5 * h), $MachinePrecision]), $MachinePrecision] * N[Power[l, -1.0], $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1e-310], N[(N[(N[(-0.125 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[N[(h / l), $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] + N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[d, 8.5e-182], N[(N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(0.5 * N[(D * 0.5), $MachinePrecision]), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(0.5 / d), $MachinePrecision] * N[(M * D), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] * N[Power[l, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := {\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right)}^{2}\\
\mathbf{if}\;d \leq -1.75 \cdot 10^{-277}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(-0.5 \cdot h\right), {\ell}^{-1}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right), \sqrt{{\left(\frac{h}{\ell}\right)}^{3}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\
\mathbf{elif}\;d \leq 8.5 \cdot 10^{-182}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, t\_0, 1\right) \cdot d}{\sqrt{h}}}{\sqrt{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - \left(\left(0.5 \cdot \left(D \cdot 0.5\right)\right) \cdot \frac{M}{d}\right) \cdot \left(\left(\left(\frac{0.5}{d} \cdot \left(M \cdot D\right)\right) \cdot h\right) \cdot {\ell}^{-1}\right)\right)\\
\end{array}
\end{array}
if d < -1.74999999999999991e-277Initial program 79.4%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites75.3%
lift-/.f64N/A
metadata-eval75.3
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6484.2
Applied rewrites84.2%
Applied rewrites90.8%
lift-fma.f64N/A
lift-/.f64N/A
associate-*r/N/A
div-invN/A
unpow-1N/A
lift-pow.f64N/A
lower-fma.f64N/A
Applied rewrites91.7%
if -1.74999999999999991e-277 < d < -9.999999999999969e-311Initial program 26.9%
Taylor expanded in d around inf
Applied rewrites14.0%
Taylor expanded in h around 0
lower-/.f64N/A
Applied rewrites50.4%
if -9.999999999999969e-311 < d < 8.5000000000000001e-182Initial program 21.6%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6429.3
Applied rewrites29.3%
lift-/.f64N/A
metadata-eval29.3
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6445.6
Applied rewrites45.6%
Applied rewrites65.8%
if 8.5000000000000001e-182 < d Initial program 72.9%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites71.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-/.f64N/A
div-invN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites79.0%
lift-/.f64N/A
metadata-eval79.0
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
pow1/2N/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
pow1/2N/A
lower-sqrt.f6491.0
Applied rewrites91.0%
Final simplification87.6%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(*
(* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
(-
1.0
(* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))))
(if (<= t_0 -5e-159)
(/
(*
(* -0.125 (/ (* (* (* M M) h) (* D D)) (* (* d d) l)))
(/ d (sqrt (- h))))
(- (sqrt (- l))))
(if (or (<= t_0 1e-252) (not (<= t_0 5e+273)))
(fabs (/ d (sqrt (* l h))))
(* (sqrt (/ d l)) (sqrt (/ d h)))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
double tmp;
if (t_0 <= -5e-159) {
tmp = ((-0.125 * ((((M * M) * h) * (D * D)) / ((d * d) * l))) * (d / sqrt(-h))) / -sqrt(-l);
} else if ((t_0 <= 1e-252) || !(t_0 <= 5e+273)) {
tmp = fabs((d / sqrt((l * h))));
} else {
tmp = sqrt((d / l)) * sqrt((d / h));
}
return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this 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) ** (2.0d0 ** (-1.0d0))) * ((d / l) ** (2.0d0 ** (-1.0d0)))) * (1.0d0 - (((2.0d0 ** (-1.0d0)) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
if (t_0 <= (-5d-159)) then
tmp = (((-0.125d0) * ((((m * m) * h) * (d_1 * d_1)) / ((d * d) * l))) * (d / sqrt(-h))) / -sqrt(-l)
else if ((t_0 <= 1d-252) .or. (.not. (t_0 <= 5d+273))) then
tmp = abs((d / sqrt((l * h))))
else
tmp = sqrt((d / l)) * sqrt((d / h))
end if
code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
double tmp;
if (t_0 <= -5e-159) {
tmp = ((-0.125 * ((((M * M) * h) * (D * D)) / ((d * d) * l))) * (d / Math.sqrt(-h))) / -Math.sqrt(-l);
} else if ((t_0 <= 1e-252) || !(t_0 <= 5e+273)) {
tmp = Math.abs((d / Math.sqrt((l * h))));
} else {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
}
return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D]) def code(d, h, l, M, D): t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l))) tmp = 0 if t_0 <= -5e-159: tmp = ((-0.125 * ((((M * M) * h) * (D * D)) / ((d * d) * l))) * (d / math.sqrt(-h))) / -math.sqrt(-l) elif (t_0 <= 1e-252) or not (t_0 <= 5e+273): tmp = math.fabs((d / math.sqrt((l * h)))) else: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) return tmp
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) tmp = 0.0 if (t_0 <= -5e-159) tmp = Float64(Float64(Float64(-0.125 * Float64(Float64(Float64(Float64(M * M) * h) * Float64(D * D)) / Float64(Float64(d * d) * l))) * Float64(d / sqrt(Float64(-h)))) / Float64(-sqrt(Float64(-l)))); elseif ((t_0 <= 1e-252) || !(t_0 <= 5e+273)) tmp = abs(Float64(d / sqrt(Float64(l * h)))); else tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); end return tmp end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
tmp = 0.0;
if (t_0 <= -5e-159)
tmp = ((-0.125 * ((((M * M) * h) * (D * D)) / ((d * d) * l))) * (d / sqrt(-h))) / -sqrt(-l);
elseif ((t_0 <= 1e-252) || ~((t_0 <= 5e+273)))
tmp = abs((d / sqrt((l * h))));
else
tmp = sqrt((d / l)) * sqrt((d / h));
end
tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.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]}, If[LessEqual[t$95$0, -5e-159], N[(N[(N[(-0.125 * N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(d / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-N[Sqrt[(-l)], $MachinePrecision])), $MachinePrecision], If[Or[LessEqual[t$95$0, 1e-252], N[Not[LessEqual[t$95$0, 5e+273]], $MachinePrecision]], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-159}:\\
\;\;\;\;\frac{\left(-0.125 \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{\left(d \cdot d\right) \cdot \ell}\right) \cdot \frac{d}{\sqrt{-h}}}{-\sqrt{-\ell}}\\
\mathbf{elif}\;t\_0 \leq 10^{-252} \lor \neg \left(t\_0 \leq 5 \cdot 10^{+273}\right):\\
\;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -5.00000000000000032e-159Initial program 87.6%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites82.4%
lift-/.f64N/A
metadata-eval82.4
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6447.7
Applied rewrites47.7%
Applied rewrites50.2%
Taylor expanded in d around 0
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6424.2
Applied rewrites24.2%
if -5.00000000000000032e-159 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.99999999999999943e-253 or 4.99999999999999961e273 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 24.4%
Taylor expanded in d around inf
Applied rewrites30.1%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6434.0
Applied rewrites34.0%
Applied rewrites34.1%
Applied rewrites51.0%
if 9.99999999999999943e-253 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.99999999999999961e273Initial program 99.3%
Taylor expanded in d around inf
Applied rewrites99.0%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6436.3
Applied rewrites36.3%
Applied rewrites37.5%
Applied rewrites99.0%
Final simplification56.8%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(*
(* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
(-
1.0
(* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))))
(if (<= t_0 0.0)
(/ d (sqrt (* (sqrt (fabs l)) (sqrt (* (fabs h) (* l h))))))
(if (<= t_0 5e+273)
(* (sqrt (/ d l)) (sqrt (/ d h)))
(fabs (/ d (sqrt (* l h))))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
double tmp;
if (t_0 <= 0.0) {
tmp = d / sqrt((sqrt(fabs(l)) * sqrt((fabs(h) * (l * h)))));
} else if (t_0 <= 5e+273) {
tmp = sqrt((d / l)) * sqrt((d / h));
} else {
tmp = fabs((d / sqrt((l * h))));
}
return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this 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) ** (2.0d0 ** (-1.0d0))) * ((d / l) ** (2.0d0 ** (-1.0d0)))) * (1.0d0 - (((2.0d0 ** (-1.0d0)) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
if (t_0 <= 0.0d0) then
tmp = d / sqrt((sqrt(abs(l)) * sqrt((abs(h) * (l * h)))))
else if (t_0 <= 5d+273) then
tmp = sqrt((d / l)) * sqrt((d / h))
else
tmp = abs((d / sqrt((l * h))))
end if
code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
double tmp;
if (t_0 <= 0.0) {
tmp = d / Math.sqrt((Math.sqrt(Math.abs(l)) * Math.sqrt((Math.abs(h) * (l * h)))));
} else if (t_0 <= 5e+273) {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
} else {
tmp = Math.abs((d / Math.sqrt((l * h))));
}
return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D]) def code(d, h, l, M, D): t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l))) tmp = 0 if t_0 <= 0.0: tmp = d / math.sqrt((math.sqrt(math.fabs(l)) * math.sqrt((math.fabs(h) * (l * h))))) elif t_0 <= 5e+273: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) else: tmp = math.fabs((d / math.sqrt((l * h)))) return tmp
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) tmp = 0.0 if (t_0 <= 0.0) tmp = Float64(d / sqrt(Float64(sqrt(abs(l)) * sqrt(Float64(abs(h) * Float64(l * h)))))); elseif (t_0 <= 5e+273) tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); else tmp = abs(Float64(d / sqrt(Float64(l * h)))); end return tmp end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = d / sqrt((sqrt(abs(l)) * sqrt((abs(h) * (l * h)))));
elseif (t_0 <= 5e+273)
tmp = sqrt((d / l)) * sqrt((d / h));
else
tmp = abs((d / sqrt((l * h))));
end
tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.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]}, If[LessEqual[t$95$0, 0.0], N[(d / N[Sqrt[N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[Abs[h], $MachinePrecision] * N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+273], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\frac{d}{\sqrt{\sqrt{\left|\ell\right|} \cdot \sqrt{\left|h\right| \cdot \left(\ell \cdot h\right)}}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+273}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -0.0Initial program 80.1%
Taylor expanded in d around inf
Applied rewrites5.4%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6419.2
Applied rewrites19.2%
Applied rewrites19.2%
Applied rewrites21.0%
if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.99999999999999961e273Initial program 99.3%
Taylor expanded in d around inf
Applied rewrites99.0%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6436.0
Applied rewrites36.0%
Applied rewrites37.1%
Applied rewrites99.0%
if 4.99999999999999961e273 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 21.7%
Taylor expanded in d around inf
Applied rewrites28.5%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6428.3
Applied rewrites28.3%
Applied rewrites28.4%
Applied rewrites44.9%
Final simplification52.5%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(*
(* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
(-
1.0
(* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
(t_1 (/ d (sqrt (* l h)))))
(if (<= t_0 0.0)
t_1
(if (<= t_0 5e+273) (* (sqrt (/ d l)) (sqrt (/ d h))) (fabs t_1)))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
double t_1 = d / sqrt((l * h));
double tmp;
if (t_0 <= 0.0) {
tmp = t_1;
} else if (t_0 <= 5e+273) {
tmp = sqrt((d / l)) * sqrt((d / h));
} else {
tmp = fabs(t_1);
}
return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this 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) :: t_1
real(8) :: tmp
t_0 = (((d / h) ** (2.0d0 ** (-1.0d0))) * ((d / l) ** (2.0d0 ** (-1.0d0)))) * (1.0d0 - (((2.0d0 ** (-1.0d0)) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
t_1 = d / sqrt((l * h))
if (t_0 <= 0.0d0) then
tmp = t_1
else if (t_0 <= 5d+273) then
tmp = sqrt((d / l)) * sqrt((d / h))
else
tmp = abs(t_1)
end if
code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
double t_1 = d / Math.sqrt((l * h));
double tmp;
if (t_0 <= 0.0) {
tmp = t_1;
} else if (t_0 <= 5e+273) {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
} else {
tmp = Math.abs(t_1);
}
return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D]) def code(d, h, l, M, D): t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l))) t_1 = d / math.sqrt((l * h)) tmp = 0 if t_0 <= 0.0: tmp = t_1 elif t_0 <= 5e+273: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) else: tmp = math.fabs(t_1) return tmp
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) t_1 = Float64(d / sqrt(Float64(l * h))) tmp = 0.0 if (t_0 <= 0.0) tmp = t_1; elseif (t_0 <= 5e+273) tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); else tmp = abs(t_1); end return tmp end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
t_1 = d / sqrt((l * h));
tmp = 0.0;
if (t_0 <= 0.0)
tmp = t_1;
elseif (t_0 <= 5e+273)
tmp = sqrt((d / l)) * sqrt((d / h));
else
tmp = abs(t_1);
end
tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.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]}, Block[{t$95$1 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], t$95$1, If[LessEqual[t$95$0, 5e+273], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
t_1 := \frac{d}{\sqrt{\ell \cdot h}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+273}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1\right|\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -0.0Initial program 80.1%
Taylor expanded in d around inf
Applied rewrites5.4%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6419.2
Applied rewrites19.2%
Applied rewrites19.2%
if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.99999999999999961e273Initial program 99.3%
Taylor expanded in d around inf
Applied rewrites99.0%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6436.0
Applied rewrites36.0%
Applied rewrites37.1%
Applied rewrites99.0%
if 4.99999999999999961e273 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 21.7%
Taylor expanded in d around inf
Applied rewrites28.5%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6428.3
Applied rewrites28.3%
Applied rewrites28.4%
Applied rewrites44.9%
Final simplification51.8%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(*
(* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
(-
1.0
(* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
(t_1 (/ d (sqrt (* l h)))))
(if (<= t_0 1e-157)
t_1
(if (<= t_0 6e+142) (sqrt (* (/ d l) (/ d h))) (fabs t_1)))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
double t_1 = d / sqrt((l * h));
double tmp;
if (t_0 <= 1e-157) {
tmp = t_1;
} else if (t_0 <= 6e+142) {
tmp = sqrt(((d / l) * (d / h)));
} else {
tmp = fabs(t_1);
}
return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this 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) :: t_1
real(8) :: tmp
t_0 = (((d / h) ** (2.0d0 ** (-1.0d0))) * ((d / l) ** (2.0d0 ** (-1.0d0)))) * (1.0d0 - (((2.0d0 ** (-1.0d0)) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
t_1 = d / sqrt((l * h))
if (t_0 <= 1d-157) then
tmp = t_1
else if (t_0 <= 6d+142) then
tmp = sqrt(((d / l) * (d / h)))
else
tmp = abs(t_1)
end if
code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
double t_1 = d / Math.sqrt((l * h));
double tmp;
if (t_0 <= 1e-157) {
tmp = t_1;
} else if (t_0 <= 6e+142) {
tmp = Math.sqrt(((d / l) * (d / h)));
} else {
tmp = Math.abs(t_1);
}
return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D]) def code(d, h, l, M, D): t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l))) t_1 = d / math.sqrt((l * h)) tmp = 0 if t_0 <= 1e-157: tmp = t_1 elif t_0 <= 6e+142: tmp = math.sqrt(((d / l) * (d / h))) else: tmp = math.fabs(t_1) return tmp
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) t_1 = Float64(d / sqrt(Float64(l * h))) tmp = 0.0 if (t_0 <= 1e-157) tmp = t_1; elseif (t_0 <= 6e+142) tmp = sqrt(Float64(Float64(d / l) * Float64(d / h))); else tmp = abs(t_1); end return tmp end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
t_1 = d / sqrt((l * h));
tmp = 0.0;
if (t_0 <= 1e-157)
tmp = t_1;
elseif (t_0 <= 6e+142)
tmp = sqrt(((d / l) * (d / h)));
else
tmp = abs(t_1);
end
tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.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]}, Block[{t$95$1 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-157], t$95$1, If[LessEqual[t$95$0, 6e+142], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[t$95$1], $MachinePrecision]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
t_1 := \frac{d}{\sqrt{\ell \cdot h}}\\
\mathbf{if}\;t\_0 \leq 10^{-157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 6 \cdot 10^{+142}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\left|t\_1\right|\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.99999999999999943e-158Initial program 82.0%
Taylor expanded in d around inf
Applied rewrites14.5%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6421.2
Applied rewrites21.2%
Applied rewrites21.2%
if 9.99999999999999943e-158 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 5.99999999999999949e142Initial program 99.3%
Taylor expanded in d around inf
Applied rewrites98.8%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6436.2
Applied rewrites36.2%
Applied rewrites38.0%
Applied rewrites99.1%
if 5.99999999999999949e142 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 35.7%
Taylor expanded in d around inf
Applied rewrites41.2%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6429.1
Applied rewrites29.1%
Applied rewrites29.1%
Applied rewrites50.5%
Final simplification47.8%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ d (sqrt (* l h)))))
(if (<=
(*
(* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
(-
1.0
(* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))
-5e-159)
t_0
(fabs t_0))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = d / sqrt((l * h));
double tmp;
if (((pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))) <= -5e-159) {
tmp = t_0;
} else {
tmp = fabs(t_0);
}
return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this 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 / sqrt((l * h))
if (((((d / h) ** (2.0d0 ** (-1.0d0))) * ((d / l) ** (2.0d0 ** (-1.0d0)))) * (1.0d0 - (((2.0d0 ** (-1.0d0)) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))) <= (-5d-159)) then
tmp = t_0
else
tmp = abs(t_0)
end if
code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
double t_0 = d / Math.sqrt((l * h));
double tmp;
if (((Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))) <= -5e-159) {
tmp = t_0;
} else {
tmp = Math.abs(t_0);
}
return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D]) def code(d, h, l, M, D): t_0 = d / math.sqrt((l * h)) tmp = 0 if ((math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))) <= -5e-159: tmp = t_0 else: tmp = math.fabs(t_0) return tmp
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(d / sqrt(Float64(l * h))) tmp = 0.0 if (Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) <= -5e-159) tmp = t_0; else tmp = abs(t_0); end return tmp end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
t_0 = d / sqrt((l * h));
tmp = 0.0;
if (((((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)))) <= -5e-159)
tmp = t_0;
else
tmp = abs(t_0);
end
tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.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], -5e-159], t$95$0, N[Abs[t$95$0], $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \frac{d}{\sqrt{\ell \cdot h}}\\
\mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -5 \cdot 10^{-159}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left|t\_0\right|\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -5.00000000000000032e-159Initial program 87.6%
Taylor expanded in d around inf
Applied rewrites0.9%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6411.8
Applied rewrites11.8%
Applied rewrites11.8%
if -5.00000000000000032e-159 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 60.1%
Taylor expanded in d around inf
Applied rewrites62.9%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6435.1
Applied rewrites35.1%
Applied rewrites35.7%
Applied rewrites61.5%
Final simplification44.4%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (pow (* (* (/ D d) 0.5) M) 2.0)))
(if (<= d -1.75e-277)
(/
(* (fma (* t_0 (* -0.5 h)) (pow l -1.0) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(if (<= d -1e-310)
(/
(fma
(* -0.125 (* (* D D) (/ (* M M) d)))
(sqrt (pow (/ h l) 3.0))
(* (sqrt (/ h l)) d))
h)
(/ (/ (* (fma (* (/ h l) -0.5) t_0 1.0) d) (sqrt h)) (sqrt l))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = pow((((D / d) * 0.5) * M), 2.0);
double tmp;
if (d <= -1.75e-277) {
tmp = (fma((t_0 * (-0.5 * h)), pow(l, -1.0), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else if (d <= -1e-310) {
tmp = fma((-0.125 * ((D * D) * ((M * M) / d))), sqrt(pow((h / l), 3.0)), (sqrt((h / l)) * d)) / h;
} else {
tmp = ((fma(((h / l) * -0.5), t_0, 1.0) * d) / sqrt(h)) / sqrt(l);
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) ^ 2.0 tmp = 0.0 if (d <= -1.75e-277) tmp = Float64(Float64(fma(Float64(t_0 * Float64(-0.5 * h)), (l ^ -1.0), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= -1e-310) tmp = Float64(fma(Float64(-0.125 * Float64(Float64(D * D) * Float64(Float64(M * M) / d))), sqrt((Float64(h / l) ^ 3.0)), Float64(sqrt(Float64(h / l)) * d)) / h); else tmp = Float64(Float64(Float64(fma(Float64(Float64(h / l) * -0.5), t_0, 1.0) * d) / sqrt(h)) / sqrt(l)); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Power[N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[d, -1.75e-277], N[(N[(N[(N[(t$95$0 * N[(-0.5 * h), $MachinePrecision]), $MachinePrecision] * N[Power[l, -1.0], $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1e-310], N[(N[(N[(-0.125 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[N[(h / l), $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] + N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], N[(N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := {\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right)}^{2}\\
\mathbf{if}\;d \leq -1.75 \cdot 10^{-277}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(-0.5 \cdot h\right), {\ell}^{-1}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right), \sqrt{{\left(\frac{h}{\ell}\right)}^{3}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, t\_0, 1\right) \cdot d}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -1.74999999999999991e-277Initial program 79.4%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites75.3%
lift-/.f64N/A
metadata-eval75.3
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6484.2
Applied rewrites84.2%
Applied rewrites90.8%
lift-fma.f64N/A
lift-/.f64N/A
associate-*r/N/A
div-invN/A
unpow-1N/A
lift-pow.f64N/A
lower-fma.f64N/A
Applied rewrites91.7%
if -1.74999999999999991e-277 < d < -9.999999999999969e-311Initial program 26.9%
Taylor expanded in d around inf
Applied rewrites14.0%
Taylor expanded in h around 0
lower-/.f64N/A
Applied rewrites50.4%
if -9.999999999999969e-311 < d Initial program 62.7%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6469.3
Applied rewrites69.3%
lift-/.f64N/A
metadata-eval69.3
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6476.1
Applied rewrites76.1%
Applied rewrites78.9%
Final simplification84.1%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= d -2.25e-277)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(if (<= d -1e-310)
(/
(fma
(* -0.125 (* (* D D) (/ (* M M) d)))
(sqrt (pow (/ h l) 3.0))
(* (sqrt (/ h l)) d))
h)
(/
(/ (* (fma (* (/ h l) -0.5) (pow t_0 2.0) 1.0) d) (sqrt h))
(sqrt l))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (d <= -2.25e-277) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else if (d <= -1e-310) {
tmp = fma((-0.125 * ((D * D) * ((M * M) / d))), sqrt(pow((h / l), 3.0)), (sqrt((h / l)) * d)) / h;
} else {
tmp = ((fma(((h / l) * -0.5), pow(t_0, 2.0), 1.0) * d) / sqrt(h)) / sqrt(l);
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (d <= -2.25e-277) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= -1e-310) tmp = Float64(fma(Float64(-0.125 * Float64(Float64(D * D) * Float64(Float64(M * M) / d))), sqrt((Float64(h / l) ^ 3.0)), Float64(sqrt(Float64(h / l)) * d)) / h); else tmp = Float64(Float64(Float64(fma(Float64(Float64(h / l) * -0.5), (t_0 ^ 2.0), 1.0) * d) / sqrt(h)) / sqrt(l)); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -2.25e-277], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1e-310], N[(N[(N[(-0.125 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[N[(h / l), $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] + N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], N[(N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * N[Power[t$95$0, 2.0], $MachinePrecision] + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;d \leq -2.25 \cdot 10^{-277}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right), \sqrt{{\left(\frac{h}{\ell}\right)}^{3}}, \sqrt{\frac{h}{\ell}} \cdot d\right)}{h}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, {t\_0}^{2}, 1\right) \cdot d}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -2.24999999999999996e-277Initial program 79.4%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites75.3%
lift-/.f64N/A
metadata-eval75.3
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6484.2
Applied rewrites84.2%
Applied rewrites90.8%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites90.8%
if -2.24999999999999996e-277 < d < -9.999999999999969e-311Initial program 26.9%
Taylor expanded in d around inf
Applied rewrites14.0%
Taylor expanded in h around 0
lower-/.f64N/A
Applied rewrites50.4%
if -9.999999999999969e-311 < d Initial program 62.7%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6469.3
Applied rewrites69.3%
lift-/.f64N/A
metadata-eval69.3
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6476.1
Applied rewrites76.1%
Applied rewrites78.9%
Final simplification83.7%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (pow (* (* (/ D d) 0.5) M) 2.0)))
(if (<= l -4e-310)
(/ (* (fma (* -0.5 t_0) (/ h l) 1.0) (/ (- d) (sqrt (- l)))) (sqrt (- h)))
(/ (/ (* (fma (* (/ h l) -0.5) t_0 1.0) d) (sqrt h)) (sqrt l)))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = pow((((D / d) * 0.5) * M), 2.0);
double tmp;
if (l <= -4e-310) {
tmp = (fma((-0.5 * t_0), (h / l), 1.0) * (-d / sqrt(-l))) / sqrt(-h);
} else {
tmp = ((fma(((h / l) * -0.5), t_0, 1.0) * d) / sqrt(h)) / sqrt(l);
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) ^ 2.0 tmp = 0.0 if (l <= -4e-310) tmp = Float64(Float64(fma(Float64(-0.5 * t_0), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-l)))) / sqrt(Float64(-h))); else tmp = Float64(Float64(Float64(fma(Float64(Float64(h / l) * -0.5), t_0, 1.0) * d) / sqrt(h)) / sqrt(l)); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Power[N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[l, -4e-310], N[(N[(N[(N[(-0.5 * t$95$0), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := {\left(\left(\frac{D}{d} \cdot 0.5\right) \cdot M\right)}^{2}\\
\mathbf{if}\;\ell \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.5 \cdot t\_0, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-\ell}}}{\sqrt{-h}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, t\_0, 1\right) \cdot d}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -3.999999999999988e-310Initial program 76.2%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites71.6%
lift-/.f64N/A
metadata-eval71.6
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6479.9
Applied rewrites79.9%
Applied rewrites87.8%
if -3.999999999999988e-310 < l Initial program 62.7%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6469.3
Applied rewrites69.3%
lift-/.f64N/A
metadata-eval69.3
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6476.1
Applied rewrites76.1%
Applied rewrites78.9%
Final simplification83.4%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= d -7.4e-302)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(/
(/ (* (fma (* (/ h l) -0.5) (pow t_0 2.0) 1.0) d) (sqrt h))
(sqrt l)))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (d <= -7.4e-302) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else {
tmp = ((fma(((h / l) * -0.5), pow(t_0, 2.0), 1.0) * d) / sqrt(h)) / sqrt(l);
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (d <= -7.4e-302) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); else tmp = Float64(Float64(Float64(fma(Float64(Float64(h / l) * -0.5), (t_0 ^ 2.0), 1.0) * d) / sqrt(h)) / sqrt(l)); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -7.4e-302], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * N[Power[t$95$0, 2.0], $MachinePrecision] + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;d \leq -7.4 \cdot 10^{-302}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, {t\_0}^{2}, 1\right) \cdot d}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -7.4e-302Initial program 76.8%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites72.1%
lift-/.f64N/A
metadata-eval72.1
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6480.5
Applied rewrites80.5%
Applied rewrites87.6%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites87.6%
if -7.4e-302 < d Initial program 62.2%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6468.7
Applied rewrites68.7%
lift-/.f64N/A
metadata-eval68.7
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6475.5
Applied rewrites75.5%
Applied rewrites78.3%
Final simplification83.0%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= l -4e-310)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(/
(* (fma (* (/ h l) -0.5) (pow t_0 2.0) 1.0) (/ d (sqrt l)))
(sqrt h)))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (l <= -4e-310) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else {
tmp = (fma(((h / l) * -0.5), pow(t_0, 2.0), 1.0) * (d / sqrt(l))) / sqrt(h);
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (l <= -4e-310) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); else tmp = Float64(Float64(fma(Float64(Float64(h / l) * -0.5), (t_0 ^ 2.0), 1.0) * Float64(d / sqrt(l))) / sqrt(h)); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[l, -4e-310], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * N[Power[t$95$0, 2.0], $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;\ell \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, {t\_0}^{2}, 1\right) \cdot \frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -3.999999999999988e-310Initial program 76.2%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites71.6%
lift-/.f64N/A
metadata-eval71.6
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6479.9
Applied rewrites79.9%
Applied rewrites86.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites86.9%
if -3.999999999999988e-310 < l Initial program 62.7%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6469.3
Applied rewrites69.3%
lift-/.f64N/A
metadata-eval69.3
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6476.1
Applied rewrites76.1%
Applied rewrites77.2%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= l -4e-310)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(/
(* (fma (* (/ h l) -0.5) (pow t_0 2.0) 1.0) (/ d (sqrt h)))
(sqrt l)))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (l <= -4e-310) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else {
tmp = (fma(((h / l) * -0.5), pow(t_0, 2.0), 1.0) * (d / sqrt(h))) / sqrt(l);
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (l <= -4e-310) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); else tmp = Float64(Float64(fma(Float64(Float64(h / l) * -0.5), (t_0 ^ 2.0), 1.0) * Float64(d / sqrt(h))) / sqrt(l)); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[l, -4e-310], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * N[Power[t$95$0, 2.0], $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;\ell \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, {t\_0}^{2}, 1\right) \cdot \frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -3.999999999999988e-310Initial program 76.2%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites71.6%
lift-/.f64N/A
metadata-eval71.6
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6479.9
Applied rewrites79.9%
Applied rewrites86.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites86.9%
if -3.999999999999988e-310 < l Initial program 62.7%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6469.3
Applied rewrites69.3%
lift-/.f64N/A
metadata-eval69.3
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6476.1
Applied rewrites76.1%
Applied rewrites75.4%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= h -2.6e-301)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(if (<= h 3.2e+186)
(/ (* (fma (* (/ h l) -0.5) (pow t_0 2.0) 1.0) d) (sqrt (* l h)))
(*
(* (/ (sqrt d) (sqrt h)) (/ (sqrt d) (sqrt l)))
(/ (fma (/ (* (* (* M M) h) (* D D)) (* d d)) -0.125 l) l))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (h <= -2.6e-301) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else if (h <= 3.2e+186) {
tmp = (fma(((h / l) * -0.5), pow(t_0, 2.0), 1.0) * d) / sqrt((l * h));
} else {
tmp = ((sqrt(d) / sqrt(h)) * (sqrt(d) / sqrt(l))) * (fma(((((M * M) * h) * (D * D)) / (d * d)), -0.125, l) / l);
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (h <= -2.6e-301) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); elseif (h <= 3.2e+186) tmp = Float64(Float64(fma(Float64(Float64(h / l) * -0.5), (t_0 ^ 2.0), 1.0) * d) / sqrt(Float64(l * h))); else tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(d) / sqrt(l))) * Float64(fma(Float64(Float64(Float64(Float64(M * M) * h) * Float64(D * D)) / Float64(d * d)), -0.125, l) / l)); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[h, -2.6e-301], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 3.2e+186], N[(N[(N[(N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] * N[Power[t$95$0, 2.0], $MachinePrecision] + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * -0.125 + l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;h \leq -2.6 \cdot 10^{-301}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;h \leq 3.2 \cdot 10^{+186}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{h}{\ell} \cdot -0.5, {t\_0}^{2}, 1\right) \cdot d}{\sqrt{\ell \cdot h}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}\\
\end{array}
\end{array}
if h < -2.5999999999999998e-301Initial program 76.8%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites72.1%
lift-/.f64N/A
metadata-eval72.1
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6480.5
Applied rewrites80.5%
Applied rewrites87.6%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites87.6%
if -2.5999999999999998e-301 < h < 3.1999999999999999e186Initial program 65.3%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6473.2
Applied rewrites73.2%
lift-/.f64N/A
metadata-eval73.2
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6477.7
Applied rewrites77.7%
Applied rewrites74.6%
if 3.1999999999999999e186 < h Initial program 48.3%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6448.2
Applied rewrites48.2%
lift-/.f64N/A
metadata-eval48.2
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6465.4
Applied rewrites65.4%
Taylor expanded in l around 0
metadata-evalN/A
cancel-sign-sub-invN/A
lower-/.f64N/A
Applied rewrites61.0%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= d -5.6e-300)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(if (<= d 9e-190)
(* (* -0.125 (* (* D D) (/ (* M M) d))) (sqrt (/ h (pow l 3.0))))
(if (<= d 2.8e+70)
(*
(* (/ (sqrt d) (sqrt h)) (/ (sqrt d) (sqrt l)))
(/ (fma (* (* D D) (/ (* (* M M) h) l)) -0.125 (* d d)) (* d d)))
(* (/ (pow l -0.5) (sqrt h)) d))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (d <= -5.6e-300) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else if (d <= 9e-190) {
tmp = (-0.125 * ((D * D) * ((M * M) / d))) * sqrt((h / pow(l, 3.0)));
} else if (d <= 2.8e+70) {
tmp = ((sqrt(d) / sqrt(h)) * (sqrt(d) / sqrt(l))) * (fma(((D * D) * (((M * M) * h) / l)), -0.125, (d * d)) / (d * d));
} else {
tmp = (pow(l, -0.5) / sqrt(h)) * d;
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (d <= -5.6e-300) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= 9e-190) tmp = Float64(Float64(-0.125 * Float64(Float64(D * D) * Float64(Float64(M * M) / d))) * sqrt(Float64(h / (l ^ 3.0)))); elseif (d <= 2.8e+70) tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(d) / sqrt(l))) * Float64(fma(Float64(Float64(D * D) * Float64(Float64(Float64(M * M) * h) / l)), -0.125, Float64(d * d)) / Float64(d * d))); else tmp = Float64(Float64((l ^ -0.5) / sqrt(h)) * d); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -5.6e-300], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9e-190], N[(N[(-0.125 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.8e+70], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(D * D), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * -0.125 + N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l, -0.5], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq 9 \cdot 10^{-190}:\\
\;\;\;\;\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}\\
\mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\
\;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}, -0.125, d \cdot d\right)}{d \cdot d}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\
\end{array}
\end{array}
if d < -5.59999999999999988e-300Initial program 77.7%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites73.8%
lift-/.f64N/A
metadata-eval73.8
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6482.4
Applied rewrites82.4%
Applied rewrites88.8%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites88.8%
if -5.59999999999999988e-300 < d < 9.00000000000000042e-190Initial program 16.6%
Taylor expanded in d around inf
Applied rewrites13.4%
Taylor expanded in d around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-pow.f6423.5
Applied rewrites23.5%
if 9.00000000000000042e-190 < d < 2.7999999999999999e70Initial program 73.3%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6477.9
Applied rewrites77.9%
lift-/.f64N/A
metadata-eval77.9
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6481.1
Applied rewrites81.1%
Taylor expanded in d around 0
cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-/.f64N/A
Applied rewrites77.7%
if 2.7999999999999999e70 < d Initial program 73.6%
Taylor expanded in d around inf
Applied rewrites58.2%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6466.1
Applied rewrites66.1%
Applied rewrites77.0%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= d -5.6e-300)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(if (<= d 1.9e-196)
(pow (/ (sqrt (* l h)) d) -1.0)
(if (<= d 2.8e+70)
(*
(* (/ (sqrt d) (sqrt h)) (/ (sqrt d) (sqrt l)))
(/ (fma (* (* D D) (/ (* (* M M) h) l)) -0.125 (* d d)) (* d d)))
(* (/ (pow l -0.5) (sqrt h)) d))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (d <= -5.6e-300) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else if (d <= 1.9e-196) {
tmp = pow((sqrt((l * h)) / d), -1.0);
} else if (d <= 2.8e+70) {
tmp = ((sqrt(d) / sqrt(h)) * (sqrt(d) / sqrt(l))) * (fma(((D * D) * (((M * M) * h) / l)), -0.125, (d * d)) / (d * d));
} else {
tmp = (pow(l, -0.5) / sqrt(h)) * d;
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (d <= -5.6e-300) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= 1.9e-196) tmp = Float64(sqrt(Float64(l * h)) / d) ^ -1.0; elseif (d <= 2.8e+70) tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(d) / sqrt(l))) * Float64(fma(Float64(Float64(D * D) * Float64(Float64(Float64(M * M) * h) / l)), -0.125, Float64(d * d)) / Float64(d * d))); else tmp = Float64(Float64((l ^ -0.5) / sqrt(h)) * d); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -5.6e-300], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.9e-196], N[Power[N[(N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision] / d), $MachinePrecision], -1.0], $MachinePrecision], If[LessEqual[d, 2.8e+70], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(D * D), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * -0.125 + N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l, -0.5], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\
\;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\
\mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\
\;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\left(D \cdot D\right) \cdot \frac{\left(M \cdot M\right) \cdot h}{\ell}, -0.125, d \cdot d\right)}{d \cdot d}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\
\end{array}
\end{array}
if d < -5.59999999999999988e-300Initial program 77.7%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites73.8%
lift-/.f64N/A
metadata-eval73.8
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6482.4
Applied rewrites82.4%
Applied rewrites88.8%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites88.8%
if -5.59999999999999988e-300 < d < 1.9000000000000001e-196Initial program 14.2%
Taylor expanded in d around inf
Applied rewrites14.7%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6426.4
Applied rewrites26.4%
Applied rewrites26.4%
Applied rewrites26.4%
if 1.9000000000000001e-196 < d < 2.7999999999999999e70Initial program 71.4%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6475.9
Applied rewrites75.9%
lift-/.f64N/A
metadata-eval75.9
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6480.5
Applied rewrites80.5%
Taylor expanded in d around 0
cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-/.f64N/A
Applied rewrites75.6%
if 2.7999999999999999e70 < d Initial program 73.6%
Taylor expanded in d around inf
Applied rewrites58.2%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6466.1
Applied rewrites66.1%
Applied rewrites77.0%
Final simplification77.7%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= d -5.6e-300)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(if (<= d 1.9e-196)
(pow (/ (sqrt (* l h)) d) -1.0)
(if (<= d 2.8e+70)
(*
(* (/ (sqrt d) (sqrt h)) (/ (sqrt d) (sqrt l)))
(/ (fma (/ (* (* (* M M) h) (* D D)) (* d d)) -0.125 l) l))
(* (/ (pow l -0.5) (sqrt h)) d))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (d <= -5.6e-300) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else if (d <= 1.9e-196) {
tmp = pow((sqrt((l * h)) / d), -1.0);
} else if (d <= 2.8e+70) {
tmp = ((sqrt(d) / sqrt(h)) * (sqrt(d) / sqrt(l))) * (fma(((((M * M) * h) * (D * D)) / (d * d)), -0.125, l) / l);
} else {
tmp = (pow(l, -0.5) / sqrt(h)) * d;
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (d <= -5.6e-300) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= 1.9e-196) tmp = Float64(sqrt(Float64(l * h)) / d) ^ -1.0; elseif (d <= 2.8e+70) tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(d) / sqrt(l))) * Float64(fma(Float64(Float64(Float64(Float64(M * M) * h) * Float64(D * D)) / Float64(d * d)), -0.125, l) / l)); else tmp = Float64(Float64((l ^ -0.5) / sqrt(h)) * d); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -5.6e-300], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.9e-196], N[Power[N[(N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision] / d), $MachinePrecision], -1.0], $MachinePrecision], If[LessEqual[d, 2.8e+70], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * -0.125 + l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l, -0.5], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\
\;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\
\mathbf{elif}\;d \leq 2.8 \cdot 10^{+70}:\\
\;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{-0.5}}{\sqrt{h}} \cdot d\\
\end{array}
\end{array}
if d < -5.59999999999999988e-300Initial program 77.7%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites73.8%
lift-/.f64N/A
metadata-eval73.8
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6482.4
Applied rewrites82.4%
Applied rewrites88.8%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites88.8%
if -5.59999999999999988e-300 < d < 1.9000000000000001e-196Initial program 14.2%
Taylor expanded in d around inf
Applied rewrites14.7%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6426.4
Applied rewrites26.4%
Applied rewrites26.4%
Applied rewrites26.4%
if 1.9000000000000001e-196 < d < 2.7999999999999999e70Initial program 71.4%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6475.9
Applied rewrites75.9%
lift-/.f64N/A
metadata-eval75.9
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6480.5
Applied rewrites80.5%
Taylor expanded in l around 0
metadata-evalN/A
cancel-sign-sub-invN/A
lower-/.f64N/A
Applied rewrites71.0%
if 2.7999999999999999e70 < d Initial program 73.6%
Taylor expanded in d around inf
Applied rewrites58.2%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6466.1
Applied rewrites66.1%
Applied rewrites77.0%
Final simplification76.6%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= d -5.6e-300)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(if (<= d 1.9e-196)
(pow (/ (sqrt (* l h)) d) -1.0)
(if (<= d 3e+70)
(*
(* (/ (sqrt d) (sqrt h)) (/ (sqrt d) (sqrt l)))
(/ (fma (/ (* (* (* M M) h) (* D D)) (* d d)) -0.125 l) l))
(/ d (* (sqrt l) (sqrt h))))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (d <= -5.6e-300) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else if (d <= 1.9e-196) {
tmp = pow((sqrt((l * h)) / d), -1.0);
} else if (d <= 3e+70) {
tmp = ((sqrt(d) / sqrt(h)) * (sqrt(d) / sqrt(l))) * (fma(((((M * M) * h) * (D * D)) / (d * d)), -0.125, l) / l);
} else {
tmp = d / (sqrt(l) * sqrt(h));
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (d <= -5.6e-300) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= 1.9e-196) tmp = Float64(sqrt(Float64(l * h)) / d) ^ -1.0; elseif (d <= 3e+70) tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * Float64(sqrt(d) / sqrt(l))) * Float64(fma(Float64(Float64(Float64(Float64(M * M) * h) * Float64(D * D)) / Float64(d * d)), -0.125, l) / l)); else tmp = Float64(d / Float64(sqrt(l) * sqrt(h))); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[d, -5.6e-300], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.9e-196], N[Power[N[(N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision] / d), $MachinePrecision], -1.0], $MachinePrecision], If[LessEqual[d, 3e+70], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * -0.125 + l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;d \leq -5.6 \cdot 10^{-300}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq 1.9 \cdot 10^{-196}:\\
\;\;\;\;{\left(\frac{\sqrt{\ell \cdot h}}{d}\right)}^{-1}\\
\mathbf{elif}\;d \leq 3 \cdot 10^{+70}:\\
\;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{d \cdot d}, -0.125, \ell\right)}{\ell}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
\end{array}
\end{array}
if d < -5.59999999999999988e-300Initial program 77.7%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites73.8%
lift-/.f64N/A
metadata-eval73.8
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6482.4
Applied rewrites82.4%
Applied rewrites88.8%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites88.8%
if -5.59999999999999988e-300 < d < 1.9000000000000001e-196Initial program 14.2%
Taylor expanded in d around inf
Applied rewrites14.7%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6426.4
Applied rewrites26.4%
Applied rewrites26.4%
Applied rewrites26.4%
if 1.9000000000000001e-196 < d < 2.99999999999999976e70Initial program 71.4%
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6475.9
Applied rewrites75.9%
lift-/.f64N/A
metadata-eval75.9
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
lower-sqrt.f6480.5
Applied rewrites80.5%
Taylor expanded in l around 0
metadata-evalN/A
cancel-sign-sub-invN/A
lower-/.f64N/A
Applied rewrites71.0%
if 2.99999999999999976e70 < d Initial program 73.6%
Taylor expanded in d around inf
Applied rewrites58.2%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6466.1
Applied rewrites66.1%
Applied rewrites66.1%
Applied rewrites76.8%
Final simplification76.6%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(if (<= l -8.6e-188)
(fabs (/ d (sqrt (* l h))))
(if (<= l 1.75e-301)
(* (sqrt (pow (* l h) -1.0)) d)
(/ d (* (sqrt l) (sqrt h))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -8.6e-188) {
tmp = fabs((d / sqrt((l * h))));
} else if (l <= 1.75e-301) {
tmp = sqrt(pow((l * h), -1.0)) * d;
} else {
tmp = d / (sqrt(l) * sqrt(h));
}
return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this 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) :: tmp
if (l <= (-8.6d-188)) then
tmp = abs((d / sqrt((l * h))))
else if (l <= 1.75d-301) then
tmp = sqrt(((l * h) ** (-1.0d0))) * d
else
tmp = d / (sqrt(l) * sqrt(h))
end if
code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -8.6e-188) {
tmp = Math.abs((d / Math.sqrt((l * h))));
} else if (l <= 1.75e-301) {
tmp = Math.sqrt(Math.pow((l * h), -1.0)) * d;
} else {
tmp = d / (Math.sqrt(l) * Math.sqrt(h));
}
return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D]) def code(d, h, l, M, D): tmp = 0 if l <= -8.6e-188: tmp = math.fabs((d / math.sqrt((l * h)))) elif l <= 1.75e-301: tmp = math.sqrt(math.pow((l * h), -1.0)) * d else: tmp = d / (math.sqrt(l) * math.sqrt(h)) return tmp
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) tmp = 0.0 if (l <= -8.6e-188) tmp = abs(Float64(d / sqrt(Float64(l * h)))); elseif (l <= 1.75e-301) tmp = Float64(sqrt((Float64(l * h) ^ -1.0)) * d); else tmp = Float64(d / Float64(sqrt(l) * sqrt(h))); end return tmp end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
tmp = 0.0;
if (l <= -8.6e-188)
tmp = abs((d / sqrt((l * h))));
elseif (l <= 1.75e-301)
tmp = sqrt(((l * h) ^ -1.0)) * d;
else
tmp = d / (sqrt(l) * sqrt(h));
end
tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function. code[d_, h_, l_, M_, D_] := If[LessEqual[l, -8.6e-188], N[Abs[N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.75e-301], N[(N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -8.6 \cdot 10^{-188}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\ell \cdot h}}\right|\\
\mathbf{elif}\;\ell \leq 1.75 \cdot 10^{-301}:\\
\;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
\end{array}
\end{array}
if l < -8.59999999999999975e-188Initial program 76.0%
Taylor expanded in d around inf
Applied rewrites46.7%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f647.0
Applied rewrites7.0%
Applied rewrites7.0%
Applied rewrites40.8%
if -8.59999999999999975e-188 < l < 1.74999999999999996e-301Initial program 74.2%
Taylor expanded in d around inf
Applied rewrites11.7%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6439.4
Applied rewrites39.4%
if 1.74999999999999996e-301 < l Initial program 62.9%
Taylor expanded in d around inf
Applied rewrites41.6%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6443.5
Applied rewrites43.5%
Applied rewrites44.3%
Applied rewrites52.7%
Final simplification46.4%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* (/ D d) 0.5) M)))
(if (<= l -4e-310)
(/
(* (fma (* t_0 (* t_0 -0.5)) (/ h l) 1.0) (/ (- d) (sqrt (- h))))
(sqrt (- l)))
(/ d (* (sqrt l) (sqrt h))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = ((D / d) * 0.5) * M;
double tmp;
if (l <= -4e-310) {
tmp = (fma((t_0 * (t_0 * -0.5)), (h / l), 1.0) * (-d / sqrt(-h))) / sqrt(-l);
} else {
tmp = d / (sqrt(l) * sqrt(h));
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(D / d) * 0.5) * M) tmp = 0.0 if (l <= -4e-310) tmp = Float64(Float64(fma(Float64(t_0 * Float64(t_0 * -0.5)), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(-h)))) / sqrt(Float64(-l))); else tmp = Float64(d / Float64(sqrt(l) * sqrt(h))); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] * 0.5), $MachinePrecision] * M), $MachinePrecision]}, If[LessEqual[l, -4e-310], N[(N[(N[(N[(t$95$0 * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\frac{D}{d} \cdot 0.5\right) \cdot M\\
\mathbf{if}\;\ell \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t\_0 \cdot \left(t\_0 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{-h}}}{\sqrt{-\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
\end{array}
\end{array}
if l < -3.999999999999988e-310Initial program 76.2%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites71.6%
lift-/.f64N/A
metadata-eval71.6
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6479.9
Applied rewrites79.9%
Applied rewrites86.9%
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
div-invN/A
lift-/.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites86.9%
if -3.999999999999988e-310 < l Initial program 62.7%
Taylor expanded in d around inf
Applied rewrites41.0%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6443.6
Applied rewrites43.6%
Applied rewrites44.4%
Applied rewrites52.6%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (- h))) (t_1 (sqrt (- l))))
(if (<= d -1.2e+142)
(/ (* (/ (- d) t_1) 1.0) t_0)
(if (<= d -7.4e-302)
(/
(*
(fma (* (/ (* (* M M) (* D D)) (* d d)) -0.125) (/ h l) 1.0)
(/ d t_0))
(- t_1))
(/ d (* (sqrt l) (sqrt h)))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(-h);
double t_1 = sqrt(-l);
double tmp;
if (d <= -1.2e+142) {
tmp = ((-d / t_1) * 1.0) / t_0;
} else if (d <= -7.4e-302) {
tmp = (fma(((((M * M) * (D * D)) / (d * d)) * -0.125), (h / l), 1.0) * (d / t_0)) / -t_1;
} else {
tmp = d / (sqrt(l) * sqrt(h));
}
return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) t_0 = sqrt(Float64(-h)) t_1 = sqrt(Float64(-l)) tmp = 0.0 if (d <= -1.2e+142) tmp = Float64(Float64(Float64(Float64(-d) / t_1) * 1.0) / t_0); elseif (d <= -7.4e-302) tmp = Float64(Float64(fma(Float64(Float64(Float64(Float64(M * M) * Float64(D * D)) / Float64(d * d)) * -0.125), Float64(h / l), 1.0) * Float64(d / t_0)) / Float64(-t_1)); else tmp = Float64(d / Float64(sqrt(l) * sqrt(h))); end return tmp end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[(-h)], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[(-l)], $MachinePrecision]}, If[LessEqual[d, -1.2e+142], N[(N[(N[((-d) / t$95$1), $MachinePrecision] * 1.0), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[d, -7.4e-302], N[(N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / t$95$0), $MachinePrecision]), $MachinePrecision] / (-t$95$1)), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \sqrt{-h}\\
t_1 := \sqrt{-\ell}\\
\mathbf{if}\;d \leq -1.2 \cdot 10^{+142}:\\
\;\;\;\;\frac{\frac{-d}{t\_1} \cdot 1}{t\_0}\\
\mathbf{elif}\;d \leq -7.4 \cdot 10^{-302}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \frac{d}{t\_0}}{-t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
\end{array}
\end{array}
if d < -1.2e142Initial program 91.0%
Taylor expanded in d around inf
Applied rewrites64.9%
lift-/.f64N/A
metadata-eval64.9
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6467.7
Applied rewrites67.7%
Applied rewrites73.3%
if -1.2e142 < d < -7.4e-302Initial program 71.7%
lift-*.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites68.2%
lift-/.f64N/A
metadata-eval68.2
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6477.6
Applied rewrites77.6%
Applied rewrites84.3%
Taylor expanded in d around 0
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.9
Applied rewrites64.9%
if -7.4e-302 < d Initial program 62.2%
Taylor expanded in d around inf
Applied rewrites40.7%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6443.3
Applied rewrites43.3%
Applied rewrites44.1%
Applied rewrites52.2%
Final simplification59.7%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
:precision binary64
(if (<= l -6.4e-160)
(* (/ (- d) (* (sqrt (- l)) (sqrt (- h)))) 1.0)
(if (<= l -4e-310)
(/ d (sqrt (* (sqrt (* (fabs h) (* l l))) (sqrt (fabs h)))))
(/ d (* (sqrt l) (sqrt h))))))assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -6.4e-160) {
tmp = (-d / (sqrt(-l) * sqrt(-h))) * 1.0;
} else if (l <= -4e-310) {
tmp = d / sqrt((sqrt((fabs(h) * (l * l))) * sqrt(fabs(h))));
} else {
tmp = d / (sqrt(l) * sqrt(h));
}
return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this 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) :: tmp
if (l <= (-6.4d-160)) then
tmp = (-d / (sqrt(-l) * sqrt(-h))) * 1.0d0
else if (l <= (-4d-310)) then
tmp = d / sqrt((sqrt((abs(h) * (l * l))) * sqrt(abs(h))))
else
tmp = d / (sqrt(l) * sqrt(h))
end if
code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -6.4e-160) {
tmp = (-d / (Math.sqrt(-l) * Math.sqrt(-h))) * 1.0;
} else if (l <= -4e-310) {
tmp = d / Math.sqrt((Math.sqrt((Math.abs(h) * (l * l))) * Math.sqrt(Math.abs(h))));
} else {
tmp = d / (Math.sqrt(l) * Math.sqrt(h));
}
return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D]) def code(d, h, l, M, D): tmp = 0 if l <= -6.4e-160: tmp = (-d / (math.sqrt(-l) * math.sqrt(-h))) * 1.0 elif l <= -4e-310: tmp = d / math.sqrt((math.sqrt((math.fabs(h) * (l * l))) * math.sqrt(math.fabs(h)))) else: tmp = d / (math.sqrt(l) * math.sqrt(h)) return tmp
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) tmp = 0.0 if (l <= -6.4e-160) tmp = Float64(Float64(Float64(-d) / Float64(sqrt(Float64(-l)) * sqrt(Float64(-h)))) * 1.0); elseif (l <= -4e-310) tmp = Float64(d / sqrt(Float64(sqrt(Float64(abs(h) * Float64(l * l))) * sqrt(abs(h))))); else tmp = Float64(d / Float64(sqrt(l) * sqrt(h))); end return tmp end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
tmp = 0.0;
if (l <= -6.4e-160)
tmp = (-d / (sqrt(-l) * sqrt(-h))) * 1.0;
elseif (l <= -4e-310)
tmp = d / sqrt((sqrt((abs(h) * (l * l))) * sqrt(abs(h))));
else
tmp = d / (sqrt(l) * sqrt(h));
end
tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function. code[d_, h_, l_, M_, D_] := If[LessEqual[l, -6.4e-160], N[(N[((-d) / N[(N[Sqrt[(-l)], $MachinePrecision] * N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[l, -4e-310], N[(d / N[Sqrt[N[(N[Sqrt[N[(N[Abs[h], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Abs[h], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6.4 \cdot 10^{-160}:\\
\;\;\;\;\frac{-d}{\sqrt{-\ell} \cdot \sqrt{-h}} \cdot 1\\
\mathbf{elif}\;\ell \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{d}{\sqrt{\sqrt{\left|h\right| \cdot \left(\ell \cdot \ell\right)} \cdot \sqrt{\left|h\right|}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
\end{array}
\end{array}
if l < -6.40000000000000018e-160Initial program 78.5%
Taylor expanded in d around inf
Applied rewrites48.7%
lift-/.f64N/A
metadata-eval48.7
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6450.5
Applied rewrites50.5%
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
frac-2negN/A
lift-/.f64N/A
metadata-evalN/A
lift-pow.f64N/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
lift-neg.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
frac-2negN/A
frac-timesN/A
Applied rewrites53.9%
if -6.40000000000000018e-160 < l < -3.999999999999988e-310Initial program 64.6%
Taylor expanded in d around inf
Applied rewrites10.1%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6429.9
Applied rewrites29.9%
Applied rewrites29.9%
Applied rewrites64.7%
if -3.999999999999988e-310 < l Initial program 62.7%
Taylor expanded in d around inf
Applied rewrites41.0%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6443.6
Applied rewrites43.6%
Applied rewrites44.4%
Applied rewrites52.6%
Final simplification54.2%
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function. (FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
return d / sqrt((l * h));
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this 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
code = d / sqrt((l * h))
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
return d / Math.sqrt((l * h));
}
[d, h, l, M, D] = sort([d, h, l, M, D]) def code(d, h, l, M, D): return d / math.sqrt((l * h))
d, h, l, M, D = sort([d, h, l, M, D]) function code(d, h, l, M, D) return Float64(d / sqrt(Float64(l * h))) end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp = code(d, h, l, M, D)
tmp = d / sqrt((l * h));
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function. code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\frac{d}{\sqrt{\ell \cdot h}}
\end{array}
Initial program 69.5%
Taylor expanded in d around inf
Applied rewrites41.6%
Taylor expanded in d around inf
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6427.1
Applied rewrites27.1%
Applied rewrites27.5%
herbie shell --seed 2024305
(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)))))