
(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}
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(+ 1.0 (* (/ h (/ d (/ (* M D) 2.0))) (/ (* -0.25 (/ (* M D) d)) l))))
(t_1 (* (pow (/ d l) 0.5) t_0))
(t_2 (pow (/ d h) 0.5))
(t_3 (sqrt (- 0.0 d))))
(if (<= h -5.2e+125)
(* (/ t_3 (pow (- 0.0 h) 0.5)) t_1)
(if (<= h -4e-310)
(* t_2 (* t_0 (/ t_3 (pow (- 0.0 l) 0.5))))
(if (<= h 7.2e+123)
(* t_2 (* t_0 (/ (sqrt d) (sqrt l))))
(* t_1 (/ (sqrt d) (sqrt h))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l));
double t_1 = pow((d / l), 0.5) * t_0;
double t_2 = pow((d / h), 0.5);
double t_3 = sqrt((0.0 - d));
double tmp;
if (h <= -5.2e+125) {
tmp = (t_3 / pow((0.0 - h), 0.5)) * t_1;
} else if (h <= -4e-310) {
tmp = t_2 * (t_0 * (t_3 / pow((0.0 - l), 0.5)));
} else if (h <= 7.2e+123) {
tmp = t_2 * (t_0 * (sqrt(d) / sqrt(l)));
} else {
tmp = t_1 * (sqrt(d) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = 1.0d0 + ((h / (d / ((m * d_1) / 2.0d0))) * (((-0.25d0) * ((m * d_1) / d)) / l))
t_1 = ((d / l) ** 0.5d0) * t_0
t_2 = (d / h) ** 0.5d0
t_3 = sqrt((0.0d0 - d))
if (h <= (-5.2d+125)) then
tmp = (t_3 / ((0.0d0 - h) ** 0.5d0)) * t_1
else if (h <= (-4d-310)) then
tmp = t_2 * (t_0 * (t_3 / ((0.0d0 - l) ** 0.5d0)))
else if (h <= 7.2d+123) then
tmp = t_2 * (t_0 * (sqrt(d) / sqrt(l)))
else
tmp = t_1 * (sqrt(d) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l));
double t_1 = Math.pow((d / l), 0.5) * t_0;
double t_2 = Math.pow((d / h), 0.5);
double t_3 = Math.sqrt((0.0 - d));
double tmp;
if (h <= -5.2e+125) {
tmp = (t_3 / Math.pow((0.0 - h), 0.5)) * t_1;
} else if (h <= -4e-310) {
tmp = t_2 * (t_0 * (t_3 / Math.pow((0.0 - l), 0.5)));
} else if (h <= 7.2e+123) {
tmp = t_2 * (t_0 * (Math.sqrt(d) / Math.sqrt(l)));
} else {
tmp = t_1 * (Math.sqrt(d) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l)) t_1 = math.pow((d / l), 0.5) * t_0 t_2 = math.pow((d / h), 0.5) t_3 = math.sqrt((0.0 - d)) tmp = 0 if h <= -5.2e+125: tmp = (t_3 / math.pow((0.0 - h), 0.5)) * t_1 elif h <= -4e-310: tmp = t_2 * (t_0 * (t_3 / math.pow((0.0 - l), 0.5))) elif h <= 7.2e+123: tmp = t_2 * (t_0 * (math.sqrt(d) / math.sqrt(l))) else: tmp = t_1 * (math.sqrt(d) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) t_0 = Float64(1.0 + Float64(Float64(h / Float64(d / Float64(Float64(M * D) / 2.0))) * Float64(Float64(-0.25 * Float64(Float64(M * D) / d)) / l))) t_1 = Float64((Float64(d / l) ^ 0.5) * t_0) t_2 = Float64(d / h) ^ 0.5 t_3 = sqrt(Float64(0.0 - d)) tmp = 0.0 if (h <= -5.2e+125) tmp = Float64(Float64(t_3 / (Float64(0.0 - h) ^ 0.5)) * t_1); elseif (h <= -4e-310) tmp = Float64(t_2 * Float64(t_0 * Float64(t_3 / (Float64(0.0 - l) ^ 0.5)))); elseif (h <= 7.2e+123) tmp = Float64(t_2 * Float64(t_0 * Float64(sqrt(d) / sqrt(l)))); else tmp = Float64(t_1 * Float64(sqrt(d) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l)); t_1 = ((d / l) ^ 0.5) * t_0; t_2 = (d / h) ^ 0.5; t_3 = sqrt((0.0 - d)); tmp = 0.0; if (h <= -5.2e+125) tmp = (t_3 / ((0.0 - h) ^ 0.5)) * t_1; elseif (h <= -4e-310) tmp = t_2 * (t_0 * (t_3 / ((0.0 - l) ^ 0.5))); elseif (h <= 7.2e+123) tmp = t_2 * (t_0 * (sqrt(d) / sqrt(l))); else tmp = t_1 * (sqrt(d) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(1.0 + N[(N[(h / N[(d / N[(N[(M * D), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[h, -5.2e+125], N[(N[(t$95$3 / N[Power[N[(0.0 - h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[h, -4e-310], N[(t$95$2 * N[(t$95$0 * N[(t$95$3 / N[Power[N[(0.0 - l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 7.2e+123], N[(t$95$2 * N[(t$95$0 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{h}{\frac{d}{\frac{M \cdot D}{2}}} \cdot \frac{-0.25 \cdot \frac{M \cdot D}{d}}{\ell}\\
t_1 := {\left(\frac{d}{\ell}\right)}^{0.5} \cdot t\_0\\
t_2 := {\left(\frac{d}{h}\right)}^{0.5}\\
t_3 := \sqrt{0 - d}\\
\mathbf{if}\;h \leq -5.2 \cdot 10^{+125}:\\
\;\;\;\;\frac{t\_3}{{\left(0 - h\right)}^{0.5}} \cdot t\_1\\
\mathbf{elif}\;h \leq -4 \cdot 10^{-310}:\\
\;\;\;\;t\_2 \cdot \left(t\_0 \cdot \frac{t\_3}{{\left(0 - \ell\right)}^{0.5}}\right)\\
\mathbf{elif}\;h \leq 7.2 \cdot 10^{+123}:\\
\;\;\;\;t\_2 \cdot \left(t\_0 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \frac{\sqrt{d}}{\sqrt{h}}\\
\end{array}
\end{array}
if h < -5.20000000000000006e125Initial program 60.4%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr67.8%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr67.8%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6467.8%
Simplified67.8%
unpow1/2N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6485.9%
Applied egg-rr85.9%
if -5.20000000000000006e125 < h < -3.999999999999988e-310Initial program 70.8%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr75.4%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr75.5%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6475.5%
Simplified75.5%
unpow1/2N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6486.2%
Applied egg-rr86.2%
if -3.999999999999988e-310 < h < 7.19999999999999996e123Initial program 67.5%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr71.5%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr71.5%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.5%
Simplified71.5%
unpow1/2N/A
sqrt-divN/A
pow1/2N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6483.1%
Applied egg-rr83.1%
if 7.19999999999999996e123 < h Initial program 56.7%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr63.3%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr63.2%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6463.2%
Simplified63.2%
unpow1/2N/A
sqrt-divN/A
pow1/2N/A
pow1/2N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6477.2%
Applied egg-rr77.2%
Final simplification83.7%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(+ 1.0 (* (/ h (/ d (/ (* M D) 2.0))) (/ (* -0.25 (/ (* M D) d)) l))))
(t_1 (* (pow (/ d l) 0.5) t_0)))
(if (<= h -4e-310)
(* (/ (sqrt (- 0.0 d)) (pow (- 0.0 h) 0.5)) t_1)
(if (<= h 1.4e+117)
(* (pow (/ d h) 0.5) (* t_0 (/ (sqrt d) (sqrt l))))
(* t_1 (/ (sqrt d) (sqrt h)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l));
double t_1 = pow((d / l), 0.5) * t_0;
double tmp;
if (h <= -4e-310) {
tmp = (sqrt((0.0 - d)) / pow((0.0 - h), 0.5)) * t_1;
} else if (h <= 1.4e+117) {
tmp = pow((d / h), 0.5) * (t_0 * (sqrt(d) / sqrt(l)));
} else {
tmp = t_1 * (sqrt(d) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 + ((h / (d / ((m * d_1) / 2.0d0))) * (((-0.25d0) * ((m * d_1) / d)) / l))
t_1 = ((d / l) ** 0.5d0) * t_0
if (h <= (-4d-310)) then
tmp = (sqrt((0.0d0 - d)) / ((0.0d0 - h) ** 0.5d0)) * t_1
else if (h <= 1.4d+117) then
tmp = ((d / h) ** 0.5d0) * (t_0 * (sqrt(d) / sqrt(l)))
else
tmp = t_1 * (sqrt(d) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l));
double t_1 = Math.pow((d / l), 0.5) * t_0;
double tmp;
if (h <= -4e-310) {
tmp = (Math.sqrt((0.0 - d)) / Math.pow((0.0 - h), 0.5)) * t_1;
} else if (h <= 1.4e+117) {
tmp = Math.pow((d / h), 0.5) * (t_0 * (Math.sqrt(d) / Math.sqrt(l)));
} else {
tmp = t_1 * (Math.sqrt(d) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l)) t_1 = math.pow((d / l), 0.5) * t_0 tmp = 0 if h <= -4e-310: tmp = (math.sqrt((0.0 - d)) / math.pow((0.0 - h), 0.5)) * t_1 elif h <= 1.4e+117: tmp = math.pow((d / h), 0.5) * (t_0 * (math.sqrt(d) / math.sqrt(l))) else: tmp = t_1 * (math.sqrt(d) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) t_0 = Float64(1.0 + Float64(Float64(h / Float64(d / Float64(Float64(M * D) / 2.0))) * Float64(Float64(-0.25 * Float64(Float64(M * D) / d)) / l))) t_1 = Float64((Float64(d / l) ^ 0.5) * t_0) tmp = 0.0 if (h <= -4e-310) tmp = Float64(Float64(sqrt(Float64(0.0 - d)) / (Float64(0.0 - h) ^ 0.5)) * t_1); elseif (h <= 1.4e+117) tmp = Float64((Float64(d / h) ^ 0.5) * Float64(t_0 * Float64(sqrt(d) / sqrt(l)))); else tmp = Float64(t_1 * Float64(sqrt(d) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l)); t_1 = ((d / l) ^ 0.5) * t_0; tmp = 0.0; if (h <= -4e-310) tmp = (sqrt((0.0 - d)) / ((0.0 - h) ^ 0.5)) * t_1; elseif (h <= 1.4e+117) tmp = ((d / h) ^ 0.5) * (t_0 * (sqrt(d) / sqrt(l))); else tmp = t_1 * (sqrt(d) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(1.0 + N[(N[(h / N[(d / N[(N[(M * D), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[h, -4e-310], N[(N[(N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision] / N[Power[N[(0.0 - h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[h, 1.4e+117], N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[(t$95$0 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{h}{\frac{d}{\frac{M \cdot D}{2}}} \cdot \frac{-0.25 \cdot \frac{M \cdot D}{d}}{\ell}\\
t_1 := {\left(\frac{d}{\ell}\right)}^{0.5} \cdot t\_0\\
\mathbf{if}\;h \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\frac{\sqrt{0 - d}}{{\left(0 - h\right)}^{0.5}} \cdot t\_1\\
\mathbf{elif}\;h \leq 1.4 \cdot 10^{+117}:\\
\;\;\;\;{\left(\frac{d}{h}\right)}^{0.5} \cdot \left(t\_0 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \frac{\sqrt{d}}{\sqrt{h}}\\
\end{array}
\end{array}
if h < -3.999999999999988e-310Initial program 68.6%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr73.8%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr73.9%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6473.9%
Simplified73.9%
unpow1/2N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6482.6%
Applied egg-rr82.6%
if -3.999999999999988e-310 < h < 1.39999999999999999e117Initial program 67.5%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr71.5%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr71.5%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.5%
Simplified71.5%
unpow1/2N/A
sqrt-divN/A
pow1/2N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6483.1%
Applied egg-rr83.1%
if 1.39999999999999999e117 < h Initial program 56.7%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr63.3%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr63.2%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6463.2%
Simplified63.2%
unpow1/2N/A
sqrt-divN/A
pow1/2N/A
pow1/2N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6477.2%
Applied egg-rr77.2%
Final simplification81.8%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (pow (/ d h) 0.5))
(t_1
(+
1.0
(* (/ h (/ d (/ (* M D) 2.0))) (/ (* -0.25 (/ (* M D) d)) l)))))
(if (<= h -1e-309)
(* t_0 (* t_1 (sqrt (/ d l))))
(if (<= h 2.8e+120)
(* t_0 (* t_1 (/ (sqrt d) (sqrt l))))
(* (* (pow (/ d l) 0.5) t_1) (/ (sqrt d) (sqrt h)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = pow((d / h), 0.5);
double t_1 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l));
double tmp;
if (h <= -1e-309) {
tmp = t_0 * (t_1 * sqrt((d / l)));
} else if (h <= 2.8e+120) {
tmp = t_0 * (t_1 * (sqrt(d) / sqrt(l)));
} else {
tmp = (pow((d / l), 0.5) * t_1) * (sqrt(d) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (d / h) ** 0.5d0
t_1 = 1.0d0 + ((h / (d / ((m * d_1) / 2.0d0))) * (((-0.25d0) * ((m * d_1) / d)) / l))
if (h <= (-1d-309)) then
tmp = t_0 * (t_1 * sqrt((d / l)))
else if (h <= 2.8d+120) then
tmp = t_0 * (t_1 * (sqrt(d) / sqrt(l)))
else
tmp = (((d / l) ** 0.5d0) * t_1) * (sqrt(d) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = Math.pow((d / h), 0.5);
double t_1 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l));
double tmp;
if (h <= -1e-309) {
tmp = t_0 * (t_1 * Math.sqrt((d / l)));
} else if (h <= 2.8e+120) {
tmp = t_0 * (t_1 * (Math.sqrt(d) / Math.sqrt(l)));
} else {
tmp = (Math.pow((d / l), 0.5) * t_1) * (Math.sqrt(d) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.pow((d / h), 0.5) t_1 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l)) tmp = 0 if h <= -1e-309: tmp = t_0 * (t_1 * math.sqrt((d / l))) elif h <= 2.8e+120: tmp = t_0 * (t_1 * (math.sqrt(d) / math.sqrt(l))) else: tmp = (math.pow((d / l), 0.5) * t_1) * (math.sqrt(d) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) t_0 = Float64(d / h) ^ 0.5 t_1 = Float64(1.0 + Float64(Float64(h / Float64(d / Float64(Float64(M * D) / 2.0))) * Float64(Float64(-0.25 * Float64(Float64(M * D) / d)) / l))) tmp = 0.0 if (h <= -1e-309) tmp = Float64(t_0 * Float64(t_1 * sqrt(Float64(d / l)))); elseif (h <= 2.8e+120) tmp = Float64(t_0 * Float64(t_1 * Float64(sqrt(d) / sqrt(l)))); else tmp = Float64(Float64((Float64(d / l) ^ 0.5) * t_1) * Float64(sqrt(d) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (d / h) ^ 0.5; t_1 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l)); tmp = 0.0; if (h <= -1e-309) tmp = t_0 * (t_1 * sqrt((d / l))); elseif (h <= 2.8e+120) tmp = t_0 * (t_1 * (sqrt(d) / sqrt(l))); else tmp = (((d / l) ^ 0.5) * t_1) * (sqrt(d) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(N[(h / N[(d / N[(N[(M * D), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, -1e-309], N[(t$95$0 * N[(t$95$1 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 2.8e+120], N[(t$95$0 * N[(t$95$1 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{d}{h}\right)}^{0.5}\\
t_1 := 1 + \frac{h}{\frac{d}{\frac{M \cdot D}{2}}} \cdot \frac{-0.25 \cdot \frac{M \cdot D}{d}}{\ell}\\
\mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \sqrt{\frac{d}{\ell}}\right)\\
\mathbf{elif}\;h \leq 2.8 \cdot 10^{+120}:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left({\left(\frac{d}{\ell}\right)}^{0.5} \cdot t\_1\right) \cdot \frac{\sqrt{d}}{\sqrt{h}}\\
\end{array}
\end{array}
if h < -1.000000000000002e-309Initial program 68.6%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr73.8%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr73.9%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6473.9%
Simplified73.9%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6473.9%
Applied egg-rr73.9%
if -1.000000000000002e-309 < h < 2.8000000000000001e120Initial program 67.5%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr71.5%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr71.5%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.5%
Simplified71.5%
unpow1/2N/A
sqrt-divN/A
pow1/2N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6483.1%
Applied egg-rr83.1%
if 2.8000000000000001e120 < h Initial program 56.7%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr63.3%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr63.2%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6463.2%
Simplified63.2%
unpow1/2N/A
sqrt-divN/A
pow1/2N/A
pow1/2N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6477.2%
Applied egg-rr77.2%
Final simplification77.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(+
1.0
(* (/ h (/ d (/ (* M D) 2.0))) (/ (* -0.25 (/ (* M D) d)) l)))))
(if (<= d -7.2e-281)
(* (pow (/ d h) 0.5) (* t_0 (sqrt (/ d l))))
(if (<= d 5.2e-307)
(*
h
(+
(/ d (sqrt (* h (* l (* h h)))))
(*
(pow (* h (* l (* l l))) -0.5)
(* -0.125 (/ D (/ d (* M (* M D))))))))
(* (* (pow (/ d l) 0.5) t_0) (/ (sqrt d) (sqrt h)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l));
double tmp;
if (d <= -7.2e-281) {
tmp = pow((d / h), 0.5) * (t_0 * sqrt((d / l)));
} else if (d <= 5.2e-307) {
tmp = h * ((d / sqrt((h * (l * (h * h))))) + (pow((h * (l * (l * l))), -0.5) * (-0.125 * (D / (d / (M * (M * D)))))));
} else {
tmp = (pow((d / l), 0.5) * t_0) * (sqrt(d) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + ((h / (d / ((m * d_1) / 2.0d0))) * (((-0.25d0) * ((m * d_1) / d)) / l))
if (d <= (-7.2d-281)) then
tmp = ((d / h) ** 0.5d0) * (t_0 * sqrt((d / l)))
else if (d <= 5.2d-307) then
tmp = h * ((d / sqrt((h * (l * (h * h))))) + (((h * (l * (l * l))) ** (-0.5d0)) * ((-0.125d0) * (d_1 / (d / (m * (m * d_1)))))))
else
tmp = (((d / l) ** 0.5d0) * t_0) * (sqrt(d) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l));
double tmp;
if (d <= -7.2e-281) {
tmp = Math.pow((d / h), 0.5) * (t_0 * Math.sqrt((d / l)));
} else if (d <= 5.2e-307) {
tmp = h * ((d / Math.sqrt((h * (l * (h * h))))) + (Math.pow((h * (l * (l * l))), -0.5) * (-0.125 * (D / (d / (M * (M * D)))))));
} else {
tmp = (Math.pow((d / l), 0.5) * t_0) * (Math.sqrt(d) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l)) tmp = 0 if d <= -7.2e-281: tmp = math.pow((d / h), 0.5) * (t_0 * math.sqrt((d / l))) elif d <= 5.2e-307: tmp = h * ((d / math.sqrt((h * (l * (h * h))))) + (math.pow((h * (l * (l * l))), -0.5) * (-0.125 * (D / (d / (M * (M * D))))))) else: tmp = (math.pow((d / l), 0.5) * t_0) * (math.sqrt(d) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) t_0 = Float64(1.0 + Float64(Float64(h / Float64(d / Float64(Float64(M * D) / 2.0))) * Float64(Float64(-0.25 * Float64(Float64(M * D) / d)) / l))) tmp = 0.0 if (d <= -7.2e-281) tmp = Float64((Float64(d / h) ^ 0.5) * Float64(t_0 * sqrt(Float64(d / l)))); elseif (d <= 5.2e-307) tmp = Float64(h * Float64(Float64(d / sqrt(Float64(h * Float64(l * Float64(h * h))))) + Float64((Float64(h * Float64(l * Float64(l * l))) ^ -0.5) * Float64(-0.125 * Float64(D / Float64(d / Float64(M * Float64(M * D)))))))); else tmp = Float64(Float64((Float64(d / l) ^ 0.5) * t_0) * Float64(sqrt(d) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = 1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l)); tmp = 0.0; if (d <= -7.2e-281) tmp = ((d / h) ^ 0.5) * (t_0 * sqrt((d / l))); elseif (d <= 5.2e-307) tmp = h * ((d / sqrt((h * (l * (h * h))))) + (((h * (l * (l * l))) ^ -0.5) * (-0.125 * (D / (d / (M * (M * D))))))); else tmp = (((d / l) ^ 0.5) * t_0) * (sqrt(d) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(1.0 + N[(N[(h / N[(d / N[(N[(M * D), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -7.2e-281], N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[(t$95$0 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 5.2e-307], N[(h * N[(N[(d / N[Sqrt[N[(h * N[(l * N[(h * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(h * N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(-0.125 * N[(D / N[(d / N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision] * t$95$0), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{h}{\frac{d}{\frac{M \cdot D}{2}}} \cdot \frac{-0.25 \cdot \frac{M \cdot D}{d}}{\ell}\\
\mathbf{if}\;d \leq -7.2 \cdot 10^{-281}:\\
\;\;\;\;{\left(\frac{d}{h}\right)}^{0.5} \cdot \left(t\_0 \cdot \sqrt{\frac{d}{\ell}}\right)\\
\mathbf{elif}\;d \leq 5.2 \cdot 10^{-307}:\\
\;\;\;\;h \cdot \left(\frac{d}{\sqrt{h \cdot \left(\ell \cdot \left(h \cdot h\right)\right)}} + {\left(h \cdot \left(\ell \cdot \left(\ell \cdot \ell\right)\right)\right)}^{-0.5} \cdot \left(-0.125 \cdot \frac{D}{\frac{d}{M \cdot \left(M \cdot D\right)}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left({\left(\frac{d}{\ell}\right)}^{0.5} \cdot t\_0\right) \cdot \frac{\sqrt{d}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < -7.20000000000000013e-281Initial program 71.5%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr77.2%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr77.2%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6477.2%
Simplified77.2%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6477.2%
Applied egg-rr77.2%
if -7.20000000000000013e-281 < d < 5.19999999999999992e-307Initial program 36.4%
Taylor expanded in h around inf
Simplified63.8%
Applied egg-rr72.7%
if 5.19999999999999992e-307 < d Initial program 63.4%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr68.4%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr68.4%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6468.4%
Simplified68.4%
unpow1/2N/A
sqrt-divN/A
pow1/2N/A
pow1/2N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6476.7%
Applied egg-rr76.7%
Final simplification76.8%
(FPCore (d h l M D)
:precision binary64
(if (<= l 1.42e-161)
(*
(+ 1.0 (/ (/ (* h (* M D)) (* d 2.0)) (/ l (/ -0.25 (/ d (* M D))))))
(sqrt (* (/ d l) (/ d h))))
(if (<= l 2.05e+67)
(/
(+
(* (sqrt (* h l)) (* (* -0.125 (* D D)) (/ (* M M) d)))
(* (sqrt (/ l h)) (* d l)))
(* l l))
(/ d (* (sqrt l) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 1.42e-161) {
tmp = (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * sqrt(((d / l) * (d / h)));
} else if (l <= 2.05e+67) {
tmp = ((sqrt((h * l)) * ((-0.125 * (D * D)) * ((M * M) / d))) + (sqrt((l / h)) * (d * l))) / (l * l);
} else {
tmp = d / (sqrt(l) * sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= 1.42d-161) then
tmp = (1.0d0 + (((h * (m * d_1)) / (d * 2.0d0)) / (l / ((-0.25d0) / (d / (m * d_1)))))) * sqrt(((d / l) * (d / h)))
else if (l <= 2.05d+67) then
tmp = ((sqrt((h * l)) * (((-0.125d0) * (d_1 * d_1)) * ((m * m) / d))) + (sqrt((l / h)) * (d * l))) / (l * l)
else
tmp = d / (sqrt(l) * sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 1.42e-161) {
tmp = (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * Math.sqrt(((d / l) * (d / h)));
} else if (l <= 2.05e+67) {
tmp = ((Math.sqrt((h * l)) * ((-0.125 * (D * D)) * ((M * M) / d))) + (Math.sqrt((l / h)) * (d * l))) / (l * l);
} else {
tmp = d / (Math.sqrt(l) * Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 1.42e-161: tmp = (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * math.sqrt(((d / l) * (d / h))) elif l <= 2.05e+67: tmp = ((math.sqrt((h * l)) * ((-0.125 * (D * D)) * ((M * M) / d))) + (math.sqrt((l / h)) * (d * l))) / (l * l) else: tmp = d / (math.sqrt(l) * math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 1.42e-161) tmp = Float64(Float64(1.0 + Float64(Float64(Float64(h * Float64(M * D)) / Float64(d * 2.0)) / Float64(l / Float64(-0.25 / Float64(d / Float64(M * D)))))) * sqrt(Float64(Float64(d / l) * Float64(d / h)))); elseif (l <= 2.05e+67) tmp = Float64(Float64(Float64(sqrt(Float64(h * l)) * Float64(Float64(-0.125 * Float64(D * D)) * Float64(Float64(M * M) / d))) + Float64(sqrt(Float64(l / h)) * Float64(d * l))) / Float64(l * l)); else tmp = Float64(d / Float64(sqrt(l) * sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 1.42e-161) tmp = (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * sqrt(((d / l) * (d / h))); elseif (l <= 2.05e+67) tmp = ((sqrt((h * l)) * ((-0.125 * (D * D)) * ((M * M) / d))) + (sqrt((l / h)) * (d * l))) / (l * l); else tmp = d / (sqrt(l) * sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 1.42e-161], N[(N[(1.0 + N[(N[(N[(h * N[(M * D), $MachinePrecision]), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] / N[(l / N[(-0.25 / N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.05e+67], N[(N[(N[(N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision] * N[(N[(-0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(l / h), $MachinePrecision]], $MachinePrecision] * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.42 \cdot 10^{-161}:\\
\;\;\;\;\left(1 + \frac{\frac{h \cdot \left(M \cdot D\right)}{d \cdot 2}}{\frac{\ell}{\frac{-0.25}{\frac{d}{M \cdot D}}}}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{elif}\;\ell \leq 2.05 \cdot 10^{+67}:\\
\;\;\;\;\frac{\sqrt{h \cdot \ell} \cdot \left(\left(-0.125 \cdot \left(D \cdot D\right)\right) \cdot \frac{M \cdot M}{d}\right) + \sqrt{\frac{\ell}{h}} \cdot \left(d \cdot \ell\right)}{\ell \cdot \ell}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
\end{array}
\end{array}
if l < 1.42000000000000004e-161Initial program 69.0%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr74.1%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr74.1%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6474.1%
Simplified74.1%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr59.8%
if 1.42000000000000004e-161 < l < 2.0499999999999999e67Initial program 70.5%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr76.7%
Applied egg-rr26.5%
Taylor expanded in l around 0
/-lowering-/.f64N/A
Simplified75.8%
if 2.0499999999999999e67 < l Initial program 53.0%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6443.3%
Simplified43.3%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6443.3%
Applied egg-rr43.3%
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6460.2%
Applied egg-rr60.2%
Final simplification62.8%
(FPCore (d h l M D)
:precision binary64
(if (<= l 2.9e+107)
(*
(sqrt (/ d l))
(*
(pow (/ h d) -0.5)
(+ 1.0 (/ (/ (* (/ h d) (/ (* M D) -2.0)) (* (/ d (* M D)) 4.0)) l))))
(/ d (* (sqrt l) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 2.9e+107) {
tmp = sqrt((d / l)) * (pow((h / d), -0.5) * (1.0 + ((((h / d) * ((M * D) / -2.0)) / ((d / (M * D)) * 4.0)) / l)));
} else {
tmp = d / (sqrt(l) * sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= 2.9d+107) then
tmp = sqrt((d / l)) * (((h / d) ** (-0.5d0)) * (1.0d0 + ((((h / d) * ((m * d_1) / (-2.0d0))) / ((d / (m * d_1)) * 4.0d0)) / l)))
else
tmp = d / (sqrt(l) * sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 2.9e+107) {
tmp = Math.sqrt((d / l)) * (Math.pow((h / d), -0.5) * (1.0 + ((((h / d) * ((M * D) / -2.0)) / ((d / (M * D)) * 4.0)) / l)));
} else {
tmp = d / (Math.sqrt(l) * Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 2.9e+107: tmp = math.sqrt((d / l)) * (math.pow((h / d), -0.5) * (1.0 + ((((h / d) * ((M * D) / -2.0)) / ((d / (M * D)) * 4.0)) / l))) else: tmp = d / (math.sqrt(l) * math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 2.9e+107) tmp = Float64(sqrt(Float64(d / l)) * Float64((Float64(h / d) ^ -0.5) * Float64(1.0 + Float64(Float64(Float64(Float64(h / d) * Float64(Float64(M * D) / -2.0)) / Float64(Float64(d / Float64(M * D)) * 4.0)) / l)))); else tmp = Float64(d / Float64(sqrt(l) * sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 2.9e+107) tmp = sqrt((d / l)) * (((h / d) ^ -0.5) * (1.0 + ((((h / d) * ((M * D) / -2.0)) / ((d / (M * D)) * 4.0)) / l))); else tmp = d / (sqrt(l) * sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 2.9e+107], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[(h / d), $MachinePrecision], -0.5], $MachinePrecision] * N[(1.0 + N[(N[(N[(N[(h / d), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] / -2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.9 \cdot 10^{+107}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left({\left(\frac{h}{d}\right)}^{-0.5} \cdot \left(1 + \frac{\frac{\frac{h}{d} \cdot \frac{M \cdot D}{-2}}{\frac{d}{M \cdot D} \cdot 4}}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
\end{array}
\end{array}
if l < 2.89999999999999988e107Initial program 69.7%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr74.9%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr75.0%
Applied egg-rr73.4%
if 2.89999999999999988e107 < l Initial program 49.0%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6444.5%
Simplified44.5%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6444.5%
Applied egg-rr44.5%
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6461.6%
Applied egg-rr61.6%
Final simplification71.4%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ d (* M D))))
(*
(pow (/ d h) 0.5)
(* (pow (/ d l) 0.5) (+ 1.0 (/ (/ (/ h (/ l (/ -0.25 t_0))) t_0) 2.0))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d / (M * D);
return pow((d / h), 0.5) * (pow((d / l), 0.5) * (1.0 + (((h / (l / (-0.25 / t_0))) / t_0) / 2.0)));
}
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
t_0 = d / (m * d_1)
code = ((d / h) ** 0.5d0) * (((d / l) ** 0.5d0) * (1.0d0 + (((h / (l / ((-0.25d0) / t_0))) / t_0) / 2.0d0)))
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = d / (M * D);
return Math.pow((d / h), 0.5) * (Math.pow((d / l), 0.5) * (1.0 + (((h / (l / (-0.25 / t_0))) / t_0) / 2.0)));
}
def code(d, h, l, M, D): t_0 = d / (M * D) return math.pow((d / h), 0.5) * (math.pow((d / l), 0.5) * (1.0 + (((h / (l / (-0.25 / t_0))) / t_0) / 2.0)))
function code(d, h, l, M, D) t_0 = Float64(d / Float64(M * D)) return Float64((Float64(d / h) ^ 0.5) * Float64((Float64(d / l) ^ 0.5) * Float64(1.0 + Float64(Float64(Float64(h / Float64(l / Float64(-0.25 / t_0))) / t_0) / 2.0)))) end
function tmp = code(d, h, l, M, D) t_0 = d / (M * D); tmp = ((d / h) ^ 0.5) * (((d / l) ^ 0.5) * (1.0 + (((h / (l / (-0.25 / t_0))) / t_0) / 2.0))); end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[(N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision] * N[(1.0 + N[(N[(N[(h / N[(l / N[(-0.25 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{d}{M \cdot D}\\
{\left(\frac{d}{h}\right)}^{0.5} \cdot \left({\left(\frac{d}{\ell}\right)}^{0.5} \cdot \left(1 + \frac{\frac{\frac{h}{\frac{\ell}{\frac{-0.25}{t\_0}}}}{t\_0}}{2}\right)\right)
\end{array}
\end{array}
Initial program 66.2%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr71.2%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr71.3%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.3%
Simplified71.3%
associate-*l/N/A
associate-/r/N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr71.6%
(FPCore (d h l M D) :precision binary64 (* (pow (/ d h) 0.5) (* (+ 1.0 (* (/ h (/ d (/ (* M D) 2.0))) (/ (* -0.25 (/ (* M D) d)) l))) (sqrt (/ d l)))))
double code(double d, double h, double l, double M, double D) {
return pow((d / h), 0.5) * ((1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l))) * sqrt((d / 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) ** 0.5d0) * ((1.0d0 + ((h / (d / ((m * d_1) / 2.0d0))) * (((-0.25d0) * ((m * d_1) / d)) / l))) * sqrt((d / l)))
end function
public static double code(double d, double h, double l, double M, double D) {
return Math.pow((d / h), 0.5) * ((1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l))) * Math.sqrt((d / l)));
}
def code(d, h, l, M, D): return math.pow((d / h), 0.5) * ((1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l))) * math.sqrt((d / l)))
function code(d, h, l, M, D) return Float64((Float64(d / h) ^ 0.5) * Float64(Float64(1.0 + Float64(Float64(h / Float64(d / Float64(Float64(M * D) / 2.0))) * Float64(Float64(-0.25 * Float64(Float64(M * D) / d)) / l))) * sqrt(Float64(d / l)))) end
function tmp = code(d, h, l, M, D) tmp = ((d / h) ^ 0.5) * ((1.0 + ((h / (d / ((M * D) / 2.0))) * ((-0.25 * ((M * D) / d)) / l))) * sqrt((d / l))); end
code[d_, h_, l_, M_, D_] := N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[(N[(1.0 + N[(N[(h / N[(d / N[(N[(M * D), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(\frac{d}{h}\right)}^{0.5} \cdot \left(\left(1 + \frac{h}{\frac{d}{\frac{M \cdot D}{2}}} \cdot \frac{-0.25 \cdot \frac{M \cdot D}{d}}{\ell}\right) \cdot \sqrt{\frac{d}{\ell}}\right)
\end{array}
Initial program 66.2%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr71.2%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr71.3%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.3%
Simplified71.3%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f6471.3%
Applied egg-rr71.3%
Final simplification71.3%
(FPCore (d h l M D)
:precision binary64
(if (<= l 8e+129)
(*
(+ 1.0 (/ (/ (* h (* M D)) (* d 2.0)) (/ l (/ -0.25 (/ d (* M D))))))
(sqrt (* (/ d l) (/ d h))))
(/ d (* (sqrt l) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 8e+129) {
tmp = (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * sqrt(((d / l) * (d / h)));
} else {
tmp = d / (sqrt(l) * sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= 8d+129) then
tmp = (1.0d0 + (((h * (m * d_1)) / (d * 2.0d0)) / (l / ((-0.25d0) / (d / (m * d_1)))))) * sqrt(((d / l) * (d / h)))
else
tmp = d / (sqrt(l) * sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 8e+129) {
tmp = (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * Math.sqrt(((d / l) * (d / h)));
} else {
tmp = d / (Math.sqrt(l) * Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 8e+129: tmp = (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * math.sqrt(((d / l) * (d / h))) else: tmp = d / (math.sqrt(l) * math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 8e+129) tmp = Float64(Float64(1.0 + Float64(Float64(Float64(h * Float64(M * D)) / Float64(d * 2.0)) / Float64(l / Float64(-0.25 / Float64(d / Float64(M * D)))))) * sqrt(Float64(Float64(d / l) * Float64(d / h)))); else tmp = Float64(d / Float64(sqrt(l) * sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 8e+129) tmp = (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * sqrt(((d / l) * (d / h))); else tmp = d / (sqrt(l) * sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 8e+129], N[(N[(1.0 + N[(N[(N[(h * N[(M * D), $MachinePrecision]), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] / N[(l / N[(-0.25 / N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8 \cdot 10^{+129}:\\
\;\;\;\;\left(1 + \frac{\frac{h \cdot \left(M \cdot D\right)}{d \cdot 2}}{\frac{\ell}{\frac{-0.25}{\frac{d}{M \cdot D}}}}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
\end{array}
\end{array}
if l < 8e129Initial program 70.3%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr75.4%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr75.4%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6475.4%
Simplified75.4%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr61.7%
if 8e129 < l Initial program 43.9%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6439.0%
Simplified39.0%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6439.0%
Applied egg-rr39.0%
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f6457.9%
Applied egg-rr57.9%
Final simplification61.1%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(*
(+ 1.0 (* (/ (* M D) (/ (* 4.0 (* d d)) (* M D))) (* -0.5 (/ h l))))
(sqrt (/ d (/ h (/ d l)))))))
(if (<= d -5.2e+142)
(* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
(if (<= d -2e-155)
t_0
(if (<= d -3.2e-302)
(* (sqrt (/ (/ h l) (* l l))) (* (/ (* M M) d) (* (* D D) 0.125)))
(if (<= d 4.6e-100)
(* M (* (* M -0.125) (/ (* D (* D (sqrt (/ (/ (/ h l) l) l)))) d)))
(if (<= d 3e+146) t_0 (* d (pow (* h l) -0.5)))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (1.0 + (((M * D) / ((4.0 * (d * d)) / (M * D))) * (-0.5 * (h / l)))) * sqrt((d / (h / (d / l))));
double tmp;
if (d <= -5.2e+142) {
tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
} else if (d <= -2e-155) {
tmp = t_0;
} else if (d <= -3.2e-302) {
tmp = sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125));
} else if (d <= 4.6e-100) {
tmp = M * ((M * -0.125) * ((D * (D * sqrt((((h / l) / l) / l)))) / d));
} else if (d <= 3e+146) {
tmp = t_0;
} else {
tmp = d * pow((h * l), -0.5);
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 + (((m * d_1) / ((4.0d0 * (d * d)) / (m * d_1))) * ((-0.5d0) * (h / l)))) * sqrt((d / (h / (d / l))))
if (d <= (-5.2d+142)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
else if (d <= (-2d-155)) then
tmp = t_0
else if (d <= (-3.2d-302)) then
tmp = sqrt(((h / l) / (l * l))) * (((m * m) / d) * ((d_1 * d_1) * 0.125d0))
else if (d <= 4.6d-100) then
tmp = m * ((m * (-0.125d0)) * ((d_1 * (d_1 * sqrt((((h / l) / l) / l)))) / d))
else if (d <= 3d+146) then
tmp = t_0
else
tmp = d * ((h * l) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (1.0 + (((M * D) / ((4.0 * (d * d)) / (M * D))) * (-0.5 * (h / l)))) * Math.sqrt((d / (h / (d / l))));
double tmp;
if (d <= -5.2e+142) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
} else if (d <= -2e-155) {
tmp = t_0;
} else if (d <= -3.2e-302) {
tmp = Math.sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125));
} else if (d <= 4.6e-100) {
tmp = M * ((M * -0.125) * ((D * (D * Math.sqrt((((h / l) / l) / l)))) / d));
} else if (d <= 3e+146) {
tmp = t_0;
} else {
tmp = d * Math.pow((h * l), -0.5);
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (1.0 + (((M * D) / ((4.0 * (d * d)) / (M * D))) * (-0.5 * (h / l)))) * math.sqrt((d / (h / (d / l)))) tmp = 0 if d <= -5.2e+142: tmp = (0.0 - d) * math.sqrt((1.0 / (h * l))) elif d <= -2e-155: tmp = t_0 elif d <= -3.2e-302: tmp = math.sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125)) elif d <= 4.6e-100: tmp = M * ((M * -0.125) * ((D * (D * math.sqrt((((h / l) / l) / l)))) / d)) elif d <= 3e+146: tmp = t_0 else: tmp = d * math.pow((h * l), -0.5) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(1.0 + Float64(Float64(Float64(M * D) / Float64(Float64(4.0 * Float64(d * d)) / Float64(M * D))) * Float64(-0.5 * Float64(h / l)))) * sqrt(Float64(d / Float64(h / Float64(d / l))))) tmp = 0.0 if (d <= -5.2e+142) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (d <= -2e-155) tmp = t_0; elseif (d <= -3.2e-302) tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(Float64(Float64(M * M) / d) * Float64(Float64(D * D) * 0.125))); elseif (d <= 4.6e-100) tmp = Float64(M * Float64(Float64(M * -0.125) * Float64(Float64(D * Float64(D * sqrt(Float64(Float64(Float64(h / l) / l) / l)))) / d))); elseif (d <= 3e+146) tmp = t_0; else tmp = Float64(d * (Float64(h * l) ^ -0.5)); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (1.0 + (((M * D) / ((4.0 * (d * d)) / (M * D))) * (-0.5 * (h / l)))) * sqrt((d / (h / (d / l)))); tmp = 0.0; if (d <= -5.2e+142) tmp = (0.0 - d) * sqrt((1.0 / (h * l))); elseif (d <= -2e-155) tmp = t_0; elseif (d <= -3.2e-302) tmp = sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125)); elseif (d <= 4.6e-100) tmp = M * ((M * -0.125) * ((D * (D * sqrt((((h / l) / l) / l)))) / d)); elseif (d <= 3e+146) tmp = t_0; else tmp = d * ((h * l) ^ -0.5); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(1.0 + N[(N[(N[(M * D), $MachinePrecision] / N[(N[(4.0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / N[(h / N[(d / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -5.2e+142], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2e-155], t$95$0, If[LessEqual[d, -3.2e-302], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.6e-100], N[(M * N[(N[(M * -0.125), $MachinePrecision] * N[(N[(D * N[(D * N[Sqrt[N[(N[(N[(h / l), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3e+146], t$95$0, N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + \frac{M \cdot D}{\frac{4 \cdot \left(d \cdot d\right)}{M \cdot D}} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\
\mathbf{if}\;d \leq -5.2 \cdot 10^{+142}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;d \leq -2 \cdot 10^{-155}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;d \leq -3.2 \cdot 10^{-302}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(\frac{M \cdot M}{d} \cdot \left(\left(D \cdot D\right) \cdot 0.125\right)\right)\\
\mathbf{elif}\;d \leq 4.6 \cdot 10^{-100}:\\
\;\;\;\;M \cdot \left(\left(M \cdot -0.125\right) \cdot \frac{D \cdot \left(D \cdot \sqrt{\frac{\frac{\frac{h}{\ell}}{\ell}}{\ell}}\right)}{d}\right)\\
\mathbf{elif}\;d \leq 3 \cdot 10^{+146}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\
\end{array}
\end{array}
if d < -5.20000000000000043e142Initial program 73.8%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6461.3%
Simplified61.3%
if -5.20000000000000043e142 < d < -2.00000000000000003e-155 or 4.59999999999999989e-100 < d < 3.00000000000000002e146Initial program 81.2%
Applied egg-rr70.9%
if -2.00000000000000003e-155 < d < -3.19999999999999978e-302Initial program 48.7%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr48.9%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr48.9%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6448.9%
Simplified48.9%
Taylor expanded in h around -inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
cube-multN/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
Simplified35.4%
if -3.19999999999999978e-302 < d < 4.59999999999999989e-100Initial program 35.5%
Taylor expanded in d around 0
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified38.1%
associate-/l*N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr46.2%
if 3.00000000000000002e146 < d Initial program 63.7%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6452.2%
Simplified52.2%
*-commutativeN/A
*-lowering-*.f64N/A
inv-powN/A
sqrt-pow1N/A
metadata-evalN/A
pow-lowering-pow.f64N/A
*-lowering-*.f6452.3%
Applied egg-rr52.3%
Final simplification58.5%
(FPCore (d h l M D)
:precision binary64
(if (<= l -7e+250)
(*
(+ 1.0 (* (/ (* M D) (/ (* 4.0 (* d d)) (* M D))) (* -0.5 (/ h l))))
(sqrt (/ d (/ h (/ d l)))))
(if (<= l -1.3e-32)
(* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
(if (<= l 2.45e+107)
(*
(+ 1.0 (/ (/ (* (/ h d) (/ (* M D) -2.0)) (* (/ d (* M D)) 4.0)) l))
(sqrt (/ (/ d (/ h d)) l)))
(* d (sqrt (/ (/ 1.0 h) l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -7e+250) {
tmp = (1.0 + (((M * D) / ((4.0 * (d * d)) / (M * D))) * (-0.5 * (h / l)))) * sqrt((d / (h / (d / l))));
} else if (l <= -1.3e-32) {
tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
} else if (l <= 2.45e+107) {
tmp = (1.0 + ((((h / d) * ((M * D) / -2.0)) / ((d / (M * D)) * 4.0)) / l)) * sqrt(((d / (h / d)) / l));
} else {
tmp = d * sqrt(((1.0 / h) / l));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-7d+250)) then
tmp = (1.0d0 + (((m * d_1) / ((4.0d0 * (d * d)) / (m * d_1))) * ((-0.5d0) * (h / l)))) * sqrt((d / (h / (d / l))))
else if (l <= (-1.3d-32)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
else if (l <= 2.45d+107) then
tmp = (1.0d0 + ((((h / d) * ((m * d_1) / (-2.0d0))) / ((d / (m * d_1)) * 4.0d0)) / l)) * sqrt(((d / (h / d)) / l))
else
tmp = d * sqrt(((1.0d0 / h) / l))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -7e+250) {
tmp = (1.0 + (((M * D) / ((4.0 * (d * d)) / (M * D))) * (-0.5 * (h / l)))) * Math.sqrt((d / (h / (d / l))));
} else if (l <= -1.3e-32) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
} else if (l <= 2.45e+107) {
tmp = (1.0 + ((((h / d) * ((M * D) / -2.0)) / ((d / (M * D)) * 4.0)) / l)) * Math.sqrt(((d / (h / d)) / l));
} else {
tmp = d * Math.sqrt(((1.0 / h) / l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -7e+250: tmp = (1.0 + (((M * D) / ((4.0 * (d * d)) / (M * D))) * (-0.5 * (h / l)))) * math.sqrt((d / (h / (d / l)))) elif l <= -1.3e-32: tmp = (0.0 - d) * math.sqrt((1.0 / (h * l))) elif l <= 2.45e+107: tmp = (1.0 + ((((h / d) * ((M * D) / -2.0)) / ((d / (M * D)) * 4.0)) / l)) * math.sqrt(((d / (h / d)) / l)) else: tmp = d * math.sqrt(((1.0 / h) / l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -7e+250) tmp = Float64(Float64(1.0 + Float64(Float64(Float64(M * D) / Float64(Float64(4.0 * Float64(d * d)) / Float64(M * D))) * Float64(-0.5 * Float64(h / l)))) * sqrt(Float64(d / Float64(h / Float64(d / l))))); elseif (l <= -1.3e-32) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (l <= 2.45e+107) tmp = Float64(Float64(1.0 + Float64(Float64(Float64(Float64(h / d) * Float64(Float64(M * D) / -2.0)) / Float64(Float64(d / Float64(M * D)) * 4.0)) / l)) * sqrt(Float64(Float64(d / Float64(h / d)) / l))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -7e+250) tmp = (1.0 + (((M * D) / ((4.0 * (d * d)) / (M * D))) * (-0.5 * (h / l)))) * sqrt((d / (h / (d / l)))); elseif (l <= -1.3e-32) tmp = (0.0 - d) * sqrt((1.0 / (h * l))); elseif (l <= 2.45e+107) tmp = (1.0 + ((((h / d) * ((M * D) / -2.0)) / ((d / (M * D)) * 4.0)) / l)) * sqrt(((d / (h / d)) / l)); else tmp = d * sqrt(((1.0 / h) / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -7e+250], N[(N[(1.0 + N[(N[(N[(M * D), $MachinePrecision] / N[(N[(4.0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / N[(h / N[(d / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1.3e-32], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.45e+107], N[(N[(1.0 + N[(N[(N[(N[(h / d), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] / -2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / N[(h / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -7 \cdot 10^{+250}:\\
\;\;\;\;\left(1 + \frac{M \cdot D}{\frac{4 \cdot \left(d \cdot d\right)}{M \cdot D}} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}}\\
\mathbf{elif}\;\ell \leq -1.3 \cdot 10^{-32}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;\ell \leq 2.45 \cdot 10^{+107}:\\
\;\;\;\;\left(1 + \frac{\frac{\frac{h}{d} \cdot \frac{M \cdot D}{-2}}{\frac{d}{M \cdot D} \cdot 4}}{\ell}\right) \cdot \sqrt{\frac{\frac{d}{\frac{h}{d}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if l < -7.0000000000000001e250Initial program 68.1%
Applied egg-rr63.3%
if -7.0000000000000001e250 < l < -1.2999999999999999e-32Initial program 63.5%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6455.2%
Simplified55.2%
if -1.2999999999999999e-32 < l < 2.4500000000000001e107Initial program 72.6%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr77.7%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr77.7%
Applied egg-rr64.0%
if 2.4500000000000001e107 < l Initial program 49.0%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6444.5%
Simplified44.5%
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6444.6%
Applied egg-rr44.6%
Final simplification58.7%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ h (* l (* l l))))))
(if (<= l -2.3e-12)
(* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
(if (<= l 2.3e-308)
(* -0.125 (* (/ (* M M) d) (* t_0 (- 0.0 (* D D)))))
(if (<= l 15600000.0)
(/ (* (* M -0.125) (* D (* (* M D) t_0))) d)
(* d (sqrt (/ (/ 1.0 h) l))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((h / (l * (l * l))));
double tmp;
if (l <= -2.3e-12) {
tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = -0.125 * (((M * M) / d) * (t_0 * (0.0 - (D * D))));
} else if (l <= 15600000.0) {
tmp = ((M * -0.125) * (D * ((M * D) * t_0))) / d;
} else {
tmp = d * sqrt(((1.0 / h) / l));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((h / (l * (l * l))))
if (l <= (-2.3d-12)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
else if (l <= 2.3d-308) then
tmp = (-0.125d0) * (((m * m) / d) * (t_0 * (0.0d0 - (d_1 * d_1))))
else if (l <= 15600000.0d0) then
tmp = ((m * (-0.125d0)) * (d_1 * ((m * d_1) * t_0))) / d
else
tmp = d * sqrt(((1.0d0 / h) / l))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = Math.sqrt((h / (l * (l * l))));
double tmp;
if (l <= -2.3e-12) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = -0.125 * (((M * M) / d) * (t_0 * (0.0 - (D * D))));
} else if (l <= 15600000.0) {
tmp = ((M * -0.125) * (D * ((M * D) * t_0))) / d;
} else {
tmp = d * Math.sqrt(((1.0 / h) / l));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((h / (l * (l * l)))) tmp = 0 if l <= -2.3e-12: tmp = (0.0 - d) * math.sqrt((1.0 / (h * l))) elif l <= 2.3e-308: tmp = -0.125 * (((M * M) / d) * (t_0 * (0.0 - (D * D)))) elif l <= 15600000.0: tmp = ((M * -0.125) * (D * ((M * D) * t_0))) / d else: tmp = d * math.sqrt(((1.0 / h) / l)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(h / Float64(l * Float64(l * l)))) tmp = 0.0 if (l <= -2.3e-12) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (l <= 2.3e-308) tmp = Float64(-0.125 * Float64(Float64(Float64(M * M) / d) * Float64(t_0 * Float64(0.0 - Float64(D * D))))); elseif (l <= 15600000.0) tmp = Float64(Float64(Float64(M * -0.125) * Float64(D * Float64(Float64(M * D) * t_0))) / d); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((h / (l * (l * l)))); tmp = 0.0; if (l <= -2.3e-12) tmp = (0.0 - d) * sqrt((1.0 / (h * l))); elseif (l <= 2.3e-308) tmp = -0.125 * (((M * M) / d) * (t_0 * (0.0 - (D * D)))); elseif (l <= 15600000.0) tmp = ((M * -0.125) * (D * ((M * D) * t_0))) / d; else tmp = d * sqrt(((1.0 / h) / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -2.3e-12], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.3e-308], N[(-0.125 * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(t$95$0 * N[(0.0 - N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 15600000.0], N[(N[(N[(M * -0.125), $MachinePrecision] * N[(D * N[(N[(M * D), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\
\mathbf{if}\;\ell \leq -2.3 \cdot 10^{-12}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;\ell \leq 2.3 \cdot 10^{-308}:\\
\;\;\;\;-0.125 \cdot \left(\frac{M \cdot M}{d} \cdot \left(t\_0 \cdot \left(0 - D \cdot D\right)\right)\right)\\
\mathbf{elif}\;\ell \leq 15600000:\\
\;\;\;\;\frac{\left(M \cdot -0.125\right) \cdot \left(D \cdot \left(\left(M \cdot D\right) \cdot t\_0\right)\right)}{d}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if l < -2.29999999999999989e-12Initial program 64.1%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6451.1%
Simplified51.1%
if -2.29999999999999989e-12 < l < 2.2999999999999999e-308Initial program 74.2%
Applied egg-rr22.3%
Taylor expanded in h around -inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified45.7%
if 2.2999999999999999e-308 < l < 1.56e7Initial program 65.9%
Taylor expanded in d around 0
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified49.5%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.7%
Applied egg-rr49.7%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr57.1%
if 1.56e7 < l Initial program 60.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.2%
Simplified47.2%
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6447.6%
Applied egg-rr47.6%
Final simplification50.1%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.95e-13)
(* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
(if (<= l 2.3e-308)
(* (sqrt (/ (/ h l) (* l l))) (* (/ (* M M) d) (* (* D D) 0.125)))
(if (<= l 80000000.0)
(/ (* (* M -0.125) (* D (* (* M D) (sqrt (/ h (* l (* l l))))))) d)
(* d (sqrt (/ (/ 1.0 h) l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.95e-13) {
tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125));
} else if (l <= 80000000.0) {
tmp = ((M * -0.125) * (D * ((M * D) * sqrt((h / (l * (l * l))))))) / d;
} else {
tmp = d * sqrt(((1.0 / h) / l));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-1.95d-13)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
else if (l <= 2.3d-308) then
tmp = sqrt(((h / l) / (l * l))) * (((m * m) / d) * ((d_1 * d_1) * 0.125d0))
else if (l <= 80000000.0d0) then
tmp = ((m * (-0.125d0)) * (d_1 * ((m * d_1) * sqrt((h / (l * (l * l))))))) / d
else
tmp = d * sqrt(((1.0d0 / h) / l))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.95e-13) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = Math.sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125));
} else if (l <= 80000000.0) {
tmp = ((M * -0.125) * (D * ((M * D) * Math.sqrt((h / (l * (l * l))))))) / d;
} else {
tmp = d * Math.sqrt(((1.0 / h) / l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.95e-13: tmp = (0.0 - d) * math.sqrt((1.0 / (h * l))) elif l <= 2.3e-308: tmp = math.sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125)) elif l <= 80000000.0: tmp = ((M * -0.125) * (D * ((M * D) * math.sqrt((h / (l * (l * l))))))) / d else: tmp = d * math.sqrt(((1.0 / h) / l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.95e-13) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (l <= 2.3e-308) tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(Float64(Float64(M * M) / d) * Float64(Float64(D * D) * 0.125))); elseif (l <= 80000000.0) tmp = Float64(Float64(Float64(M * -0.125) * Float64(D * Float64(Float64(M * D) * sqrt(Float64(h / Float64(l * Float64(l * l))))))) / d); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.95e-13) tmp = (0.0 - d) * sqrt((1.0 / (h * l))); elseif (l <= 2.3e-308) tmp = sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125)); elseif (l <= 80000000.0) tmp = ((M * -0.125) * (D * ((M * D) * sqrt((h / (l * (l * l))))))) / d; else tmp = d * sqrt(((1.0 / h) / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.95e-13], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.3e-308], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 80000000.0], N[(N[(N[(M * -0.125), $MachinePrecision] * N[(D * N[(N[(M * D), $MachinePrecision] * N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.95 \cdot 10^{-13}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;\ell \leq 2.3 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(\frac{M \cdot M}{d} \cdot \left(\left(D \cdot D\right) \cdot 0.125\right)\right)\\
\mathbf{elif}\;\ell \leq 80000000:\\
\;\;\;\;\frac{\left(M \cdot -0.125\right) \cdot \left(D \cdot \left(\left(M \cdot D\right) \cdot \sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right)\right)}{d}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if l < -1.95000000000000002e-13Initial program 64.1%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6451.1%
Simplified51.1%
if -1.95000000000000002e-13 < l < 2.2999999999999999e-308Initial program 74.2%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr78.8%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr79.0%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6479.0%
Simplified79.0%
Taylor expanded in h around -inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
cube-multN/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
Simplified44.3%
if 2.2999999999999999e-308 < l < 8e7Initial program 65.9%
Taylor expanded in d around 0
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified49.5%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.7%
Applied egg-rr49.7%
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr57.1%
if 8e7 < l Initial program 60.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.2%
Simplified47.2%
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6447.6%
Applied egg-rr47.6%
Final simplification49.8%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.7e-13)
(* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
(if (<= l 2.3e-308)
(* (sqrt (/ (/ h l) (* l l))) (* (/ (* M M) d) (* (* D D) 0.125)))
(if (<= l 340000000.0)
(* M (* (* M -0.125) (/ (* D (* D (sqrt (/ (/ (/ h l) l) l)))) d)))
(* d (sqrt (/ (/ 1.0 h) l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.7e-13) {
tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125));
} else if (l <= 340000000.0) {
tmp = M * ((M * -0.125) * ((D * (D * sqrt((((h / l) / l) / l)))) / d));
} else {
tmp = d * sqrt(((1.0 / h) / l));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-1.7d-13)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
else if (l <= 2.3d-308) then
tmp = sqrt(((h / l) / (l * l))) * (((m * m) / d) * ((d_1 * d_1) * 0.125d0))
else if (l <= 340000000.0d0) then
tmp = m * ((m * (-0.125d0)) * ((d_1 * (d_1 * sqrt((((h / l) / l) / l)))) / d))
else
tmp = d * sqrt(((1.0d0 / h) / l))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.7e-13) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = Math.sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125));
} else if (l <= 340000000.0) {
tmp = M * ((M * -0.125) * ((D * (D * Math.sqrt((((h / l) / l) / l)))) / d));
} else {
tmp = d * Math.sqrt(((1.0 / h) / l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.7e-13: tmp = (0.0 - d) * math.sqrt((1.0 / (h * l))) elif l <= 2.3e-308: tmp = math.sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125)) elif l <= 340000000.0: tmp = M * ((M * -0.125) * ((D * (D * math.sqrt((((h / l) / l) / l)))) / d)) else: tmp = d * math.sqrt(((1.0 / h) / l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.7e-13) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (l <= 2.3e-308) tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(Float64(Float64(M * M) / d) * Float64(Float64(D * D) * 0.125))); elseif (l <= 340000000.0) tmp = Float64(M * Float64(Float64(M * -0.125) * Float64(Float64(D * Float64(D * sqrt(Float64(Float64(Float64(h / l) / l) / l)))) / d))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.7e-13) tmp = (0.0 - d) * sqrt((1.0 / (h * l))); elseif (l <= 2.3e-308) tmp = sqrt(((h / l) / (l * l))) * (((M * M) / d) * ((D * D) * 0.125)); elseif (l <= 340000000.0) tmp = M * ((M * -0.125) * ((D * (D * sqrt((((h / l) / l) / l)))) / d)); else tmp = d * sqrt(((1.0 / h) / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.7e-13], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.3e-308], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 340000000.0], N[(M * N[(N[(M * -0.125), $MachinePrecision] * N[(N[(D * N[(D * N[Sqrt[N[(N[(N[(h / l), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.7 \cdot 10^{-13}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;\ell \leq 2.3 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(\frac{M \cdot M}{d} \cdot \left(\left(D \cdot D\right) \cdot 0.125\right)\right)\\
\mathbf{elif}\;\ell \leq 340000000:\\
\;\;\;\;M \cdot \left(\left(M \cdot -0.125\right) \cdot \frac{D \cdot \left(D \cdot \sqrt{\frac{\frac{\frac{h}{\ell}}{\ell}}{\ell}}\right)}{d}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if l < -1.70000000000000008e-13Initial program 64.1%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6451.1%
Simplified51.1%
if -1.70000000000000008e-13 < l < 2.2999999999999999e-308Initial program 74.2%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr78.8%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr79.0%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6479.0%
Simplified79.0%
Taylor expanded in h around -inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
cube-multN/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
Simplified44.3%
if 2.2999999999999999e-308 < l < 3.4e8Initial program 65.9%
Taylor expanded in d around 0
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified49.5%
associate-/l*N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr55.6%
if 3.4e8 < l Initial program 60.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.2%
Simplified47.2%
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6447.6%
Applied egg-rr47.6%
Final simplification49.5%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.75e-13)
(* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
(if (<= l 2.3e-308)
(* (* (/ (* M M) d) (* (* D D) 0.125)) (sqrt (/ h (* l (* l l)))))
(if (<= l 340000000.0)
(* M (* (* M -0.125) (/ (* D (* D (sqrt (/ (/ (/ h l) l) l)))) d)))
(* d (sqrt (/ (/ 1.0 h) l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.75e-13) {
tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = (((M * M) / d) * ((D * D) * 0.125)) * sqrt((h / (l * (l * l))));
} else if (l <= 340000000.0) {
tmp = M * ((M * -0.125) * ((D * (D * sqrt((((h / l) / l) / l)))) / d));
} else {
tmp = d * sqrt(((1.0 / h) / l));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-1.75d-13)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
else if (l <= 2.3d-308) then
tmp = (((m * m) / d) * ((d_1 * d_1) * 0.125d0)) * sqrt((h / (l * (l * l))))
else if (l <= 340000000.0d0) then
tmp = m * ((m * (-0.125d0)) * ((d_1 * (d_1 * sqrt((((h / l) / l) / l)))) / d))
else
tmp = d * sqrt(((1.0d0 / h) / l))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.75e-13) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = (((M * M) / d) * ((D * D) * 0.125)) * Math.sqrt((h / (l * (l * l))));
} else if (l <= 340000000.0) {
tmp = M * ((M * -0.125) * ((D * (D * Math.sqrt((((h / l) / l) / l)))) / d));
} else {
tmp = d * Math.sqrt(((1.0 / h) / l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.75e-13: tmp = (0.0 - d) * math.sqrt((1.0 / (h * l))) elif l <= 2.3e-308: tmp = (((M * M) / d) * ((D * D) * 0.125)) * math.sqrt((h / (l * (l * l)))) elif l <= 340000000.0: tmp = M * ((M * -0.125) * ((D * (D * math.sqrt((((h / l) / l) / l)))) / d)) else: tmp = d * math.sqrt(((1.0 / h) / l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.75e-13) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (l <= 2.3e-308) tmp = Float64(Float64(Float64(Float64(M * M) / d) * Float64(Float64(D * D) * 0.125)) * sqrt(Float64(h / Float64(l * Float64(l * l))))); elseif (l <= 340000000.0) tmp = Float64(M * Float64(Float64(M * -0.125) * Float64(Float64(D * Float64(D * sqrt(Float64(Float64(Float64(h / l) / l) / l)))) / d))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.75e-13) tmp = (0.0 - d) * sqrt((1.0 / (h * l))); elseif (l <= 2.3e-308) tmp = (((M * M) / d) * ((D * D) * 0.125)) * sqrt((h / (l * (l * l)))); elseif (l <= 340000000.0) tmp = M * ((M * -0.125) * ((D * (D * sqrt((((h / l) / l) / l)))) / d)); else tmp = d * sqrt(((1.0 / h) / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.75e-13], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.3e-308], N[(N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 340000000.0], N[(M * N[(N[(M * -0.125), $MachinePrecision] * N[(N[(D * N[(D * N[Sqrt[N[(N[(N[(h / l), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.75 \cdot 10^{-13}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;\ell \leq 2.3 \cdot 10^{-308}:\\
\;\;\;\;\left(\frac{M \cdot M}{d} \cdot \left(\left(D \cdot D\right) \cdot 0.125\right)\right) \cdot \sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\
\mathbf{elif}\;\ell \leq 340000000:\\
\;\;\;\;M \cdot \left(\left(M \cdot -0.125\right) \cdot \frac{D \cdot \left(D \cdot \sqrt{\frac{\frac{\frac{h}{\ell}}{\ell}}{\ell}}\right)}{d}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if l < -1.7500000000000001e-13Initial program 64.1%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6451.1%
Simplified51.1%
if -1.7500000000000001e-13 < l < 2.2999999999999999e-308Initial program 74.2%
Taylor expanded in h around -inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
Simplified44.3%
if 2.2999999999999999e-308 < l < 3.4e8Initial program 65.9%
Taylor expanded in d around 0
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified49.5%
associate-/l*N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr55.6%
if 3.4e8 < l Initial program 60.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.2%
Simplified47.2%
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6447.6%
Applied egg-rr47.6%
Final simplification49.5%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.8e-214)
(* (- 0.0 d) (sqrt (/ 1.0 (* h l))))
(if (<= l 2.3e-308)
(* d (pow (* (* h l) (* h l)) -0.25))
(if (<= l 175000000.0)
(* M (* (* M -0.125) (/ (* D (* D (sqrt (/ (/ (/ h l) l) l)))) d)))
(* d (sqrt (/ (/ 1.0 h) l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.8e-214) {
tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = d * pow(((h * l) * (h * l)), -0.25);
} else if (l <= 175000000.0) {
tmp = M * ((M * -0.125) * ((D * (D * sqrt((((h / l) / l) / l)))) / d));
} else {
tmp = d * sqrt(((1.0 / h) / l));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-1.8d-214)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
else if (l <= 2.3d-308) then
tmp = d * (((h * l) * (h * l)) ** (-0.25d0))
else if (l <= 175000000.0d0) then
tmp = m * ((m * (-0.125d0)) * ((d_1 * (d_1 * sqrt((((h / l) / l) / l)))) / d))
else
tmp = d * sqrt(((1.0d0 / h) / l))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.8e-214) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
} else if (l <= 2.3e-308) {
tmp = d * Math.pow(((h * l) * (h * l)), -0.25);
} else if (l <= 175000000.0) {
tmp = M * ((M * -0.125) * ((D * (D * Math.sqrt((((h / l) / l) / l)))) / d));
} else {
tmp = d * Math.sqrt(((1.0 / h) / l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.8e-214: tmp = (0.0 - d) * math.sqrt((1.0 / (h * l))) elif l <= 2.3e-308: tmp = d * math.pow(((h * l) * (h * l)), -0.25) elif l <= 175000000.0: tmp = M * ((M * -0.125) * ((D * (D * math.sqrt((((h / l) / l) / l)))) / d)) else: tmp = d * math.sqrt(((1.0 / h) / l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.8e-214) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (l <= 2.3e-308) tmp = Float64(d * (Float64(Float64(h * l) * Float64(h * l)) ^ -0.25)); elseif (l <= 175000000.0) tmp = Float64(M * Float64(Float64(M * -0.125) * Float64(Float64(D * Float64(D * sqrt(Float64(Float64(Float64(h / l) / l) / l)))) / d))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.8e-214) tmp = (0.0 - d) * sqrt((1.0 / (h * l))); elseif (l <= 2.3e-308) tmp = d * (((h * l) * (h * l)) ^ -0.25); elseif (l <= 175000000.0) tmp = M * ((M * -0.125) * ((D * (D * sqrt((((h / l) / l) / l)))) / d)); else tmp = d * sqrt(((1.0 / h) / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.8e-214], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.3e-308], N[(d * N[Power[N[(N[(h * l), $MachinePrecision] * N[(h * l), $MachinePrecision]), $MachinePrecision], -0.25], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 175000000.0], N[(M * N[(N[(M * -0.125), $MachinePrecision] * N[(N[(D * N[(D * N[Sqrt[N[(N[(N[(h / l), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.8 \cdot 10^{-214}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;\ell \leq 2.3 \cdot 10^{-308}:\\
\;\;\;\;d \cdot {\left(\left(h \cdot \ell\right) \cdot \left(h \cdot \ell\right)\right)}^{-0.25}\\
\mathbf{elif}\;\ell \leq 175000000:\\
\;\;\;\;M \cdot \left(\left(M \cdot -0.125\right) \cdot \frac{D \cdot \left(D \cdot \sqrt{\frac{\frac{\frac{h}{\ell}}{\ell}}{\ell}}\right)}{d}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if l < -1.8e-214Initial program 67.7%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6443.0%
Simplified43.0%
if -1.8e-214 < l < 2.2999999999999999e-308Initial program 76.7%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6420.9%
Simplified20.9%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6420.9%
Applied egg-rr20.9%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
pow1/2N/A
pow-flipN/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval20.9%
Applied egg-rr20.9%
*-commutativeN/A
metadata-evalN/A
pow-sqrN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6448.9%
Applied egg-rr48.9%
if 2.2999999999999999e-308 < l < 1.75e8Initial program 65.9%
Taylor expanded in d around 0
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
associate-*r/N/A
associate-*l/N/A
/-lowering-/.f64N/A
Simplified49.5%
associate-/l*N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr55.6%
if 1.75e8 < l Initial program 60.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.2%
Simplified47.2%
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6447.6%
Applied egg-rr47.6%
Final simplification47.3%
(FPCore (d h l M D) :precision binary64 (* (+ 1.0 (/ (/ (* h (* M D)) (* d 2.0)) (/ l (/ -0.25 (/ d (* M D)))))) (sqrt (* (/ d l) (/ d h)))))
double code(double d, double h, double l, double M, double D) {
return (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * sqrt(((d / l) * (d / h)));
}
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 = (1.0d0 + (((h * (m * d_1)) / (d * 2.0d0)) / (l / ((-0.25d0) / (d / (m * d_1)))))) * sqrt(((d / l) * (d / h)))
end function
public static double code(double d, double h, double l, double M, double D) {
return (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * Math.sqrt(((d / l) * (d / h)));
}
def code(d, h, l, M, D): return (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * math.sqrt(((d / l) * (d / h)))
function code(d, h, l, M, D) return Float64(Float64(1.0 + Float64(Float64(Float64(h * Float64(M * D)) / Float64(d * 2.0)) / Float64(l / Float64(-0.25 / Float64(d / Float64(M * D)))))) * sqrt(Float64(Float64(d / l) * Float64(d / h)))) end
function tmp = code(d, h, l, M, D) tmp = (1.0 + (((h * (M * D)) / (d * 2.0)) / (l / (-0.25 / (d / (M * D)))))) * sqrt(((d / l) * (d / h))); end
code[d_, h_, l_, M_, D_] := N[(N[(1.0 + N[(N[(N[(h * N[(M * D), $MachinePrecision]), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] / N[(l / N[(-0.25 / N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{\frac{h \cdot \left(M \cdot D\right)}{d \cdot 2}}{\frac{\ell}{\frac{-0.25}{\frac{d}{M \cdot D}}}}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}
\end{array}
Initial program 66.2%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr71.2%
associate-*l*N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
sub-negN/A
+-lowering-+.f64N/A
Applied egg-rr71.3%
Taylor expanded in M around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.3%
Simplified71.3%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr58.2%
Final simplification58.2%
(FPCore (d h l M D) :precision binary64 (if (<= l 3.1e-282) (* (- 0.0 d) (sqrt (/ 1.0 (* h l)))) (* d (pow (* h l) -0.5))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 3.1e-282) {
tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
} else {
tmp = d * pow((h * l), -0.5);
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= 3.1d-282) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
else
tmp = d * ((h * l) ** (-0.5d0))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 3.1e-282) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
} else {
tmp = d * Math.pow((h * l), -0.5);
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 3.1e-282: tmp = (0.0 - d) * math.sqrt((1.0 / (h * l))) else: tmp = d * math.pow((h * l), -0.5) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 3.1e-282) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(d * (Float64(h * l) ^ -0.5)); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 3.1e-282) tmp = (0.0 - d) * sqrt((1.0 / (h * l))); else tmp = d * ((h * l) ^ -0.5); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 3.1e-282], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.1 \cdot 10^{-282}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\
\end{array}
\end{array}
if l < 3.10000000000000013e-282Initial program 69.7%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6440.8%
Simplified40.8%
if 3.10000000000000013e-282 < l Initial program 61.7%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6438.3%
Simplified38.3%
*-commutativeN/A
*-lowering-*.f64N/A
inv-powN/A
sqrt-pow1N/A
metadata-evalN/A
pow-lowering-pow.f64N/A
*-lowering-*.f6438.8%
Applied egg-rr38.8%
Final simplification39.9%
(FPCore (d h l M D) :precision binary64 (* d (sqrt (/ (/ 1.0 h) l))))
double code(double d, double h, double l, double M, double D) {
return d * sqrt(((1.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 * sqrt(((1.0d0 / h) / l))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.sqrt(((1.0 / h) / l));
}
def code(d, h, l, M, D): return d * math.sqrt(((1.0 / h) / l))
function code(d, h, l, M, D) return Float64(d * sqrt(Float64(Float64(1.0 / h) / l))) end
function tmp = code(d, h, l, M, D) tmp = d * sqrt(((1.0 / h) / l)); end
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}
\end{array}
Initial program 66.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6422.5%
Simplified22.5%
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6422.6%
Applied egg-rr22.6%
(FPCore (d h l M D) :precision binary64 (* d (sqrt (/ 1.0 (* h l)))))
double code(double d, double h, double l, double M, double D) {
return d * sqrt((1.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 * sqrt((1.0d0 / (h * l)))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.sqrt((1.0 / (h * l)));
}
def code(d, h, l, M, D): return d * math.sqrt((1.0 / (h * l)))
function code(d, h, l, M, D) return Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) end
function tmp = code(d, h, l, M, D) tmp = d * sqrt((1.0 / (h * l))); end
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot \sqrt{\frac{1}{h \cdot \ell}}
\end{array}
Initial program 66.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6422.5%
Simplified22.5%
(FPCore (d h l M D) :precision binary64 (* d (pow (* h l) -0.5)))
double code(double d, double h, double l, double M, double D) {
return d * pow((h * l), -0.5);
}
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 * l) ** (-0.5d0))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.pow((h * l), -0.5);
}
def code(d, h, l, M, D): return d * math.pow((h * l), -0.5)
function code(d, h, l, M, D) return Float64(d * (Float64(h * l) ^ -0.5)) end
function tmp = code(d, h, l, M, D) tmp = d * ((h * l) ^ -0.5); end
code[d_, h_, l_, M_, D_] := N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot {\left(h \cdot \ell\right)}^{-0.5}
\end{array}
Initial program 66.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6422.5%
Simplified22.5%
*-commutativeN/A
*-lowering-*.f64N/A
inv-powN/A
sqrt-pow1N/A
metadata-evalN/A
pow-lowering-pow.f64N/A
*-lowering-*.f6422.4%
Applied egg-rr22.4%
Final simplification22.4%
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* h l))))
double code(double d, double h, double l, double M, double D) {
return d / sqrt((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 / sqrt((h * l))
end function
public static double code(double d, double h, double l, double M, double D) {
return d / Math.sqrt((h * l));
}
def code(d, h, l, M, D): return d / math.sqrt((h * l))
function code(d, h, l, M, D) return Float64(d / sqrt(Float64(h * l))) end
function tmp = code(d, h, l, M, D) tmp = d / sqrt((h * l)); end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{d}{\sqrt{h \cdot \ell}}
\end{array}
Initial program 66.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6422.5%
Simplified22.5%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6422.3%
Applied egg-rr22.3%
herbie shell --seed 2024191
(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)))))