
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (d h l M D) :precision binary64 (* (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))) (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
double code(double d, double h, double l, double M, double D) {
return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
end function
public static double code(double d, double h, double l, double M, double D) {
return (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
def code(d, h, l, M, D): return (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
function code(d, h, l, M, D) return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) end
function tmp = code(d, h, l, M, D) tmp = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l))); end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\end{array}
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* D (* 0.5 M)))
(t_1 (- 1.0 (* (/ (* h (/ t_0 d)) l) (/ t_0 (* d 2.0)))))
(t_2 (sqrt (/ d h))))
(if (<= d -1.5e-215)
(* (* t_2 (/ (sqrt (- d)) (sqrt (- l)))) t_1)
(if (<= d -5e-310)
(fma
(/ 1.0 (sqrt (/ (* l l) (/ h l))))
(* (/ (* M M) d) (* 0.125 (* D D)))
(* (- d) (sqrt (/ 1.0 (* h l)))))
(* t_1 (* t_2 (/ (sqrt d) (sqrt l))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = D * (0.5 * M);
double t_1 = 1.0 - (((h * (t_0 / d)) / l) * (t_0 / (d * 2.0)));
double t_2 = sqrt((d / h));
double tmp;
if (d <= -1.5e-215) {
tmp = (t_2 * (sqrt(-d) / sqrt(-l))) * t_1;
} else if (d <= -5e-310) {
tmp = fma((1.0 / sqrt(((l * l) / (h / l)))), (((M * M) / d) * (0.125 * (D * D))), (-d * sqrt((1.0 / (h * l)))));
} else {
tmp = t_1 * (t_2 * (sqrt(d) / sqrt(l)));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(D * Float64(0.5 * M)) t_1 = Float64(1.0 - Float64(Float64(Float64(h * Float64(t_0 / d)) / l) * Float64(t_0 / Float64(d * 2.0)))) t_2 = sqrt(Float64(d / h)) tmp = 0.0 if (d <= -1.5e-215) tmp = Float64(Float64(t_2 * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l)))) * t_1); elseif (d <= -5e-310) tmp = fma(Float64(1.0 / sqrt(Float64(Float64(l * l) / Float64(h / l)))), Float64(Float64(Float64(M * M) / d) * Float64(0.125 * Float64(D * D))), Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))))); else tmp = Float64(t_1 * Float64(t_2 * Float64(sqrt(d) / sqrt(l)))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - N[(N[(N[(h * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$0 / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.5e-215], N[(N[(t$95$2 * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(1.0 / N[Sqrt[N[(N[(l * l), $MachinePrecision] / N[(h / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$2 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := D \cdot \left(0.5 \cdot M\right)\\
t_1 := 1 - \frac{h \cdot \frac{t\_0}{d}}{\ell} \cdot \frac{t\_0}{d \cdot 2}\\
t_2 := \sqrt{\frac{d}{h}}\\
\mathbf{if}\;d \leq -1.5 \cdot 10^{-215}:\\
\;\;\;\;\left(t\_2 \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot t\_1\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{\frac{\ell \cdot \ell}{\frac{h}{\ell}}}}, \frac{M \cdot M}{d} \cdot \left(0.125 \cdot \left(D \cdot D\right)\right), \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\
\end{array}
\end{array}
if d < -1.50000000000000013e-215Initial program 74.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr79.2%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6479.2
Applied egg-rr79.2%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6479.2
Applied egg-rr79.2%
frac-2negN/A
lift-neg.f64N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower-neg.f6489.4
Applied egg-rr89.4%
if -1.50000000000000013e-215 < d < -4.999999999999985e-310Initial program 22.6%
Applied egg-rr22.6%
Taylor expanded in l around -inf
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified78.3%
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-/.f6482.7
Applied egg-rr82.7%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-sqrt.f6478.6
Applied egg-rr78.6%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6478.6
Applied egg-rr78.6%
Final simplification83.3%
(FPCore (d h l M D)
:precision binary64
(if (<=
(*
(* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
(+ 1.0 (* (/ h l) (* (pow (/ (* D M) (* d 2.0)) 2.0) (/ -1.0 2.0)))))
-5e-109)
(*
(- 1.0 (/ (* (* h 0.5) (* M (* 0.25 (* D (* D M))))) (* d (* d l))))
(sqrt (/ (* d d) (* h l))))
(* (sqrt (/ d h)) (sqrt (/ d l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (((pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 + ((h / l) * (pow(((D * M) / (d * 2.0)), 2.0) * (-1.0 / 2.0))))) <= -5e-109) {
tmp = (1.0 - (((h * 0.5) * (M * (0.25 * (D * (D * M))))) / (d * (d * l)))) * sqrt(((d * d) / (h * l)));
} else {
tmp = sqrt((d / h)) * sqrt((d / 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 (((((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 + ((h / l) * ((((d_1 * m) / (d * 2.0d0)) ** 2.0d0) * ((-1.0d0) / 2.0d0))))) <= (-5d-109)) then
tmp = (1.0d0 - (((h * 0.5d0) * (m * (0.25d0 * (d_1 * (d_1 * m))))) / (d * (d * l)))) * sqrt(((d * d) / (h * l)))
else
tmp = sqrt((d / h)) * sqrt((d / l))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (((Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 + ((h / l) * (Math.pow(((D * M) / (d * 2.0)), 2.0) * (-1.0 / 2.0))))) <= -5e-109) {
tmp = (1.0 - (((h * 0.5) * (M * (0.25 * (D * (D * M))))) / (d * (d * l)))) * Math.sqrt(((d * d) / (h * l)));
} else {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if ((math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 + ((h / l) * (math.pow(((D * M) / (d * 2.0)), 2.0) * (-1.0 / 2.0))))) <= -5e-109: tmp = (1.0 - (((h * 0.5) * (M * (0.25 * (D * (D * M))))) / (d * (d * l)))) * math.sqrt(((d * d) / (h * l))) else: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(D * M) / Float64(d * 2.0)) ^ 2.0) * Float64(-1.0 / 2.0))))) <= -5e-109) tmp = Float64(Float64(1.0 - Float64(Float64(Float64(h * 0.5) * Float64(M * Float64(0.25 * Float64(D * Float64(D * M))))) / Float64(d * Float64(d * l)))) * sqrt(Float64(Float64(d * d) / Float64(h * l)))); else tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (((((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 + ((h / l) * ((((D * M) / (d * 2.0)) ^ 2.0) * (-1.0 / 2.0))))) <= -5e-109) tmp = (1.0 - (((h * 0.5) * (M * (0.25 * (D * (D * M))))) / (d * (d * l)))) * sqrt(((d * d) / (h * l))); else tmp = sqrt((d / h)) * sqrt((d / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[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[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(D * M), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-109], N[(N[(1.0 - N[(N[(N[(h * 0.5), $MachinePrecision] * N[(M * N[(0.25 * N[(D * N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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 + \frac{h}{\ell} \cdot \left({\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2} \cdot \frac{-1}{2}\right)\right) \leq -5 \cdot 10^{-109}:\\
\;\;\;\;\left(1 - \frac{\left(h \cdot 0.5\right) \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(D \cdot M\right)\right)\right)\right)}{d \cdot \left(d \cdot \ell\right)}\right) \cdot \sqrt{\frac{d \cdot d}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -5.0000000000000002e-109Initial program 81.4%
Applied egg-rr79.2%
Applied egg-rr47.0%
if -5.0000000000000002e-109 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 57.7%
Applied egg-rr53.3%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6433.5
Simplified33.5%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6433.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6433.8
Applied egg-rr33.8%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
*-commutativeN/A
lower-*.f6460.4
Applied egg-rr60.4%
Final simplification56.1%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* D (* 0.5 M)))
(t_1 (- 1.0 (* (/ (* h (/ t_0 d)) l) (/ t_0 (* d 2.0)))))
(t_2 (sqrt (/ d h))))
(if (<= d -1.5e-215)
(* t_1 (* t_2 (sqrt (/ d l))))
(if (<= d -5e-310)
(fma
(/ 1.0 (sqrt (/ (* l l) (/ h l))))
(* (/ (* M M) d) (* 0.125 (* D D)))
(* (- d) (sqrt (/ 1.0 (* h l)))))
(* t_1 (* t_2 (/ (sqrt d) (sqrt l))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = D * (0.5 * M);
double t_1 = 1.0 - (((h * (t_0 / d)) / l) * (t_0 / (d * 2.0)));
double t_2 = sqrt((d / h));
double tmp;
if (d <= -1.5e-215) {
tmp = t_1 * (t_2 * sqrt((d / l)));
} else if (d <= -5e-310) {
tmp = fma((1.0 / sqrt(((l * l) / (h / l)))), (((M * M) / d) * (0.125 * (D * D))), (-d * sqrt((1.0 / (h * l)))));
} else {
tmp = t_1 * (t_2 * (sqrt(d) / sqrt(l)));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(D * Float64(0.5 * M)) t_1 = Float64(1.0 - Float64(Float64(Float64(h * Float64(t_0 / d)) / l) * Float64(t_0 / Float64(d * 2.0)))) t_2 = sqrt(Float64(d / h)) tmp = 0.0 if (d <= -1.5e-215) tmp = Float64(t_1 * Float64(t_2 * sqrt(Float64(d / l)))); elseif (d <= -5e-310) tmp = fma(Float64(1.0 / sqrt(Float64(Float64(l * l) / Float64(h / l)))), Float64(Float64(Float64(M * M) / d) * Float64(0.125 * Float64(D * D))), Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))))); else tmp = Float64(t_1 * Float64(t_2 * Float64(sqrt(d) / sqrt(l)))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - N[(N[(N[(h * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$0 / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.5e-215], N[(t$95$1 * N[(t$95$2 * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(1.0 / N[Sqrt[N[(N[(l * l), $MachinePrecision] / N[(h / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$2 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := D \cdot \left(0.5 \cdot M\right)\\
t_1 := 1 - \frac{h \cdot \frac{t\_0}{d}}{\ell} \cdot \frac{t\_0}{d \cdot 2}\\
t_2 := \sqrt{\frac{d}{h}}\\
\mathbf{if}\;d \leq -1.5 \cdot 10^{-215}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \sqrt{\frac{d}{\ell}}\right)\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{\frac{\ell \cdot \ell}{\frac{h}{\ell}}}}, \frac{M \cdot M}{d} \cdot \left(0.125 \cdot \left(D \cdot D\right)\right), \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\
\end{array}
\end{array}
if d < -1.50000000000000013e-215Initial program 74.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr79.2%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6479.2
Applied egg-rr79.2%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6479.2
Applied egg-rr79.2%
if -1.50000000000000013e-215 < d < -4.999999999999985e-310Initial program 22.6%
Applied egg-rr22.6%
Taylor expanded in l around -inf
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified78.3%
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-/.f6482.7
Applied egg-rr82.7%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-sqrt.f6478.6
Applied egg-rr78.6%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6478.6
Applied egg-rr78.6%
Final simplification79.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* D (* 0.5 M)))
(t_1
(*
(- 1.0 (* (/ (* h (/ t_0 d)) l) (/ t_0 (* d 2.0))))
(* (sqrt (/ d h)) (sqrt (/ d l))))))
(if (<= d -1.5e-215)
t_1
(if (<= d -5e-310)
(fma
(/ 1.0 (sqrt (/ (* l l) (/ h l))))
(* (/ (* M M) d) (* 0.125 (* D D)))
(* (- d) (sqrt (/ 1.0 (* h l)))))
(if (<= d 8.1e-44)
(*
(/ d (sqrt (* h l)))
(- 1.0 (* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d))))))
t_1)))))
double code(double d, double h, double l, double M, double D) {
double t_0 = D * (0.5 * M);
double t_1 = (1.0 - (((h * (t_0 / d)) / l) * (t_0 / (d * 2.0)))) * (sqrt((d / h)) * sqrt((d / l)));
double tmp;
if (d <= -1.5e-215) {
tmp = t_1;
} else if (d <= -5e-310) {
tmp = fma((1.0 / sqrt(((l * l) / (h / l)))), (((M * M) / d) * (0.125 * (D * D))), (-d * sqrt((1.0 / (h * l)))));
} else if (d <= 8.1e-44) {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
} else {
tmp = t_1;
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(D * Float64(0.5 * M)) t_1 = Float64(Float64(1.0 - Float64(Float64(Float64(h * Float64(t_0 / d)) / l) * Float64(t_0 / Float64(d * 2.0)))) * Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)))) tmp = 0.0 if (d <= -1.5e-215) tmp = t_1; elseif (d <= -5e-310) tmp = fma(Float64(1.0 / sqrt(Float64(Float64(l * l) / Float64(h / l)))), Float64(Float64(Float64(M * M) / d) * Float64(0.125 * Float64(D * D))), Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))))); elseif (d <= 8.1e-44) tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); else tmp = t_1; end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 - N[(N[(N[(h * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$0 / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.5e-215], t$95$1, If[LessEqual[d, -5e-310], N[(N[(1.0 / N[Sqrt[N[(N[(l * l), $MachinePrecision] / N[(h / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8.1e-44], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := D \cdot \left(0.5 \cdot M\right)\\
t_1 := \left(1 - \frac{h \cdot \frac{t\_0}{d}}{\ell} \cdot \frac{t\_0}{d \cdot 2}\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\
\mathbf{if}\;d \leq -1.5 \cdot 10^{-215}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{\frac{\ell \cdot \ell}{\frac{h}{\ell}}}}, \frac{M \cdot M}{d} \cdot \left(0.125 \cdot \left(D \cdot D\right)\right), \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
\mathbf{elif}\;d \leq 8.1 \cdot 10^{-44}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if d < -1.50000000000000013e-215 or 8.0999999999999997e-44 < d Initial program 75.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr80.4%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6480.4
Applied egg-rr80.4%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6480.4
Applied egg-rr80.4%
if -1.50000000000000013e-215 < d < -4.999999999999985e-310Initial program 22.6%
Applied egg-rr22.6%
Taylor expanded in l around -inf
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified78.3%
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-/.f6482.7
Applied egg-rr82.7%
if -4.999999999999985e-310 < d < 8.0999999999999997e-44Initial program 53.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr57.6%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6457.6
Applied egg-rr57.6%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6457.6
Applied egg-rr57.6%
Applied egg-rr64.2%
Final simplification76.7%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ d h))))
(if (<= d -3e+178)
(*
t_0
(*
(sqrt (/ d l))
(- 1.0 (* (/ (* h 0.5) (* d l)) (* D (/ (* M (* 0.25 (* D M))) d))))))
(if (<= d -1.7e-215)
(*
t_0
(*
(/ (sqrt (- d)) (sqrt (- l)))
(- 1.0 (/ (* (* h 0.5) (* M (* 0.25 (* D (* D M))))) (* d (* d l))))))
(if (<= d -5e-310)
(fma
(/ 1.0 (sqrt (/ (* l l) (/ h l))))
(* (/ (* M M) d) (* 0.125 (* D D)))
(* (- d) (sqrt (/ 1.0 (* h l)))))
(*
(/ d (sqrt (* h l)))
(-
1.0
(* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d)))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((d / h));
double tmp;
if (d <= -3e+178) {
tmp = t_0 * (sqrt((d / l)) * (1.0 - (((h * 0.5) / (d * l)) * (D * ((M * (0.25 * (D * M))) / d)))));
} else if (d <= -1.7e-215) {
tmp = t_0 * ((sqrt(-d) / sqrt(-l)) * (1.0 - (((h * 0.5) * (M * (0.25 * (D * (D * M))))) / (d * (d * l)))));
} else if (d <= -5e-310) {
tmp = fma((1.0 / sqrt(((l * l) / (h / l)))), (((M * M) / d) * (0.125 * (D * D))), (-d * sqrt((1.0 / (h * l)))));
} else {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = sqrt(Float64(d / h)) tmp = 0.0 if (d <= -3e+178) tmp = Float64(t_0 * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(Float64(Float64(h * 0.5) / Float64(d * l)) * Float64(D * Float64(Float64(M * Float64(0.25 * Float64(D * M))) / d)))))); elseif (d <= -1.7e-215) tmp = Float64(t_0 * Float64(Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))) * Float64(1.0 - Float64(Float64(Float64(h * 0.5) * Float64(M * Float64(0.25 * Float64(D * Float64(D * M))))) / Float64(d * Float64(d * l)))))); elseif (d <= -5e-310) tmp = fma(Float64(1.0 / sqrt(Float64(Float64(l * l) / Float64(h / l)))), Float64(Float64(Float64(M * M) / d) * Float64(0.125 * Float64(D * D))), Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -3e+178], N[(t$95$0 * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[(N[(h * 0.5), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(N[(M * N[(0.25 * N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1.7e-215], N[(t$95$0 * N[(N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(h * 0.5), $MachinePrecision] * N[(M * N[(0.25 * N[(D * N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(1.0 / N[Sqrt[N[(N[(l * l), $MachinePrecision] / N[(h / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}}\\
\mathbf{if}\;d \leq -3 \cdot 10^{+178}:\\
\;\;\;\;t\_0 \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - \frac{h \cdot 0.5}{d \cdot \ell} \cdot \left(D \cdot \frac{M \cdot \left(0.25 \cdot \left(D \cdot M\right)\right)}{d}\right)\right)\right)\\
\mathbf{elif}\;d \leq -1.7 \cdot 10^{-215}:\\
\;\;\;\;t\_0 \cdot \left(\frac{\sqrt{-d}}{\sqrt{-\ell}} \cdot \left(1 - \frac{\left(h \cdot 0.5\right) \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(D \cdot M\right)\right)\right)\right)}{d \cdot \left(d \cdot \ell\right)}\right)\right)\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{\frac{\ell \cdot \ell}{\frac{h}{\ell}}}}, \frac{M \cdot M}{d} \cdot \left(0.125 \cdot \left(D \cdot D\right)\right), \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\end{array}
\end{array}
if d < -3.00000000000000016e178Initial program 87.3%
Applied egg-rr70.4%
Applied egg-rr70.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
Applied egg-rr83.4%
if -3.00000000000000016e178 < d < -1.70000000000000001e-215Initial program 70.3%
Applied egg-rr68.1%
Applied egg-rr64.4%
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6475.3
Applied egg-rr75.3%
if -1.70000000000000001e-215 < d < -4.999999999999985e-310Initial program 22.6%
Applied egg-rr22.6%
Taylor expanded in l around -inf
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified78.3%
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-/.f6482.7
Applied egg-rr82.7%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6470.8
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6470.8
Applied egg-rr70.8%
Applied egg-rr68.0%
Final simplification73.0%
(FPCore (d h l M D)
:precision binary64
(if (<= d -9.2e-95)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* (* h (* 0.5 (* D M))) (/ (* 0.25 (* D M)) (* d (* d l)))))))
(if (<= d -5e-310)
(fma
(sqrt (/ h (* l (* l l))))
(* (/ (* M M) d) (* 0.125 (* D D)))
(* d (/ (sqrt (/ -1.0 l)) (- (sqrt (- h))))))
(*
(/ d (sqrt (* h l)))
(- 1.0 (* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d)))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -9.2e-95) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - ((h * (0.5 * (D * M))) * ((0.25 * (D * M)) / (d * (d * l))))));
} else if (d <= -5e-310) {
tmp = fma(sqrt((h / (l * (l * l)))), (((M * M) / d) * (0.125 * (D * D))), (d * (sqrt((-1.0 / l)) / -sqrt(-h))));
} else {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (d <= -9.2e-95) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(Float64(h * Float64(0.5 * Float64(D * M))) * Float64(Float64(0.25 * Float64(D * M)) / Float64(d * Float64(d * l))))))); elseif (d <= -5e-310) tmp = fma(sqrt(Float64(h / Float64(l * Float64(l * l)))), Float64(Float64(Float64(M * M) / d) * Float64(0.125 * Float64(D * D))), Float64(d * Float64(sqrt(Float64(-1.0 / l)) / Float64(-sqrt(Float64(-h)))))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -9.2e-95], 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[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(0.25 * N[(D * M), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(d * N[(N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision] / (-N[Sqrt[(-h)], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -9.2 \cdot 10^{-95}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - \left(h \cdot \left(0.5 \cdot \left(D \cdot M\right)\right)\right) \cdot \frac{0.25 \cdot \left(D \cdot M\right)}{d \cdot \left(d \cdot \ell\right)}\right)\right)\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}, \frac{M \cdot M}{d} \cdot \left(0.125 \cdot \left(D \cdot D\right)\right), d \cdot \frac{\sqrt{\frac{-1}{\ell}}}{-\sqrt{-h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\end{array}
\end{array}
if d < -9.19999999999999997e-95Initial program 78.5%
Applied egg-rr71.5%
Applied egg-rr69.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
Applied egg-rr75.3%
if -9.19999999999999997e-95 < d < -4.999999999999985e-310Initial program 39.0%
Applied egg-rr39.3%
Taylor expanded in l around -inf
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified58.6%
associate-/r*N/A
frac-2negN/A
mul-1-negN/A
div-invN/A
lift-/.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lift-/.f6463.0
Applied egg-rr63.0%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6470.8
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6470.8
Applied egg-rr70.8%
Applied egg-rr68.0%
Final simplification69.5%
(FPCore (d h l M D)
:precision binary64
(if (<= d -1.5e-215)
(*
(- 1.0 (* (/ (* D (* 0.5 M)) (* d 2.0)) (* D (* (/ h l) (/ (* 0.5 M) d)))))
(* (sqrt (/ d h)) (sqrt (/ d l))))
(if (<= d -5e-310)
(fma
(/ 1.0 (sqrt (/ (* l l) (/ h l))))
(* (/ (* M M) d) (* 0.125 (* D D)))
(* (- d) (sqrt (/ 1.0 (* h l)))))
(*
(/ d (sqrt (* h l)))
(- 1.0 (* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d)))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.5e-215) {
tmp = (1.0 - (((D * (0.5 * M)) / (d * 2.0)) * (D * ((h / l) * ((0.5 * M) / d))))) * (sqrt((d / h)) * sqrt((d / l)));
} else if (d <= -5e-310) {
tmp = fma((1.0 / sqrt(((l * l) / (h / l)))), (((M * M) / d) * (0.125 * (D * D))), (-d * sqrt((1.0 / (h * l)))));
} else {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.5e-215) tmp = Float64(Float64(1.0 - Float64(Float64(Float64(D * Float64(0.5 * M)) / Float64(d * 2.0)) * Float64(D * Float64(Float64(h / l) * Float64(Float64(0.5 * M) / d))))) * Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)))); elseif (d <= -5e-310) tmp = fma(Float64(1.0 / sqrt(Float64(Float64(l * l) / Float64(h / l)))), Float64(Float64(Float64(M * M) / d) * Float64(0.125 * Float64(D * D))), Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.5e-215], N[(N[(1.0 - N[(N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] * N[(D * N[(N[(h / l), $MachinePrecision] * N[(N[(0.5 * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(1.0 / N[Sqrt[N[(N[(l * l), $MachinePrecision] / N[(h / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.5 \cdot 10^{-215}:\\
\;\;\;\;\left(1 - \frac{D \cdot \left(0.5 \cdot M\right)}{d \cdot 2} \cdot \left(D \cdot \left(\frac{h}{\ell} \cdot \frac{0.5 \cdot M}{d}\right)\right)\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{\frac{\ell \cdot \ell}{\frac{h}{\ell}}}}, \frac{M \cdot M}{d} \cdot \left(0.125 \cdot \left(D \cdot D\right)\right), \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\end{array}
\end{array}
if d < -1.50000000000000013e-215Initial program 74.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr79.2%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6479.2
Applied egg-rr79.2%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6479.2
Applied egg-rr79.2%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6474.0
Applied egg-rr74.0%
if -1.50000000000000013e-215 < d < -4.999999999999985e-310Initial program 22.6%
Applied egg-rr22.6%
Taylor expanded in l around -inf
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified78.3%
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-/.f6482.7
Applied egg-rr82.7%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6470.8
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6470.8
Applied egg-rr70.8%
Applied egg-rr68.0%
Final simplification71.7%
(FPCore (d h l M D)
:precision binary64
(if (<= d -1.7e-215)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* (* h (* 0.5 (* D M))) (/ (* 0.25 (* D M)) (* d (* d l)))))))
(if (<= d -5e-310)
(fma
(/ 1.0 (sqrt (/ (* l l) (/ h l))))
(* (/ (* M M) d) (* 0.125 (* D D)))
(* (- d) (sqrt (/ 1.0 (* h l)))))
(*
(/ d (sqrt (* h l)))
(- 1.0 (* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d)))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.7e-215) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - ((h * (0.5 * (D * M))) * ((0.25 * (D * M)) / (d * (d * l))))));
} else if (d <= -5e-310) {
tmp = fma((1.0 / sqrt(((l * l) / (h / l)))), (((M * M) / d) * (0.125 * (D * D))), (-d * sqrt((1.0 / (h * l)))));
} else {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.7e-215) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(Float64(h * Float64(0.5 * Float64(D * M))) * Float64(Float64(0.25 * Float64(D * M)) / Float64(d * Float64(d * l))))))); elseif (d <= -5e-310) tmp = fma(Float64(1.0 / sqrt(Float64(Float64(l * l) / Float64(h / l)))), Float64(Float64(Float64(M * M) / d) * Float64(0.125 * Float64(D * D))), Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.7e-215], 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[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(0.25 * N[(D * M), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(1.0 / N[Sqrt[N[(N[(l * l), $MachinePrecision] / N[(h / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.7 \cdot 10^{-215}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - \left(h \cdot \left(0.5 \cdot \left(D \cdot M\right)\right)\right) \cdot \frac{0.25 \cdot \left(D \cdot M\right)}{d \cdot \left(d \cdot \ell\right)}\right)\right)\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{\sqrt{\frac{\ell \cdot \ell}{\frac{h}{\ell}}}}, \frac{M \cdot M}{d} \cdot \left(0.125 \cdot \left(D \cdot D\right)\right), \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\end{array}
\end{array}
if d < -1.70000000000000001e-215Initial program 74.1%
Applied egg-rr68.6%
Applied egg-rr65.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
Applied egg-rr70.7%
if -1.70000000000000001e-215 < d < -4.999999999999985e-310Initial program 22.6%
Applied egg-rr22.6%
Taylor expanded in l around -inf
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified78.3%
lift-*.f64N/A
associate-/r*N/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-/.f6482.7
Applied egg-rr82.7%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6470.8
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6470.8
Applied egg-rr70.8%
Applied egg-rr68.0%
Final simplification70.4%
(FPCore (d h l M D)
:precision binary64
(if (<= d -1.7e-215)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* (* h (* 0.5 (* D M))) (/ (* 0.25 (* D M)) (* d (* d l)))))))
(if (<= d -5e-310)
(fma
(sqrt (/ h (* l (* l l))))
(* (/ (* M M) d) (* 0.125 (* D D)))
(* (- d) (sqrt (/ 1.0 (* h l)))))
(*
(/ d (sqrt (* h l)))
(- 1.0 (* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d)))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.7e-215) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - ((h * (0.5 * (D * M))) * ((0.25 * (D * M)) / (d * (d * l))))));
} else if (d <= -5e-310) {
tmp = fma(sqrt((h / (l * (l * l)))), (((M * M) / d) * (0.125 * (D * D))), (-d * sqrt((1.0 / (h * l)))));
} else {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.7e-215) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(Float64(h * Float64(0.5 * Float64(D * M))) * Float64(Float64(0.25 * Float64(D * M)) / Float64(d * Float64(d * l))))))); elseif (d <= -5e-310) tmp = fma(sqrt(Float64(h / Float64(l * Float64(l * l)))), Float64(Float64(Float64(M * M) / d) * Float64(0.125 * Float64(D * D))), Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.7e-215], 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[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(0.25 * N[(D * M), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.7 \cdot 10^{-215}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - \left(h \cdot \left(0.5 \cdot \left(D \cdot M\right)\right)\right) \cdot \frac{0.25 \cdot \left(D \cdot M\right)}{d \cdot \left(d \cdot \ell\right)}\right)\right)\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}, \frac{M \cdot M}{d} \cdot \left(0.125 \cdot \left(D \cdot D\right)\right), \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\end{array}
\end{array}
if d < -1.70000000000000001e-215Initial program 74.1%
Applied egg-rr68.6%
Applied egg-rr65.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
Applied egg-rr70.7%
if -1.70000000000000001e-215 < d < -4.999999999999985e-310Initial program 22.6%
Applied egg-rr22.6%
Taylor expanded in l around -inf
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified78.3%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6470.8
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6470.8
Applied egg-rr70.8%
Applied egg-rr68.0%
Final simplification70.0%
(FPCore (d h l M D)
:precision binary64
(if (<= d -5.5e-97)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* h (/ (* 0.125 (* D (* M (* D M)))) (* d (* d l)))))))
(if (<= d -5e-310)
(fma
(sqrt (/ h (* l (* l l))))
(* (/ (* M M) d) (* 0.125 (* D D)))
(* (- d) (sqrt (/ 1.0 (* h l)))))
(*
(/ d (sqrt (* h l)))
(- 1.0 (* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d)))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -5.5e-97) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (h * ((0.125 * (D * (M * (D * M)))) / (d * (d * l))))));
} else if (d <= -5e-310) {
tmp = fma(sqrt((h / (l * (l * l)))), (((M * M) / d) * (0.125 * (D * D))), (-d * sqrt((1.0 / (h * l)))));
} else {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (d <= -5.5e-97) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(h * Float64(Float64(0.125 * Float64(D * Float64(M * Float64(D * M)))) / Float64(d * Float64(d * l))))))); elseif (d <= -5e-310) tmp = fma(sqrt(Float64(h / Float64(l * Float64(l * l)))), Float64(Float64(Float64(M * M) / d) * Float64(0.125 * Float64(D * D))), Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -5.5e-97], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(h * N[(N[(0.125 * N[(D * N[(M * N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -5.5 \cdot 10^{-97}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - h \cdot \frac{0.125 \cdot \left(D \cdot \left(M \cdot \left(D \cdot M\right)\right)\right)}{d \cdot \left(d \cdot \ell\right)}\right)\right)\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}, \frac{M \cdot M}{d} \cdot \left(0.125 \cdot \left(D \cdot D\right)\right), \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\end{array}
\end{array}
if d < -5.49999999999999948e-97Initial program 77.9%
Applied egg-rr70.9%
Applied egg-rr68.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr68.7%
if -5.49999999999999948e-97 < d < -4.999999999999985e-310Initial program 39.4%
Applied egg-rr39.6%
Taylor expanded in l around -inf
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
Simplified59.8%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6470.8
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6470.8
Applied egg-rr70.8%
Applied egg-rr68.0%
Final simplification66.9%
(FPCore (d h l M D)
:precision binary64
(if (<= d -2.3e+145)
(* (- d) (sqrt (/ 1.0 (* h l))))
(if (<= d -1.7e-215)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* M (* (/ (* D M) (* d (* d l))) (* 0.125 (* h D)))))))
(if (<= d -5e-310)
(* (* M M) (* (sqrt (/ h (* l (* l l)))) (* (* D D) (/ 0.125 d))))
(*
(/ d (sqrt (* h l)))
(-
1.0
(* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d))))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -2.3e+145) {
tmp = -d * sqrt((1.0 / (h * l)));
} else if (d <= -1.7e-215) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (M * (((D * M) / (d * (d * l))) * (0.125 * (h * D))))));
} else if (d <= -5e-310) {
tmp = (M * M) * (sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d)));
} else {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= (-2.3d+145)) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else if (d <= (-1.7d-215)) then
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0d0 - (m * (((d_1 * m) / (d * (d * l))) * (0.125d0 * (h * d_1))))))
else if (d <= (-5d-310)) then
tmp = (m * m) * (sqrt((h / (l * (l * l)))) * ((d_1 * d_1) * (0.125d0 / d)))
else
tmp = (d / sqrt((h * l))) * (1.0d0 - (((d_1 * (h * (0.5d0 * m))) / (d * l)) * (d_1 * (0.25d0 * (m / d)))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -2.3e+145) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else if (d <= -1.7e-215) {
tmp = Math.sqrt((d / h)) * (Math.sqrt((d / l)) * (1.0 - (M * (((D * M) / (d * (d * l))) * (0.125 * (h * D))))));
} else if (d <= -5e-310) {
tmp = (M * M) * (Math.sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d)));
} else {
tmp = (d / Math.sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -2.3e+145: tmp = -d * math.sqrt((1.0 / (h * l))) elif d <= -1.7e-215: tmp = math.sqrt((d / h)) * (math.sqrt((d / l)) * (1.0 - (M * (((D * M) / (d * (d * l))) * (0.125 * (h * D)))))) elif d <= -5e-310: tmp = (M * M) * (math.sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d))) else: tmp = (d / math.sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d))))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -2.3e+145) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (d <= -1.7e-215) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(M * Float64(Float64(Float64(D * M) / Float64(d * Float64(d * l))) * Float64(0.125 * Float64(h * D))))))); elseif (d <= -5e-310) tmp = Float64(Float64(M * M) * Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(D * D) * Float64(0.125 / d)))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -2.3e+145) tmp = -d * sqrt((1.0 / (h * l))); elseif (d <= -1.7e-215) tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (M * (((D * M) / (d * (d * l))) * (0.125 * (h * D)))))); elseif (d <= -5e-310) tmp = (M * M) * (sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d))); else tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d))))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -2.3e+145], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1.7e-215], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(M * N[(N[(N[(D * M), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.125 * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(M * M), $MachinePrecision] * N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -2.3 \cdot 10^{+145}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;d \leq -1.7 \cdot 10^{-215}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - M \cdot \left(\frac{D \cdot M}{d \cdot \left(d \cdot \ell\right)} \cdot \left(0.125 \cdot \left(h \cdot D\right)\right)\right)\right)\right)\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(M \cdot M\right) \cdot \left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot D\right) \cdot \frac{0.125}{d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\end{array}
\end{array}
if d < -2.3e145Initial program 79.0%
Applied egg-rr65.1%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6471.7
Simplified71.7%
if -2.3e145 < d < -1.70000000000000001e-215Initial program 72.3%
Applied egg-rr69.9%
Applied egg-rr67.2%
Applied egg-rr69.5%
if -1.70000000000000001e-215 < d < -4.999999999999985e-310Initial program 22.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr22.6%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6422.6
Applied egg-rr22.6%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6422.6
Applied egg-rr22.6%
Taylor expanded in h around -inf
Simplified62.3%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6470.8
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6470.8
Applied egg-rr70.8%
Applied egg-rr68.0%
Final simplification68.4%
(FPCore (d h l M D)
:precision binary64
(if (<= d -2200.0)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= d -1.7e-215)
(*
(- 1.0 (/ (* (* h 0.5) (* M (* 0.25 (* D (* D M))))) (* d (* d l))))
(sqrt (/ (* d d) (* h l))))
(if (<= d -5e-310)
(* (* M M) (* (sqrt (/ h (* l (* l l)))) (* (* D D) (/ 0.125 d))))
(*
(/ d (sqrt (* h l)))
(-
1.0
(* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d))))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -2200.0) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (d <= -1.7e-215) {
tmp = (1.0 - (((h * 0.5) * (M * (0.25 * (D * (D * M))))) / (d * (d * l)))) * sqrt(((d * d) / (h * l)));
} else if (d <= -5e-310) {
tmp = (M * M) * (sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d)));
} else {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= (-2200.0d0)) then
tmp = sqrt((d / h)) * sqrt((d / l))
else if (d <= (-1.7d-215)) then
tmp = (1.0d0 - (((h * 0.5d0) * (m * (0.25d0 * (d_1 * (d_1 * m))))) / (d * (d * l)))) * sqrt(((d * d) / (h * l)))
else if (d <= (-5d-310)) then
tmp = (m * m) * (sqrt((h / (l * (l * l)))) * ((d_1 * d_1) * (0.125d0 / d)))
else
tmp = (d / sqrt((h * l))) * (1.0d0 - (((d_1 * (h * (0.5d0 * m))) / (d * l)) * (d_1 * (0.25d0 * (m / d)))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -2200.0) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (d <= -1.7e-215) {
tmp = (1.0 - (((h * 0.5) * (M * (0.25 * (D * (D * M))))) / (d * (d * l)))) * Math.sqrt(((d * d) / (h * l)));
} else if (d <= -5e-310) {
tmp = (M * M) * (Math.sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d)));
} else {
tmp = (d / Math.sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -2200.0: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) elif d <= -1.7e-215: tmp = (1.0 - (((h * 0.5) * (M * (0.25 * (D * (D * M))))) / (d * (d * l)))) * math.sqrt(((d * d) / (h * l))) elif d <= -5e-310: tmp = (M * M) * (math.sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d))) else: tmp = (d / math.sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d))))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -2200.0) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (d <= -1.7e-215) tmp = Float64(Float64(1.0 - Float64(Float64(Float64(h * 0.5) * Float64(M * Float64(0.25 * Float64(D * Float64(D * M))))) / Float64(d * Float64(d * l)))) * sqrt(Float64(Float64(d * d) / Float64(h * l)))); elseif (d <= -5e-310) tmp = Float64(Float64(M * M) * Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(D * D) * Float64(0.125 / d)))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -2200.0) tmp = sqrt((d / h)) * sqrt((d / l)); elseif (d <= -1.7e-215) tmp = (1.0 - (((h * 0.5) * (M * (0.25 * (D * (D * M))))) / (d * (d * l)))) * sqrt(((d * d) / (h * l))); elseif (d <= -5e-310) tmp = (M * M) * (sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d))); else tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d))))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -2200.0], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1.7e-215], N[(N[(1.0 - N[(N[(N[(h * 0.5), $MachinePrecision] * N[(M * N[(0.25 * N[(D * N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(M * M), $MachinePrecision] * N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -2200:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;d \leq -1.7 \cdot 10^{-215}:\\
\;\;\;\;\left(1 - \frac{\left(h \cdot 0.5\right) \cdot \left(M \cdot \left(0.25 \cdot \left(D \cdot \left(D \cdot M\right)\right)\right)\right)}{d \cdot \left(d \cdot \ell\right)}\right) \cdot \sqrt{\frac{d \cdot d}{h \cdot \ell}}\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(M \cdot M\right) \cdot \left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot D\right) \cdot \frac{0.125}{d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\end{array}
\end{array}
if d < -2200Initial program 80.6%
Applied egg-rr70.1%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f642.0
Simplified2.0%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f642.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f642.0
Applied egg-rr2.0%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
*-commutativeN/A
lower-*.f6466.3
Applied egg-rr66.3%
if -2200 < d < -1.70000000000000001e-215Initial program 66.5%
Applied egg-rr66.8%
Applied egg-rr46.3%
if -1.70000000000000001e-215 < d < -4.999999999999985e-310Initial program 22.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr22.6%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6422.6
Applied egg-rr22.6%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6422.6
Applied egg-rr22.6%
Taylor expanded in h around -inf
Simplified62.3%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6470.8
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6470.8
Applied egg-rr70.8%
Applied egg-rr68.0%
Final simplification63.2%
(FPCore (d h l M D)
:precision binary64
(if (<= d -1.7e-215)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* h (/ (* 0.125 (* D (* M (* D M)))) (* d (* d l)))))))
(if (<= d -5e-310)
(* (* M M) (* (sqrt (/ h (* l (* l l)))) (* (* D D) (/ 0.125 d))))
(*
(/ d (sqrt (* h l)))
(- 1.0 (* (/ (* D (* h (* 0.5 M))) (* d l)) (* D (* 0.25 (/ M d)))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.7e-215) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (h * ((0.125 * (D * (M * (D * M)))) / (d * (d * l))))));
} else if (d <= -5e-310) {
tmp = (M * M) * (sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d)));
} else {
tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= (-1.7d-215)) then
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0d0 - (h * ((0.125d0 * (d_1 * (m * (d_1 * m)))) / (d * (d * l))))))
else if (d <= (-5d-310)) then
tmp = (m * m) * (sqrt((h / (l * (l * l)))) * ((d_1 * d_1) * (0.125d0 / d)))
else
tmp = (d / sqrt((h * l))) * (1.0d0 - (((d_1 * (h * (0.5d0 * m))) / (d * l)) * (d_1 * (0.25d0 * (m / d)))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.7e-215) {
tmp = Math.sqrt((d / h)) * (Math.sqrt((d / l)) * (1.0 - (h * ((0.125 * (D * (M * (D * M)))) / (d * (d * l))))));
} else if (d <= -5e-310) {
tmp = (M * M) * (Math.sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d)));
} else {
tmp = (d / Math.sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d)))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -1.7e-215: tmp = math.sqrt((d / h)) * (math.sqrt((d / l)) * (1.0 - (h * ((0.125 * (D * (M * (D * M)))) / (d * (d * l)))))) elif d <= -5e-310: tmp = (M * M) * (math.sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d))) else: tmp = (d / math.sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d))))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.7e-215) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(h * Float64(Float64(0.125 * Float64(D * Float64(M * Float64(D * M)))) / Float64(d * Float64(d * l))))))); elseif (d <= -5e-310) tmp = Float64(Float64(M * M) * Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(D * D) * Float64(0.125 / d)))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * Float64(1.0 - Float64(Float64(Float64(D * Float64(h * Float64(0.5 * M))) / Float64(d * l)) * Float64(D * Float64(0.25 * Float64(M / d)))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -1.7e-215) tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (h * ((0.125 * (D * (M * (D * M)))) / (d * (d * l)))))); elseif (d <= -5e-310) tmp = (M * M) * (sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d))); else tmp = (d / sqrt((h * l))) * (1.0 - (((D * (h * (0.5 * M))) / (d * l)) * (D * (0.25 * (M / d))))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.7e-215], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(h * N[(N[(0.125 * N[(D * N[(M * N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(M * M), $MachinePrecision] * N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(D * N[(h * N[(0.5 * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision] * N[(D * N[(0.25 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.7 \cdot 10^{-215}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - h \cdot \frac{0.125 \cdot \left(D \cdot \left(M \cdot \left(D \cdot M\right)\right)\right)}{d \cdot \left(d \cdot \ell\right)}\right)\right)\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(M \cdot M\right) \cdot \left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot D\right) \cdot \frac{0.125}{d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 - \frac{D \cdot \left(h \cdot \left(0.5 \cdot M\right)\right)}{d \cdot \ell} \cdot \left(D \cdot \left(0.25 \cdot \frac{M}{d}\right)\right)\right)\\
\end{array}
\end{array}
if d < -1.70000000000000001e-215Initial program 74.1%
Applied egg-rr68.6%
Applied egg-rr65.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied egg-rr64.9%
if -1.70000000000000001e-215 < d < -4.999999999999985e-310Initial program 22.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr22.6%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6422.6
Applied egg-rr22.6%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6422.6
Applied egg-rr22.6%
Taylor expanded in h around -inf
Simplified62.3%
if -4.999999999999985e-310 < d Initial program 65.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6470.8
Applied egg-rr70.8%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6470.8
Applied egg-rr70.8%
Applied egg-rr68.0%
Final simplification66.3%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ h (* l (* l l))))))
(if (<= d -1.95e+175)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= d -7.2e-110)
(/ (sqrt (* d (/ d (- h)))) (sqrt (- l)))
(if (<= d -7.8e-292)
(/ (* t_0 (* (* M M) (* 0.125 (* D D)))) d)
(if (<= d 3.2e-192)
(/ (* (* (* M M) -0.125) (* (* D D) t_0)) d)
(* d (/ (/ 1.0 (sqrt h)) (sqrt l)))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((h / (l * (l * l))));
double tmp;
if (d <= -1.95e+175) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (d <= -7.2e-110) {
tmp = sqrt((d * (d / -h))) / sqrt(-l);
} else if (d <= -7.8e-292) {
tmp = (t_0 * ((M * M) * (0.125 * (D * D)))) / d;
} else if (d <= 3.2e-192) {
tmp = (((M * M) * -0.125) * ((D * D) * t_0)) / d;
} else {
tmp = d * ((1.0 / 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) :: t_0
real(8) :: tmp
t_0 = sqrt((h / (l * (l * l))))
if (d <= (-1.95d+175)) then
tmp = sqrt((d / h)) * sqrt((d / l))
else if (d <= (-7.2d-110)) then
tmp = sqrt((d * (d / -h))) / sqrt(-l)
else if (d <= (-7.8d-292)) then
tmp = (t_0 * ((m * m) * (0.125d0 * (d_1 * d_1)))) / d
else if (d <= 3.2d-192) then
tmp = (((m * m) * (-0.125d0)) * ((d_1 * d_1) * t_0)) / d
else
tmp = d * ((1.0d0 / 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 t_0 = Math.sqrt((h / (l * (l * l))));
double tmp;
if (d <= -1.95e+175) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (d <= -7.2e-110) {
tmp = Math.sqrt((d * (d / -h))) / Math.sqrt(-l);
} else if (d <= -7.8e-292) {
tmp = (t_0 * ((M * M) * (0.125 * (D * D)))) / d;
} else if (d <= 3.2e-192) {
tmp = (((M * M) * -0.125) * ((D * D) * t_0)) / d;
} else {
tmp = d * ((1.0 / Math.sqrt(h)) / Math.sqrt(l));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((h / (l * (l * l)))) tmp = 0 if d <= -1.95e+175: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) elif d <= -7.2e-110: tmp = math.sqrt((d * (d / -h))) / math.sqrt(-l) elif d <= -7.8e-292: tmp = (t_0 * ((M * M) * (0.125 * (D * D)))) / d elif d <= 3.2e-192: tmp = (((M * M) * -0.125) * ((D * D) * t_0)) / d else: tmp = d * ((1.0 / math.sqrt(h)) / math.sqrt(l)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(h / Float64(l * Float64(l * l)))) tmp = 0.0 if (d <= -1.95e+175) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (d <= -7.2e-110) tmp = Float64(sqrt(Float64(d * Float64(d / Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= -7.8e-292) tmp = Float64(Float64(t_0 * Float64(Float64(M * M) * Float64(0.125 * Float64(D * D)))) / d); elseif (d <= 3.2e-192) tmp = Float64(Float64(Float64(Float64(M * M) * -0.125) * Float64(Float64(D * D) * t_0)) / d); else tmp = Float64(d * Float64(Float64(1.0 / sqrt(h)) / sqrt(l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((h / (l * (l * l)))); tmp = 0.0; if (d <= -1.95e+175) tmp = sqrt((d / h)) * sqrt((d / l)); elseif (d <= -7.2e-110) tmp = sqrt((d * (d / -h))) / sqrt(-l); elseif (d <= -7.8e-292) tmp = (t_0 * ((M * M) * (0.125 * (D * D)))) / d; elseif (d <= 3.2e-192) tmp = (((M * M) * -0.125) * ((D * D) * t_0)) / d; else tmp = d * ((1.0 / sqrt(h)) / sqrt(l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.95e+175], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -7.2e-110], N[(N[Sqrt[N[(d * N[(d / (-h)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -7.8e-292], N[(N[(t$95$0 * N[(N[(M * M), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[d, 3.2e-192], N[(N[(N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], N[(d * N[(N[(1.0 / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\
\mathbf{if}\;d \leq -1.95 \cdot 10^{+175}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;d \leq -7.2 \cdot 10^{-110}:\\
\;\;\;\;\frac{\sqrt{d \cdot \frac{d}{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq -7.8 \cdot 10^{-292}:\\
\;\;\;\;\frac{t\_0 \cdot \left(\left(M \cdot M\right) \cdot \left(0.125 \cdot \left(D \cdot D\right)\right)\right)}{d}\\
\mathbf{elif}\;d \leq 3.2 \cdot 10^{-192}:\\
\;\;\;\;\frac{\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\left(D \cdot D\right) \cdot t\_0\right)}{d}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\frac{1}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -1.94999999999999986e175Initial program 87.3%
Applied egg-rr70.4%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f641.7
Simplified1.7%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f641.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.7
Applied egg-rr1.7%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
*-commutativeN/A
lower-*.f6474.8
Applied egg-rr74.8%
if -1.94999999999999986e175 < d < -7.1999999999999999e-110Initial program 74.4%
Applied egg-rr71.4%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f644.4
Simplified4.4%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f642.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f642.9
Applied egg-rr2.9%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-unprodN/A
lift-/.f64N/A
frac-2negN/A
lift-neg.f64N/A
associate-*r/N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f6454.5
Applied egg-rr54.5%
if -7.1999999999999999e-110 < d < -7.8e-292Initial program 36.9%
Applied egg-rr37.1%
Taylor expanded in h around -inf
Simplified53.8%
if -7.8e-292 < d < 3.2000000000000002e-192Initial program 42.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr45.6%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6445.6
Applied egg-rr45.6%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6445.6
Applied egg-rr45.6%
Taylor expanded in d around 0
associate-*l/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r/N/A
associate-*r/N/A
lower-/.f64N/A
Simplified45.8%
if 3.2000000000000002e-192 < d Initial program 72.6%
Applied egg-rr68.7%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6449.4
Simplified49.4%
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6460.7
Applied egg-rr60.7%
Final simplification57.5%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ h (* l (* l l))))))
(if (<= d -1.95e+175)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= d -7.2e-110)
(/ (sqrt (* d (/ d (- h)))) (sqrt (- l)))
(if (<= d -7.8e-292)
(/ (* t_0 (* (* M M) (* 0.125 (* D D)))) d)
(if (<= d 3.2e-192)
(/ (* t_0 (* (* D D) (* (* M M) -0.125))) d)
(* d (/ (/ 1.0 (sqrt h)) (sqrt l)))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((h / (l * (l * l))));
double tmp;
if (d <= -1.95e+175) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (d <= -7.2e-110) {
tmp = sqrt((d * (d / -h))) / sqrt(-l);
} else if (d <= -7.8e-292) {
tmp = (t_0 * ((M * M) * (0.125 * (D * D)))) / d;
} else if (d <= 3.2e-192) {
tmp = (t_0 * ((D * D) * ((M * M) * -0.125))) / d;
} else {
tmp = d * ((1.0 / 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) :: t_0
real(8) :: tmp
t_0 = sqrt((h / (l * (l * l))))
if (d <= (-1.95d+175)) then
tmp = sqrt((d / h)) * sqrt((d / l))
else if (d <= (-7.2d-110)) then
tmp = sqrt((d * (d / -h))) / sqrt(-l)
else if (d <= (-7.8d-292)) then
tmp = (t_0 * ((m * m) * (0.125d0 * (d_1 * d_1)))) / d
else if (d <= 3.2d-192) then
tmp = (t_0 * ((d_1 * d_1) * ((m * m) * (-0.125d0)))) / d
else
tmp = d * ((1.0d0 / 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 t_0 = Math.sqrt((h / (l * (l * l))));
double tmp;
if (d <= -1.95e+175) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (d <= -7.2e-110) {
tmp = Math.sqrt((d * (d / -h))) / Math.sqrt(-l);
} else if (d <= -7.8e-292) {
tmp = (t_0 * ((M * M) * (0.125 * (D * D)))) / d;
} else if (d <= 3.2e-192) {
tmp = (t_0 * ((D * D) * ((M * M) * -0.125))) / d;
} else {
tmp = d * ((1.0 / Math.sqrt(h)) / Math.sqrt(l));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((h / (l * (l * l)))) tmp = 0 if d <= -1.95e+175: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) elif d <= -7.2e-110: tmp = math.sqrt((d * (d / -h))) / math.sqrt(-l) elif d <= -7.8e-292: tmp = (t_0 * ((M * M) * (0.125 * (D * D)))) / d elif d <= 3.2e-192: tmp = (t_0 * ((D * D) * ((M * M) * -0.125))) / d else: tmp = d * ((1.0 / math.sqrt(h)) / math.sqrt(l)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(h / Float64(l * Float64(l * l)))) tmp = 0.0 if (d <= -1.95e+175) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (d <= -7.2e-110) tmp = Float64(sqrt(Float64(d * Float64(d / Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= -7.8e-292) tmp = Float64(Float64(t_0 * Float64(Float64(M * M) * Float64(0.125 * Float64(D * D)))) / d); elseif (d <= 3.2e-192) tmp = Float64(Float64(t_0 * Float64(Float64(D * D) * Float64(Float64(M * M) * -0.125))) / d); else tmp = Float64(d * Float64(Float64(1.0 / sqrt(h)) / sqrt(l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((h / (l * (l * l)))); tmp = 0.0; if (d <= -1.95e+175) tmp = sqrt((d / h)) * sqrt((d / l)); elseif (d <= -7.2e-110) tmp = sqrt((d * (d / -h))) / sqrt(-l); elseif (d <= -7.8e-292) tmp = (t_0 * ((M * M) * (0.125 * (D * D)))) / d; elseif (d <= 3.2e-192) tmp = (t_0 * ((D * D) * ((M * M) * -0.125))) / d; else tmp = d * ((1.0 / sqrt(h)) / sqrt(l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.95e+175], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -7.2e-110], N[(N[Sqrt[N[(d * N[(d / (-h)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -7.8e-292], N[(N[(t$95$0 * N[(N[(M * M), $MachinePrecision] * N[(0.125 * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[d, 3.2e-192], N[(N[(t$95$0 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], N[(d * N[(N[(1.0 / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\
\mathbf{if}\;d \leq -1.95 \cdot 10^{+175}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;d \leq -7.2 \cdot 10^{-110}:\\
\;\;\;\;\frac{\sqrt{d \cdot \frac{d}{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq -7.8 \cdot 10^{-292}:\\
\;\;\;\;\frac{t\_0 \cdot \left(\left(M \cdot M\right) \cdot \left(0.125 \cdot \left(D \cdot D\right)\right)\right)}{d}\\
\mathbf{elif}\;d \leq 3.2 \cdot 10^{-192}:\\
\;\;\;\;\frac{t\_0 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(M \cdot M\right) \cdot -0.125\right)\right)}{d}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\frac{1}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -1.94999999999999986e175Initial program 87.3%
Applied egg-rr70.4%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f641.7
Simplified1.7%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f641.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.7
Applied egg-rr1.7%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
*-commutativeN/A
lower-*.f6474.8
Applied egg-rr74.8%
if -1.94999999999999986e175 < d < -7.1999999999999999e-110Initial program 74.4%
Applied egg-rr71.4%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f644.4
Simplified4.4%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f642.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f642.9
Applied egg-rr2.9%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-unprodN/A
lift-/.f64N/A
frac-2negN/A
lift-neg.f64N/A
associate-*r/N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f6454.5
Applied egg-rr54.5%
if -7.1999999999999999e-110 < d < -7.8e-292Initial program 36.9%
Applied egg-rr37.1%
Taylor expanded in h around -inf
Simplified53.8%
if -7.8e-292 < d < 3.2000000000000002e-192Initial program 42.3%
Applied egg-rr42.4%
Taylor expanded in d around 0
associate-*l/N/A
associate-*r/N/A
lower-/.f64N/A
Simplified47.0%
if 3.2000000000000002e-192 < d Initial program 72.6%
Applied egg-rr68.7%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6449.4
Simplified49.4%
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6460.7
Applied egg-rr60.7%
Final simplification57.7%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ h (* l (* l l))))))
(if (<= d -1.95e+175)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= d -8e-112)
(/ (sqrt (* d (/ d (- h)))) (sqrt (- l)))
(if (<= d 6.5e-308)
(* (* M M) (* t_0 (* (* D D) (/ 0.125 d))))
(if (<= d 3.2e-192)
(/ (* t_0 (* (* D D) (* (* M M) -0.125))) d)
(* d (/ (/ 1.0 (sqrt h)) (sqrt l)))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((h / (l * (l * l))));
double tmp;
if (d <= -1.95e+175) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (d <= -8e-112) {
tmp = sqrt((d * (d / -h))) / sqrt(-l);
} else if (d <= 6.5e-308) {
tmp = (M * M) * (t_0 * ((D * D) * (0.125 / d)));
} else if (d <= 3.2e-192) {
tmp = (t_0 * ((D * D) * ((M * M) * -0.125))) / d;
} else {
tmp = d * ((1.0 / 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) :: t_0
real(8) :: tmp
t_0 = sqrt((h / (l * (l * l))))
if (d <= (-1.95d+175)) then
tmp = sqrt((d / h)) * sqrt((d / l))
else if (d <= (-8d-112)) then
tmp = sqrt((d * (d / -h))) / sqrt(-l)
else if (d <= 6.5d-308) then
tmp = (m * m) * (t_0 * ((d_1 * d_1) * (0.125d0 / d)))
else if (d <= 3.2d-192) then
tmp = (t_0 * ((d_1 * d_1) * ((m * m) * (-0.125d0)))) / d
else
tmp = d * ((1.0d0 / 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 t_0 = Math.sqrt((h / (l * (l * l))));
double tmp;
if (d <= -1.95e+175) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (d <= -8e-112) {
tmp = Math.sqrt((d * (d / -h))) / Math.sqrt(-l);
} else if (d <= 6.5e-308) {
tmp = (M * M) * (t_0 * ((D * D) * (0.125 / d)));
} else if (d <= 3.2e-192) {
tmp = (t_0 * ((D * D) * ((M * M) * -0.125))) / d;
} else {
tmp = d * ((1.0 / Math.sqrt(h)) / Math.sqrt(l));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((h / (l * (l * l)))) tmp = 0 if d <= -1.95e+175: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) elif d <= -8e-112: tmp = math.sqrt((d * (d / -h))) / math.sqrt(-l) elif d <= 6.5e-308: tmp = (M * M) * (t_0 * ((D * D) * (0.125 / d))) elif d <= 3.2e-192: tmp = (t_0 * ((D * D) * ((M * M) * -0.125))) / d else: tmp = d * ((1.0 / math.sqrt(h)) / math.sqrt(l)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(h / Float64(l * Float64(l * l)))) tmp = 0.0 if (d <= -1.95e+175) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (d <= -8e-112) tmp = Float64(sqrt(Float64(d * Float64(d / Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= 6.5e-308) tmp = Float64(Float64(M * M) * Float64(t_0 * Float64(Float64(D * D) * Float64(0.125 / d)))); elseif (d <= 3.2e-192) tmp = Float64(Float64(t_0 * Float64(Float64(D * D) * Float64(Float64(M * M) * -0.125))) / d); else tmp = Float64(d * Float64(Float64(1.0 / sqrt(h)) / sqrt(l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((h / (l * (l * l)))); tmp = 0.0; if (d <= -1.95e+175) tmp = sqrt((d / h)) * sqrt((d / l)); elseif (d <= -8e-112) tmp = sqrt((d * (d / -h))) / sqrt(-l); elseif (d <= 6.5e-308) tmp = (M * M) * (t_0 * ((D * D) * (0.125 / d))); elseif (d <= 3.2e-192) tmp = (t_0 * ((D * D) * ((M * M) * -0.125))) / d; else tmp = d * ((1.0 / sqrt(h)) / sqrt(l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.95e+175], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -8e-112], N[(N[Sqrt[N[(d * N[(d / (-h)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 6.5e-308], N[(N[(M * M), $MachinePrecision] * N[(t$95$0 * N[(N[(D * D), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.2e-192], N[(N[(t$95$0 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], N[(d * N[(N[(1.0 / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}}\\
\mathbf{if}\;d \leq -1.95 \cdot 10^{+175}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;d \leq -8 \cdot 10^{-112}:\\
\;\;\;\;\frac{\sqrt{d \cdot \frac{d}{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq 6.5 \cdot 10^{-308}:\\
\;\;\;\;\left(M \cdot M\right) \cdot \left(t\_0 \cdot \left(\left(D \cdot D\right) \cdot \frac{0.125}{d}\right)\right)\\
\mathbf{elif}\;d \leq 3.2 \cdot 10^{-192}:\\
\;\;\;\;\frac{t\_0 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(M \cdot M\right) \cdot -0.125\right)\right)}{d}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\frac{1}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -1.94999999999999986e175Initial program 87.3%
Applied egg-rr70.4%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f641.7
Simplified1.7%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f641.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.7
Applied egg-rr1.7%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
*-commutativeN/A
lower-*.f6474.8
Applied egg-rr74.8%
if -1.94999999999999986e175 < d < -7.9999999999999996e-112Initial program 74.4%
Applied egg-rr71.4%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f644.4
Simplified4.4%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f642.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f642.9
Applied egg-rr2.9%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-unprodN/A
lift-/.f64N/A
frac-2negN/A
lift-neg.f64N/A
associate-*r/N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f6454.5
Applied egg-rr54.5%
if -7.9999999999999996e-112 < d < 6.4999999999999999e-308Initial program 36.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr39.2%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6439.2
Applied egg-rr39.2%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6439.2
Applied egg-rr39.2%
Taylor expanded in h around -inf
Simplified51.5%
if 6.4999999999999999e-308 < d < 3.2000000000000002e-192Initial program 43.8%
Applied egg-rr44.0%
Taylor expanded in d around 0
associate-*l/N/A
associate-*r/N/A
lower-/.f64N/A
Simplified52.7%
if 3.2000000000000002e-192 < d Initial program 72.6%
Applied egg-rr68.7%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6449.4
Simplified49.4%
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6460.7
Applied egg-rr60.7%
Final simplification58.1%
(FPCore (d h l M D)
:precision binary64
(if (<= d -1.95e+175)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= d -8e-112)
(/ (sqrt (* d (/ d (- h)))) (sqrt (- l)))
(if (<= d -5e-310)
(* (* M M) (* (sqrt (/ h (* l (* l l)))) (* (* D D) (/ 0.125 d))))
(* d (/ (/ 1.0 (sqrt h)) (sqrt l)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.95e+175) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (d <= -8e-112) {
tmp = sqrt((d * (d / -h))) / sqrt(-l);
} else if (d <= -5e-310) {
tmp = (M * M) * (sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d)));
} else {
tmp = d * ((1.0 / 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 (d <= (-1.95d+175)) then
tmp = sqrt((d / h)) * sqrt((d / l))
else if (d <= (-8d-112)) then
tmp = sqrt((d * (d / -h))) / sqrt(-l)
else if (d <= (-5d-310)) then
tmp = (m * m) * (sqrt((h / (l * (l * l)))) * ((d_1 * d_1) * (0.125d0 / d)))
else
tmp = d * ((1.0d0 / 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 (d <= -1.95e+175) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (d <= -8e-112) {
tmp = Math.sqrt((d * (d / -h))) / Math.sqrt(-l);
} else if (d <= -5e-310) {
tmp = (M * M) * (Math.sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d)));
} else {
tmp = d * ((1.0 / Math.sqrt(h)) / Math.sqrt(l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -1.95e+175: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) elif d <= -8e-112: tmp = math.sqrt((d * (d / -h))) / math.sqrt(-l) elif d <= -5e-310: tmp = (M * M) * (math.sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d))) else: tmp = d * ((1.0 / math.sqrt(h)) / math.sqrt(l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.95e+175) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (d <= -8e-112) tmp = Float64(sqrt(Float64(d * Float64(d / Float64(-h)))) / sqrt(Float64(-l))); elseif (d <= -5e-310) tmp = Float64(Float64(M * M) * Float64(sqrt(Float64(h / Float64(l * Float64(l * l)))) * Float64(Float64(D * D) * Float64(0.125 / d)))); else tmp = Float64(d * Float64(Float64(1.0 / sqrt(h)) / sqrt(l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -1.95e+175) tmp = sqrt((d / h)) * sqrt((d / l)); elseif (d <= -8e-112) tmp = sqrt((d * (d / -h))) / sqrt(-l); elseif (d <= -5e-310) tmp = (M * M) * (sqrt((h / (l * (l * l)))) * ((D * D) * (0.125 / d))); else tmp = d * ((1.0 / sqrt(h)) / sqrt(l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.95e+175], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -8e-112], N[(N[Sqrt[N[(d * N[(d / (-h)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[(M * M), $MachinePrecision] * N[(N[Sqrt[N[(h / N[(l * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * N[(0.125 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[(1.0 / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.95 \cdot 10^{+175}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;d \leq -8 \cdot 10^{-112}:\\
\;\;\;\;\frac{\sqrt{d \cdot \frac{d}{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(M \cdot M\right) \cdot \left(\sqrt{\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}} \cdot \left(\left(D \cdot D\right) \cdot \frac{0.125}{d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\frac{1}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -1.94999999999999986e175Initial program 87.3%
Applied egg-rr70.4%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f641.7
Simplified1.7%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f641.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.7
Applied egg-rr1.7%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
lift-sqrt.f64N/A
*-commutativeN/A
lower-*.f6474.8
Applied egg-rr74.8%
if -1.94999999999999986e175 < d < -7.9999999999999996e-112Initial program 74.4%
Applied egg-rr71.4%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f644.4
Simplified4.4%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f642.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f642.9
Applied egg-rr2.9%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-unprodN/A
lift-/.f64N/A
frac-2negN/A
lift-neg.f64N/A
associate-*r/N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f6454.5
Applied egg-rr54.5%
if -7.9999999999999996e-112 < d < -4.999999999999985e-310Initial program 37.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
unpow2N/A
associate-*l*N/A
associate-*r*N/A
Applied egg-rr40.0%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f6440.0
Applied egg-rr40.0%
lift-/.f64N/A
metadata-evalN/A
pow1/2N/A
lift-sqrt.f6440.0
Applied egg-rr40.0%
Taylor expanded in h around -inf
Simplified52.6%
if -4.999999999999985e-310 < d Initial program 65.9%
Applied egg-rr62.9%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6440.4
Simplified40.4%
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6450.7
Applied egg-rr50.7%
Final simplification54.1%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.45e+228)
(/ (sqrt (* d (/ d (- h)))) (sqrt (- l)))
(if (<= l 2.5e-241)
(* (- d) (sqrt (/ 1.0 (* h l))))
(* d (/ (/ 1.0 (sqrt h)) (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.45e+228) {
tmp = sqrt((d * (d / -h))) / sqrt(-l);
} else if (l <= 2.5e-241) {
tmp = -d * sqrt((1.0 / (h * l)));
} else {
tmp = d * ((1.0 / 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 <= (-1.45d+228)) then
tmp = sqrt((d * (d / -h))) / sqrt(-l)
else if (l <= 2.5d-241) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else
tmp = d * ((1.0d0 / 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 <= -1.45e+228) {
tmp = Math.sqrt((d * (d / -h))) / Math.sqrt(-l);
} else if (l <= 2.5e-241) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else {
tmp = d * ((1.0 / Math.sqrt(h)) / Math.sqrt(l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.45e+228: tmp = math.sqrt((d * (d / -h))) / math.sqrt(-l) elif l <= 2.5e-241: tmp = -d * math.sqrt((1.0 / (h * l))) else: tmp = d * ((1.0 / math.sqrt(h)) / math.sqrt(l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.45e+228) tmp = Float64(sqrt(Float64(d * Float64(d / Float64(-h)))) / sqrt(Float64(-l))); elseif (l <= 2.5e-241) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(d * Float64(Float64(1.0 / sqrt(h)) / sqrt(l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.45e+228) tmp = sqrt((d * (d / -h))) / sqrt(-l); elseif (l <= 2.5e-241) tmp = -d * sqrt((1.0 / (h * l))); else tmp = d * ((1.0 / sqrt(h)) / sqrt(l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.45e+228], N[(N[Sqrt[N[(d * N[(d / (-h)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.5e-241], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[(N[(1.0 / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.45 \cdot 10^{+228}:\\
\;\;\;\;\frac{\sqrt{d \cdot \frac{d}{-h}}}{\sqrt{-\ell}}\\
\mathbf{elif}\;\ell \leq 2.5 \cdot 10^{-241}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\frac{1}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -1.45000000000000001e228Initial program 54.8%
Applied egg-rr49.4%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6426.6
Simplified26.6%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6426.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6426.6
Applied egg-rr26.6%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-unprodN/A
lift-/.f64N/A
frac-2negN/A
lift-neg.f64N/A
associate-*r/N/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f6453.9
Applied egg-rr53.9%
if -1.45000000000000001e228 < l < 2.4999999999999999e-241Initial program 66.9%
Applied egg-rr62.8%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6448.0
Simplified48.0%
if 2.4999999999999999e-241 < l Initial program 65.3%
Applied egg-rr62.1%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6442.9
Simplified42.9%
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6453.1
Applied egg-rr53.1%
Final simplification50.8%
(FPCore (d h l M D) :precision binary64 (if (<= l 2.5e-241) (* (- d) (sqrt (/ 1.0 (* h l)))) (* d (/ (/ 1.0 (sqrt h)) (sqrt l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 2.5e-241) {
tmp = -d * sqrt((1.0 / (h * l)));
} else {
tmp = d * ((1.0 / 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 <= 2.5d-241) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else
tmp = d * ((1.0d0 / 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 <= 2.5e-241) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else {
tmp = d * ((1.0 / Math.sqrt(h)) / Math.sqrt(l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 2.5e-241: tmp = -d * math.sqrt((1.0 / (h * l))) else: tmp = d * ((1.0 / math.sqrt(h)) / math.sqrt(l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 2.5e-241) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(d * Float64(Float64(1.0 / sqrt(h)) / sqrt(l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 2.5e-241) tmp = -d * sqrt((1.0 / (h * l))); else tmp = d * ((1.0 / sqrt(h)) / sqrt(l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 2.5e-241], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[(N[(1.0 / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.5 \cdot 10^{-241}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\frac{1}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < 2.4999999999999999e-241Initial program 65.3%
Applied egg-rr61.1%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6445.2
Simplified45.2%
if 2.4999999999999999e-241 < l Initial program 65.3%
Applied egg-rr62.1%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6442.9
Simplified42.9%
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f6453.1
Applied egg-rr53.1%
Final simplification49.0%
(FPCore (d h l M D) :precision binary64 (if (<= l 2.5e-241) (* (- d) (sqrt (/ 1.0 (* h l)))) (/ d (* (sqrt l) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 2.5e-241) {
tmp = -d * sqrt((1.0 / (h * l)));
} else {
tmp = d / (sqrt(l) * sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= 2.5d-241) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else
tmp = d / (sqrt(l) * sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 2.5e-241) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else {
tmp = d / (Math.sqrt(l) * Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 2.5e-241: tmp = -d * math.sqrt((1.0 / (h * l))) else: tmp = d / (math.sqrt(l) * math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 2.5e-241) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(d / Float64(sqrt(l) * sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 2.5e-241) tmp = -d * sqrt((1.0 / (h * l))); else tmp = d / (sqrt(l) * sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 2.5e-241], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.5 \cdot 10^{-241}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\
\end{array}
\end{array}
if l < 2.4999999999999999e-241Initial program 65.3%
Applied egg-rr61.1%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6445.2
Simplified45.2%
if 2.4999999999999999e-241 < l Initial program 65.3%
Applied egg-rr62.1%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6442.9
Simplified42.9%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6443.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.4
Applied egg-rr43.4%
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
lower-*.f64N/A
lower-sqrt.f64N/A
pow1/2N/A
lower-sqrt.f6453.1
Applied egg-rr53.1%
Final simplification49.0%
(FPCore (d h l M D) :precision binary64 (if (<= l 5e-241) (* (- d) (sqrt (/ 1.0 (* h l)))) (/ d (sqrt (* h l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 5e-241) {
tmp = -d * sqrt((1.0 / (h * l)));
} else {
tmp = d / sqrt((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 <= 5d-241) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else
tmp = d / sqrt((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 <= 5e-241) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else {
tmp = d / Math.sqrt((h * l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 5e-241: tmp = -d * math.sqrt((1.0 / (h * l))) else: tmp = d / math.sqrt((h * l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 5e-241) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(d / sqrt(Float64(h * l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 5e-241) tmp = -d * sqrt((1.0 / (h * l))); else tmp = d / sqrt((h * l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 5e-241], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5 \cdot 10^{-241}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\
\end{array}
\end{array}
if l < 4.9999999999999998e-241Initial program 65.3%
Applied egg-rr61.1%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6445.2
Simplified45.2%
if 4.9999999999999998e-241 < l Initial program 65.3%
Applied egg-rr62.1%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6442.9
Simplified42.9%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6443.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.4
Applied egg-rr43.4%
Final simplification44.3%
(FPCore (d h l M D) :precision binary64 (if (<= d -1.15e-112) (sqrt (/ (* d d) (* h l))) (/ d (sqrt (* h l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.15e-112) {
tmp = sqrt(((d * d) / (h * l)));
} else {
tmp = d / sqrt((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 (d <= (-1.15d-112)) then
tmp = sqrt(((d * d) / (h * l)))
else
tmp = d / sqrt((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 (d <= -1.15e-112) {
tmp = Math.sqrt(((d * d) / (h * l)));
} else {
tmp = d / Math.sqrt((h * l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -1.15e-112: tmp = math.sqrt(((d * d) / (h * l))) else: tmp = d / math.sqrt((h * l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.15e-112) tmp = sqrt(Float64(Float64(d * d) / Float64(h * l))); else tmp = Float64(d / sqrt(Float64(h * l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -1.15e-112) tmp = sqrt(((d * d) / (h * l))); else tmp = d / sqrt((h * l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.15e-112], N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.15 \cdot 10^{-112}:\\
\;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\
\end{array}
\end{array}
if d < -1.14999999999999995e-112Initial program 78.0%
Applied egg-rr71.1%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f643.7
Simplified3.7%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f642.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f642.5
Applied egg-rr2.5%
rem-square-sqrtN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
pow1/2N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-divN/A
lift-/.f64N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
*-commutativeN/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f6431.9
Applied egg-rr31.9%
if -1.14999999999999995e-112 < d Initial program 59.1%
Applied egg-rr56.9%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6434.3
Simplified34.3%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6434.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6434.6
Applied egg-rr34.6%
Final simplification33.7%
(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 65.3%
Applied egg-rr61.6%
Taylor expanded in d around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6424.3
Simplified24.3%
lift-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f6424.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6424.1
Applied egg-rr24.1%
herbie shell --seed 2024219
(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)))))