
(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 20 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 (/ (/ d D) M))
(t_1 (sqrt (/ d l)))
(t_2 (/ (* M D) d))
(t_3 (+ 1.0 (* (* h (* t_2 0.25)) (/ (/ t_2 -2.0) l)))))
(if (<= l -2e-310)
(* t_1 (* (* (pow (- 0.0 d) 0.5) (sqrt (/ -1.0 h))) t_3))
(if (<= l 1.35e+208)
(* t_1 (* t_3 (/ (sqrt d) (sqrt h))))
(*
(/ d (pow (* l h) 0.5))
(+ 1.0 (* (/ (/ h t_0) l) (/ -0.125 t_0))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double t_1 = sqrt((d / l));
double t_2 = (M * D) / d;
double t_3 = 1.0 + ((h * (t_2 * 0.25)) * ((t_2 / -2.0) / l));
double tmp;
if (l <= -2e-310) {
tmp = t_1 * ((pow((0.0 - d), 0.5) * sqrt((-1.0 / h))) * t_3);
} else if (l <= 1.35e+208) {
tmp = t_1 * (t_3 * (sqrt(d) / sqrt(h)));
} else {
tmp = (d / pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0)));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (d / d_1) / m
t_1 = sqrt((d / l))
t_2 = (m * d_1) / d
t_3 = 1.0d0 + ((h * (t_2 * 0.25d0)) * ((t_2 / (-2.0d0)) / l))
if (l <= (-2d-310)) then
tmp = t_1 * ((((0.0d0 - d) ** 0.5d0) * sqrt(((-1.0d0) / h))) * t_3)
else if (l <= 1.35d+208) then
tmp = t_1 * (t_3 * (sqrt(d) / sqrt(h)))
else
tmp = (d / ((l * h) ** 0.5d0)) * (1.0d0 + (((h / t_0) / l) * ((-0.125d0) / t_0)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double t_1 = Math.sqrt((d / l));
double t_2 = (M * D) / d;
double t_3 = 1.0 + ((h * (t_2 * 0.25)) * ((t_2 / -2.0) / l));
double tmp;
if (l <= -2e-310) {
tmp = t_1 * ((Math.pow((0.0 - d), 0.5) * Math.sqrt((-1.0 / h))) * t_3);
} else if (l <= 1.35e+208) {
tmp = t_1 * (t_3 * (Math.sqrt(d) / Math.sqrt(h)));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (d / D) / M t_1 = math.sqrt((d / l)) t_2 = (M * D) / d t_3 = 1.0 + ((h * (t_2 * 0.25)) * ((t_2 / -2.0) / l)) tmp = 0 if l <= -2e-310: tmp = t_1 * ((math.pow((0.0 - d), 0.5) * math.sqrt((-1.0 / h))) * t_3) elif l <= 1.35e+208: tmp = t_1 * (t_3 * (math.sqrt(d) / math.sqrt(h))) else: tmp = (d / math.pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0))) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(d / D) / M) t_1 = sqrt(Float64(d / l)) t_2 = Float64(Float64(M * D) / d) t_3 = Float64(1.0 + Float64(Float64(h * Float64(t_2 * 0.25)) * Float64(Float64(t_2 / -2.0) / l))) tmp = 0.0 if (l <= -2e-310) tmp = Float64(t_1 * Float64(Float64((Float64(0.0 - d) ^ 0.5) * sqrt(Float64(-1.0 / h))) * t_3)); elseif (l <= 1.35e+208) tmp = Float64(t_1 * Float64(t_3 * Float64(sqrt(d) / sqrt(h)))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(h / t_0) / l) * Float64(-0.125 / t_0)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (d / D) / M; t_1 = sqrt((d / l)); t_2 = (M * D) / d; t_3 = 1.0 + ((h * (t_2 * 0.25)) * ((t_2 / -2.0) / l)); tmp = 0.0; if (l <= -2e-310) tmp = t_1 * ((((0.0 - d) ^ 0.5) * sqrt((-1.0 / h))) * t_3); elseif (l <= 1.35e+208) tmp = t_1 * (t_3 * (sqrt(d) / sqrt(h))); else tmp = (d / ((l * h) ^ 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(N[(h * N[(t$95$2 * 0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 / -2.0), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2e-310], N[(t$95$1 * N[(N[(N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(-1.0 / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.35e+208], N[(t$95$1 * N[(t$95$3 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h / t$95$0), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{d}{D}}{M}\\
t_1 := \sqrt{\frac{d}{\ell}}\\
t_2 := \frac{M \cdot D}{d}\\
t_3 := 1 + \left(h \cdot \left(t\_2 \cdot 0.25\right)\right) \cdot \frac{\frac{t\_2}{-2}}{\ell}\\
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot \left(\left({\left(0 - d\right)}^{0.5} \cdot \sqrt{\frac{-1}{h}}\right) \cdot t\_3\right)\\
\mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+208}:\\
\;\;\;\;t\_1 \cdot \left(t\_3 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot \left(1 + \frac{\frac{h}{t\_0}}{\ell} \cdot \frac{-0.125}{t\_0}\right)\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 68.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.1%
frac-2negN/A
div-invN/A
sqrt-prodN/A
*-lowering-*.f64N/A
pow1/2N/A
metadata-evalN/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f64N/A
frac-2negN/A
metadata-evalN/A
remove-double-negN/A
/-lowering-/.f6485.6%
Applied egg-rr85.6%
if -1.999999999999994e-310 < l < 1.35e208Initial program 69.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified76.1%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6488.6%
Applied egg-rr88.6%
if 1.35e208 < l Initial program 18.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified23.5%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr29.4%
Applied egg-rr78.7%
Final simplification86.4%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (/ d D) M))
(t_1 (/ (* M D) d))
(t_2 (sqrt (/ d l)))
(t_3 (+ 1.0 (* (/ (/ h t_0) l) (/ -0.125 t_0)))))
(if (<= l -2e-310)
(/ (* t_2 t_3) (/ (pow (- 0.0 h) 0.5) (sqrt (- 0.0 d))))
(if (<= l 2.6e+210)
(*
t_2
(*
(+ 1.0 (* (* h (* t_1 0.25)) (/ (/ t_1 -2.0) l)))
(/ (sqrt d) (sqrt h))))
(* (/ d (pow (* l h) 0.5)) t_3)))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double t_1 = (M * D) / d;
double t_2 = sqrt((d / l));
double t_3 = 1.0 + (((h / t_0) / l) * (-0.125 / t_0));
double tmp;
if (l <= -2e-310) {
tmp = (t_2 * t_3) / (pow((0.0 - h), 0.5) / sqrt((0.0 - d)));
} else if (l <= 2.6e+210) {
tmp = t_2 * ((1.0 + ((h * (t_1 * 0.25)) * ((t_1 / -2.0) / l))) * (sqrt(d) / sqrt(h)));
} else {
tmp = (d / pow((l * h), 0.5)) * t_3;
}
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 = (d / d_1) / m
t_1 = (m * d_1) / d
t_2 = sqrt((d / l))
t_3 = 1.0d0 + (((h / t_0) / l) * ((-0.125d0) / t_0))
if (l <= (-2d-310)) then
tmp = (t_2 * t_3) / (((0.0d0 - h) ** 0.5d0) / sqrt((0.0d0 - d)))
else if (l <= 2.6d+210) then
tmp = t_2 * ((1.0d0 + ((h * (t_1 * 0.25d0)) * ((t_1 / (-2.0d0)) / l))) * (sqrt(d) / sqrt(h)))
else
tmp = (d / ((l * h) ** 0.5d0)) * t_3
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double t_1 = (M * D) / d;
double t_2 = Math.sqrt((d / l));
double t_3 = 1.0 + (((h / t_0) / l) * (-0.125 / t_0));
double tmp;
if (l <= -2e-310) {
tmp = (t_2 * t_3) / (Math.pow((0.0 - h), 0.5) / Math.sqrt((0.0 - d)));
} else if (l <= 2.6e+210) {
tmp = t_2 * ((1.0 + ((h * (t_1 * 0.25)) * ((t_1 / -2.0) / l))) * (Math.sqrt(d) / Math.sqrt(h)));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * t_3;
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (d / D) / M t_1 = (M * D) / d t_2 = math.sqrt((d / l)) t_3 = 1.0 + (((h / t_0) / l) * (-0.125 / t_0)) tmp = 0 if l <= -2e-310: tmp = (t_2 * t_3) / (math.pow((0.0 - h), 0.5) / math.sqrt((0.0 - d))) elif l <= 2.6e+210: tmp = t_2 * ((1.0 + ((h * (t_1 * 0.25)) * ((t_1 / -2.0) / l))) * (math.sqrt(d) / math.sqrt(h))) else: tmp = (d / math.pow((l * h), 0.5)) * t_3 return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(d / D) / M) t_1 = Float64(Float64(M * D) / d) t_2 = sqrt(Float64(d / l)) t_3 = Float64(1.0 + Float64(Float64(Float64(h / t_0) / l) * Float64(-0.125 / t_0))) tmp = 0.0 if (l <= -2e-310) tmp = Float64(Float64(t_2 * t_3) / Float64((Float64(0.0 - h) ^ 0.5) / sqrt(Float64(0.0 - d)))); elseif (l <= 2.6e+210) tmp = Float64(t_2 * Float64(Float64(1.0 + Float64(Float64(h * Float64(t_1 * 0.25)) * Float64(Float64(t_1 / -2.0) / l))) * Float64(sqrt(d) / sqrt(h)))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * t_3); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (d / D) / M; t_1 = (M * D) / d; t_2 = sqrt((d / l)); t_3 = 1.0 + (((h / t_0) / l) * (-0.125 / t_0)); tmp = 0.0; if (l <= -2e-310) tmp = (t_2 * t_3) / (((0.0 - h) ^ 0.5) / sqrt((0.0 - d))); elseif (l <= 2.6e+210) tmp = t_2 * ((1.0 + ((h * (t_1 * 0.25)) * ((t_1 / -2.0) / l))) * (sqrt(d) / sqrt(h))); else tmp = (d / ((l * h) ^ 0.5)) * t_3; end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, Block[{t$95$1 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(N[(N[(h / t$95$0), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2e-310], N[(N[(t$95$2 * t$95$3), $MachinePrecision] / N[(N[Power[N[(0.0 - h), $MachinePrecision], 0.5], $MachinePrecision] / N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.6e+210], N[(t$95$2 * N[(N[(1.0 + N[(N[(h * N[(t$95$1 * 0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 / -2.0), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{d}{D}}{M}\\
t_1 := \frac{M \cdot D}{d}\\
t_2 := \sqrt{\frac{d}{\ell}}\\
t_3 := 1 + \frac{\frac{h}{t\_0}}{\ell} \cdot \frac{-0.125}{t\_0}\\
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{t\_2 \cdot t\_3}{\frac{{\left(0 - h\right)}^{0.5}}{\sqrt{0 - d}}}\\
\mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+210}:\\
\;\;\;\;t\_2 \cdot \left(\left(1 + \left(h \cdot \left(t\_1 \cdot 0.25\right)\right) \cdot \frac{\frac{t\_1}{-2}}{\ell}\right) \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot t\_3\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 68.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.1%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr71.6%
Applied egg-rr73.6%
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6486.3%
Applied egg-rr86.3%
if -1.999999999999994e-310 < l < 2.5999999999999999e210Initial program 69.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified76.1%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6488.6%
Applied egg-rr88.6%
if 2.5999999999999999e210 < l Initial program 18.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified23.5%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr29.4%
Applied egg-rr78.7%
Final simplification86.7%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (/ d D) M))
(t_1 (/ M (/ d D)))
(t_2 (sqrt (/ d l)))
(t_3 (/ (* M D) d)))
(if (<= l -2e-310)
(*
t_2
(*
(/ (sqrt (- 0.0 d)) (pow (- 0.0 h) 0.5))
(+ 1.0 (* h (* -0.125 (/ t_1 (/ l t_1)))))))
(if (<= l 3e+211)
(*
t_2
(*
(+ 1.0 (* (* h (* t_3 0.25)) (/ (/ t_3 -2.0) l)))
(/ (sqrt d) (sqrt h))))
(*
(/ d (pow (* l h) 0.5))
(+ 1.0 (* (/ (/ h t_0) l) (/ -0.125 t_0))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double t_1 = M / (d / D);
double t_2 = sqrt((d / l));
double t_3 = (M * D) / d;
double tmp;
if (l <= -2e-310) {
tmp = t_2 * ((sqrt((0.0 - d)) / pow((0.0 - h), 0.5)) * (1.0 + (h * (-0.125 * (t_1 / (l / t_1))))));
} else if (l <= 3e+211) {
tmp = t_2 * ((1.0 + ((h * (t_3 * 0.25)) * ((t_3 / -2.0) / l))) * (sqrt(d) / sqrt(h)));
} else {
tmp = (d / pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0)));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (d / d_1) / m
t_1 = m / (d / d_1)
t_2 = sqrt((d / l))
t_3 = (m * d_1) / d
if (l <= (-2d-310)) then
tmp = t_2 * ((sqrt((0.0d0 - d)) / ((0.0d0 - h) ** 0.5d0)) * (1.0d0 + (h * ((-0.125d0) * (t_1 / (l / t_1))))))
else if (l <= 3d+211) then
tmp = t_2 * ((1.0d0 + ((h * (t_3 * 0.25d0)) * ((t_3 / (-2.0d0)) / l))) * (sqrt(d) / sqrt(h)))
else
tmp = (d / ((l * h) ** 0.5d0)) * (1.0d0 + (((h / t_0) / l) * ((-0.125d0) / t_0)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double t_1 = M / (d / D);
double t_2 = Math.sqrt((d / l));
double t_3 = (M * D) / d;
double tmp;
if (l <= -2e-310) {
tmp = t_2 * ((Math.sqrt((0.0 - d)) / Math.pow((0.0 - h), 0.5)) * (1.0 + (h * (-0.125 * (t_1 / (l / t_1))))));
} else if (l <= 3e+211) {
tmp = t_2 * ((1.0 + ((h * (t_3 * 0.25)) * ((t_3 / -2.0) / l))) * (Math.sqrt(d) / Math.sqrt(h)));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (d / D) / M t_1 = M / (d / D) t_2 = math.sqrt((d / l)) t_3 = (M * D) / d tmp = 0 if l <= -2e-310: tmp = t_2 * ((math.sqrt((0.0 - d)) / math.pow((0.0 - h), 0.5)) * (1.0 + (h * (-0.125 * (t_1 / (l / t_1)))))) elif l <= 3e+211: tmp = t_2 * ((1.0 + ((h * (t_3 * 0.25)) * ((t_3 / -2.0) / l))) * (math.sqrt(d) / math.sqrt(h))) else: tmp = (d / math.pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0))) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(d / D) / M) t_1 = Float64(M / Float64(d / D)) t_2 = sqrt(Float64(d / l)) t_3 = Float64(Float64(M * D) / d) tmp = 0.0 if (l <= -2e-310) tmp = Float64(t_2 * Float64(Float64(sqrt(Float64(0.0 - d)) / (Float64(0.0 - h) ^ 0.5)) * Float64(1.0 + Float64(h * Float64(-0.125 * Float64(t_1 / Float64(l / t_1))))))); elseif (l <= 3e+211) tmp = Float64(t_2 * Float64(Float64(1.0 + Float64(Float64(h * Float64(t_3 * 0.25)) * Float64(Float64(t_3 / -2.0) / l))) * Float64(sqrt(d) / sqrt(h)))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(h / t_0) / l) * Float64(-0.125 / t_0)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (d / D) / M; t_1 = M / (d / D); t_2 = sqrt((d / l)); t_3 = (M * D) / d; tmp = 0.0; if (l <= -2e-310) tmp = t_2 * ((sqrt((0.0 - d)) / ((0.0 - h) ^ 0.5)) * (1.0 + (h * (-0.125 * (t_1 / (l / t_1)))))); elseif (l <= 3e+211) tmp = t_2 * ((1.0 + ((h * (t_3 * 0.25)) * ((t_3 / -2.0) / l))) * (sqrt(d) / sqrt(h))); else tmp = (d / ((l * h) ^ 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, Block[{t$95$1 = N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, If[LessEqual[l, -2e-310], N[(t$95$2 * N[(N[(N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision] / N[Power[N[(0.0 - h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(h * N[(-0.125 * N[(t$95$1 / N[(l / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3e+211], N[(t$95$2 * N[(N[(1.0 + N[(N[(h * N[(t$95$3 * 0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$3 / -2.0), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h / t$95$0), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{d}{D}}{M}\\
t_1 := \frac{M}{\frac{d}{D}}\\
t_2 := \sqrt{\frac{d}{\ell}}\\
t_3 := \frac{M \cdot D}{d}\\
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t\_2 \cdot \left(\frac{\sqrt{0 - d}}{{\left(0 - h\right)}^{0.5}} \cdot \left(1 + h \cdot \left(-0.125 \cdot \frac{t\_1}{\frac{\ell}{t\_1}}\right)\right)\right)\\
\mathbf{elif}\;\ell \leq 3 \cdot 10^{+211}:\\
\;\;\;\;t\_2 \cdot \left(\left(1 + \left(h \cdot \left(t\_3 \cdot 0.25\right)\right) \cdot \frac{\frac{t\_3}{-2}}{\ell}\right) \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot \left(1 + \frac{\frac{h}{t\_0}}{\ell} \cdot \frac{-0.125}{t\_0}\right)\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 68.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.1%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr71.6%
frac-2negN/A
sqrt-divN/A
pow1/2N/A
/-lowering-/.f64N/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6484.1%
Applied egg-rr84.1%
if -1.999999999999994e-310 < l < 3e211Initial program 69.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified76.1%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6488.6%
Applied egg-rr88.6%
if 3e211 < l Initial program 18.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified23.5%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr29.4%
Applied egg-rr78.7%
Final simplification85.6%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* M D) d))
(t_1 (sqrt (/ d l)))
(t_2 (+ 1.0 (* (* h (* t_0 0.25)) (/ (/ t_0 -2.0) l))))
(t_3 (/ (/ d D) M)))
(if (<= l -2e-310)
(* t_1 (* t_2 (sqrt (/ d h))))
(if (<= l 1.4e+211)
(* t_1 (* t_2 (/ (sqrt d) (sqrt h))))
(*
(/ d (pow (* l h) 0.5))
(+ 1.0 (* (/ (/ h t_3) l) (/ -0.125 t_3))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / d;
double t_1 = sqrt((d / l));
double t_2 = 1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l));
double t_3 = (d / D) / M;
double tmp;
if (l <= -2e-310) {
tmp = t_1 * (t_2 * sqrt((d / h)));
} else if (l <= 1.4e+211) {
tmp = t_1 * (t_2 * (sqrt(d) / sqrt(h)));
} else {
tmp = (d / pow((l * h), 0.5)) * (1.0 + (((h / t_3) / l) * (-0.125 / t_3)));
}
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 = (m * d_1) / d
t_1 = sqrt((d / l))
t_2 = 1.0d0 + ((h * (t_0 * 0.25d0)) * ((t_0 / (-2.0d0)) / l))
t_3 = (d / d_1) / m
if (l <= (-2d-310)) then
tmp = t_1 * (t_2 * sqrt((d / h)))
else if (l <= 1.4d+211) then
tmp = t_1 * (t_2 * (sqrt(d) / sqrt(h)))
else
tmp = (d / ((l * h) ** 0.5d0)) * (1.0d0 + (((h / t_3) / l) * ((-0.125d0) / t_3)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / d;
double t_1 = Math.sqrt((d / l));
double t_2 = 1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l));
double t_3 = (d / D) / M;
double tmp;
if (l <= -2e-310) {
tmp = t_1 * (t_2 * Math.sqrt((d / h)));
} else if (l <= 1.4e+211) {
tmp = t_1 * (t_2 * (Math.sqrt(d) / Math.sqrt(h)));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * (1.0 + (((h / t_3) / l) * (-0.125 / t_3)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (M * D) / d t_1 = math.sqrt((d / l)) t_2 = 1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l)) t_3 = (d / D) / M tmp = 0 if l <= -2e-310: tmp = t_1 * (t_2 * math.sqrt((d / h))) elif l <= 1.4e+211: tmp = t_1 * (t_2 * (math.sqrt(d) / math.sqrt(h))) else: tmp = (d / math.pow((l * h), 0.5)) * (1.0 + (((h / t_3) / l) * (-0.125 / t_3))) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) / d) t_1 = sqrt(Float64(d / l)) t_2 = Float64(1.0 + Float64(Float64(h * Float64(t_0 * 0.25)) * Float64(Float64(t_0 / -2.0) / l))) t_3 = Float64(Float64(d / D) / M) tmp = 0.0 if (l <= -2e-310) tmp = Float64(t_1 * Float64(t_2 * sqrt(Float64(d / h)))); elseif (l <= 1.4e+211) tmp = Float64(t_1 * Float64(t_2 * Float64(sqrt(d) / sqrt(h)))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(h / t_3) / l) * Float64(-0.125 / t_3)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (M * D) / d; t_1 = sqrt((d / l)); t_2 = 1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l)); t_3 = (d / D) / M; tmp = 0.0; if (l <= -2e-310) tmp = t_1 * (t_2 * sqrt((d / h))); elseif (l <= 1.4e+211) tmp = t_1 * (t_2 * (sqrt(d) / sqrt(h))); else tmp = (d / ((l * h) ^ 0.5)) * (1.0 + (((h / t_3) / l) * (-0.125 / t_3))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(N[(h * N[(t$95$0 * 0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 / -2.0), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, If[LessEqual[l, -2e-310], N[(t$95$1 * N[(t$95$2 * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.4e+211], N[(t$95$1 * N[(t$95$2 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h / t$95$3), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := \sqrt{\frac{d}{\ell}}\\
t_2 := 1 + \left(h \cdot \left(t\_0 \cdot 0.25\right)\right) \cdot \frac{\frac{t\_0}{-2}}{\ell}\\
t_3 := \frac{\frac{d}{D}}{M}\\
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \sqrt{\frac{d}{h}}\right)\\
\mathbf{elif}\;\ell \leq 1.4 \cdot 10^{+211}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot \left(1 + \frac{\frac{h}{t\_3}}{\ell} \cdot \frac{-0.125}{t\_3}\right)\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 68.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.1%
if -1.999999999999994e-310 < l < 1.4e211Initial program 69.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified76.1%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6488.6%
Applied egg-rr88.6%
if 1.4e211 < l Initial program 18.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified23.5%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr29.4%
Applied egg-rr78.7%
Final simplification80.0%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* M D) d)) (t_1 (/ (/ d D) M)))
(if (<= l 6.8e-279)
(*
(sqrt (/ d l))
(* (+ 1.0 (* (* h (* t_0 0.25)) (/ (/ t_0 -2.0) l))) (sqrt (/ d h))))
(* (/ d (pow (* l h) 0.5)) (+ 1.0 (* (/ (/ h t_1) l) (/ -0.125 t_1)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / d;
double t_1 = (d / D) / M;
double tmp;
if (l <= 6.8e-279) {
tmp = sqrt((d / l)) * ((1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l))) * sqrt((d / h)));
} else {
tmp = (d / pow((l * h), 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1)));
}
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 = (m * d_1) / d
t_1 = (d / d_1) / m
if (l <= 6.8d-279) then
tmp = sqrt((d / l)) * ((1.0d0 + ((h * (t_0 * 0.25d0)) * ((t_0 / (-2.0d0)) / l))) * sqrt((d / h)))
else
tmp = (d / ((l * h) ** 0.5d0)) * (1.0d0 + (((h / t_1) / l) * ((-0.125d0) / t_1)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / d;
double t_1 = (d / D) / M;
double tmp;
if (l <= 6.8e-279) {
tmp = Math.sqrt((d / l)) * ((1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l))) * Math.sqrt((d / h)));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (M * D) / d t_1 = (d / D) / M tmp = 0 if l <= 6.8e-279: tmp = math.sqrt((d / l)) * ((1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l))) * math.sqrt((d / h))) else: tmp = (d / math.pow((l * h), 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1))) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) / d) t_1 = Float64(Float64(d / D) / M) tmp = 0.0 if (l <= 6.8e-279) tmp = Float64(sqrt(Float64(d / l)) * Float64(Float64(1.0 + Float64(Float64(h * Float64(t_0 * 0.25)) * Float64(Float64(t_0 / -2.0) / l))) * sqrt(Float64(d / h)))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(h / t_1) / l) * Float64(-0.125 / t_1)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (M * D) / d; t_1 = (d / D) / M; tmp = 0.0; if (l <= 6.8e-279) tmp = sqrt((d / l)) * ((1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l))) * sqrt((d / h))); else tmp = (d / ((l * h) ^ 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, If[LessEqual[l, 6.8e-279], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(1.0 + N[(N[(h * N[(t$95$0 * 0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 / -2.0), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h / t$95$1), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := \frac{\frac{d}{D}}{M}\\
\mathbf{if}\;\ell \leq 6.8 \cdot 10^{-279}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\left(1 + \left(h \cdot \left(t\_0 \cdot 0.25\right)\right) \cdot \frac{\frac{t\_0}{-2}}{\ell}\right) \cdot \sqrt{\frac{d}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot \left(1 + \frac{\frac{h}{t\_1}}{\ell} \cdot \frac{-0.125}{t\_1}\right)\\
\end{array}
\end{array}
if l < 6.8000000000000003e-279Initial program 69.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.3%
if 6.8000000000000003e-279 < l Initial program 61.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified66.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr66.2%
Applied egg-rr78.2%
Final simplification76.1%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (/ d D) M)) (t_1 (+ 1.0 (* (/ (/ h t_0) l) (/ -0.125 t_0)))))
(if (<= l 5.6e-278)
(/ (* (sqrt (/ d l)) t_1) (sqrt (/ h d)))
(* (/ d (pow (* l h) 0.5)) t_1))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double t_1 = 1.0 + (((h / t_0) / l) * (-0.125 / t_0));
double tmp;
if (l <= 5.6e-278) {
tmp = (sqrt((d / l)) * t_1) / sqrt((h / d));
} else {
tmp = (d / pow((l * h), 0.5)) * t_1;
}
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 / d_1) / m
t_1 = 1.0d0 + (((h / t_0) / l) * ((-0.125d0) / t_0))
if (l <= 5.6d-278) then
tmp = (sqrt((d / l)) * t_1) / sqrt((h / d))
else
tmp = (d / ((l * h) ** 0.5d0)) * t_1
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double t_1 = 1.0 + (((h / t_0) / l) * (-0.125 / t_0));
double tmp;
if (l <= 5.6e-278) {
tmp = (Math.sqrt((d / l)) * t_1) / Math.sqrt((h / d));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * t_1;
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (d / D) / M t_1 = 1.0 + (((h / t_0) / l) * (-0.125 / t_0)) tmp = 0 if l <= 5.6e-278: tmp = (math.sqrt((d / l)) * t_1) / math.sqrt((h / d)) else: tmp = (d / math.pow((l * h), 0.5)) * t_1 return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(d / D) / M) t_1 = Float64(1.0 + Float64(Float64(Float64(h / t_0) / l) * Float64(-0.125 / t_0))) tmp = 0.0 if (l <= 5.6e-278) tmp = Float64(Float64(sqrt(Float64(d / l)) * t_1) / sqrt(Float64(h / d))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * t_1); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (d / D) / M; t_1 = 1.0 + (((h / t_0) / l) * (-0.125 / t_0)); tmp = 0.0; if (l <= 5.6e-278) tmp = (sqrt((d / l)) * t_1) / sqrt((h / d)); else tmp = (d / ((l * h) ^ 0.5)) * t_1; end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(N[(N[(h / t$95$0), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 5.6e-278], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{d}{D}}{M}\\
t_1 := 1 + \frac{\frac{h}{t\_0}}{\ell} \cdot \frac{-0.125}{t\_0}\\
\mathbf{if}\;\ell \leq 5.6 \cdot 10^{-278}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot t\_1}{\sqrt{\frac{h}{d}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot t\_1\\
\end{array}
\end{array}
if l < 5.60000000000000015e-278Initial program 69.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.3%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr72.9%
Applied egg-rr74.8%
if 5.60000000000000015e-278 < l Initial program 61.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified66.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr66.2%
Applied egg-rr78.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (/ d D) M)))
(if (<= l 1.7e-276)
(*
(sqrt (/ d l))
(* (sqrt (/ d h)) (+ 1.0 (* (/ M (/ d D)) (/ (/ -0.125 (/ t_0 h)) l)))))
(* (/ d (pow (* l h) 0.5)) (+ 1.0 (* (/ (/ h t_0) l) (/ -0.125 t_0)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double tmp;
if (l <= 1.7e-276) {
tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((M / (d / D)) * ((-0.125 / (t_0 / h)) / l))));
} else {
tmp = (d / pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0)));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = (d / d_1) / m
if (l <= 1.7d-276) then
tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0d0 + ((m / (d / d_1)) * (((-0.125d0) / (t_0 / h)) / l))))
else
tmp = (d / ((l * h) ** 0.5d0)) * (1.0d0 + (((h / t_0) / l) * ((-0.125d0) / t_0)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double tmp;
if (l <= 1.7e-276) {
tmp = Math.sqrt((d / l)) * (Math.sqrt((d / h)) * (1.0 + ((M / (d / D)) * ((-0.125 / (t_0 / h)) / l))));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (d / D) / M tmp = 0 if l <= 1.7e-276: tmp = math.sqrt((d / l)) * (math.sqrt((d / h)) * (1.0 + ((M / (d / D)) * ((-0.125 / (t_0 / h)) / l)))) else: tmp = (d / math.pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0))) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(d / D) / M) tmp = 0.0 if (l <= 1.7e-276) tmp = Float64(sqrt(Float64(d / l)) * Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(M / Float64(d / D)) * Float64(Float64(-0.125 / Float64(t_0 / h)) / l))))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(h / t_0) / l) * Float64(-0.125 / t_0)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (d / D) / M; tmp = 0.0; if (l <= 1.7e-276) tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((M / (d / D)) * ((-0.125 / (t_0 / h)) / l)))); else tmp = (d / ((l * h) ^ 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, If[LessEqual[l, 1.7e-276], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 / N[(t$95$0 / h), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h / t$95$0), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{d}{D}}{M}\\
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{-276}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{M}{\frac{d}{D}} \cdot \frac{\frac{-0.125}{\frac{t\_0}{h}}}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot \left(1 + \frac{\frac{h}{t\_0}}{\ell} \cdot \frac{-0.125}{t\_0}\right)\\
\end{array}
\end{array}
if l < 1.69999999999999996e-276Initial program 69.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.3%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr72.9%
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
associate-*l*N/A
associate-/l*N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr74.3%
if 1.69999999999999996e-276 < l Initial program 61.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified66.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr66.2%
Applied egg-rr78.2%
Final simplification76.1%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ M (/ d D))) (t_1 (/ (/ d D) M)))
(if (<= l 1.28e-278)
(*
(sqrt (/ d l))
(* (+ 1.0 (* h (* -0.125 (/ t_0 (/ l t_0))))) (sqrt (/ d h))))
(* (/ d (pow (* l h) 0.5)) (+ 1.0 (* (/ (/ h t_1) l) (/ -0.125 t_1)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = M / (d / D);
double t_1 = (d / D) / M;
double tmp;
if (l <= 1.28e-278) {
tmp = sqrt((d / l)) * ((1.0 + (h * (-0.125 * (t_0 / (l / t_0))))) * sqrt((d / h)));
} else {
tmp = (d / pow((l * h), 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1)));
}
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 = m / (d / d_1)
t_1 = (d / d_1) / m
if (l <= 1.28d-278) then
tmp = sqrt((d / l)) * ((1.0d0 + (h * ((-0.125d0) * (t_0 / (l / t_0))))) * sqrt((d / h)))
else
tmp = (d / ((l * h) ** 0.5d0)) * (1.0d0 + (((h / t_1) / l) * ((-0.125d0) / t_1)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = M / (d / D);
double t_1 = (d / D) / M;
double tmp;
if (l <= 1.28e-278) {
tmp = Math.sqrt((d / l)) * ((1.0 + (h * (-0.125 * (t_0 / (l / t_0))))) * Math.sqrt((d / h)));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = M / (d / D) t_1 = (d / D) / M tmp = 0 if l <= 1.28e-278: tmp = math.sqrt((d / l)) * ((1.0 + (h * (-0.125 * (t_0 / (l / t_0))))) * math.sqrt((d / h))) else: tmp = (d / math.pow((l * h), 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1))) return tmp
function code(d, h, l, M, D) t_0 = Float64(M / Float64(d / D)) t_1 = Float64(Float64(d / D) / M) tmp = 0.0 if (l <= 1.28e-278) tmp = Float64(sqrt(Float64(d / l)) * Float64(Float64(1.0 + Float64(h * Float64(-0.125 * Float64(t_0 / Float64(l / t_0))))) * sqrt(Float64(d / h)))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(h / t_1) / l) * Float64(-0.125 / t_1)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = M / (d / D); t_1 = (d / D) / M; tmp = 0.0; if (l <= 1.28e-278) tmp = sqrt((d / l)) * ((1.0 + (h * (-0.125 * (t_0 / (l / t_0))))) * sqrt((d / h))); else tmp = (d / ((l * h) ^ 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, If[LessEqual[l, 1.28e-278], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(1.0 + N[(h * N[(-0.125 * N[(t$95$0 / N[(l / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h / t$95$1), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M}{\frac{d}{D}}\\
t_1 := \frac{\frac{d}{D}}{M}\\
\mathbf{if}\;\ell \leq 1.28 \cdot 10^{-278}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\left(1 + h \cdot \left(-0.125 \cdot \frac{t\_0}{\frac{\ell}{t\_0}}\right)\right) \cdot \sqrt{\frac{d}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot \left(1 + \frac{\frac{h}{t\_1}}{\ell} \cdot \frac{-0.125}{t\_1}\right)\\
\end{array}
\end{array}
if l < 1.2799999999999999e-278Initial program 69.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.3%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr72.9%
if 1.2799999999999999e-278 < l Initial program 61.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified66.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr66.2%
Applied egg-rr78.2%
Final simplification75.4%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ M (/ d D))) (t_1 (/ (/ d D) M)))
(if (<= l -1.35e-42)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= l 3.8e-279)
(*
(+ 1.0 (/ (* h -0.125) (/ (/ l t_0) t_0)))
(sqrt (/ (/ d l) (/ h d))))
(*
(/ d (pow (* l h) 0.5))
(+ 1.0 (* (/ (/ h t_1) l) (/ -0.125 t_1))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = M / (d / D);
double t_1 = (d / D) / M;
double tmp;
if (l <= -1.35e-42) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (l <= 3.8e-279) {
tmp = (1.0 + ((h * -0.125) / ((l / t_0) / t_0))) * sqrt(((d / l) / (h / d)));
} else {
tmp = (d / pow((l * h), 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1)));
}
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 = m / (d / d_1)
t_1 = (d / d_1) / m
if (l <= (-1.35d-42)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (l <= 3.8d-279) then
tmp = (1.0d0 + ((h * (-0.125d0)) / ((l / t_0) / t_0))) * sqrt(((d / l) / (h / d)))
else
tmp = (d / ((l * h) ** 0.5d0)) * (1.0d0 + (((h / t_1) / l) * ((-0.125d0) / t_1)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = M / (d / D);
double t_1 = (d / D) / M;
double tmp;
if (l <= -1.35e-42) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (l <= 3.8e-279) {
tmp = (1.0 + ((h * -0.125) / ((l / t_0) / t_0))) * Math.sqrt(((d / l) / (h / d)));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = M / (d / D) t_1 = (d / D) / M tmp = 0 if l <= -1.35e-42: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif l <= 3.8e-279: tmp = (1.0 + ((h * -0.125) / ((l / t_0) / t_0))) * math.sqrt(((d / l) / (h / d))) else: tmp = (d / math.pow((l * h), 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1))) return tmp
function code(d, h, l, M, D) t_0 = Float64(M / Float64(d / D)) t_1 = Float64(Float64(d / D) / M) tmp = 0.0 if (l <= -1.35e-42) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (l <= 3.8e-279) tmp = Float64(Float64(1.0 + Float64(Float64(h * -0.125) / Float64(Float64(l / t_0) / t_0))) * sqrt(Float64(Float64(d / l) / Float64(h / d)))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(h / t_1) / l) * Float64(-0.125 / t_1)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = M / (d / D); t_1 = (d / D) / M; tmp = 0.0; if (l <= -1.35e-42) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (l <= 3.8e-279) tmp = (1.0 + ((h * -0.125) / ((l / t_0) / t_0))) * sqrt(((d / l) / (h / d))); else tmp = (d / ((l * h) ^ 0.5)) * (1.0 + (((h / t_1) / l) * (-0.125 / t_1))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, If[LessEqual[l, -1.35e-42], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.8e-279], N[(N[(1.0 + N[(N[(h * -0.125), $MachinePrecision] / N[(N[(l / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] / N[(h / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h / t$95$1), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M}{\frac{d}{D}}\\
t_1 := \frac{\frac{d}{D}}{M}\\
\mathbf{if}\;\ell \leq -1.35 \cdot 10^{-42}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;\ell \leq 3.8 \cdot 10^{-279}:\\
\;\;\;\;\left(1 + \frac{h \cdot -0.125}{\frac{\frac{\ell}{t\_0}}{t\_0}}\right) \cdot \sqrt{\frac{\frac{d}{\ell}}{\frac{h}{d}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot \left(1 + \frac{\frac{h}{t\_1}}{\ell} \cdot \frac{-0.125}{t\_1}\right)\\
\end{array}
\end{array}
if l < -1.35e-42Initial program 63.5%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr66.2%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6458.5%
Simplified58.5%
if -1.35e-42 < l < 3.80000000000000033e-279Initial program 76.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified84.1%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr82.4%
Applied egg-rr84.0%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Applied egg-rr75.6%
if 3.80000000000000033e-279 < l Initial program 61.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified66.6%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr66.2%
Applied egg-rr78.2%
Final simplification71.5%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* l (* l l))))
(if (<= d -1.4e-23)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= d -4.9e-296)
(* (sqrt (/ h t_0)) (* (* D (* M (* M D))) (/ 0.125 d)))
(if (<= d 4.3e-117)
(/ -1.0 (* (sqrt (/ t_0 h)) (* 8.0 (/ d (* D (* D (* M M)))))))
(* d (sqrt (/ (/ 1.0 l) h))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = l * (l * l);
double tmp;
if (d <= -1.4e-23) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (d <= -4.9e-296) {
tmp = sqrt((h / t_0)) * ((D * (M * (M * D))) * (0.125 / d));
} else if (d <= 4.3e-117) {
tmp = -1.0 / (sqrt((t_0 / h)) * (8.0 * (d / (D * (D * (M * M))))));
} else {
tmp = d * sqrt(((1.0 / l) / 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 = l * (l * l)
if (d <= (-1.4d-23)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (d <= (-4.9d-296)) then
tmp = sqrt((h / t_0)) * ((d_1 * (m * (m * d_1))) * (0.125d0 / d))
else if (d <= 4.3d-117) then
tmp = (-1.0d0) / (sqrt((t_0 / h)) * (8.0d0 * (d / (d_1 * (d_1 * (m * m))))))
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = l * (l * l);
double tmp;
if (d <= -1.4e-23) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (d <= -4.9e-296) {
tmp = Math.sqrt((h / t_0)) * ((D * (M * (M * D))) * (0.125 / d));
} else if (d <= 4.3e-117) {
tmp = -1.0 / (Math.sqrt((t_0 / h)) * (8.0 * (d / (D * (D * (M * M))))));
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = l * (l * l) tmp = 0 if d <= -1.4e-23: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif d <= -4.9e-296: tmp = math.sqrt((h / t_0)) * ((D * (M * (M * D))) * (0.125 / d)) elif d <= 4.3e-117: tmp = -1.0 / (math.sqrt((t_0 / h)) * (8.0 * (d / (D * (D * (M * M)))))) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) t_0 = Float64(l * Float64(l * l)) tmp = 0.0 if (d <= -1.4e-23) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (d <= -4.9e-296) tmp = Float64(sqrt(Float64(h / t_0)) * Float64(Float64(D * Float64(M * Float64(M * D))) * Float64(0.125 / d))); elseif (d <= 4.3e-117) tmp = Float64(-1.0 / Float64(sqrt(Float64(t_0 / h)) * Float64(8.0 * Float64(d / Float64(D * Float64(D * Float64(M * M))))))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = l * (l * l); tmp = 0.0; if (d <= -1.4e-23) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (d <= -4.9e-296) tmp = sqrt((h / t_0)) * ((D * (M * (M * D))) * (0.125 / d)); elseif (d <= 4.3e-117) tmp = -1.0 / (sqrt((t_0 / h)) * (8.0 * (d / (D * (D * (M * M)))))); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.4e-23], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -4.9e-296], N[(N[Sqrt[N[(h / t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[(D * N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.3e-117], N[(-1.0 / N[(N[Sqrt[N[(t$95$0 / h), $MachinePrecision]], $MachinePrecision] * N[(8.0 * N[(d / N[(D * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \ell \cdot \left(\ell \cdot \ell\right)\\
\mathbf{if}\;d \leq -1.4 \cdot 10^{-23}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;d \leq -4.9 \cdot 10^{-296}:\\
\;\;\;\;\sqrt{\frac{h}{t\_0}} \cdot \left(\left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right) \cdot \frac{0.125}{d}\right)\\
\mathbf{elif}\;d \leq 4.3 \cdot 10^{-117}:\\
\;\;\;\;\frac{-1}{\sqrt{\frac{t\_0}{h}} \cdot \left(8 \cdot \frac{d}{D \cdot \left(D \cdot \left(M \cdot M\right)\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if d < -1.3999999999999999e-23Initial program 78.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified80.9%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr80.9%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.2%
Simplified68.2%
if -1.3999999999999999e-23 < d < -4.8999999999999998e-296Initial program 57.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified64.8%
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
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
associate-/l*N/A
mul-1-negN/A
Simplified39.1%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6444.8%
Applied egg-rr44.8%
if -4.8999999999999998e-296 < d < 4.3e-117Initial program 35.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified39.3%
Applied egg-rr19.0%
Taylor expanded in h around -inf
*-commutativeN/A
*-commutativeN/A
associate-*l*N/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
*-lowering-*.f64N/A
Simplified43.0%
if 4.3e-117 < d Initial program 73.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified80.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6454.9%
Simplified54.9%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6455.5%
Applied egg-rr55.5%
Final simplification55.0%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (/ d D) M)))
(if (<= d -1.7e-20)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= d -4.9e-296)
(* (sqrt (/ h (* l (* l l)))) (* (* D (* M (* M D))) (/ 0.125 d)))
(*
(/ d (pow (* l h) 0.5))
(+ 1.0 (* (/ (/ h t_0) l) (/ -0.125 t_0))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double tmp;
if (d <= -1.7e-20) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (d <= -4.9e-296) {
tmp = sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d));
} else {
tmp = (d / pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0)));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = (d / d_1) / m
if (d <= (-1.7d-20)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (d <= (-4.9d-296)) then
tmp = sqrt((h / (l * (l * l)))) * ((d_1 * (m * (m * d_1))) * (0.125d0 / d))
else
tmp = (d / ((l * h) ** 0.5d0)) * (1.0d0 + (((h / t_0) / l) * ((-0.125d0) / t_0)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = (d / D) / M;
double tmp;
if (d <= -1.7e-20) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (d <= -4.9e-296) {
tmp = Math.sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d));
} else {
tmp = (d / Math.pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (d / D) / M tmp = 0 if d <= -1.7e-20: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif d <= -4.9e-296: tmp = math.sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d)) else: tmp = (d / math.pow((l * h), 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0))) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(d / D) / M) tmp = 0.0 if (d <= -1.7e-20) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (d <= -4.9e-296) tmp = Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(D * Float64(M * Float64(M * D))) * Float64(0.125 / d))); else tmp = Float64(Float64(d / (Float64(l * h) ^ 0.5)) * Float64(1.0 + Float64(Float64(Float64(h / t_0) / l) * Float64(-0.125 / t_0)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (d / D) / M; tmp = 0.0; if (d <= -1.7e-20) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (d <= -4.9e-296) tmp = sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d)); else tmp = (d / ((l * h) ^ 0.5)) * (1.0 + (((h / t_0) / l) * (-0.125 / t_0))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]}, If[LessEqual[d, -1.7e-20], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -4.9e-296], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Power[N[(l * h), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h / t$95$0), $MachinePrecision] / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{d}{D}}{M}\\
\mathbf{if}\;d \leq -1.7 \cdot 10^{-20}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;d \leq -4.9 \cdot 10^{-296}:\\
\;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right) \cdot \frac{0.125}{d}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{{\left(\ell \cdot h\right)}^{0.5}} \cdot \left(1 + \frac{\frac{h}{t\_0}}{\ell} \cdot \frac{-0.125}{t\_0}\right)\\
\end{array}
\end{array}
if d < -1.6999999999999999e-20Initial program 78.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified80.9%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr80.9%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.2%
Simplified68.2%
if -1.6999999999999999e-20 < d < -4.8999999999999998e-296Initial program 57.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified64.8%
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
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
associate-/l*N/A
mul-1-negN/A
Simplified39.1%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6444.8%
Applied egg-rr44.8%
if -4.8999999999999998e-296 < d Initial program 61.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.1%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr66.7%
Applied egg-rr77.3%
Final simplification67.9%
(FPCore (d h l M D)
:precision binary64
(if (<= d -1.85e-19)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= d -4.9e-296)
(* (sqrt (/ h (* l (* l l)))) (* (* D (* M (* M D))) (/ 0.125 d)))
(*
(/ d (sqrt (* l h)))
(+ 1.0 (* -0.125 (/ (/ (* h M) (/ d D)) (/ l (/ M (/ d D))))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.85e-19) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (d <= -4.9e-296) {
tmp = sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d));
} else {
tmp = (d / sqrt((l * h))) * (1.0 + (-0.125 * (((h * M) / (d / D)) / (l / (M / (d / D))))));
}
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 (d <= (-1.85d-19)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (d <= (-4.9d-296)) then
tmp = sqrt((h / (l * (l * l)))) * ((d_1 * (m * (m * d_1))) * (0.125d0 / d))
else
tmp = (d / sqrt((l * h))) * (1.0d0 + ((-0.125d0) * (((h * m) / (d / d_1)) / (l / (m / (d / d_1))))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.85e-19) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (d <= -4.9e-296) {
tmp = Math.sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d));
} else {
tmp = (d / Math.sqrt((l * h))) * (1.0 + (-0.125 * (((h * M) / (d / D)) / (l / (M / (d / D))))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -1.85e-19: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif d <= -4.9e-296: tmp = math.sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d)) else: tmp = (d / math.sqrt((l * h))) * (1.0 + (-0.125 * (((h * M) / (d / D)) / (l / (M / (d / D)))))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.85e-19) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (d <= -4.9e-296) tmp = Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(D * Float64(M * Float64(M * D))) * Float64(0.125 / d))); else tmp = Float64(Float64(d / sqrt(Float64(l * h))) * Float64(1.0 + Float64(-0.125 * Float64(Float64(Float64(h * M) / Float64(d / D)) / Float64(l / Float64(M / Float64(d / D))))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -1.85e-19) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (d <= -4.9e-296) tmp = sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d)); else tmp = (d / sqrt((l * h))) * (1.0 + (-0.125 * (((h * M) / (d / D)) / (l / (M / (d / D)))))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.85e-19], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -4.9e-296], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(N[(N[(h * M), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision] / N[(l / N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.85 \cdot 10^{-19}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;d \leq -4.9 \cdot 10^{-296}:\\
\;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right) \cdot \frac{0.125}{d}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \left(1 + -0.125 \cdot \frac{\frac{h \cdot M}{\frac{d}{D}}}{\frac{\ell}{\frac{M}{\frac{d}{D}}}}\right)\\
\end{array}
\end{array}
if d < -1.85000000000000003e-19Initial program 78.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified80.9%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr80.9%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.2%
Simplified68.2%
if -1.85000000000000003e-19 < d < -4.8999999999999998e-296Initial program 57.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified64.8%
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
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
associate-/l*N/A
mul-1-negN/A
Simplified39.1%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6444.8%
Applied egg-rr44.8%
if -4.8999999999999998e-296 < d Initial program 61.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.1%
Applied egg-rr75.7%
Final simplification67.1%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ h (* l (* l l))))))
(if (<= d -2.8e-23)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= d -4.9e-296)
(* t_0 (* (* D (* M (* M D))) (/ 0.125 d)))
(if (<= d 3.6e-124)
(* (* D D) (* t_0 (* -0.125 (/ (* M M) d))))
(* d (sqrt (/ (/ 1.0 l) h))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((h / (l * (l * l))));
double tmp;
if (d <= -2.8e-23) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (d <= -4.9e-296) {
tmp = t_0 * ((D * (M * (M * D))) * (0.125 / d));
} else if (d <= 3.6e-124) {
tmp = (D * D) * (t_0 * (-0.125 * ((M * M) / d)));
} else {
tmp = d * sqrt(((1.0 / l) / 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 = sqrt((h / (l * (l * l))))
if (d <= (-2.8d-23)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (d <= (-4.9d-296)) then
tmp = t_0 * ((d_1 * (m * (m * d_1))) * (0.125d0 / d))
else if (d <= 3.6d-124) then
tmp = (d_1 * d_1) * (t_0 * ((-0.125d0) * ((m * m) / d)))
else
tmp = d * sqrt(((1.0d0 / l) / 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.sqrt((h / (l * (l * l))));
double tmp;
if (d <= -2.8e-23) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (d <= -4.9e-296) {
tmp = t_0 * ((D * (M * (M * D))) * (0.125 / d));
} else if (d <= 3.6e-124) {
tmp = (D * D) * (t_0 * (-0.125 * ((M * M) / d)));
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((h / (l * (l * l)))) tmp = 0 if d <= -2.8e-23: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif d <= -4.9e-296: tmp = t_0 * ((D * (M * (M * D))) * (0.125 / d)) elif d <= 3.6e-124: tmp = (D * D) * (t_0 * (-0.125 * ((M * M) / d))) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(h / Float64(l * Float64(l * l)))) tmp = 0.0 if (d <= -2.8e-23) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (d <= -4.9e-296) tmp = Float64(t_0 * Float64(Float64(D * Float64(M * Float64(M * D))) * Float64(0.125 / d))); elseif (d <= 3.6e-124) tmp = Float64(Float64(D * D) * Float64(t_0 * Float64(-0.125 * Float64(Float64(M * M) / d)))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((h / (l * (l * l)))); tmp = 0.0; if (d <= -2.8e-23) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (d <= -4.9e-296) tmp = t_0 * ((D * (M * (M * D))) * (0.125 / d)); elseif (d <= 3.6e-124) tmp = (D * D) * (t_0 * (-0.125 * ((M * M) / d))); else tmp = d * sqrt(((1.0 / l) / h)); 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[d, -2.8e-23], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -4.9e-296], N[(t$95$0 * N[(N[(D * N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.6e-124], N[(N[(D * D), $MachinePrecision] * N[(t$95$0 * N[(-0.125 * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\
\mathbf{if}\;d \leq -2.8 \cdot 10^{-23}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;d \leq -4.9 \cdot 10^{-296}:\\
\;\;\;\;t\_0 \cdot \left(\left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right) \cdot \frac{0.125}{d}\right)\\
\mathbf{elif}\;d \leq 3.6 \cdot 10^{-124}:\\
\;\;\;\;\left(D \cdot D\right) \cdot \left(t\_0 \cdot \left(-0.125 \cdot \frac{M \cdot M}{d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if d < -2.7999999999999997e-23Initial program 78.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified80.9%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr80.9%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.2%
Simplified68.2%
if -2.7999999999999997e-23 < d < -4.8999999999999998e-296Initial program 57.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified64.8%
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
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
associate-/l*N/A
mul-1-negN/A
Simplified39.1%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6444.8%
Applied egg-rr44.8%
if -4.8999999999999998e-296 < d < 3.6000000000000001e-124Initial program 36.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified40.2%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr38.9%
Taylor expanded in d around 0
*-commutativeN/A
associate-/l*N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
Simplified41.2%
if 3.6000000000000001e-124 < d Initial program 72.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified79.3%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6454.3%
Simplified54.3%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6454.9%
Applied egg-rr54.9%
Final simplification54.6%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ (/ 1.0 h) l))))
(if (<= d -8.4e-19)
(* (- 0.0 d) t_0)
(if (<= d -5.6e-291)
(* (sqrt (/ h (* l (* l l)))) (* (* D (* M (* M D))) (/ 0.125 d)))
(* d t_0)))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(((1.0 / h) / l));
double tmp;
if (d <= -8.4e-19) {
tmp = (0.0 - d) * t_0;
} else if (d <= -5.6e-291) {
tmp = sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d));
} else {
tmp = d * t_0;
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(((1.0d0 / h) / l))
if (d <= (-8.4d-19)) then
tmp = (0.0d0 - d) * t_0
else if (d <= (-5.6d-291)) then
tmp = sqrt((h / (l * (l * l)))) * ((d_1 * (m * (m * d_1))) * (0.125d0 / d))
else
tmp = d * t_0
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(((1.0 / h) / l));
double tmp;
if (d <= -8.4e-19) {
tmp = (0.0 - d) * t_0;
} else if (d <= -5.6e-291) {
tmp = Math.sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d));
} else {
tmp = d * t_0;
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt(((1.0 / h) / l)) tmp = 0 if d <= -8.4e-19: tmp = (0.0 - d) * t_0 elif d <= -5.6e-291: tmp = math.sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d)) else: tmp = d * t_0 return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(Float64(1.0 / h) / l)) tmp = 0.0 if (d <= -8.4e-19) tmp = Float64(Float64(0.0 - d) * t_0); elseif (d <= -5.6e-291) tmp = Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(D * Float64(M * Float64(M * D))) * Float64(0.125 / d))); else tmp = Float64(d * t_0); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt(((1.0 / h) / l)); tmp = 0.0; if (d <= -8.4e-19) tmp = (0.0 - d) * t_0; elseif (d <= -5.6e-291) tmp = sqrt((h / (l * (l * l)))) * ((D * (M * (M * D))) * (0.125 / d)); else tmp = d * t_0; end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -8.4e-19], N[(N[(0.0 - d), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[d, -5.6e-291], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{if}\;d \leq -8.4 \cdot 10^{-19}:\\
\;\;\;\;\left(0 - d\right) \cdot t\_0\\
\mathbf{elif}\;d \leq -5.6 \cdot 10^{-291}:\\
\;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot \left(M \cdot \left(M \cdot D\right)\right)\right) \cdot \frac{0.125}{d}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot t\_0\\
\end{array}
\end{array}
if d < -8.3999999999999996e-19Initial program 78.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified80.9%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr80.9%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.2%
Simplified68.2%
if -8.3999999999999996e-19 < d < -5.5999999999999999e-291Initial program 56.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified64.1%
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
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
associate-/l*N/A
mul-1-negN/A
Simplified38.0%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6443.8%
Applied egg-rr43.8%
if -5.5999999999999999e-291 < d Initial program 61.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.3%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6442.2%
Simplified42.2%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6442.6%
Applied egg-rr42.6%
Final simplification50.3%
(FPCore (d h l M D) :precision binary64 (if (<= d 5.2e-156) (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l))) (* d (sqrt (/ (/ 1.0 l) h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 5.2e-156) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else {
tmp = d * sqrt(((1.0 / l) / 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 (d <= 5.2d-156) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 5.2e-156) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 5.2e-156: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 5.2e-156) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 5.2e-156) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 5.2e-156], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 5.2 \cdot 10^{-156}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if d < 5.2000000000000002e-156Initial program 63.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr66.3%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6444.4%
Simplified44.4%
if 5.2000000000000002e-156 < d Initial program 68.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified76.0%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6451.5%
Simplified51.5%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6452.0%
Applied egg-rr52.0%
Final simplification47.3%
(FPCore (d h l M D) :precision binary64 (if (<= d 6.5e-157) (* (- 0.0 d) (sqrt (/ 1.0 (* l h)))) (* d (sqrt (/ (/ 1.0 l) h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 6.5e-157) {
tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
} else {
tmp = d * sqrt(((1.0 / l) / 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 (d <= 6.5d-157) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (l * h)))
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 6.5e-157) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (l * h)));
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 6.5e-157: tmp = (0.0 - d) * math.sqrt((1.0 / (l * h))) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 6.5e-157) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(l * h)))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 6.5e-157) tmp = (0.0 - d) * sqrt((1.0 / (l * h))); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 6.5e-157], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 6.5 \cdot 10^{-157}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if d < 6.5000000000000002e-157Initial program 63.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.4%
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--.f6442.6%
Simplified42.6%
if 6.5000000000000002e-157 < d Initial program 68.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified76.0%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6451.5%
Simplified51.5%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6452.0%
Applied egg-rr52.0%
Final simplification46.2%
(FPCore (d h l M D) :precision binary64 (if (<= l -7e-250) (pow (* (/ h d) (/ l d)) -0.5) (* 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 = pow(((h / d) * (l / d)), -0.5);
} 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 = ((h / d) * (l / d)) ** (-0.5d0)
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 = Math.pow(((h / d) * (l / d)), -0.5);
} 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 = math.pow(((h / d) * (l / d)), -0.5) 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(h / d) * Float64(l / d)) ^ -0.5; 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 = ((h / d) * (l / d)) ^ -0.5; 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[Power[N[(N[(h / d), $MachinePrecision] * N[(l / d), $MachinePrecision]), $MachinePrecision], -0.5], $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(\frac{h}{d} \cdot \frac{\ell}{d}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if l < -6.9999999999999998e-250Initial program 69.5%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.0%
Simplified7.0%
sqrt-divN/A
metadata-evalN/A
*-commutativeN/A
div-invN/A
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
*-commutativeN/A
clear-numN/A
inv-powN/A
sqrt-pow1N/A
metadata-evalN/A
clear-numN/A
inv-powN/A
sqrt-pow1N/A
metadata-evalN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
Applied egg-rr34.4%
if -6.9999999999999998e-250 < l Initial program 61.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.9%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6442.2%
Simplified42.2%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6442.6%
Applied egg-rr42.6%
(FPCore (d h l M D) :precision binary64 (if (<= l -1.32e-250) (sqrt (* (/ d l) (/ d h))) (* d (sqrt (/ (/ 1.0 h) l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.32e-250) {
tmp = sqrt(((d / l) * (d / h)));
} 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.32d-250)) then
tmp = sqrt(((d / l) * (d / h)))
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.32e-250) {
tmp = Math.sqrt(((d / l) * (d / h)));
} else {
tmp = d * Math.sqrt(((1.0 / h) / l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.32e-250: tmp = math.sqrt(((d / l) * (d / h))) else: tmp = d * math.sqrt(((1.0 / h) / l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.32e-250) tmp = sqrt(Float64(Float64(d / l) * Float64(d / h))); 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.32e-250) tmp = sqrt(((d / l) * (d / h))); else tmp = d * sqrt(((1.0 / h) / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.32e-250], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $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.32 \cdot 10^{-250}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if l < -1.32e-250Initial program 69.5%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.0%
Simplified7.0%
sqrt-divN/A
metadata-evalN/A
*-commutativeN/A
div-invN/A
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6433.7%
Applied egg-rr33.7%
if -1.32e-250 < l Initial program 61.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.9%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6442.2%
Simplified42.2%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6442.6%
Applied egg-rr42.6%
(FPCore (d h l M D) :precision binary64 (if (<= l -6.5e-251) (sqrt (* (/ d l) (/ d h))) (/ d (sqrt (* l h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -6.5e-251) {
tmp = sqrt(((d / l) * (d / h)));
} else {
tmp = d / sqrt((l * 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 <= (-6.5d-251)) then
tmp = sqrt(((d / l) * (d / h)))
else
tmp = d / sqrt((l * 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 <= -6.5e-251) {
tmp = Math.sqrt(((d / l) * (d / h)));
} else {
tmp = d / Math.sqrt((l * h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -6.5e-251: tmp = math.sqrt(((d / l) * (d / h))) else: tmp = d / math.sqrt((l * h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -6.5e-251) tmp = sqrt(Float64(Float64(d / l) * Float64(d / h))); else tmp = Float64(d / sqrt(Float64(l * h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -6.5e-251) tmp = sqrt(((d / l) * (d / h))); else tmp = d / sqrt((l * h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -6.5e-251], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6.5 \cdot 10^{-251}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
\end{array}
\end{array}
if l < -6.5000000000000002e-251Initial program 69.5%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.0%
Simplified7.0%
sqrt-divN/A
metadata-evalN/A
*-commutativeN/A
div-invN/A
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6433.7%
Applied egg-rr33.7%
if -6.5000000000000002e-251 < l Initial program 61.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.9%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6442.2%
Simplified42.2%
sqrt-divN/A
metadata-evalN/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
*-commutativeN/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6442.5%
Applied egg-rr42.5%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6442.5%
Applied egg-rr42.5%
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
double code(double d, double h, double l, double M, double D) {
return d / sqrt((l * 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 = d / sqrt((l * h))
end function
public static double code(double d, double h, double l, double M, double D) {
return d / Math.sqrt((l * h));
}
def code(d, h, l, M, D): return d / math.sqrt((l * h))
function code(d, h, l, M, D) return Float64(d / sqrt(Float64(l * h))) end
function tmp = code(d, h, l, M, D) tmp = d / sqrt((l * h)); end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{d}{\sqrt{\ell \cdot h}}
\end{array}
Initial program 65.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified70.7%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6425.4%
Simplified25.4%
sqrt-divN/A
metadata-evalN/A
*-commutativeN/A
div-invN/A
/-lowering-/.f64N/A
pow1/2N/A
*-commutativeN/A
pow-lowering-pow.f64N/A
*-commutativeN/A
*-lowering-*.f6425.6%
Applied egg-rr25.6%
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6425.6%
Applied egg-rr25.6%
herbie shell --seed 2024192
(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)))))