
(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 24 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 (* (* M D) 0.5))
(t_1 (* h (/ t_0 d)))
(t_2 (pow (/ d l) (/ 1.0 2.0)))
(t_3 (sqrt (- 0.0 d)))
(t_4 (/ (* M D) (* d 2.0))))
(if (<= d -2.35e-152)
(*
(* (* t_3 (/ 1.0 (sqrt (- 0.0 h)))) t_2)
(+ 1.0 (* (/ h l) (* (pow t_4 2.0) (/ -1.0 2.0)))))
(if (<= d -2.9e-303)
(/
(* (sqrt (/ d h)) (fma (/ (* (* M D) -0.5) (* l (* d 2.0))) t_1 1.0))
(/ (sqrt (- 0.0 l)) t_3))
(if (<= d 1.6e-67)
(* (fma (/ (* (* M D) -0.25) (* d l)) t_1 1.0) (/ d (sqrt (* h l))))
(*
(* t_2 (/ (sqrt d) (sqrt h)))
(+ 1.0 (* (/ (/ t_0 (* d 2.0)) l) (/ t_4 (/ -1.0 h))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) * 0.5;
double t_1 = h * (t_0 / d);
double t_2 = pow((d / l), (1.0 / 2.0));
double t_3 = sqrt((0.0 - d));
double t_4 = (M * D) / (d * 2.0);
double tmp;
if (d <= -2.35e-152) {
tmp = ((t_3 * (1.0 / sqrt((0.0 - h)))) * t_2) * (1.0 + ((h / l) * (pow(t_4, 2.0) * (-1.0 / 2.0))));
} else if (d <= -2.9e-303) {
tmp = (sqrt((d / h)) * fma((((M * D) * -0.5) / (l * (d * 2.0))), t_1, 1.0)) / (sqrt((0.0 - l)) / t_3);
} else if (d <= 1.6e-67) {
tmp = fma((((M * D) * -0.25) / (d * l)), t_1, 1.0) * (d / sqrt((h * l)));
} else {
tmp = (t_2 * (sqrt(d) / sqrt(h))) * (1.0 + (((t_0 / (d * 2.0)) / l) * (t_4 / (-1.0 / h))));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) * 0.5) t_1 = Float64(h * Float64(t_0 / d)) t_2 = Float64(d / l) ^ Float64(1.0 / 2.0) t_3 = sqrt(Float64(0.0 - d)) t_4 = Float64(Float64(M * D) / Float64(d * 2.0)) tmp = 0.0 if (d <= -2.35e-152) tmp = Float64(Float64(Float64(t_3 * Float64(1.0 / sqrt(Float64(0.0 - h)))) * t_2) * Float64(1.0 + Float64(Float64(h / l) * Float64((t_4 ^ 2.0) * Float64(-1.0 / 2.0))))); elseif (d <= -2.9e-303) tmp = Float64(Float64(sqrt(Float64(d / h)) * fma(Float64(Float64(Float64(M * D) * -0.5) / Float64(l * Float64(d * 2.0))), t_1, 1.0)) / Float64(sqrt(Float64(0.0 - l)) / t_3)); elseif (d <= 1.6e-67) tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), t_1, 1.0) * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64(t_2 * Float64(sqrt(d) / sqrt(h))) * Float64(1.0 + Float64(Float64(Float64(t_0 / Float64(d * 2.0)) / l) * Float64(t_4 / Float64(-1.0 / h))))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(h * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -2.35e-152], N[(N[(N[(t$95$3 * N[(1.0 / N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[t$95$4, 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.9e-303], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[(M * D), $MachinePrecision] * -0.5), $MachinePrecision] / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[N[(0.0 - l), $MachinePrecision]], $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.6e-67], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * t$95$1 + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(t$95$0 / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$4 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(M \cdot D\right) \cdot 0.5\\
t_1 := h \cdot \frac{t\_0}{d}\\
t_2 := {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\\
t_3 := \sqrt{0 - d}\\
t_4 := \frac{M \cdot D}{d \cdot 2}\\
\mathbf{if}\;d \leq -2.35 \cdot 10^{-152}:\\
\;\;\;\;\left(\left(t\_3 \cdot \frac{1}{\sqrt{0 - h}}\right) \cdot t\_2\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({t\_4}^{2} \cdot \frac{-1}{2}\right)\right)\\
\mathbf{elif}\;d \leq -2.9 \cdot 10^{-303}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.5}{\ell \cdot \left(d \cdot 2\right)}, t\_1, 1\right)}{\frac{\sqrt{0 - \ell}}{t\_3}}\\
\mathbf{elif}\;d \leq 1.6 \cdot 10^{-67}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, t\_1, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(t\_2 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right) \cdot \left(1 + \frac{\frac{t\_0}{d \cdot 2}}{\ell} \cdot \frac{t\_4}{\frac{-1}{h}}\right)\\
\end{array}
\end{array}
if d < -2.35000000000000006e-152Initial program 72.3%
metadata-evalN/A
unpow1/2N/A
frac-2negN/A
sqrt-divN/A
div-invN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6490.3
Applied egg-rr90.3%
if -2.35000000000000006e-152 < d < -2.90000000000000014e-303Initial program 39.1%
Applied egg-rr24.9%
Applied egg-rr38.7%
frac-2negN/A
sqrt-divN/A
sub0-negN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sub0-negN/A
sqrt-lowering-sqrt.f64N/A
sub0-negN/A
--lowering--.f6459.6
Applied egg-rr59.6%
if -2.90000000000000014e-303 < d < 1.60000000000000011e-67Initial program 45.2%
Applied egg-rr28.6%
Applied egg-rr45.3%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval45.7
Applied egg-rr45.7%
Applied egg-rr78.5%
if 1.60000000000000011e-67 < d Initial program 82.9%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr87.7%
metadata-evalN/A
pow1/2N/A
sqrt-divN/A
pow1/2N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6493.1
Applied egg-rr93.1%
Final simplification84.9%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (pow (/ d l) (/ 1.0 2.0)))
(t_1 (sqrt (- 0.0 d)))
(t_2 (/ (* M D) (* d 2.0)))
(t_3 (* (* M D) 0.5))
(t_4 (* h (/ t_3 d))))
(if (<= d -1.85e-152)
(*
(+ 1.0 (* (/ h l) (* (pow t_2 2.0) (/ -1.0 2.0))))
(* t_0 (* t_1 (sqrt (/ -1.0 h)))))
(if (<= d -2.9e-303)
(/
(* (sqrt (/ d h)) (fma (/ (* (* M D) -0.5) (* l (* d 2.0))) t_4 1.0))
(/ (sqrt (- 0.0 l)) t_1))
(if (<= d 9.2e-72)
(* (fma (/ (* (* M D) -0.25) (* d l)) t_4 1.0) (/ d (sqrt (* h l))))
(*
(* t_0 (/ (sqrt d) (sqrt h)))
(+ 1.0 (* (/ (/ t_3 (* d 2.0)) l) (/ t_2 (/ -1.0 h))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = pow((d / l), (1.0 / 2.0));
double t_1 = sqrt((0.0 - d));
double t_2 = (M * D) / (d * 2.0);
double t_3 = (M * D) * 0.5;
double t_4 = h * (t_3 / d);
double tmp;
if (d <= -1.85e-152) {
tmp = (1.0 + ((h / l) * (pow(t_2, 2.0) * (-1.0 / 2.0)))) * (t_0 * (t_1 * sqrt((-1.0 / h))));
} else if (d <= -2.9e-303) {
tmp = (sqrt((d / h)) * fma((((M * D) * -0.5) / (l * (d * 2.0))), t_4, 1.0)) / (sqrt((0.0 - l)) / t_1);
} else if (d <= 9.2e-72) {
tmp = fma((((M * D) * -0.25) / (d * l)), t_4, 1.0) * (d / sqrt((h * l)));
} else {
tmp = (t_0 * (sqrt(d) / sqrt(h))) * (1.0 + (((t_3 / (d * 2.0)) / l) * (t_2 / (-1.0 / h))));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(d / l) ^ Float64(1.0 / 2.0) t_1 = sqrt(Float64(0.0 - d)) t_2 = Float64(Float64(M * D) / Float64(d * 2.0)) t_3 = Float64(Float64(M * D) * 0.5) t_4 = Float64(h * Float64(t_3 / d)) tmp = 0.0 if (d <= -1.85e-152) tmp = Float64(Float64(1.0 + Float64(Float64(h / l) * Float64((t_2 ^ 2.0) * Float64(-1.0 / 2.0)))) * Float64(t_0 * Float64(t_1 * sqrt(Float64(-1.0 / h))))); elseif (d <= -2.9e-303) tmp = Float64(Float64(sqrt(Float64(d / h)) * fma(Float64(Float64(Float64(M * D) * -0.5) / Float64(l * Float64(d * 2.0))), t_4, 1.0)) / Float64(sqrt(Float64(0.0 - l)) / t_1)); elseif (d <= 9.2e-72) tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), t_4, 1.0) * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64(t_0 * Float64(sqrt(d) / sqrt(h))) * Float64(1.0 + Float64(Float64(Float64(t_3 / Float64(d * 2.0)) / l) * Float64(t_2 / Float64(-1.0 / h))))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$4 = N[(h * N[(t$95$3 / d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.85e-152], N[(N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[t$95$2, 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(t$95$1 * N[Sqrt[N[(-1.0 / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.9e-303], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[(M * D), $MachinePrecision] * -0.5), $MachinePrecision] / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$4 + 1.0), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[N[(0.0 - l), $MachinePrecision]], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9.2e-72], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * t$95$4 + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(t$95$3 / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$2 / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\\
t_1 := \sqrt{0 - d}\\
t_2 := \frac{M \cdot D}{d \cdot 2}\\
t_3 := \left(M \cdot D\right) \cdot 0.5\\
t_4 := h \cdot \frac{t\_3}{d}\\
\mathbf{if}\;d \leq -1.85 \cdot 10^{-152}:\\
\;\;\;\;\left(1 + \frac{h}{\ell} \cdot \left({t\_2}^{2} \cdot \frac{-1}{2}\right)\right) \cdot \left(t\_0 \cdot \left(t\_1 \cdot \sqrt{\frac{-1}{h}}\right)\right)\\
\mathbf{elif}\;d \leq -2.9 \cdot 10^{-303}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.5}{\ell \cdot \left(d \cdot 2\right)}, t\_4, 1\right)}{\frac{\sqrt{0 - \ell}}{t\_1}}\\
\mathbf{elif}\;d \leq 9.2 \cdot 10^{-72}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, t\_4, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right) \cdot \left(1 + \frac{\frac{t\_3}{d \cdot 2}}{\ell} \cdot \frac{t\_2}{\frac{-1}{h}}\right)\\
\end{array}
\end{array}
if d < -1.8499999999999999e-152Initial program 72.3%
metadata-evalN/A
unpow1/2N/A
frac-2negN/A
div-invN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
frac-2negN/A
metadata-evalN/A
remove-double-negN/A
/-lowering-/.f6490.3
Applied egg-rr90.3%
if -1.8499999999999999e-152 < d < -2.90000000000000014e-303Initial program 39.1%
Applied egg-rr24.9%
Applied egg-rr38.7%
frac-2negN/A
sqrt-divN/A
sub0-negN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sub0-negN/A
sqrt-lowering-sqrt.f64N/A
sub0-negN/A
--lowering--.f6459.6
Applied egg-rr59.6%
if -2.90000000000000014e-303 < d < 9.19999999999999978e-72Initial program 45.2%
Applied egg-rr28.6%
Applied egg-rr45.3%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval45.7
Applied egg-rr45.7%
Applied egg-rr78.5%
if 9.19999999999999978e-72 < d Initial program 82.9%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr87.7%
metadata-evalN/A
pow1/2N/A
sqrt-divN/A
pow1/2N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6493.1
Applied egg-rr93.1%
Final simplification84.9%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* M D) 0.5))
(t_1
(+
1.0
(* (/ (/ t_0 (* d 2.0)) l) (/ (/ (* M D) (* d 2.0)) (/ -1.0 h))))))
(if (<= d -8.5e+197)
(fabs (* (sqrt (/ -1.0 h)) (* d (/ 1.0 (sqrt (fabs l))))))
(if (<= d -5e-311)
(*
t_1
(* (pow (/ d h) (/ 1.0 2.0)) (/ (sqrt (- 0.0 d)) (sqrt (- 0.0 l)))))
(if (<= d 2e-68)
(*
(fma (/ (* (* M D) -0.25) (* d l)) (* h (/ t_0 d)) 1.0)
(/ d (sqrt (* h l))))
(* (* (pow (/ d l) (/ 1.0 2.0)) (/ (sqrt d) (sqrt h))) t_1))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) * 0.5;
double t_1 = 1.0 + (((t_0 / (d * 2.0)) / l) * (((M * D) / (d * 2.0)) / (-1.0 / h)));
double tmp;
if (d <= -8.5e+197) {
tmp = fabs((sqrt((-1.0 / h)) * (d * (1.0 / sqrt(fabs(l))))));
} else if (d <= -5e-311) {
tmp = t_1 * (pow((d / h), (1.0 / 2.0)) * (sqrt((0.0 - d)) / sqrt((0.0 - l))));
} else if (d <= 2e-68) {
tmp = fma((((M * D) * -0.25) / (d * l)), (h * (t_0 / d)), 1.0) * (d / sqrt((h * l)));
} else {
tmp = (pow((d / l), (1.0 / 2.0)) * (sqrt(d) / sqrt(h))) * t_1;
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) * 0.5) t_1 = Float64(1.0 + Float64(Float64(Float64(t_0 / Float64(d * 2.0)) / l) * Float64(Float64(Float64(M * D) / Float64(d * 2.0)) / Float64(-1.0 / h)))) tmp = 0.0 if (d <= -8.5e+197) tmp = abs(Float64(sqrt(Float64(-1.0 / h)) * Float64(d * Float64(1.0 / sqrt(abs(l)))))); elseif (d <= -5e-311) tmp = Float64(t_1 * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * Float64(sqrt(Float64(0.0 - d)) / sqrt(Float64(0.0 - l))))); elseif (d <= 2e-68) tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), Float64(h * Float64(t_0 / d)), 1.0) * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64((Float64(d / l) ^ Float64(1.0 / 2.0)) * Float64(sqrt(d) / sqrt(h))) * t_1); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(N[(N[(t$95$0 / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -8.5e+197], N[Abs[N[(N[Sqrt[N[(-1.0 / h), $MachinePrecision]], $MachinePrecision] * N[(d * N[(1.0 / N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[d, -5e-311], N[(t$95$1 * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.0 - l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2e-68], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(h * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(M \cdot D\right) \cdot 0.5\\
t_1 := 1 + \frac{\frac{t\_0}{d \cdot 2}}{\ell} \cdot \frac{\frac{M \cdot D}{d \cdot 2}}{\frac{-1}{h}}\\
\mathbf{if}\;d \leq -8.5 \cdot 10^{+197}:\\
\;\;\;\;\left|\sqrt{\frac{-1}{h}} \cdot \left(d \cdot \frac{1}{\sqrt{\left|\ell\right|}}\right)\right|\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-311}:\\
\;\;\;\;t\_1 \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{0 - d}}{\sqrt{0 - \ell}}\right)\\
\mathbf{elif}\;d \leq 2 \cdot 10^{-68}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, h \cdot \frac{t\_0}{d}, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{d}}{\sqrt{h}}\right) \cdot t\_1\\
\end{array}
\end{array}
if d < -8.5000000000000001e197Initial program 57.8%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.4
Simplified5.4%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6477.2
Applied egg-rr77.2%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
div-invN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
Applied egg-rr86.0%
if -8.5000000000000001e197 < d < -5.00000000000023e-311Initial program 63.4%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr67.8%
metadata-evalN/A
unpow1/2N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6475.3
Applied egg-rr75.3%
if -5.00000000000023e-311 < d < 2.00000000000000013e-68Initial program 46.3%
Applied egg-rr29.4%
Applied egg-rr46.4%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval46.8
Applied egg-rr46.8%
Applied egg-rr80.4%
if 2.00000000000000013e-68 < d Initial program 82.9%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr87.7%
metadata-evalN/A
pow1/2N/A
sqrt-divN/A
pow1/2N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6493.1
Applied egg-rr93.1%
Final simplification82.9%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* M D) 0.5)) (t_1 (* h (/ t_0 d))))
(if (<= d -3.8e+188)
(fabs (* (sqrt (/ -1.0 h)) (* d (/ 1.0 (sqrt (fabs l))))))
(if (<= d -2.9e-303)
(/
(* (sqrt (/ d h)) (fma (/ (* (* M D) -0.5) (* l (* d 2.0))) t_1 1.0))
(/ (sqrt (- 0.0 l)) (sqrt (- 0.0 d))))
(if (<= d 1.05e-69)
(* (fma (/ (* (* M D) -0.25) (* d l)) t_1 1.0) (/ d (sqrt (* h l))))
(*
(* (pow (/ d l) (/ 1.0 2.0)) (/ (sqrt d) (sqrt h)))
(+
1.0
(*
(/ (/ t_0 (* d 2.0)) l)
(/ (/ (* M D) (* d 2.0)) (/ -1.0 h))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) * 0.5;
double t_1 = h * (t_0 / d);
double tmp;
if (d <= -3.8e+188) {
tmp = fabs((sqrt((-1.0 / h)) * (d * (1.0 / sqrt(fabs(l))))));
} else if (d <= -2.9e-303) {
tmp = (sqrt((d / h)) * fma((((M * D) * -0.5) / (l * (d * 2.0))), t_1, 1.0)) / (sqrt((0.0 - l)) / sqrt((0.0 - d)));
} else if (d <= 1.05e-69) {
tmp = fma((((M * D) * -0.25) / (d * l)), t_1, 1.0) * (d / sqrt((h * l)));
} else {
tmp = (pow((d / l), (1.0 / 2.0)) * (sqrt(d) / sqrt(h))) * (1.0 + (((t_0 / (d * 2.0)) / l) * (((M * D) / (d * 2.0)) / (-1.0 / h))));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) * 0.5) t_1 = Float64(h * Float64(t_0 / d)) tmp = 0.0 if (d <= -3.8e+188) tmp = abs(Float64(sqrt(Float64(-1.0 / h)) * Float64(d * Float64(1.0 / sqrt(abs(l)))))); elseif (d <= -2.9e-303) tmp = Float64(Float64(sqrt(Float64(d / h)) * fma(Float64(Float64(Float64(M * D) * -0.5) / Float64(l * Float64(d * 2.0))), t_1, 1.0)) / Float64(sqrt(Float64(0.0 - l)) / sqrt(Float64(0.0 - d)))); elseif (d <= 1.05e-69) tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), t_1, 1.0) * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64((Float64(d / l) ^ Float64(1.0 / 2.0)) * Float64(sqrt(d) / sqrt(h))) * Float64(1.0 + Float64(Float64(Float64(t_0 / Float64(d * 2.0)) / l) * Float64(Float64(Float64(M * D) / Float64(d * 2.0)) / Float64(-1.0 / h))))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(h * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -3.8e+188], N[Abs[N[(N[Sqrt[N[(-1.0 / h), $MachinePrecision]], $MachinePrecision] * N[(d * N[(1.0 / N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[d, -2.9e-303], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[(M * D), $MachinePrecision] * -0.5), $MachinePrecision] / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[N[(0.0 - l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.05e-69], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * t$95$1 + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(t$95$0 / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] / N[(-1.0 / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(M \cdot D\right) \cdot 0.5\\
t_1 := h \cdot \frac{t\_0}{d}\\
\mathbf{if}\;d \leq -3.8 \cdot 10^{+188}:\\
\;\;\;\;\left|\sqrt{\frac{-1}{h}} \cdot \left(d \cdot \frac{1}{\sqrt{\left|\ell\right|}}\right)\right|\\
\mathbf{elif}\;d \leq -2.9 \cdot 10^{-303}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.5}{\ell \cdot \left(d \cdot 2\right)}, t\_1, 1\right)}{\frac{\sqrt{0 - \ell}}{\sqrt{0 - d}}}\\
\mathbf{elif}\;d \leq 1.05 \cdot 10^{-69}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, t\_1, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{d}}{\sqrt{h}}\right) \cdot \left(1 + \frac{\frac{t\_0}{d \cdot 2}}{\ell} \cdot \frac{\frac{M \cdot D}{d \cdot 2}}{\frac{-1}{h}}\right)\\
\end{array}
\end{array}
if d < -3.7999999999999998e188Initial program 61.3%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.1
Simplified5.1%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6475.0
Applied egg-rr75.0%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
div-invN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
Applied egg-rr83.0%
if -3.7999999999999998e188 < d < -2.90000000000000014e-303Initial program 63.2%
Applied egg-rr54.5%
Applied egg-rr65.8%
frac-2negN/A
sqrt-divN/A
sub0-negN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sub0-negN/A
sqrt-lowering-sqrt.f64N/A
sub0-negN/A
--lowering--.f6475.6
Applied egg-rr75.6%
if -2.90000000000000014e-303 < d < 1.05e-69Initial program 45.2%
Applied egg-rr28.6%
Applied egg-rr45.3%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval45.7
Applied egg-rr45.7%
Applied egg-rr78.5%
if 1.05e-69 < d Initial program 82.9%
clear-numN/A
un-div-invN/A
unpow2N/A
associate-*r*N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
Applied egg-rr87.7%
metadata-evalN/A
pow1/2N/A
sqrt-divN/A
pow1/2N/A
metadata-evalN/A
/-lowering-/.f64N/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6493.1
Applied egg-rr93.1%
Final simplification82.6%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (- 0.0 l)))
(t_1 (* h (/ (* (* M D) 0.5) d)))
(t_2 (sqrt (- 0.0 d)))
(t_3 (fma (/ (* (* M D) -0.5) (* l (* d 2.0))) t_1 1.0)))
(if (<= h -9.8e+67)
(/
(*
t_2
(*
(/ t_2 t_0)
(fma (/ (* M (* D (* M D))) (* (* d d) 4.0)) (* (/ h l) -0.5) 1.0)))
(sqrt (- 0.0 h)))
(if (<= h -2e-311)
(/ (* (sqrt (/ d h)) t_3) (/ t_0 t_2))
(if (<= h 5e+21)
(* (fma (/ (* (* M D) -0.25) (* d l)) t_1 1.0) (/ d (sqrt (* h l))))
(/ (* t_3 (/ (sqrt d) (sqrt h))) (sqrt (/ l d))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((0.0 - l));
double t_1 = h * (((M * D) * 0.5) / d);
double t_2 = sqrt((0.0 - d));
double t_3 = fma((((M * D) * -0.5) / (l * (d * 2.0))), t_1, 1.0);
double tmp;
if (h <= -9.8e+67) {
tmp = (t_2 * ((t_2 / t_0) * fma(((M * (D * (M * D))) / ((d * d) * 4.0)), ((h / l) * -0.5), 1.0))) / sqrt((0.0 - h));
} else if (h <= -2e-311) {
tmp = (sqrt((d / h)) * t_3) / (t_0 / t_2);
} else if (h <= 5e+21) {
tmp = fma((((M * D) * -0.25) / (d * l)), t_1, 1.0) * (d / sqrt((h * l)));
} else {
tmp = (t_3 * (sqrt(d) / sqrt(h))) / sqrt((l / d));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = sqrt(Float64(0.0 - l)) t_1 = Float64(h * Float64(Float64(Float64(M * D) * 0.5) / d)) t_2 = sqrt(Float64(0.0 - d)) t_3 = fma(Float64(Float64(Float64(M * D) * -0.5) / Float64(l * Float64(d * 2.0))), t_1, 1.0) tmp = 0.0 if (h <= -9.8e+67) tmp = Float64(Float64(t_2 * Float64(Float64(t_2 / t_0) * fma(Float64(Float64(M * Float64(D * Float64(M * D))) / Float64(Float64(d * d) * 4.0)), Float64(Float64(h / l) * -0.5), 1.0))) / sqrt(Float64(0.0 - h))); elseif (h <= -2e-311) tmp = Float64(Float64(sqrt(Float64(d / h)) * t_3) / Float64(t_0 / t_2)); elseif (h <= 5e+21) tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), t_1, 1.0) * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64(t_3 * Float64(sqrt(d) / sqrt(h))) / sqrt(Float64(l / d))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(0.0 - l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(h * N[(N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(M * D), $MachinePrecision] * -0.5), $MachinePrecision] / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1 + 1.0), $MachinePrecision]}, If[LessEqual[h, -9.8e+67], N[(N[(t$95$2 * N[(N[(t$95$2 / t$95$0), $MachinePrecision] * N[(N[(N[(M * N[(D * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -2e-311], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision] / N[(t$95$0 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 5e+21], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * t$95$1 + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$3 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{0 - \ell}\\
t_1 := h \cdot \frac{\left(M \cdot D\right) \cdot 0.5}{d}\\
t_2 := \sqrt{0 - d}\\
t_3 := \mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.5}{\ell \cdot \left(d \cdot 2\right)}, t\_1, 1\right)\\
\mathbf{if}\;h \leq -9.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{t\_2 \cdot \left(\frac{t\_2}{t\_0} \cdot \mathsf{fma}\left(\frac{M \cdot \left(D \cdot \left(M \cdot D\right)\right)}{\left(d \cdot d\right) \cdot 4}, \frac{h}{\ell} \cdot -0.5, 1\right)\right)}{\sqrt{0 - h}}\\
\mathbf{elif}\;h \leq -2 \cdot 10^{-311}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot t\_3}{\frac{t\_0}{t\_2}}\\
\mathbf{elif}\;h \leq 5 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, t\_1, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_3 \cdot \frac{\sqrt{d}}{\sqrt{h}}}{\sqrt{\frac{\ell}{d}}}\\
\end{array}
\end{array}
if h < -9.7999999999999998e67Initial program 55.7%
Applied egg-rr59.8%
frac-2negN/A
sqrt-divN/A
sub0-negN/A
/-lowering-/.f64N/A
sub0-negN/A
sqrt-lowering-sqrt.f64N/A
sub0-negN/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6472.3
Applied egg-rr72.3%
if -9.7999999999999998e67 < h < -1.9999999999999e-311Initial program 66.5%
Applied egg-rr51.2%
Applied egg-rr66.3%
frac-2negN/A
sqrt-divN/A
sub0-negN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sub0-negN/A
sqrt-lowering-sqrt.f64N/A
sub0-negN/A
--lowering--.f6478.9
Applied egg-rr78.9%
if -1.9999999999999e-311 < h < 5e21Initial program 74.2%
Applied egg-rr58.6%
Applied egg-rr74.4%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval74.4
Applied egg-rr74.4%
Applied egg-rr91.9%
if 5e21 < h Initial program 67.4%
Applied egg-rr49.4%
Applied egg-rr70.8%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6481.6
Applied egg-rr81.6%
Final simplification81.8%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* h (/ (* (* M D) 0.5) d)))
(t_1 (fma (/ (* (* M D) -0.5) (* l (* d 2.0))) t_0 1.0)))
(if (<= d -3e+189)
(fabs (* (sqrt (/ -1.0 h)) (* d (/ 1.0 (sqrt (fabs l))))))
(if (<= d -2.9e-303)
(/ (* (sqrt (/ d h)) t_1) (/ (sqrt (- 0.0 l)) (sqrt (- 0.0 d))))
(if (<= d 1.66e-65)
(* (fma (/ (* (* M D) -0.25) (* d l)) t_0 1.0) (/ d (sqrt (* h l))))
(/ (* t_1 (/ (sqrt d) (sqrt h))) (sqrt (/ l d))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = h * (((M * D) * 0.5) / d);
double t_1 = fma((((M * D) * -0.5) / (l * (d * 2.0))), t_0, 1.0);
double tmp;
if (d <= -3e+189) {
tmp = fabs((sqrt((-1.0 / h)) * (d * (1.0 / sqrt(fabs(l))))));
} else if (d <= -2.9e-303) {
tmp = (sqrt((d / h)) * t_1) / (sqrt((0.0 - l)) / sqrt((0.0 - d)));
} else if (d <= 1.66e-65) {
tmp = fma((((M * D) * -0.25) / (d * l)), t_0, 1.0) * (d / sqrt((h * l)));
} else {
tmp = (t_1 * (sqrt(d) / sqrt(h))) / sqrt((l / d));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(h * Float64(Float64(Float64(M * D) * 0.5) / d)) t_1 = fma(Float64(Float64(Float64(M * D) * -0.5) / Float64(l * Float64(d * 2.0))), t_0, 1.0) tmp = 0.0 if (d <= -3e+189) tmp = abs(Float64(sqrt(Float64(-1.0 / h)) * Float64(d * Float64(1.0 / sqrt(abs(l)))))); elseif (d <= -2.9e-303) tmp = Float64(Float64(sqrt(Float64(d / h)) * t_1) / Float64(sqrt(Float64(0.0 - l)) / sqrt(Float64(0.0 - d)))); elseif (d <= 1.66e-65) tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), t_0, 1.0) * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64(t_1 * Float64(sqrt(d) / sqrt(h))) / sqrt(Float64(l / d))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(h * N[(N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(M * D), $MachinePrecision] * -0.5), $MachinePrecision] / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision]}, If[LessEqual[d, -3e+189], N[Abs[N[(N[Sqrt[N[(-1.0 / h), $MachinePrecision]], $MachinePrecision] * N[(d * N[(1.0 / N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[d, -2.9e-303], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] / N[(N[Sqrt[N[(0.0 - l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(0.0 - d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.66e-65], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := h \cdot \frac{\left(M \cdot D\right) \cdot 0.5}{d}\\
t_1 := \mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.5}{\ell \cdot \left(d \cdot 2\right)}, t\_0, 1\right)\\
\mathbf{if}\;d \leq -3 \cdot 10^{+189}:\\
\;\;\;\;\left|\sqrt{\frac{-1}{h}} \cdot \left(d \cdot \frac{1}{\sqrt{\left|\ell\right|}}\right)\right|\\
\mathbf{elif}\;d \leq -2.9 \cdot 10^{-303}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot t\_1}{\frac{\sqrt{0 - \ell}}{\sqrt{0 - d}}}\\
\mathbf{elif}\;d \leq 1.66 \cdot 10^{-65}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, t\_0, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1 \cdot \frac{\sqrt{d}}{\sqrt{h}}}{\sqrt{\frac{\ell}{d}}}\\
\end{array}
\end{array}
if d < -2.9999999999999998e189Initial program 61.3%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.1
Simplified5.1%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6475.0
Applied egg-rr75.0%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
div-invN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
Applied egg-rr83.0%
if -2.9999999999999998e189 < d < -2.90000000000000014e-303Initial program 63.2%
Applied egg-rr54.5%
Applied egg-rr65.8%
frac-2negN/A
sqrt-divN/A
sub0-negN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f64N/A
sub0-negN/A
sqrt-lowering-sqrt.f64N/A
sub0-negN/A
--lowering--.f6475.6
Applied egg-rr75.6%
if -2.90000000000000014e-303 < d < 1.6599999999999999e-65Initial program 45.2%
Applied egg-rr28.6%
Applied egg-rr45.3%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval45.7
Applied egg-rr45.7%
Applied egg-rr78.5%
if 1.6599999999999999e-65 < d Initial program 82.9%
Applied egg-rr66.5%
Applied egg-rr85.3%
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6490.6
Applied egg-rr90.6%
Final simplification81.7%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* h (/ (* (* M D) 0.5) d))))
(if (<= l -9.5e+150)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= l 3e-306)
(/
(* (sqrt (/ d h)) (fma (/ (* (* M D) (/ -0.25 d)) l) t_0 1.0))
(sqrt (/ l d)))
(if (<= l 9.5e+179)
(* (fma (/ (* (* M D) -0.25) (* d l)) t_0 1.0) (/ d (sqrt (* h l))))
(/ d (* (sqrt h) (sqrt l))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = h * (((M * D) * 0.5) / d);
double tmp;
if (l <= -9.5e+150) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= 3e-306) {
tmp = (sqrt((d / h)) * fma((((M * D) * (-0.25 / d)) / l), t_0, 1.0)) / sqrt((l / d));
} else if (l <= 9.5e+179) {
tmp = fma((((M * D) * -0.25) / (d * l)), t_0, 1.0) * (d / sqrt((h * l)));
} else {
tmp = d / (sqrt(h) * sqrt(l));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(h * Float64(Float64(Float64(M * D) * 0.5) / d)) tmp = 0.0 if (l <= -9.5e+150) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= 3e-306) tmp = Float64(Float64(sqrt(Float64(d / h)) * fma(Float64(Float64(Float64(M * D) * Float64(-0.25 / d)) / l), t_0, 1.0)) / sqrt(Float64(l / d))); elseif (l <= 9.5e+179) tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), t_0, 1.0) * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(h * N[(N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -9.5e+150], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3e-306], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[(M * D), $MachinePrecision] * N[(-0.25 / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 9.5e+179], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := h \cdot \frac{\left(M \cdot D\right) \cdot 0.5}{d}\\
\mathbf{if}\;\ell \leq -9.5 \cdot 10^{+150}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq 3 \cdot 10^{-306}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot \frac{-0.25}{d}}{\ell}, t\_0, 1\right)}{\sqrt{\frac{\ell}{d}}}\\
\mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+179}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, t\_0, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -9.5000000000000001e150Initial program 37.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.5
Simplified5.5%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6463.3
Applied egg-rr63.3%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr69.2%
if -9.5000000000000001e150 < l < 3.00000000000000024e-306Initial program 70.0%
Applied egg-rr54.6%
Applied egg-rr71.3%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval75.3
Applied egg-rr75.3%
if 3.00000000000000024e-306 < l < 9.5e179Initial program 76.4%
Applied egg-rr66.8%
Applied egg-rr79.7%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval79.8
Applied egg-rr79.8%
Applied egg-rr90.3%
if 9.5e179 < l Initial program 57.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6454.9
Simplified54.9%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6454.8
Applied egg-rr54.8%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6481.4
Applied egg-rr81.4%
Final simplification80.6%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* (* M D) 0.5) d)))
(if (<= l -5.6e+149)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= l -5e-310)
(/
(* (sqrt (/ d h)) (fma t_0 (* h (* -0.25 (/ (* M D) (* d l)))) 1.0))
(sqrt (/ l d)))
(if (<= l 6.8e+180)
(*
(fma (/ (* (* M D) -0.25) (* d l)) (* h t_0) 1.0)
(/ d (sqrt (* h l))))
(/ d (* (sqrt h) (sqrt l))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = ((M * D) * 0.5) / d;
double tmp;
if (l <= -5.6e+149) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= -5e-310) {
tmp = (sqrt((d / h)) * fma(t_0, (h * (-0.25 * ((M * D) / (d * l)))), 1.0)) / sqrt((l / d));
} else if (l <= 6.8e+180) {
tmp = fma((((M * D) * -0.25) / (d * l)), (h * t_0), 1.0) * (d / sqrt((h * l)));
} else {
tmp = d / (sqrt(h) * sqrt(l));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(Float64(Float64(M * D) * 0.5) / d) tmp = 0.0 if (l <= -5.6e+149) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= -5e-310) tmp = Float64(Float64(sqrt(Float64(d / h)) * fma(t_0, Float64(h * Float64(-0.25 * Float64(Float64(M * D) / Float64(d * l)))), 1.0)) / sqrt(Float64(l / d))); elseif (l <= 6.8e+180) tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), Float64(h * t_0), 1.0) * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision] / d), $MachinePrecision]}, If[LessEqual[l, -5.6e+149], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -5e-310], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[(h * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 6.8e+180], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(h * t$95$0), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(M \cdot D\right) \cdot 0.5}{d}\\
\mathbf{if}\;\ell \leq -5.6 \cdot 10^{+149}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}} \cdot \mathsf{fma}\left(t\_0, h \cdot \left(-0.25 \cdot \frac{M \cdot D}{d \cdot \ell}\right), 1\right)}{\sqrt{\frac{\ell}{d}}}\\
\mathbf{elif}\;\ell \leq 6.8 \cdot 10^{+180}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, h \cdot t\_0, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -5.5999999999999998e149Initial program 37.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.5
Simplified5.5%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6463.3
Applied egg-rr63.3%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr69.2%
if -5.5999999999999998e149 < l < -4.999999999999985e-310Initial program 70.4%
Applied egg-rr55.7%
Applied egg-rr71.7%
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-eval72.8
Applied egg-rr72.8%
if -4.999999999999985e-310 < l < 6.79999999999999969e180Initial program 75.9%
Applied egg-rr65.4%
Applied egg-rr79.0%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval79.2
Applied egg-rr79.2%
Applied egg-rr89.4%
if 6.79999999999999969e180 < l Initial program 57.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6454.9
Simplified54.9%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6454.8
Applied egg-rr54.8%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6481.4
Applied egg-rr81.4%
Final simplification79.4%
(FPCore (d h l M D)
:precision binary64
(if (<= d -6.2e+142)
(fabs (* (sqrt (/ -1.0 h)) (* d (/ 1.0 (sqrt (fabs l))))))
(if (<= d -6.5e-136)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(+ 1.0 (/ (* h (* -0.5 (* M (* D (* M D))))) (* l (* (* d d) 4.0))))))
(if (<= d 9e-301)
(fma
(* -0.125 (* (* (sqrt (/ h l)) (* D D)) (/ (* M M) d)))
(/ 1.0 l)
(sqrt (/ (* d d) (* h l))))
(*
(fma (/ (* (* M D) -0.25) (* d l)) (* h (/ (* (* M D) 0.5) d)) 1.0)
(/ d (sqrt (* h l))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -6.2e+142) {
tmp = fabs((sqrt((-1.0 / h)) * (d * (1.0 / sqrt(fabs(l))))));
} else if (d <= -6.5e-136) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 + ((h * (-0.5 * (M * (D * (M * D))))) / (l * ((d * d) * 4.0)))));
} else if (d <= 9e-301) {
tmp = fma((-0.125 * ((sqrt((h / l)) * (D * D)) * ((M * M) / d))), (1.0 / l), sqrt(((d * d) / (h * l))));
} else {
tmp = fma((((M * D) * -0.25) / (d * l)), (h * (((M * D) * 0.5) / d)), 1.0) * (d / sqrt((h * l)));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (d <= -6.2e+142) tmp = abs(Float64(sqrt(Float64(-1.0 / h)) * Float64(d * Float64(1.0 / sqrt(abs(l)))))); elseif (d <= -6.5e-136) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 + Float64(Float64(h * Float64(-0.5 * Float64(M * Float64(D * Float64(M * D))))) / Float64(l * Float64(Float64(d * d) * 4.0)))))); elseif (d <= 9e-301) tmp = fma(Float64(-0.125 * Float64(Float64(sqrt(Float64(h / l)) * Float64(D * D)) * Float64(Float64(M * M) / d))), Float64(1.0 / l), sqrt(Float64(Float64(d * d) / Float64(h * l)))); else tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), Float64(h * Float64(Float64(Float64(M * D) * 0.5) / d)), 1.0) * Float64(d / sqrt(Float64(h * l)))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -6.2e+142], N[Abs[N[(N[Sqrt[N[(-1.0 / h), $MachinePrecision]], $MachinePrecision] * N[(d * N[(1.0 / N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[d, -6.5e-136], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(h * N[(-0.5 * N[(M * N[(D * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9e-301], N[(N[(-0.125 * N[(N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / l), $MachinePrecision] + N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(h * N[(N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -6.2 \cdot 10^{+142}:\\
\;\;\;\;\left|\sqrt{\frac{-1}{h}} \cdot \left(d \cdot \frac{1}{\sqrt{\left|\ell\right|}}\right)\right|\\
\mathbf{elif}\;d \leq -6.5 \cdot 10^{-136}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{h \cdot \left(-0.5 \cdot \left(M \cdot \left(D \cdot \left(M \cdot D\right)\right)\right)\right)}{\ell \cdot \left(\left(d \cdot d\right) \cdot 4\right)}\right)\right)\\
\mathbf{elif}\;d \leq 9 \cdot 10^{-301}:\\
\;\;\;\;\mathsf{fma}\left(-0.125 \cdot \left(\left(\sqrt{\frac{h}{\ell}} \cdot \left(D \cdot D\right)\right) \cdot \frac{M \cdot M}{d}\right), \frac{1}{\ell}, \sqrt{\frac{d \cdot d}{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, h \cdot \frac{\left(M \cdot D\right) \cdot 0.5}{d}, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\end{array}
\end{array}
if d < -6.1999999999999998e142Initial program 61.2%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.0
Simplified7.0%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6466.9
Applied egg-rr66.9%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
div-invN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
Applied egg-rr77.4%
if -6.1999999999999998e142 < d < -6.50000000000000011e-136Initial program 81.6%
Applied egg-rr79.8%
Applied egg-rr81.2%
if -6.50000000000000011e-136 < d < 9.00000000000000039e-301Initial program 37.7%
Applied egg-rr5.7%
Taylor expanded in d around 0
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6452.0
Simplified52.0%
if 9.00000000000000039e-301 < d Initial program 72.3%
Applied egg-rr55.5%
Applied egg-rr74.0%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval74.9
Applied egg-rr74.9%
Applied egg-rr83.4%
Final simplification76.7%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* M D) 0.5)))
(if (<= d -1.25e+58)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= d -1.02e-102)
(*
(+ 1.0 (/ (* (* M (* D -0.5)) (* h t_0)) (* d (* 2.0 (* d l)))))
(sqrt (/ (fma d d 0.0) (* h l))))
(if (<= d 5.6e-299)
(fma
(* -0.125 (* (* (sqrt (/ h l)) (* D D)) (/ (* M M) d)))
(/ 1.0 l)
(sqrt (/ (* d d) (* h l))))
(*
(fma (/ (* (* M D) -0.25) (* d l)) (* h (/ t_0 d)) 1.0)
(/ d (sqrt (* h l)))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) * 0.5;
double tmp;
if (d <= -1.25e+58) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (d <= -1.02e-102) {
tmp = (1.0 + (((M * (D * -0.5)) * (h * t_0)) / (d * (2.0 * (d * l))))) * sqrt((fma(d, d, 0.0) / (h * l)));
} else if (d <= 5.6e-299) {
tmp = fma((-0.125 * ((sqrt((h / l)) * (D * D)) * ((M * M) / d))), (1.0 / l), sqrt(((d * d) / (h * l))));
} else {
tmp = fma((((M * D) * -0.25) / (d * l)), (h * (t_0 / d)), 1.0) * (d / sqrt((h * l)));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) * 0.5) tmp = 0.0 if (d <= -1.25e+58) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (d <= -1.02e-102) tmp = Float64(Float64(1.0 + Float64(Float64(Float64(M * Float64(D * -0.5)) * Float64(h * t_0)) / Float64(d * Float64(2.0 * Float64(d * l))))) * sqrt(Float64(fma(d, d, 0.0) / Float64(h * l)))); elseif (d <= 5.6e-299) tmp = fma(Float64(-0.125 * Float64(Float64(sqrt(Float64(h / l)) * Float64(D * D)) * Float64(Float64(M * M) / d))), Float64(1.0 / l), sqrt(Float64(Float64(d * d) / Float64(h * l)))); else tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), Float64(h * Float64(t_0 / d)), 1.0) * Float64(d / sqrt(Float64(h * l)))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[d, -1.25e+58], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[d, -1.02e-102], N[(N[(1.0 + N[(N[(N[(M * N[(D * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(d * N[(2.0 * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d * d + 0.0), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 5.6e-299], N[(N[(-0.125 * N[(N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / l), $MachinePrecision] + N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(h * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(M \cdot D\right) \cdot 0.5\\
\mathbf{if}\;d \leq -1.25 \cdot 10^{+58}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;d \leq -1.02 \cdot 10^{-102}:\\
\;\;\;\;\left(1 + \frac{\left(M \cdot \left(D \cdot -0.5\right)\right) \cdot \left(h \cdot t\_0\right)}{d \cdot \left(2 \cdot \left(d \cdot \ell\right)\right)}\right) \cdot \sqrt{\frac{\mathsf{fma}\left(d, d, 0\right)}{h \cdot \ell}}\\
\mathbf{elif}\;d \leq 5.6 \cdot 10^{-299}:\\
\;\;\;\;\mathsf{fma}\left(-0.125 \cdot \left(\left(\sqrt{\frac{h}{\ell}} \cdot \left(D \cdot D\right)\right) \cdot \frac{M \cdot M}{d}\right), \frac{1}{\ell}, \sqrt{\frac{d \cdot d}{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, h \cdot \frac{t\_0}{d}, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\end{array}
\end{array}
if d < -1.24999999999999996e58Initial program 65.0%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.6
Simplified5.6%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6466.9
Applied egg-rr66.9%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr76.9%
if -1.24999999999999996e58 < d < -1.01999999999999996e-102Initial program 85.3%
Applied egg-rr82.5%
Applied egg-rr91.1%
div-invN/A
*-commutativeN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr73.5%
if -1.01999999999999996e-102 < d < 5.6000000000000003e-299Initial program 42.5%
Applied egg-rr10.9%
Taylor expanded in d around 0
*-lowering-*.f64N/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.0
Simplified53.0%
if 5.6000000000000003e-299 < d Initial program 72.3%
Applied egg-rr55.5%
Applied egg-rr74.0%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval74.9
Applied egg-rr74.9%
Applied egg-rr83.4%
Final simplification74.8%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(fma (/ (* (* M D) -0.25) (* d l)) (* h (/ (* (* M D) 0.5) d)) 1.0)))
(if (<= l -6.2e+149)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= l -5e-310)
(* (sqrt (/ d h)) (* t_0 (sqrt (/ d l))))
(if (<= l 3.1e+180)
(* t_0 (/ d (sqrt (* h l))))
(/ d (* (sqrt h) (sqrt l))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = fma((((M * D) * -0.25) / (d * l)), (h * (((M * D) * 0.5) / d)), 1.0);
double tmp;
if (l <= -6.2e+149) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= -5e-310) {
tmp = sqrt((d / h)) * (t_0 * sqrt((d / l)));
} else if (l <= 3.1e+180) {
tmp = t_0 * (d / sqrt((h * l)));
} else {
tmp = d / (sqrt(h) * sqrt(l));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), Float64(h * Float64(Float64(Float64(M * D) * 0.5) / d)), 1.0) tmp = 0.0 if (l <= -6.2e+149) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= -5e-310) tmp = Float64(sqrt(Float64(d / h)) * Float64(t_0 * sqrt(Float64(d / l)))); elseif (l <= 3.1e+180) tmp = Float64(t_0 * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(h * N[(N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[l, -6.2e+149], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -5e-310], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.1e+180], N[(t$95$0 * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, h \cdot \frac{\left(M \cdot D\right) \cdot 0.5}{d}, 1\right)\\
\mathbf{if}\;\ell \leq -6.2 \cdot 10^{+149}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t\_0 \cdot \sqrt{\frac{d}{\ell}}\right)\\
\mathbf{elif}\;\ell \leq 3.1 \cdot 10^{+180}:\\
\;\;\;\;t\_0 \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -6.19999999999999974e149Initial program 37.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.5
Simplified5.5%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6463.3
Applied egg-rr63.3%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr69.2%
if -6.19999999999999974e149 < l < -4.999999999999985e-310Initial program 70.4%
Applied egg-rr55.7%
Applied egg-rr71.7%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval75.8
Applied egg-rr75.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr71.3%
if -4.999999999999985e-310 < l < 3.09999999999999998e180Initial program 75.9%
Applied egg-rr65.4%
Applied egg-rr79.0%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval79.2
Applied egg-rr79.2%
Applied egg-rr89.4%
if 3.09999999999999998e180 < l Initial program 57.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6454.9
Simplified54.9%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6454.8
Applied egg-rr54.8%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6481.4
Applied egg-rr81.4%
Final simplification78.9%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* M D) 0.5)) (t_1 (/ d (sqrt (* h l)))))
(if (<= d -1.15e+60)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= d -9.5e-84)
(*
(+ 1.0 (/ (* (* M (* D -0.5)) (* h t_0)) (* d (* 2.0 (* d l)))))
(sqrt (/ (fma d d 0.0) (* h l))))
(if (<= d -5.4e-209)
(*
(fma (* D D) (/ (* (* M M) (* h -0.125)) (* d (* d l))) 1.0)
(fabs t_1))
(if (<= d -6.6e-301)
(* (sqrt (/ h (* l (* l l)))) (* (* D (* D (* M M))) (/ 0.125 d)))
(*
(fma (/ (* (* M D) -0.25) (* d l)) (* h (/ t_0 d)) 1.0)
t_1)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) * 0.5;
double t_1 = d / sqrt((h * l));
double tmp;
if (d <= -1.15e+60) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (d <= -9.5e-84) {
tmp = (1.0 + (((M * (D * -0.5)) * (h * t_0)) / (d * (2.0 * (d * l))))) * sqrt((fma(d, d, 0.0) / (h * l)));
} else if (d <= -5.4e-209) {
tmp = fma((D * D), (((M * M) * (h * -0.125)) / (d * (d * l))), 1.0) * fabs(t_1);
} else if (d <= -6.6e-301) {
tmp = sqrt((h / (l * (l * l)))) * ((D * (D * (M * M))) * (0.125 / d));
} else {
tmp = fma((((M * D) * -0.25) / (d * l)), (h * (t_0 / d)), 1.0) * t_1;
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) * 0.5) t_1 = Float64(d / sqrt(Float64(h * l))) tmp = 0.0 if (d <= -1.15e+60) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (d <= -9.5e-84) tmp = Float64(Float64(1.0 + Float64(Float64(Float64(M * Float64(D * -0.5)) * Float64(h * t_0)) / Float64(d * Float64(2.0 * Float64(d * l))))) * sqrt(Float64(fma(d, d, 0.0) / Float64(h * l)))); elseif (d <= -5.4e-209) tmp = Float64(fma(Float64(D * D), Float64(Float64(Float64(M * M) * Float64(h * -0.125)) / Float64(d * Float64(d * l))), 1.0) * abs(t_1)); elseif (d <= -6.6e-301) tmp = Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(D * Float64(D * Float64(M * M))) * Float64(0.125 / d))); else tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), Float64(h * Float64(t_0 / d)), 1.0) * t_1); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.15e+60], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[d, -9.5e-84], N[(N[(1.0 + N[(N[(N[(M * N[(D * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(d * N[(2.0 * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d * d + 0.0), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5.4e-209], N[(N[(N[(D * D), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * N[(h * -0.125), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -6.6e-301], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(h * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(M \cdot D\right) \cdot 0.5\\
t_1 := \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;d \leq -1.15 \cdot 10^{+60}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;d \leq -9.5 \cdot 10^{-84}:\\
\;\;\;\;\left(1 + \frac{\left(M \cdot \left(D \cdot -0.5\right)\right) \cdot \left(h \cdot t\_0\right)}{d \cdot \left(2 \cdot \left(d \cdot \ell\right)\right)}\right) \cdot \sqrt{\frac{\mathsf{fma}\left(d, d, 0\right)}{h \cdot \ell}}\\
\mathbf{elif}\;d \leq -5.4 \cdot 10^{-209}:\\
\;\;\;\;\mathsf{fma}\left(D \cdot D, \frac{\left(M \cdot M\right) \cdot \left(h \cdot -0.125\right)}{d \cdot \left(d \cdot \ell\right)}, 1\right) \cdot \left|t\_1\right|\\
\mathbf{elif}\;d \leq -6.6 \cdot 10^{-301}:\\
\;\;\;\;\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot \left(D \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{0.125}{d}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, h \cdot \frac{t\_0}{d}, 1\right) \cdot t\_1\\
\end{array}
\end{array}
if d < -1.15000000000000008e60Initial program 65.0%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.6
Simplified5.6%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6466.9
Applied egg-rr66.9%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr76.9%
if -1.15000000000000008e60 < d < -9.49999999999999941e-84Initial program 85.0%
Applied egg-rr82.0%
Applied egg-rr90.8%
div-invN/A
*-commutativeN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr72.7%
if -9.49999999999999941e-84 < d < -5.39999999999999997e-209Initial program 54.2%
Applied egg-rr48.7%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified36.1%
div-invN/A
*-commutativeN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr23.3%
Applied egg-rr57.6%
if -5.39999999999999997e-209 < d < -6.6000000000000001e-301Initial program 40.2%
Taylor expanded in h around -inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
distribute-neg-fracN/A
Simplified49.1%
if -6.6000000000000001e-301 < d Initial program 70.1%
Applied egg-rr53.7%
Applied egg-rr71.7%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval72.6
Applied egg-rr72.6%
Applied egg-rr80.8%
Final simplification73.9%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.55e-178)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= l -5e-310)
(fma d (* (fabs l) (sqrt (/ (/ 1.0 h) (* l (fma l l 0.0))))) 0.0)
(if (<= l 2.5e+181)
(*
(fma (/ (* (* M D) -0.25) (* d l)) (* h (/ (* (* M D) 0.5) d)) 1.0)
(/ d (sqrt (* h l))))
(/ d (* (sqrt h) (sqrt l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.55e-178) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= -5e-310) {
tmp = fma(d, (fabs(l) * sqrt(((1.0 / h) / (l * fma(l, l, 0.0))))), 0.0);
} else if (l <= 2.5e+181) {
tmp = fma((((M * D) * -0.25) / (d * l)), (h * (((M * D) * 0.5) / d)), 1.0) * (d / sqrt((h * l)));
} else {
tmp = d / (sqrt(h) * sqrt(l));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.55e-178) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= -5e-310) tmp = fma(d, Float64(abs(l) * sqrt(Float64(Float64(1.0 / h) / Float64(l * fma(l, l, 0.0))))), 0.0); elseif (l <= 2.5e+181) tmp = Float64(fma(Float64(Float64(Float64(M * D) * -0.25) / Float64(d * l)), Float64(h * Float64(Float64(Float64(M * D) * 0.5) / d)), 1.0) * Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.55e-178], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -5e-310], N[(d * N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / N[(l * N[(l * l + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision], If[LessEqual[l, 2.5e+181], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(h * N[(N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.55 \cdot 10^{-178}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(d, \left|\ell\right| \cdot \sqrt{\frac{\frac{1}{h}}{\ell \cdot \mathsf{fma}\left(\ell, \ell, 0\right)}}, 0\right)\\
\mathbf{elif}\;\ell \leq 2.5 \cdot 10^{+181}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot -0.25}{d \cdot \ell}, h \cdot \frac{\left(M \cdot D\right) \cdot 0.5}{d}, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -1.55e-178Initial program 60.6%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f644.4
Simplified4.4%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6447.1
Applied egg-rr47.1%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr54.0%
if -1.55e-178 < l < -4.999999999999985e-310Initial program 71.2%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6427.8
Simplified27.8%
associate-/r*N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6415.3
Applied egg-rr15.3%
sqrt-undivN/A
flip3--N/A
associate-/r/N/A
sqrt-prodN/A
metadata-evalN/A
+-lft-identityN/A
distribute-rgt-outN/A
+-commutativeN/A
+-lft-identityN/A
sqr-negN/A
sub0-negN/A
sub0-negN/A
sqrt-unprodN/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
Applied egg-rr74.1%
if -4.999999999999985e-310 < l < 2.5000000000000002e181Initial program 75.9%
Applied egg-rr65.4%
Applied egg-rr79.0%
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
metadata-eval79.2
Applied egg-rr79.2%
Applied egg-rr89.4%
if 2.5000000000000002e181 < l Initial program 57.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6454.9
Simplified54.9%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6454.8
Applied egg-rr54.8%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6481.4
Applied egg-rr81.4%
Final simplification72.1%
(FPCore (d h l M D)
:precision binary64
(if (<= l -5.2e-175)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= l -5e-310)
(fma d (* (fabs l) (sqrt (/ (/ 1.0 h) (* l (fma l l 0.0))))) 0.0)
(if (<= l 8.2e+179)
(/
(* d (fma (* D D) (/ (* M (* M (* h -0.125))) (* d (* d l))) 1.0))
(sqrt (* h l)))
(/ d (* (sqrt h) (sqrt l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -5.2e-175) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= -5e-310) {
tmp = fma(d, (fabs(l) * sqrt(((1.0 / h) / (l * fma(l, l, 0.0))))), 0.0);
} else if (l <= 8.2e+179) {
tmp = (d * fma((D * D), ((M * (M * (h * -0.125))) / (d * (d * l))), 1.0)) / sqrt((h * l));
} else {
tmp = d / (sqrt(h) * sqrt(l));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (l <= -5.2e-175) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= -5e-310) tmp = fma(d, Float64(abs(l) * sqrt(Float64(Float64(1.0 / h) / Float64(l * fma(l, l, 0.0))))), 0.0); elseif (l <= 8.2e+179) tmp = Float64(Float64(d * fma(Float64(D * D), Float64(Float64(M * Float64(M * Float64(h * -0.125))) / Float64(d * Float64(d * l))), 1.0)) / sqrt(Float64(h * l))); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -5.2e-175], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -5e-310], N[(d * N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / N[(l * N[(l * l + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision], If[LessEqual[l, 8.2e+179], N[(N[(d * N[(N[(D * D), $MachinePrecision] * N[(N[(M * N[(M * N[(h * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5.2 \cdot 10^{-175}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(d, \left|\ell\right| \cdot \sqrt{\frac{\frac{1}{h}}{\ell \cdot \mathsf{fma}\left(\ell, \ell, 0\right)}}, 0\right)\\
\mathbf{elif}\;\ell \leq 8.2 \cdot 10^{+179}:\\
\;\;\;\;\frac{d \cdot \mathsf{fma}\left(D \cdot D, \frac{M \cdot \left(M \cdot \left(h \cdot -0.125\right)\right)}{d \cdot \left(d \cdot \ell\right)}, 1\right)}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -5.2e-175Initial program 60.6%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f644.4
Simplified4.4%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6447.1
Applied egg-rr47.1%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr54.0%
if -5.2e-175 < l < -4.999999999999985e-310Initial program 71.2%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6427.8
Simplified27.8%
associate-/r*N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6415.3
Applied egg-rr15.3%
sqrt-undivN/A
flip3--N/A
associate-/r/N/A
sqrt-prodN/A
metadata-evalN/A
+-lft-identityN/A
distribute-rgt-outN/A
+-commutativeN/A
+-lft-identityN/A
sqr-negN/A
sub0-negN/A
sub0-negN/A
sqrt-unprodN/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
Applied egg-rr74.1%
if -4.999999999999985e-310 < l < 8.20000000000000021e179Initial program 75.9%
Applied egg-rr65.4%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified52.2%
div-invN/A
*-commutativeN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr41.9%
Applied egg-rr63.9%
if 8.20000000000000021e179 < l Initial program 57.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6454.9
Simplified54.9%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6454.8
Applied egg-rr54.8%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6481.4
Applied egg-rr81.4%
Final simplification62.8%
(FPCore (d h l M D)
:precision binary64
(if (<= l -4.05e-178)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= l -5e-310)
(fma d (* (fabs l) (sqrt (/ (/ 1.0 h) (* l (fma l l 0.0))))) 0.0)
(if (<= l 2.45e+163)
(*
(/ d (sqrt (* h l)))
(fma (* D D) (/ (* (* M M) (* h -0.125)) (* d (* d l))) 1.0))
(/ d (* (sqrt h) (sqrt l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -4.05e-178) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= -5e-310) {
tmp = fma(d, (fabs(l) * sqrt(((1.0 / h) / (l * fma(l, l, 0.0))))), 0.0);
} else if (l <= 2.45e+163) {
tmp = (d / sqrt((h * l))) * fma((D * D), (((M * M) * (h * -0.125)) / (d * (d * l))), 1.0);
} else {
tmp = d / (sqrt(h) * sqrt(l));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (l <= -4.05e-178) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= -5e-310) tmp = fma(d, Float64(abs(l) * sqrt(Float64(Float64(1.0 / h) / Float64(l * fma(l, l, 0.0))))), 0.0); elseif (l <= 2.45e+163) tmp = Float64(Float64(d / sqrt(Float64(h * l))) * fma(Float64(D * D), Float64(Float64(Float64(M * M) * Float64(h * -0.125)) / Float64(d * Float64(d * l))), 1.0)); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -4.05e-178], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -5e-310], N[(d * N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / N[(l * N[(l * l + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision], If[LessEqual[l, 2.45e+163], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * N[(h * -0.125), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -4.05 \cdot 10^{-178}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(d, \left|\ell\right| \cdot \sqrt{\frac{\frac{1}{h}}{\ell \cdot \mathsf{fma}\left(\ell, \ell, 0\right)}}, 0\right)\\
\mathbf{elif}\;\ell \leq 2.45 \cdot 10^{+163}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(D \cdot D, \frac{\left(M \cdot M\right) \cdot \left(h \cdot -0.125\right)}{d \cdot \left(d \cdot \ell\right)}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -4.0499999999999999e-178Initial program 60.6%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f644.4
Simplified4.4%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6447.1
Applied egg-rr47.1%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr54.0%
if -4.0499999999999999e-178 < l < -4.999999999999985e-310Initial program 71.2%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6427.8
Simplified27.8%
associate-/r*N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6415.3
Applied egg-rr15.3%
sqrt-undivN/A
flip3--N/A
associate-/r/N/A
sqrt-prodN/A
metadata-evalN/A
+-lft-identityN/A
distribute-rgt-outN/A
+-commutativeN/A
+-lft-identityN/A
sqr-negN/A
sub0-negN/A
sub0-negN/A
sqrt-unprodN/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
Applied egg-rr74.1%
if -4.999999999999985e-310 < l < 2.45e163Initial program 77.9%
Applied egg-rr67.9%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified55.1%
div-invN/A
*-commutativeN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr44.2%
sqrt-divN/A
+-rgt-identityN/A
sqrt-prodN/A
rem-square-sqrtN/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6460.7
Applied egg-rr60.7%
if 2.45e163 < l Initial program 55.4%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6453.0
Simplified53.0%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6452.9
Applied egg-rr52.9%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6475.8
Applied egg-rr75.8%
Final simplification61.2%
(FPCore (d h l M D)
:precision binary64
(if (<= M 6.6e-90)
(fabs (* d (sqrt (/ 1.0 (* h l)))))
(*
(fma (* D D) (/ (* (* M M) (* h -0.125)) (* d (* d l))) 1.0)
(fabs (/ d (sqrt (* h l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (M <= 6.6e-90) {
tmp = fabs((d * sqrt((1.0 / (h * l)))));
} else {
tmp = fma((D * D), (((M * M) * (h * -0.125)) / (d * (d * l))), 1.0) * fabs((d / sqrt((h * l))));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (M <= 6.6e-90) tmp = abs(Float64(d * sqrt(Float64(1.0 / Float64(h * l))))); else tmp = Float64(fma(Float64(D * D), Float64(Float64(Float64(M * M) * Float64(h * -0.125)) / Float64(d * Float64(d * l))), 1.0) * abs(Float64(d / sqrt(Float64(h * l))))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[M, 6.6e-90], N[Abs[N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(D * D), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * N[(h * -0.125), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Abs[N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq 6.6 \cdot 10^{-90}:\\
\;\;\;\;\left|d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right|\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(D \cdot D, \frac{\left(M \cdot M\right) \cdot \left(h \cdot -0.125\right)}{d \cdot \left(d \cdot \ell\right)}, 1\right) \cdot \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\
\end{array}
\end{array}
if M < 6.6e-90Initial program 68.5%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6428.9
Simplified28.9%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6448.8
Applied egg-rr48.8%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
*-lowering-*.f64N/A
sqrt-undivN/A
associate-/l/N/A
metadata-evalN/A
sub0-negN/A
distribute-lft-neg-inN/A
frac-2negN/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6448.8
Applied egg-rr48.8%
if 6.6e-90 < M Initial program 63.2%
Applied egg-rr49.3%
Taylor expanded in M around 0
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
Simplified42.4%
div-invN/A
*-commutativeN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
associate-*l*N/A
*-lowering-*.f64N/A
Applied egg-rr33.6%
Applied egg-rr54.8%
Final simplification50.8%
(FPCore (d h l M D)
:precision binary64
(if (<= l -5.1e-175)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= l -5e-310)
(fma d (* (fabs l) (sqrt (/ (/ 1.0 h) (* l (fma l l 0.0))))) 0.0)
(if (<= l 6e-187)
(* (* (* D D) (* (* M M) (sqrt (/ h (* l (* l l)))))) (/ -0.125 d))
(/ d (* (sqrt h) (sqrt l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -5.1e-175) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= -5e-310) {
tmp = fma(d, (fabs(l) * sqrt(((1.0 / h) / (l * fma(l, l, 0.0))))), 0.0);
} else if (l <= 6e-187) {
tmp = ((D * D) * ((M * M) * sqrt((h / (l * (l * l)))))) * (-0.125 / d);
} else {
tmp = d / (sqrt(h) * sqrt(l));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (l <= -5.1e-175) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= -5e-310) tmp = fma(d, Float64(abs(l) * sqrt(Float64(Float64(1.0 / h) / Float64(l * fma(l, l, 0.0))))), 0.0); elseif (l <= 6e-187) tmp = Float64(Float64(Float64(D * D) * Float64(Float64(M * M) * sqrt(Float64(h / Float64(l * Float64(l * l)))))) * Float64(-0.125 / d)); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -5.1e-175], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -5e-310], N[(d * N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / N[(l * N[(l * l + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision], If[LessEqual[l, 6e-187], N[(N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.125 / d), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5.1 \cdot 10^{-175}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(d, \left|\ell\right| \cdot \sqrt{\frac{\frac{1}{h}}{\ell \cdot \mathsf{fma}\left(\ell, \ell, 0\right)}}, 0\right)\\
\mathbf{elif}\;\ell \leq 6 \cdot 10^{-187}:\\
\;\;\;\;\left(\left(D \cdot D\right) \cdot \left(\left(M \cdot M\right) \cdot \sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\right)\right) \cdot \frac{-0.125}{d}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -5.10000000000000054e-175Initial program 60.6%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f644.4
Simplified4.4%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6447.1
Applied egg-rr47.1%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr54.0%
if -5.10000000000000054e-175 < l < -4.999999999999985e-310Initial program 71.2%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6427.8
Simplified27.8%
associate-/r*N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6415.3
Applied egg-rr15.3%
sqrt-undivN/A
flip3--N/A
associate-/r/N/A
sqrt-prodN/A
metadata-evalN/A
+-lft-identityN/A
distribute-rgt-outN/A
+-commutativeN/A
+-lft-identityN/A
sqr-negN/A
sub0-negN/A
sub0-negN/A
sqrt-unprodN/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
Applied egg-rr74.1%
if -4.999999999999985e-310 < l < 6.00000000000000008e-187Initial program 75.0%
Applied egg-rr56.7%
Taylor expanded in d around 0
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified48.7%
if 6.00000000000000008e-187 < l Initial program 70.2%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6452.9
Simplified52.9%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6452.9
Applied egg-rr52.9%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6464.3
Applied egg-rr64.3%
Final simplification59.2%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.12e-175)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= l -5e-310)
(fma d (* (fabs l) (sqrt (/ (/ 1.0 h) (* l (fma l l 0.0))))) 0.0)
(/ d (* (sqrt h) (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.12e-175) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= -5e-310) {
tmp = fma(d, (fabs(l) * sqrt(((1.0 / h) / (l * fma(l, l, 0.0))))), 0.0);
} else {
tmp = d / (sqrt(h) * sqrt(l));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.12e-175) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= -5e-310) tmp = fma(d, Float64(abs(l) * sqrt(Float64(Float64(1.0 / h) / Float64(l * fma(l, l, 0.0))))), 0.0); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.12e-175], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -5e-310], N[(d * N[(N[Abs[l], $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / N[(l * N[(l * l + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.12 \cdot 10^{-175}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(d, \left|\ell\right| \cdot \sqrt{\frac{\frac{1}{h}}{\ell \cdot \mathsf{fma}\left(\ell, \ell, 0\right)}}, 0\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -1.1200000000000001e-175Initial program 60.6%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f644.4
Simplified4.4%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6447.1
Applied egg-rr47.1%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr54.0%
if -1.1200000000000001e-175 < l < -4.999999999999985e-310Initial program 71.2%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6427.8
Simplified27.8%
associate-/r*N/A
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6415.3
Applied egg-rr15.3%
sqrt-undivN/A
flip3--N/A
associate-/r/N/A
sqrt-prodN/A
metadata-evalN/A
+-lft-identityN/A
distribute-rgt-outN/A
+-commutativeN/A
+-lft-identityN/A
sqr-negN/A
sub0-negN/A
sub0-negN/A
sqrt-unprodN/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
Applied egg-rr74.1%
if -4.999999999999985e-310 < l Initial program 71.2%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6448.0
Simplified48.0%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6447.9
Applied egg-rr47.9%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6456.9
Applied egg-rr56.9%
Final simplification57.2%
(FPCore (d h l M D)
:precision binary64
(if (<= l -4.6e-179)
(fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h)))))
(if (<= l 2.8e-308)
(fma d (sqrt (/ 1.0 (sqrt (* (* h l) (* h l))))) 0.0)
(/ d (* (sqrt h) (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -4.6e-179) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= 2.8e-308) {
tmp = fma(d, sqrt((1.0 / sqrt(((h * l) * (h * l))))), 0.0);
} else {
tmp = d / (sqrt(h) * sqrt(l));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (l <= -4.6e-179) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= 2.8e-308) tmp = fma(d, sqrt(Float64(1.0 / sqrt(Float64(Float64(h * l) * Float64(h * l))))), 0.0); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -4.6e-179], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.8e-308], N[(d * N[Sqrt[N[(1.0 / N[Sqrt[N[(N[(h * l), $MachinePrecision] * N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 0.0), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -4.6 \cdot 10^{-179}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq 2.8 \cdot 10^{-308}:\\
\;\;\;\;\mathsf{fma}\left(d, \sqrt{\frac{1}{\sqrt{\left(h \cdot \ell\right) \cdot \left(h \cdot \ell\right)}}}, 0\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -4.59999999999999975e-179Initial program 60.6%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f644.4
Simplified4.4%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6447.1
Applied egg-rr47.1%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr54.0%
if -4.59999999999999975e-179 < l < 2.79999999999999984e-308Initial program 72.4%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6426.7
Simplified26.7%
rem-square-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6446.8
Applied egg-rr46.8%
if 2.79999999999999984e-308 < l Initial program 71.0%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6448.4
Simplified48.4%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6448.3
Applied egg-rr48.3%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6457.3
Applied egg-rr57.3%
Final simplification54.9%
(FPCore (d h l M D) :precision binary64 (if (<= l -5.2e-274) (fabs (/ d (* (sqrt (fabs l)) (sqrt (- 0.0 h))))) (if (<= l -5e-310) (/ d (sqrt (* h l))) (/ d (* (sqrt h) (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -5.2e-274) {
tmp = fabs((d / (sqrt(fabs(l)) * sqrt((0.0 - h)))));
} else if (l <= -5e-310) {
tmp = d / sqrt((h * l));
} else {
tmp = d / (sqrt(h) * sqrt(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 <= (-5.2d-274)) then
tmp = abs((d / (sqrt(abs(l)) * sqrt((0.0d0 - h)))))
else if (l <= (-5d-310)) then
tmp = d / sqrt((h * l))
else
tmp = d / (sqrt(h) * sqrt(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 <= -5.2e-274) {
tmp = Math.abs((d / (Math.sqrt(Math.abs(l)) * Math.sqrt((0.0 - h)))));
} else if (l <= -5e-310) {
tmp = d / Math.sqrt((h * l));
} else {
tmp = d / (Math.sqrt(h) * Math.sqrt(l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -5.2e-274: tmp = math.fabs((d / (math.sqrt(math.fabs(l)) * math.sqrt((0.0 - h))))) elif l <= -5e-310: tmp = d / math.sqrt((h * l)) else: tmp = d / (math.sqrt(h) * math.sqrt(l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -5.2e-274) tmp = abs(Float64(d / Float64(sqrt(abs(l)) * sqrt(Float64(0.0 - h))))); elseif (l <= -5e-310) tmp = Float64(d / sqrt(Float64(h * l))); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -5.2e-274) tmp = abs((d / (sqrt(abs(l)) * sqrt((0.0 - h))))); elseif (l <= -5e-310) tmp = d / sqrt((h * l)); else tmp = d / (sqrt(h) * sqrt(l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -5.2e-274], N[Abs[N[(d / N[(N[Sqrt[N[Abs[l], $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, -5e-310], N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5.2 \cdot 10^{-274}:\\
\;\;\;\;\left|\frac{d}{\sqrt{\left|\ell\right|} \cdot \sqrt{0 - h}}\right|\\
\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < -5.2e-274Initial program 61.4%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.6
Simplified5.6%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6441.8
Applied egg-rr41.8%
div-invN/A
metadata-evalN/A
*-commutativeN/A
sqrt-divN/A
frac-2negN/A
metadata-evalN/A
distribute-lft-neg-inN/A
sub0-negN/A
associate-/l/N/A
sqrt-undivN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
div-invN/A
metadata-evalN/A
sqrt-divN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr50.1%
if -5.2e-274 < l < -4.999999999999985e-310Initial program 83.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6468.2
Simplified68.2%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6468.2
Applied egg-rr68.2%
if -4.999999999999985e-310 < l Initial program 71.2%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6448.0
Simplified48.0%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6447.9
Applied egg-rr47.9%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6456.9
Applied egg-rr56.9%
Final simplification53.8%
(FPCore (d h l M D) :precision binary64 (if (<= l 7e-201) (* (- 0.0 d) (sqrt (/ 1.0 (* h l)))) (/ d (* (sqrt h) (sqrt l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 7e-201) {
tmp = (0.0 - d) * sqrt((1.0 / (h * l)));
} else {
tmp = d / (sqrt(h) * sqrt(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-201) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (h * l)))
else
tmp = d / (sqrt(h) * sqrt(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-201) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (h * l)));
} else {
tmp = d / (Math.sqrt(h) * Math.sqrt(l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 7e-201: tmp = (0.0 - d) * math.sqrt((1.0 / (h * l))) else: tmp = d / (math.sqrt(h) * math.sqrt(l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 7e-201) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(d / Float64(sqrt(h) * sqrt(l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 7e-201) tmp = (0.0 - d) * sqrt((1.0 / (h * l))); else tmp = d / (sqrt(h) * sqrt(l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 7e-201], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7 \cdot 10^{-201}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\
\end{array}
\end{array}
if l < 7.00000000000000016e-201Initial program 64.5%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6411.7
Simplified11.7%
Taylor expanded in h around -inf
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
neg-mul-1N/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6439.2
Simplified39.2%
if 7.00000000000000016e-201 < l Initial program 70.1%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6452.4
Simplified52.4%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6452.3
Applied egg-rr52.3%
*-commutativeN/A
sqrt-prodN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sqrt-lowering-sqrt.f6463.4
Applied egg-rr63.4%
Final simplification48.7%
(FPCore (d h l M D) :precision binary64 (if (<= l -2.9e-230) (fabs (/ d (sqrt (* h l)))) (* d (sqrt (/ 1.0 (* h l))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -2.9e-230) {
tmp = fabs((d / sqrt((h * l))));
} else {
tmp = d * sqrt((1.0 / (h * l)));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-2.9d-230)) then
tmp = abs((d / sqrt((h * l))))
else
tmp = d * sqrt((1.0d0 / (h * l)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -2.9e-230) {
tmp = Math.abs((d / Math.sqrt((h * l))));
} else {
tmp = d * Math.sqrt((1.0 / (h * l)));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -2.9e-230: tmp = math.fabs((d / math.sqrt((h * l)))) else: tmp = d * math.sqrt((1.0 / (h * l))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -2.9e-230) tmp = abs(Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(d * sqrt(Float64(1.0 / Float64(h * l)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -2.9e-230) tmp = abs((d / sqrt((h * l)))); else tmp = d * sqrt((1.0 / (h * l))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -2.9e-230], N[Abs[N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.9 \cdot 10^{-230}:\\
\;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\end{array}
\end{array}
if l < -2.90000000000000005e-230Initial program 61.5%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.0
Simplified5.0%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6444.1
Applied egg-rr44.1%
if -2.90000000000000005e-230 < l Initial program 71.1%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.2
Simplified47.2%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.2
Applied egg-rr47.2%
Final simplification45.8%
(FPCore (d h l M D) :precision binary64 (let* ((t_0 (/ d (sqrt (* h l))))) (if (<= l -9.5e-232) (fabs t_0) t_0)))
double code(double d, double h, double l, double M, double D) {
double t_0 = d / sqrt((h * l));
double tmp;
if (l <= -9.5e-232) {
tmp = fabs(t_0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = d / sqrt((h * l))
if (l <= (-9.5d-232)) then
tmp = abs(t_0)
else
tmp = 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 / Math.sqrt((h * l));
double tmp;
if (l <= -9.5e-232) {
tmp = Math.abs(t_0);
} else {
tmp = t_0;
}
return tmp;
}
def code(d, h, l, M, D): t_0 = d / math.sqrt((h * l)) tmp = 0 if l <= -9.5e-232: tmp = math.fabs(t_0) else: tmp = t_0 return tmp
function code(d, h, l, M, D) t_0 = Float64(d / sqrt(Float64(h * l))) tmp = 0.0 if (l <= -9.5e-232) tmp = abs(t_0); else tmp = t_0; end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = d / sqrt((h * l)); tmp = 0.0; if (l <= -9.5e-232) tmp = abs(t_0); else tmp = t_0; end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -9.5e-232], N[Abs[t$95$0], $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;\ell \leq -9.5 \cdot 10^{-232}:\\
\;\;\;\;\left|t\_0\right|\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if l < -9.50000000000000033e-232Initial program 61.5%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f645.0
Simplified5.0%
+-rgt-identityN/A
rem-square-sqrtN/A
sqrt-prodN/A
sqrt-prodN/A
div-invN/A
rem-square-sqrtN/A
rem-sqrt-squareN/A
fabs-lowering-fabs.f64N/A
sqrt-divN/A
sqrt-prodN/A
rem-square-sqrtN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6444.1
Applied egg-rr44.1%
if -9.50000000000000033e-232 < l Initial program 71.1%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.2
Simplified47.2%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6447.2
Applied egg-rr47.2%
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* h l))))
double code(double d, double h, double l, double M, double D) {
return d / sqrt((h * l));
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = d / sqrt((h * l))
end function
public static double code(double d, double h, double l, double M, double D) {
return d / Math.sqrt((h * l));
}
def code(d, h, l, M, D): return d / math.sqrt((h * l))
function code(d, h, l, M, D) return Float64(d / sqrt(Float64(h * l))) end
function tmp = code(d, h, l, M, D) tmp = d / sqrt((h * l)); end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{d}{\sqrt{h \cdot \ell}}
\end{array}
Initial program 66.7%
Taylor expanded in d around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6427.8
Simplified27.8%
+-rgt-identityN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6427.7
Applied egg-rr27.7%
herbie shell --seed 2024197
(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)))))