
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (d h l M D) :precision binary64 (* (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))) (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
double code(double d, double h, double l, double M, double D) {
return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
end function
public static double code(double d, double h, double l, double M, double D) {
return (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
def code(d, h, l, M, D): return (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
function code(d, h, l, M, D) return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) end
function tmp = code(d, h, l, M, D) tmp = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l))); end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\end{array}
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* M D) d))
(t_1 (pow (- 0.0 d) 0.5))
(t_2 (/ d (* M D)))
(t_3 (/ h t_2)))
(if (<= l -2.6e-136)
(*
(sqrt (/ d l))
(*
(/ t_1 (sqrt (- 0.0 h)))
(+ 1.0 (* (* h (* t_0 0.25)) (/ (/ t_0 -2.0) l)))))
(if (<= l -1e-309)
(*
(/ t_1 (pow (- 0.0 l) 0.5))
(* (+ 1.0 (* (/ t_3 l) (/ -0.125 t_2))) (sqrt (/ d h))))
(/ (/ (* d (+ 1.0 (/ t_3 (* l (/ t_2 -0.125))))) (sqrt h)) (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / d;
double t_1 = pow((0.0 - d), 0.5);
double t_2 = d / (M * D);
double t_3 = h / t_2;
double tmp;
if (l <= -2.6e-136) {
tmp = sqrt((d / l)) * ((t_1 / sqrt((0.0 - h))) * (1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l))));
} else if (l <= -1e-309) {
tmp = (t_1 / pow((0.0 - l), 0.5)) * ((1.0 + ((t_3 / l) * (-0.125 / t_2))) * sqrt((d / h)));
} else {
tmp = ((d * (1.0 + (t_3 / (l * (t_2 / -0.125))))) / 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (m * d_1) / d
t_1 = (0.0d0 - d) ** 0.5d0
t_2 = d / (m * d_1)
t_3 = h / t_2
if (l <= (-2.6d-136)) then
tmp = sqrt((d / l)) * ((t_1 / sqrt((0.0d0 - h))) * (1.0d0 + ((h * (t_0 * 0.25d0)) * ((t_0 / (-2.0d0)) / l))))
else if (l <= (-1d-309)) then
tmp = (t_1 / ((0.0d0 - l) ** 0.5d0)) * ((1.0d0 + ((t_3 / l) * ((-0.125d0) / t_2))) * sqrt((d / h)))
else
tmp = ((d * (1.0d0 + (t_3 / (l * (t_2 / (-0.125d0)))))) / 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 = (M * D) / d;
double t_1 = Math.pow((0.0 - d), 0.5);
double t_2 = d / (M * D);
double t_3 = h / t_2;
double tmp;
if (l <= -2.6e-136) {
tmp = Math.sqrt((d / l)) * ((t_1 / Math.sqrt((0.0 - h))) * (1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l))));
} else if (l <= -1e-309) {
tmp = (t_1 / Math.pow((0.0 - l), 0.5)) * ((1.0 + ((t_3 / l) * (-0.125 / t_2))) * Math.sqrt((d / h)));
} else {
tmp = ((d * (1.0 + (t_3 / (l * (t_2 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (M * D) / d t_1 = math.pow((0.0 - d), 0.5) t_2 = d / (M * D) t_3 = h / t_2 tmp = 0 if l <= -2.6e-136: tmp = math.sqrt((d / l)) * ((t_1 / math.sqrt((0.0 - h))) * (1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l)))) elif l <= -1e-309: tmp = (t_1 / math.pow((0.0 - l), 0.5)) * ((1.0 + ((t_3 / l) * (-0.125 / t_2))) * math.sqrt((d / h))) else: tmp = ((d * (1.0 + (t_3 / (l * (t_2 / -0.125))))) / math.sqrt(h)) / math.sqrt(l) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) / d) t_1 = Float64(0.0 - d) ^ 0.5 t_2 = Float64(d / Float64(M * D)) t_3 = Float64(h / t_2) tmp = 0.0 if (l <= -2.6e-136) tmp = Float64(sqrt(Float64(d / l)) * Float64(Float64(t_1 / sqrt(Float64(0.0 - h))) * Float64(1.0 + Float64(Float64(h * Float64(t_0 * 0.25)) * Float64(Float64(t_0 / -2.0) / l))))); elseif (l <= -1e-309) tmp = Float64(Float64(t_1 / (Float64(0.0 - l) ^ 0.5)) * Float64(Float64(1.0 + Float64(Float64(t_3 / l) * Float64(-0.125 / t_2))) * sqrt(Float64(d / h)))); else tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(t_3 / Float64(l * Float64(t_2 / -0.125))))) / sqrt(h)) / sqrt(l)); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (M * D) / d; t_1 = (0.0 - d) ^ 0.5; t_2 = d / (M * D); t_3 = h / t_2; tmp = 0.0; if (l <= -2.6e-136) tmp = sqrt((d / l)) * ((t_1 / sqrt((0.0 - h))) * (1.0 + ((h * (t_0 * 0.25)) * ((t_0 / -2.0) / l)))); elseif (l <= -1e-309) tmp = (t_1 / ((0.0 - l) ^ 0.5)) * ((1.0 + ((t_3 / l) * (-0.125 / t_2))) * sqrt((d / h))); else tmp = ((d * (1.0 + (t_3 / (l * (t_2 / -0.125))))) / sqrt(h)) / sqrt(l); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision]}, Block[{t$95$2 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(h / t$95$2), $MachinePrecision]}, If[LessEqual[l, -2.6e-136], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(t$95$1 / N[Sqrt[N[(0.0 - h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(h * N[(t$95$0 * 0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 / -2.0), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(N[(t$95$1 / N[Power[N[(0.0 - l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(t$95$3 / l), $MachinePrecision] * N[(-0.125 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(t$95$3 / N[(l * N[(t$95$2 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := {\left(0 - d\right)}^{0.5}\\
t_2 := \frac{d}{M \cdot D}\\
t_3 := \frac{h}{t\_2}\\
\mathbf{if}\;\ell \leq -2.6 \cdot 10^{-136}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\frac{t\_1}{\sqrt{0 - h}} \cdot \left(1 + \left(h \cdot \left(t\_0 \cdot 0.25\right)\right) \cdot \frac{\frac{t\_0}{-2}}{\ell}\right)\right)\\
\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{t\_1}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(\left(1 + \frac{t\_3}{\ell} \cdot \frac{-0.125}{t\_2}\right) \cdot \sqrt{\frac{d}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{t\_3}{\ell \cdot \frac{t\_2}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -2.59999999999999997e-136Initial program 69.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.3%
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
pow1/2N/A
metadata-evalN/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
metadata-evalN/A
sqrt-lowering-sqrt.f64N/A
neg-sub0N/A
--lowering--.f6484.9%
Applied egg-rr84.9%
if -2.59999999999999997e-136 < l < -1.000000000000002e-309Initial program 76.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified77.3%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr77.2%
Applied egg-rr79.7%
frac-2negN/A
sqrt-divN/A
pow1/2N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
sub0-negN/A
--lowering--.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6496.9%
Applied egg-rr96.9%
if -1.000000000000002e-309 < l Initial program 66.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.4%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.4%
Applied egg-rr71.4%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.4%
Applied egg-rr86.9%
Final simplification87.6%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* M D) d))
(t_1 (/ d (* M D)))
(t_2 (/ h t_1))
(t_3 (pow (- 0.0 d) 0.5)))
(if (<= l -1.75e-137)
(*
(sqrt (/ d l))
(/
(+ 1.0 (* -0.125 (/ (* h t_0) (/ l t_0))))
(/ (pow (- 0.0 h) 0.5) t_3)))
(if (<= l -1e-309)
(*
(/ t_3 (pow (- 0.0 l) 0.5))
(* (+ 1.0 (* (/ t_2 l) (/ -0.125 t_1))) (sqrt (/ d h))))
(/ (/ (* d (+ 1.0 (/ t_2 (* l (/ t_1 -0.125))))) (sqrt h)) (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / d;
double t_1 = d / (M * D);
double t_2 = h / t_1;
double t_3 = pow((0.0 - d), 0.5);
double tmp;
if (l <= -1.75e-137) {
tmp = sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (pow((0.0 - h), 0.5) / t_3));
} else if (l <= -1e-309) {
tmp = (t_3 / pow((0.0 - l), 0.5)) * ((1.0 + ((t_2 / l) * (-0.125 / t_1))) * sqrt((d / h)));
} else {
tmp = ((d * (1.0 + (t_2 / (l * (t_1 / -0.125))))) / 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (m * d_1) / d
t_1 = d / (m * d_1)
t_2 = h / t_1
t_3 = (0.0d0 - d) ** 0.5d0
if (l <= (-1.75d-137)) then
tmp = sqrt((d / l)) * ((1.0d0 + ((-0.125d0) * ((h * t_0) / (l / t_0)))) / (((0.0d0 - h) ** 0.5d0) / t_3))
else if (l <= (-1d-309)) then
tmp = (t_3 / ((0.0d0 - l) ** 0.5d0)) * ((1.0d0 + ((t_2 / l) * ((-0.125d0) / t_1))) * sqrt((d / h)))
else
tmp = ((d * (1.0d0 + (t_2 / (l * (t_1 / (-0.125d0)))))) / 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 = (M * D) / d;
double t_1 = d / (M * D);
double t_2 = h / t_1;
double t_3 = Math.pow((0.0 - d), 0.5);
double tmp;
if (l <= -1.75e-137) {
tmp = Math.sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (Math.pow((0.0 - h), 0.5) / t_3));
} else if (l <= -1e-309) {
tmp = (t_3 / Math.pow((0.0 - l), 0.5)) * ((1.0 + ((t_2 / l) * (-0.125 / t_1))) * Math.sqrt((d / h)));
} else {
tmp = ((d * (1.0 + (t_2 / (l * (t_1 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (M * D) / d t_1 = d / (M * D) t_2 = h / t_1 t_3 = math.pow((0.0 - d), 0.5) tmp = 0 if l <= -1.75e-137: tmp = math.sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (math.pow((0.0 - h), 0.5) / t_3)) elif l <= -1e-309: tmp = (t_3 / math.pow((0.0 - l), 0.5)) * ((1.0 + ((t_2 / l) * (-0.125 / t_1))) * math.sqrt((d / h))) else: tmp = ((d * (1.0 + (t_2 / (l * (t_1 / -0.125))))) / math.sqrt(h)) / math.sqrt(l) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) / d) t_1 = Float64(d / Float64(M * D)) t_2 = Float64(h / t_1) t_3 = Float64(0.0 - d) ^ 0.5 tmp = 0.0 if (l <= -1.75e-137) tmp = Float64(sqrt(Float64(d / l)) * Float64(Float64(1.0 + Float64(-0.125 * Float64(Float64(h * t_0) / Float64(l / t_0)))) / Float64((Float64(0.0 - h) ^ 0.5) / t_3))); elseif (l <= -1e-309) tmp = Float64(Float64(t_3 / (Float64(0.0 - l) ^ 0.5)) * Float64(Float64(1.0 + Float64(Float64(t_2 / l) * Float64(-0.125 / t_1))) * sqrt(Float64(d / h)))); else tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(t_2 / Float64(l * Float64(t_1 / -0.125))))) / sqrt(h)) / sqrt(l)); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (M * D) / d; t_1 = d / (M * D); t_2 = h / t_1; t_3 = (0.0 - d) ^ 0.5; tmp = 0.0; if (l <= -1.75e-137) tmp = sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (((0.0 - h) ^ 0.5) / t_3)); elseif (l <= -1e-309) tmp = (t_3 / ((0.0 - l) ^ 0.5)) * ((1.0 + ((t_2 / l) * (-0.125 / t_1))) * sqrt((d / h))); else tmp = ((d * (1.0 + (t_2 / (l * (t_1 / -0.125))))) / sqrt(h)) / sqrt(l); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(h / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l, -1.75e-137], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(1.0 + N[(-0.125 * N[(N[(h * t$95$0), $MachinePrecision] / N[(l / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(0.0 - h), $MachinePrecision], 0.5], $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(N[(t$95$3 / N[Power[N[(0.0 - l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(t$95$2 / l), $MachinePrecision] * N[(-0.125 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(t$95$2 / N[(l * N[(t$95$1 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := \frac{d}{M \cdot D}\\
t_2 := \frac{h}{t\_1}\\
t_3 := {\left(0 - d\right)}^{0.5}\\
\mathbf{if}\;\ell \leq -1.75 \cdot 10^{-137}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{1 + -0.125 \cdot \frac{h \cdot t\_0}{\frac{\ell}{t\_0}}}{\frac{{\left(0 - h\right)}^{0.5}}{t\_3}}\\
\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{t\_3}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(\left(1 + \frac{t\_2}{\ell} \cdot \frac{-0.125}{t\_1}\right) \cdot \sqrt{\frac{d}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{t\_2}{\ell \cdot \frac{t\_1}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -1.7500000000000001e-137Initial program 69.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.3%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr71.2%
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
sub0-negN/A
--lowering--.f6484.9%
Applied egg-rr84.9%
if -1.7500000000000001e-137 < l < -1.000000000000002e-309Initial program 76.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified77.3%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr77.2%
Applied egg-rr79.7%
frac-2negN/A
sqrt-divN/A
pow1/2N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
sub0-negN/A
--lowering--.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f6496.9%
Applied egg-rr96.9%
if -1.000000000000002e-309 < l Initial program 66.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.4%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.4%
Applied egg-rr71.4%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.4%
Applied egg-rr86.9%
Final simplification87.6%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* M D) d)) (t_1 (/ d (* M D))))
(if (<= d -5e-310)
(*
(sqrt (/ d l))
(/
(+ 1.0 (* -0.125 (/ (* h t_0) (/ l t_0))))
(/ (pow (- 0.0 h) 0.5) (pow (- 0.0 d) 0.5))))
(/
(/ (* d (+ 1.0 (/ (/ h t_1) (* l (/ t_1 -0.125))))) (sqrt h))
(sqrt l)))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / d;
double t_1 = d / (M * D);
double tmp;
if (d <= -5e-310) {
tmp = sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (pow((0.0 - h), 0.5) / pow((0.0 - d), 0.5)));
} else {
tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / 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) :: t_1
real(8) :: tmp
t_0 = (m * d_1) / d
t_1 = d / (m * d_1)
if (d <= (-5d-310)) then
tmp = sqrt((d / l)) * ((1.0d0 + ((-0.125d0) * ((h * t_0) / (l / t_0)))) / (((0.0d0 - h) ** 0.5d0) / ((0.0d0 - d) ** 0.5d0)))
else
tmp = ((d * (1.0d0 + ((h / t_1) / (l * (t_1 / (-0.125d0)))))) / 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 = (M * D) / d;
double t_1 = d / (M * D);
double tmp;
if (d <= -5e-310) {
tmp = Math.sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (Math.pow((0.0 - h), 0.5) / Math.pow((0.0 - d), 0.5)));
} else {
tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (M * D) / d t_1 = d / (M * D) tmp = 0 if d <= -5e-310: tmp = math.sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (math.pow((0.0 - h), 0.5) / math.pow((0.0 - d), 0.5))) else: tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / math.sqrt(h)) / math.sqrt(l) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) / d) t_1 = Float64(d / Float64(M * D)) tmp = 0.0 if (d <= -5e-310) tmp = Float64(sqrt(Float64(d / l)) * Float64(Float64(1.0 + Float64(-0.125 * Float64(Float64(h * t_0) / Float64(l / t_0)))) / Float64((Float64(0.0 - h) ^ 0.5) / (Float64(0.0 - d) ^ 0.5)))); else tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(Float64(h / t_1) / Float64(l * Float64(t_1 / -0.125))))) / sqrt(h)) / sqrt(l)); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (M * D) / d; t_1 = d / (M * D); tmp = 0.0; if (d <= -5e-310) tmp = sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (((0.0 - h) ^ 0.5) / ((0.0 - d) ^ 0.5))); else tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / sqrt(h)) / sqrt(l); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -5e-310], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(1.0 + N[(-0.125 * N[(N[(h * t$95$0), $MachinePrecision] / N[(l / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(0.0 - h), $MachinePrecision], 0.5], $MachinePrecision] / N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(N[(h / t$95$1), $MachinePrecision] / N[(l * N[(t$95$1 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := \frac{d}{M \cdot D}\\
\mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{1 + -0.125 \cdot \frac{h \cdot t\_0}{\frac{\ell}{t\_0}}}{\frac{{\left(0 - h\right)}^{0.5}}{{\left(0 - d\right)}^{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{t\_1}}{\ell \cdot \frac{t\_1}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -4.999999999999985e-310Initial program 71.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.0%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr72.8%
frac-2negN/A
sqrt-divN/A
/-lowering-/.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
--lowering--.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
sub0-negN/A
--lowering--.f6483.5%
Applied egg-rr83.5%
if -4.999999999999985e-310 < d Initial program 66.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.4%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.4%
Applied egg-rr71.4%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.4%
Applied egg-rr86.9%
Final simplification85.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ d (* M D))) (t_1 (/ h t_0)))
(if (<= d -1.55e+174)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= d -2.8e-214)
(* (+ 1.0 (* (/ t_1 l) (/ -0.125 t_0))) (sqrt (* (/ d l) (/ d h))))
(if (<= d -5e-310)
(*
(sqrt (/ (/ h l) (* l l)))
(* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
(/
(/ (* d (+ 1.0 (/ t_1 (* l (/ t_0 -0.125))))) (sqrt h))
(sqrt l)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d / (M * D);
double t_1 = h / t_0;
double tmp;
if (d <= -1.55e+174) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (d <= -2.8e-214) {
tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * sqrt(((d / l) * (d / h)));
} else if (d <= -5e-310) {
tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = ((d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / 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) :: t_1
real(8) :: tmp
t_0 = d / (m * d_1)
t_1 = h / t_0
if (d <= (-1.55d+174)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (d <= (-2.8d-214)) then
tmp = (1.0d0 + ((t_1 / l) * ((-0.125d0) / t_0))) * sqrt(((d / l) * (d / h)))
else if (d <= (-5d-310)) then
tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
else
tmp = ((d * (1.0d0 + (t_1 / (l * (t_0 / (-0.125d0)))))) / 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 = d / (M * D);
double t_1 = h / t_0;
double tmp;
if (d <= -1.55e+174) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (d <= -2.8e-214) {
tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * Math.sqrt(((d / l) * (d / h)));
} else if (d <= -5e-310) {
tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = ((d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
}
return tmp;
}
def code(d, h, l, M, D): t_0 = d / (M * D) t_1 = h / t_0 tmp = 0 if d <= -1.55e+174: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif d <= -2.8e-214: tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * math.sqrt(((d / l) * (d / h))) elif d <= -5e-310: tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))) else: tmp = ((d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / math.sqrt(h)) / math.sqrt(l) return tmp
function code(d, h, l, M, D) t_0 = Float64(d / Float64(M * D)) t_1 = Float64(h / t_0) tmp = 0.0 if (d <= -1.55e+174) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (d <= -2.8e-214) tmp = Float64(Float64(1.0 + Float64(Float64(t_1 / l) * Float64(-0.125 / t_0))) * sqrt(Float64(Float64(d / l) * Float64(d / h)))); elseif (d <= -5e-310) tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d)))); else tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(t_1 / Float64(l * Float64(t_0 / -0.125))))) / sqrt(h)) / sqrt(l)); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = d / (M * D); t_1 = h / t_0; tmp = 0.0; if (d <= -1.55e+174) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (d <= -2.8e-214) tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * sqrt(((d / l) * (d / h))); elseif (d <= -5e-310) tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))); else tmp = ((d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / sqrt(h)) / sqrt(l); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(h / t$95$0), $MachinePrecision]}, If[LessEqual[d, -1.55e+174], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.8e-214], N[(N[(1.0 + N[(N[(t$95$1 / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(t$95$1 / N[(l * N[(t$95$0 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{d}{M \cdot D}\\
t_1 := \frac{h}{t\_0}\\
\mathbf{if}\;d \leq -1.55 \cdot 10^{+174}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;d \leq -2.8 \cdot 10^{-214}:\\
\;\;\;\;\left(1 + \frac{t\_1}{\ell} \cdot \frac{-0.125}{t\_0}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{t\_1}{\ell \cdot \frac{t\_0}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -1.55e174Initial program 67.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.3%
Simplified7.3%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6479.5%
Simplified79.5%
if -1.55e174 < d < -2.8000000000000002e-214Initial program 77.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified79.5%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr80.5%
Applied egg-rr68.5%
if -2.8000000000000002e-214 < d < -4.999999999999985e-310Initial program 47.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified47.8%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr41.0%
Applied egg-rr47.8%
Taylor expanded in h around -inf
Simplified50.4%
if -4.999999999999985e-310 < d Initial program 66.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.4%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.4%
Applied egg-rr71.4%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.4%
Applied egg-rr86.9%
Final simplification77.9%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ d (* M D))))
(if (<= d -8.6e+228)
(* (- 0.0 d) (sqrt (/ 1.0 (* l h))))
(if (<= d 2.8e-308)
(*
(sqrt (/ d l))
(* (sqrt (/ d h)) (+ 1.0 (* (/ -0.125 t_0) (/ (/ h l) t_0)))))
(/
(/ (* d (+ 1.0 (/ (/ h t_0) (* l (/ t_0 -0.125))))) (sqrt h))
(sqrt l))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d / (M * D);
double tmp;
if (d <= -8.6e+228) {
tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
} else if (d <= 2.8e-308) {
tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((-0.125 / t_0) * ((h / l) / t_0))));
} else {
tmp = ((d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / 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 = d / (m * d_1)
if (d <= (-8.6d+228)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (l * h)))
else if (d <= 2.8d-308) then
tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0d0 + (((-0.125d0) / t_0) * ((h / l) / t_0))))
else
tmp = ((d * (1.0d0 + ((h / t_0) / (l * (t_0 / (-0.125d0)))))) / 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 = d / (M * D);
double tmp;
if (d <= -8.6e+228) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (l * h)));
} else if (d <= 2.8e-308) {
tmp = Math.sqrt((d / l)) * (Math.sqrt((d / h)) * (1.0 + ((-0.125 / t_0) * ((h / l) / t_0))));
} else {
tmp = ((d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
}
return tmp;
}
def code(d, h, l, M, D): t_0 = d / (M * D) tmp = 0 if d <= -8.6e+228: tmp = (0.0 - d) * math.sqrt((1.0 / (l * h))) elif d <= 2.8e-308: tmp = math.sqrt((d / l)) * (math.sqrt((d / h)) * (1.0 + ((-0.125 / t_0) * ((h / l) / t_0)))) else: tmp = ((d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / math.sqrt(h)) / math.sqrt(l) return tmp
function code(d, h, l, M, D) t_0 = Float64(d / Float64(M * D)) tmp = 0.0 if (d <= -8.6e+228) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(l * h)))); elseif (d <= 2.8e-308) tmp = Float64(sqrt(Float64(d / l)) * Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(-0.125 / t_0) * Float64(Float64(h / l) / t_0))))); else tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(Float64(h / t_0) / Float64(l * Float64(t_0 / -0.125))))) / sqrt(h)) / sqrt(l)); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = d / (M * D); tmp = 0.0; if (d <= -8.6e+228) tmp = (0.0 - d) * sqrt((1.0 / (l * h))); elseif (d <= 2.8e-308) tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((-0.125 / t_0) * ((h / l) / t_0)))); else tmp = ((d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / sqrt(h)) / sqrt(l); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -8.6e+228], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.8e-308], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(-0.125 / t$95$0), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(N[(h / t$95$0), $MachinePrecision] / N[(l * N[(t$95$0 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{d}{M \cdot D}\\
\mathbf{if}\;d \leq -8.6 \cdot 10^{+228}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\
\mathbf{elif}\;d \leq 2.8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{-0.125}{t\_0} \cdot \frac{\frac{h}{\ell}}{t\_0}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{t\_0}}{\ell \cdot \frac{t\_0}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -8.60000000000000063e228Initial program 59.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified59.5%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6483.4%
Simplified83.4%
if -8.60000000000000063e228 < d < 2.79999999999999984e-308Initial program 72.6%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.5%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr74.4%
Applied egg-rr75.3%
associate-/l/N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6476.0%
Applied egg-rr76.0%
if 2.79999999999999984e-308 < d Initial program 67.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.0%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.9%
Applied egg-rr71.9%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.2%
Applied egg-rr87.5%
Final simplification82.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* M D) d)) (t_1 (/ d (* M D))))
(if (<= d -1.38e+228)
(* (- 0.0 d) (sqrt (/ 1.0 (* l h))))
(if (<= d 2.8e-308)
(*
(sqrt (/ d l))
(* (sqrt (/ d h)) (+ 1.0 (* h (* -0.125 (/ t_0 (/ l t_0)))))))
(/
(/ (* d (+ 1.0 (/ (/ h t_1) (* l (/ t_1 -0.125))))) (sqrt h))
(sqrt l))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / d;
double t_1 = d / (M * D);
double tmp;
if (d <= -1.38e+228) {
tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
} else if (d <= 2.8e-308) {
tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + (h * (-0.125 * (t_0 / (l / t_0))))));
} else {
tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / 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) :: t_1
real(8) :: tmp
t_0 = (m * d_1) / d
t_1 = d / (m * d_1)
if (d <= (-1.38d+228)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (l * h)))
else if (d <= 2.8d-308) then
tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0d0 + (h * ((-0.125d0) * (t_0 / (l / t_0))))))
else
tmp = ((d * (1.0d0 + ((h / t_1) / (l * (t_1 / (-0.125d0)))))) / 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 = (M * D) / d;
double t_1 = d / (M * D);
double tmp;
if (d <= -1.38e+228) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (l * h)));
} else if (d <= 2.8e-308) {
tmp = Math.sqrt((d / l)) * (Math.sqrt((d / h)) * (1.0 + (h * (-0.125 * (t_0 / (l / t_0))))));
} else {
tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (M * D) / d t_1 = d / (M * D) tmp = 0 if d <= -1.38e+228: tmp = (0.0 - d) * math.sqrt((1.0 / (l * h))) elif d <= 2.8e-308: tmp = math.sqrt((d / l)) * (math.sqrt((d / h)) * (1.0 + (h * (-0.125 * (t_0 / (l / t_0)))))) else: tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / math.sqrt(h)) / math.sqrt(l) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) / d) t_1 = Float64(d / Float64(M * D)) tmp = 0.0 if (d <= -1.38e+228) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(l * h)))); elseif (d <= 2.8e-308) tmp = Float64(sqrt(Float64(d / l)) * Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(h * Float64(-0.125 * Float64(t_0 / Float64(l / t_0))))))); else tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(Float64(h / t_1) / Float64(l * Float64(t_1 / -0.125))))) / sqrt(h)) / sqrt(l)); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (M * D) / d; t_1 = d / (M * D); tmp = 0.0; if (d <= -1.38e+228) tmp = (0.0 - d) * sqrt((1.0 / (l * h))); elseif (d <= 2.8e-308) tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + (h * (-0.125 * (t_0 / (l / t_0)))))); else tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / sqrt(h)) / sqrt(l); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.38e+228], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.8e-308], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(h * N[(-0.125 * N[(t$95$0 / N[(l / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(N[(h / t$95$1), $MachinePrecision] / N[(l * N[(t$95$1 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := \frac{d}{M \cdot D}\\
\mathbf{if}\;d \leq -1.38 \cdot 10^{+228}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\
\mathbf{elif}\;d \leq 2.8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + h \cdot \left(-0.125 \cdot \frac{t\_0}{\frac{\ell}{t\_0}}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{t\_1}}{\ell \cdot \frac{t\_1}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if d < -1.38000000000000004e228Initial program 59.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified59.5%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6483.4%
Simplified83.4%
if -1.38000000000000004e228 < d < 2.79999999999999984e-308Initial program 72.6%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.5%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr73.7%
if 2.79999999999999984e-308 < d Initial program 67.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.0%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.9%
Applied egg-rr71.9%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.2%
Applied egg-rr87.5%
Final simplification81.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ (/ h l) (* l l)))) (t_1 (* M (* M (* D D)))))
(if (<= d -1.35e+87)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= d -2.4e-297)
(* t_0 (* -0.125 (/ t_1 (- 0.0 d))))
(if (<= d 8.5e-154)
(* t_0 (/ (* -0.125 t_1) d))
(if (<= d 1.65e+47)
(* (/ d (sqrt (* l h))) (/ (/ (* -0.125 (* h t_1)) l) (* d d)))
(* d (sqrt (/ (/ 1.0 l) h)))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(((h / l) / (l * l)));
double t_1 = M * (M * (D * D));
double tmp;
if (d <= -1.35e+87) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (d <= -2.4e-297) {
tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
} else if (d <= 8.5e-154) {
tmp = t_0 * ((-0.125 * t_1) / d);
} else if (d <= 1.65e+47) {
tmp = (d / sqrt((l * h))) * (((-0.125 * (h * t_1)) / l) / (d * d));
} else {
tmp = d * sqrt(((1.0 / l) / h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt(((h / l) / (l * l)))
t_1 = m * (m * (d_1 * d_1))
if (d <= (-1.35d+87)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (d <= (-2.4d-297)) then
tmp = t_0 * ((-0.125d0) * (t_1 / (0.0d0 - d)))
else if (d <= 8.5d-154) then
tmp = t_0 * (((-0.125d0) * t_1) / d)
else if (d <= 1.65d+47) then
tmp = (d / sqrt((l * h))) * ((((-0.125d0) * (h * t_1)) / l) / (d * d))
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = Math.sqrt(((h / l) / (l * l)));
double t_1 = M * (M * (D * D));
double tmp;
if (d <= -1.35e+87) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (d <= -2.4e-297) {
tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
} else if (d <= 8.5e-154) {
tmp = t_0 * ((-0.125 * t_1) / d);
} else if (d <= 1.65e+47) {
tmp = (d / Math.sqrt((l * h))) * (((-0.125 * (h * t_1)) / l) / (d * d));
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt(((h / l) / (l * l))) t_1 = M * (M * (D * D)) tmp = 0 if d <= -1.35e+87: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif d <= -2.4e-297: tmp = t_0 * (-0.125 * (t_1 / (0.0 - d))) elif d <= 8.5e-154: tmp = t_0 * ((-0.125 * t_1) / d) elif d <= 1.65e+47: tmp = (d / math.sqrt((l * h))) * (((-0.125 * (h * t_1)) / l) / (d * d)) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(Float64(h / l) / Float64(l * l))) t_1 = Float64(M * Float64(M * Float64(D * D))) tmp = 0.0 if (d <= -1.35e+87) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (d <= -2.4e-297) tmp = Float64(t_0 * Float64(-0.125 * Float64(t_1 / Float64(0.0 - d)))); elseif (d <= 8.5e-154) tmp = Float64(t_0 * Float64(Float64(-0.125 * t_1) / d)); elseif (d <= 1.65e+47) tmp = Float64(Float64(d / sqrt(Float64(l * h))) * Float64(Float64(Float64(-0.125 * Float64(h * t_1)) / l) / Float64(d * d))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt(((h / l) / (l * l))); t_1 = M * (M * (D * D)); tmp = 0.0; if (d <= -1.35e+87) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (d <= -2.4e-297) tmp = t_0 * (-0.125 * (t_1 / (0.0 - d))); elseif (d <= 8.5e-154) tmp = t_0 * ((-0.125 * t_1) / d); elseif (d <= 1.65e+47) tmp = (d / sqrt((l * h))) * (((-0.125 * (h * t_1)) / l) / (d * d)); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.35e+87], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.4e-297], N[(t$95$0 * N[(-0.125 * N[(t$95$1 / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8.5e-154], N[(t$95$0 * N[(N[(-0.125 * t$95$1), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.65e+47], N[(N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(-0.125 * N[(h * t$95$1), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\\
t_1 := M \cdot \left(M \cdot \left(D \cdot D\right)\right)\\
\mathbf{if}\;d \leq -1.35 \cdot 10^{+87}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\
\;\;\;\;t\_0 \cdot \left(-0.125 \cdot \frac{t\_1}{0 - d}\right)\\
\mathbf{elif}\;d \leq 8.5 \cdot 10^{-154}:\\
\;\;\;\;t\_0 \cdot \frac{-0.125 \cdot t\_1}{d}\\
\mathbf{elif}\;d \leq 1.65 \cdot 10^{+47}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \frac{\frac{-0.125 \cdot \left(h \cdot t\_1\right)}{\ell}}{d \cdot d}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if d < -1.35000000000000003e87Initial program 67.6%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified68.1%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f646.2%
Simplified6.2%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6462.6%
Simplified62.6%
if -1.35000000000000003e87 < d < -2.4e-297Initial program 72.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified75.4%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr74.1%
Applied egg-rr76.4%
Taylor expanded in h around -inf
Simplified31.1%
if -2.4e-297 < d < 8.4999999999999996e-154Initial program 42.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified46.1%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr42.9%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-eval46.3%
Applied egg-rr46.3%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
cube-multN/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.2%
Simplified53.2%
if 8.4999999999999996e-154 < d < 1.65e47Initial program 74.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified87.6%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6487.5%
Applied egg-rr87.5%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr88.3%
Taylor expanded in M around inf
associate-*r/N/A
times-fracN/A
associate-*l/N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.5%
Simplified40.5%
if 1.65e47 < d Initial program 73.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.4%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6460.8%
Simplified60.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6462.5%
Applied egg-rr62.5%
Final simplification47.6%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ d (* M D))) (t_1 (/ h t_0)))
(if (<= d -3.2e+181)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= d -1.8e-214)
(* (+ 1.0 (* (/ t_1 l) (/ -0.125 t_0))) (sqrt (* (/ d l) (/ d h))))
(if (<= d -2.4e-297)
(*
(sqrt (/ (/ h l) (* l l)))
(* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
(/ (* d (+ 1.0 (/ t_1 (* l (/ t_0 -0.125))))) (sqrt (* l h))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d / (M * D);
double t_1 = h / t_0;
double tmp;
if (d <= -3.2e+181) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (d <= -1.8e-214) {
tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * sqrt(((d / l) * (d / h)));
} else if (d <= -2.4e-297) {
tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = (d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / sqrt((l * h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = d / (m * d_1)
t_1 = h / t_0
if (d <= (-3.2d+181)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (d <= (-1.8d-214)) then
tmp = (1.0d0 + ((t_1 / l) * ((-0.125d0) / t_0))) * sqrt(((d / l) * (d / h)))
else if (d <= (-2.4d-297)) then
tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
else
tmp = (d * (1.0d0 + (t_1 / (l * (t_0 / (-0.125d0)))))) / sqrt((l * h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = d / (M * D);
double t_1 = h / t_0;
double tmp;
if (d <= -3.2e+181) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (d <= -1.8e-214) {
tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * Math.sqrt(((d / l) * (d / h)));
} else if (d <= -2.4e-297) {
tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = (d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / Math.sqrt((l * h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = d / (M * D) t_1 = h / t_0 tmp = 0 if d <= -3.2e+181: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif d <= -1.8e-214: tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * math.sqrt(((d / l) * (d / h))) elif d <= -2.4e-297: tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))) else: tmp = (d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / math.sqrt((l * h)) return tmp
function code(d, h, l, M, D) t_0 = Float64(d / Float64(M * D)) t_1 = Float64(h / t_0) tmp = 0.0 if (d <= -3.2e+181) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (d <= -1.8e-214) tmp = Float64(Float64(1.0 + Float64(Float64(t_1 / l) * Float64(-0.125 / t_0))) * sqrt(Float64(Float64(d / l) * Float64(d / h)))); elseif (d <= -2.4e-297) tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d)))); else tmp = Float64(Float64(d * Float64(1.0 + Float64(t_1 / Float64(l * Float64(t_0 / -0.125))))) / sqrt(Float64(l * h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = d / (M * D); t_1 = h / t_0; tmp = 0.0; if (d <= -3.2e+181) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (d <= -1.8e-214) tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * sqrt(((d / l) * (d / h))); elseif (d <= -2.4e-297) tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))); else tmp = (d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / sqrt((l * h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(h / t$95$0), $MachinePrecision]}, If[LessEqual[d, -3.2e+181], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1.8e-214], N[(N[(1.0 + N[(N[(t$95$1 / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.4e-297], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d * N[(1.0 + N[(t$95$1 / N[(l * N[(t$95$0 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{d}{M \cdot D}\\
t_1 := \frac{h}{t\_0}\\
\mathbf{if}\;d \leq -3.2 \cdot 10^{+181}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;d \leq -1.8 \cdot 10^{-214}:\\
\;\;\;\;\left(1 + \frac{t\_1}{\ell} \cdot \frac{-0.125}{t\_0}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d \cdot \left(1 + \frac{t\_1}{\ell \cdot \frac{t\_0}{-0.125}}\right)}{\sqrt{\ell \cdot h}}\\
\end{array}
\end{array}
if d < -3.2e181Initial program 67.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.3%
Simplified7.3%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6479.5%
Simplified79.5%
if -3.2e181 < d < -1.8e-214Initial program 77.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified79.5%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr80.5%
Applied egg-rr68.5%
if -1.8e-214 < d < -2.4e-297Initial program 44.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified44.0%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr36.8%
Applied egg-rr44.0%
Taylor expanded in h around -inf
Simplified46.8%
if -2.4e-297 < d Initial program 67.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.7%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.6%
Applied egg-rr71.6%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.5%
Applied egg-rr77.7%
Final simplification73.3%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ d (* M D))))
(if (<= l -2.45e-110)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= l -1e-309)
(*
(sqrt (/ (/ h l) (* l l)))
(* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
(/ (* d (+ 1.0 (/ (/ h t_0) (* l (/ t_0 -0.125))))) (sqrt (* l h)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d / (M * D);
double tmp;
if (l <= -2.45e-110) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (l <= -1e-309) {
tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = (d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / sqrt((l * h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = d / (m * d_1)
if (l <= (-2.45d-110)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (l <= (-1d-309)) then
tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
else
tmp = (d * (1.0d0 + ((h / t_0) / (l * (t_0 / (-0.125d0)))))) / sqrt((l * h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = d / (M * D);
double tmp;
if (l <= -2.45e-110) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (l <= -1e-309) {
tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = (d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / Math.sqrt((l * h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = d / (M * D) tmp = 0 if l <= -2.45e-110: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif l <= -1e-309: tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))) else: tmp = (d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / math.sqrt((l * h)) return tmp
function code(d, h, l, M, D) t_0 = Float64(d / Float64(M * D)) tmp = 0.0 if (l <= -2.45e-110) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (l <= -1e-309) tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d)))); else tmp = Float64(Float64(d * Float64(1.0 + Float64(Float64(h / t_0) / Float64(l * Float64(t_0 / -0.125))))) / sqrt(Float64(l * h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = d / (M * D); tmp = 0.0; if (l <= -2.45e-110) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (l <= -1e-309) tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))); else tmp = (d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / sqrt((l * h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2.45e-110], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d * N[(1.0 + N[(N[(h / t$95$0), $MachinePrecision] / N[(l * N[(t$95$0 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{d}{M \cdot D}\\
\mathbf{if}\;\ell \leq -2.45 \cdot 10^{-110}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d \cdot \left(1 + \frac{\frac{h}{t\_0}}{\ell \cdot \frac{t\_0}{-0.125}}\right)}{\sqrt{\ell \cdot h}}\\
\end{array}
\end{array}
if l < -2.4499999999999999e-110Initial program 71.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.0%
Simplified7.0%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6446.4%
Simplified46.4%
if -2.4499999999999999e-110 < l < -1.000000000000002e-309Initial program 70.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified70.9%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr68.8%
Applied egg-rr72.8%
Taylor expanded in h around -inf
Simplified43.9%
if -1.000000000000002e-309 < l Initial program 66.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.4%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.4%
Applied egg-rr71.4%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.4%
Applied egg-rr77.6%
Final simplification61.4%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.4e-109)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= l -1e-309)
(*
(sqrt (/ (/ h l) (* l l)))
(* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
(*
(/ d (sqrt (* l h)))
(+ 1.0 (/ (/ (* h (/ -0.125 (/ d (* M D)))) (/ l (* M D))) d))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.4e-109) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (l <= -1e-309) {
tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = (d / sqrt((l * h))) * (1.0 + (((h * (-0.125 / (d / (M * D)))) / (l / (M * D))) / d));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-1.4d-109)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (l <= (-1d-309)) then
tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
else
tmp = (d / sqrt((l * h))) * (1.0d0 + (((h * ((-0.125d0) / (d / (m * d_1)))) / (l / (m * d_1))) / d))
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.4e-109) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (l <= -1e-309) {
tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = (d / Math.sqrt((l * h))) * (1.0 + (((h * (-0.125 / (d / (M * D)))) / (l / (M * D))) / d));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.4e-109: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif l <= -1e-309: tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))) else: tmp = (d / math.sqrt((l * h))) * (1.0 + (((h * (-0.125 / (d / (M * D)))) / (l / (M * D))) / d)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.4e-109) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (l <= -1e-309) tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d)))); else tmp = Float64(Float64(d / sqrt(Float64(l * h))) * Float64(1.0 + Float64(Float64(Float64(h * Float64(-0.125 / Float64(d / Float64(M * D)))) / Float64(l / Float64(M * D))) / d))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.4e-109) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (l <= -1e-309) tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))); else tmp = (d / sqrt((l * h))) * (1.0 + (((h * (-0.125 / (d / (M * D)))) / (l / (M * D))) / d)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.4e-109], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h * N[(-0.125 / N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.4 \cdot 10^{-109}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \left(1 + \frac{\frac{h \cdot \frac{-0.125}{\frac{d}{M \cdot D}}}{\frac{\ell}{M \cdot D}}}{d}\right)\\
\end{array}
\end{array}
if l < -1.39999999999999989e-109Initial program 71.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.0%
Simplified7.0%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6446.4%
Simplified46.4%
if -1.39999999999999989e-109 < l < -1.000000000000002e-309Initial program 70.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified70.9%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr68.8%
Applied egg-rr72.8%
Taylor expanded in h around -inf
Simplified43.9%
if -1.000000000000002e-309 < l Initial program 66.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.4%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.4%
Applied egg-rr71.4%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.4%
associate-*r*N/A
*-commutativeN/A
clear-numN/A
div-invN/A
associate-*r*N/A
associate-/r/N/A
times-fracN/A
metadata-evalN/A
associate-*l/N/A
associate-/r/N/A
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr75.6%
Final simplification60.4%
(FPCore (d h l M D)
:precision binary64
(if (<= l -6.8e-110)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= l -1e-309)
(*
(sqrt (/ (/ h l) (* l l)))
(* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
(*
(/ d (sqrt (* l h)))
(+ 1.0 (* (/ (* M D) (/ l (/ (* M D) d))) (* -0.125 (/ h d))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -6.8e-110) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (l <= -1e-309) {
tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = (d / sqrt((l * h))) * (1.0 + (((M * D) / (l / ((M * D) / d))) * (-0.125 * (h / 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 (l <= (-6.8d-110)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (l <= (-1d-309)) then
tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
else
tmp = (d / sqrt((l * h))) * (1.0d0 + (((m * d_1) / (l / ((m * d_1) / d))) * ((-0.125d0) * (h / d))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -6.8e-110) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (l <= -1e-309) {
tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
} else {
tmp = (d / Math.sqrt((l * h))) * (1.0 + (((M * D) / (l / ((M * D) / d))) * (-0.125 * (h / d))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -6.8e-110: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif l <= -1e-309: tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))) else: tmp = (d / math.sqrt((l * h))) * (1.0 + (((M * D) / (l / ((M * D) / d))) * (-0.125 * (h / d)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -6.8e-110) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (l <= -1e-309) tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d)))); else tmp = Float64(Float64(d / sqrt(Float64(l * h))) * Float64(1.0 + Float64(Float64(Float64(M * D) / Float64(l / Float64(Float64(M * D) / d))) * Float64(-0.125 * Float64(h / d))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -6.8e-110) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (l <= -1e-309) tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d))); else tmp = (d / sqrt((l * h))) * (1.0 + (((M * D) / (l / ((M * D) / d))) * (-0.125 * (h / d)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -6.8e-110], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(M * D), $MachinePrecision] / N[(l / N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.125 * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6.8 \cdot 10^{-110}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \left(1 + \frac{M \cdot D}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot \left(-0.125 \cdot \frac{h}{d}\right)\right)\\
\end{array}
\end{array}
if l < -6.8000000000000002e-110Initial program 71.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.0%
Simplified7.0%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6446.4%
Simplified46.4%
if -6.8000000000000002e-110 < l < -1.000000000000002e-309Initial program 70.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified70.9%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr68.8%
Applied egg-rr72.8%
Taylor expanded in h around -inf
Simplified43.9%
if -1.000000000000002e-309 < l Initial program 66.7%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.4%
pow1/2N/A
metadata-evalN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
/-lowering-/.f6471.4%
Applied egg-rr71.4%
pow-powN/A
metadata-evalN/A
pow1/2N/A
associate-*r*N/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
frac-timesN/A
rem-square-sqrtN/A
*-commutativeN/A
pow1/2N/A
pow-prod-downN/A
*-lowering-*.f64N/A
Applied egg-rr76.4%
times-fracN/A
*-lowering-*.f64N/A
associate-/l/N/A
associate-/r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-commutativeN/A
times-fracN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f6472.6%
Applied egg-rr72.6%
Final simplification59.0%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ (/ h l) (* l l)))) (t_1 (* M (* M (* D D)))))
(if (<= d -3.4e+87)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= d -2.4e-297)
(* t_0 (* -0.125 (/ t_1 (- 0.0 d))))
(if (<= d 6.2e+21)
(* t_0 (/ (* -0.125 t_1) d))
(* d (sqrt (/ (/ 1.0 l) h))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(((h / l) / (l * l)));
double t_1 = M * (M * (D * D));
double tmp;
if (d <= -3.4e+87) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (d <= -2.4e-297) {
tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
} else if (d <= 6.2e+21) {
tmp = t_0 * ((-0.125 * t_1) / d);
} else {
tmp = d * sqrt(((1.0 / l) / h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt(((h / l) / (l * l)))
t_1 = m * (m * (d_1 * d_1))
if (d <= (-3.4d+87)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (d <= (-2.4d-297)) then
tmp = t_0 * ((-0.125d0) * (t_1 / (0.0d0 - d)))
else if (d <= 6.2d+21) then
tmp = t_0 * (((-0.125d0) * t_1) / d)
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = Math.sqrt(((h / l) / (l * l)));
double t_1 = M * (M * (D * D));
double tmp;
if (d <= -3.4e+87) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (d <= -2.4e-297) {
tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
} else if (d <= 6.2e+21) {
tmp = t_0 * ((-0.125 * t_1) / d);
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt(((h / l) / (l * l))) t_1 = M * (M * (D * D)) tmp = 0 if d <= -3.4e+87: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif d <= -2.4e-297: tmp = t_0 * (-0.125 * (t_1 / (0.0 - d))) elif d <= 6.2e+21: tmp = t_0 * ((-0.125 * t_1) / d) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(Float64(h / l) / Float64(l * l))) t_1 = Float64(M * Float64(M * Float64(D * D))) tmp = 0.0 if (d <= -3.4e+87) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (d <= -2.4e-297) tmp = Float64(t_0 * Float64(-0.125 * Float64(t_1 / Float64(0.0 - d)))); elseif (d <= 6.2e+21) tmp = Float64(t_0 * Float64(Float64(-0.125 * t_1) / d)); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt(((h / l) / (l * l))); t_1 = M * (M * (D * D)); tmp = 0.0; if (d <= -3.4e+87) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (d <= -2.4e-297) tmp = t_0 * (-0.125 * (t_1 / (0.0 - d))); elseif (d <= 6.2e+21) tmp = t_0 * ((-0.125 * t_1) / d); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -3.4e+87], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.4e-297], N[(t$95$0 * N[(-0.125 * N[(t$95$1 / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 6.2e+21], N[(t$95$0 * N[(N[(-0.125 * t$95$1), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\\
t_1 := M \cdot \left(M \cdot \left(D \cdot D\right)\right)\\
\mathbf{if}\;d \leq -3.4 \cdot 10^{+87}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\
\;\;\;\;t\_0 \cdot \left(-0.125 \cdot \frac{t\_1}{0 - d}\right)\\
\mathbf{elif}\;d \leq 6.2 \cdot 10^{+21}:\\
\;\;\;\;t\_0 \cdot \frac{-0.125 \cdot t\_1}{d}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if d < -3.4000000000000002e87Initial program 67.6%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified68.1%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f646.2%
Simplified6.2%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6462.6%
Simplified62.6%
if -3.4000000000000002e87 < d < -2.4e-297Initial program 72.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified75.4%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr74.1%
Applied egg-rr76.4%
Taylor expanded in h around -inf
Simplified31.1%
if -2.4e-297 < d < 6.2e21Initial program 59.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified67.1%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr65.6%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-eval67.2%
Applied egg-rr67.2%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
cube-multN/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.3%
Simplified42.3%
if 6.2e21 < d Initial program 74.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified75.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6456.1%
Simplified56.1%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6457.5%
Applied egg-rr57.5%
Final simplification46.3%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.18e-200)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= l -1e-309)
(/ d (pow (* h (* h (* l l))) 0.25))
(if (<= l 2.2e-73)
(* (sqrt (/ (/ h l) (* l l))) (/ (* -0.125 (* M (* M (* D D)))) d))
(* d (sqrt (/ (/ 1.0 l) h)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.18e-200) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (l <= -1e-309) {
tmp = d / pow((h * (h * (l * l))), 0.25);
} else if (l <= 2.2e-73) {
tmp = sqrt(((h / l) / (l * l))) * ((-0.125 * (M * (M * (D * D)))) / d);
} else {
tmp = d * sqrt(((1.0 / l) / h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-1.18d-200)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (l <= (-1d-309)) then
tmp = d / ((h * (h * (l * l))) ** 0.25d0)
else if (l <= 2.2d-73) then
tmp = sqrt(((h / l) / (l * l))) * (((-0.125d0) * (m * (m * (d_1 * d_1)))) / d)
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.18e-200) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (l <= -1e-309) {
tmp = d / Math.pow((h * (h * (l * l))), 0.25);
} else if (l <= 2.2e-73) {
tmp = Math.sqrt(((h / l) / (l * l))) * ((-0.125 * (M * (M * (D * D)))) / d);
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.18e-200: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif l <= -1e-309: tmp = d / math.pow((h * (h * (l * l))), 0.25) elif l <= 2.2e-73: tmp = math.sqrt(((h / l) / (l * l))) * ((-0.125 * (M * (M * (D * D)))) / d) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.18e-200) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (l <= -1e-309) tmp = Float64(d / (Float64(h * Float64(h * Float64(l * l))) ^ 0.25)); elseif (l <= 2.2e-73) tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(Float64(-0.125 * Float64(M * Float64(M * Float64(D * D)))) / d)); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.18e-200) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (l <= -1e-309) tmp = d / ((h * (h * (l * l))) ^ 0.25); elseif (l <= 2.2e-73) tmp = sqrt(((h / l) / (l * l))) * ((-0.125 * (M * (M * (D * D)))) / d); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.18e-200], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(d / N[Power[N[(h * N[(h * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.2e-73], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(-0.125 * N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.18 \cdot 10^{-200}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{d}{{\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right)}^{0.25}}\\
\mathbf{elif}\;\ell \leq 2.2 \cdot 10^{-73}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \frac{-0.125 \cdot \left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right)}{d}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if l < -1.17999999999999996e-200Initial program 71.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.9%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f646.8%
Simplified6.8%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6441.7%
Simplified41.7%
if -1.17999999999999996e-200 < l < -1.000000000000002e-309Initial program 72.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.4%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6428.2%
Simplified28.2%
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6428.2%
Applied egg-rr28.2%
pow1/2N/A
metadata-evalN/A
pow-powN/A
pow2N/A
pow-lowering-pow.f64N/A
swap-sqrN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6456.5%
Applied egg-rr56.5%
if -1.000000000000002e-309 < l < 2.2e-73Initial program 67.6%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified73.8%
*-commutativeN/A
clear-numN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
Applied egg-rr71.9%
pow1/2N/A
clear-numN/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-eval73.9%
Applied egg-rr73.9%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
cube-multN/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.9%
Simplified45.9%
if 2.2e-73 < l Initial program 66.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified70.0%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6447.7%
Simplified47.7%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6448.9%
Applied egg-rr48.9%
Final simplification46.1%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.45e-200)
(* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
(if (<= l -5.5e-306)
(/ d (pow (* h (* h (* l l))) 0.25))
(* d (sqrt (/ (/ 1.0 l) h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.45e-200) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else if (l <= -5.5e-306) {
tmp = d / pow((h * (h * (l * l))), 0.25);
} else {
tmp = d * sqrt(((1.0 / l) / h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-1.45d-200)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else if (l <= (-5.5d-306)) then
tmp = d / ((h * (h * (l * l))) ** 0.25d0)
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.45e-200) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else if (l <= -5.5e-306) {
tmp = d / Math.pow((h * (h * (l * l))), 0.25);
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.45e-200: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) elif l <= -5.5e-306: tmp = d / math.pow((h * (h * (l * l))), 0.25) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.45e-200) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); elseif (l <= -5.5e-306) tmp = Float64(d / (Float64(h * Float64(h * Float64(l * l))) ^ 0.25)); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.45e-200) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); elseif (l <= -5.5e-306) tmp = d / ((h * (h * (l * l))) ^ 0.25); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.45e-200], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -5.5e-306], N[(d / N[Power[N[(h * N[(h * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.45 \cdot 10^{-200}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;\ell \leq -5.5 \cdot 10^{-306}:\\
\;\;\;\;\frac{d}{{\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right)}^{0.25}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if l < -1.45e-200Initial program 71.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.9%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f646.8%
Simplified6.8%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6441.7%
Simplified41.7%
if -1.45e-200 < l < -5.49999999999999992e-306Initial program 70.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6425.1%
Simplified25.1%
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6425.1%
Applied egg-rr25.1%
pow1/2N/A
metadata-evalN/A
pow-powN/A
pow2N/A
pow-lowering-pow.f64N/A
swap-sqrN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6454.6%
Applied egg-rr54.6%
if -5.49999999999999992e-306 < l Initial program 67.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.7%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6439.8%
Simplified39.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6440.5%
Applied egg-rr40.5%
(FPCore (d h l M D) :precision binary64 (if (<= l -8.8e-203) (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l))) (* d (sqrt (/ (/ 1.0 l) h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -8.8e-203) {
tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
} else {
tmp = d * sqrt(((1.0 / l) / h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-8.8d-203)) then
tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -8.8e-203) {
tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -8.8e-203: tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l)) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -8.8e-203) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -8.8e-203) tmp = (0.0 - d) * sqrt(((1.0 / h) / l)); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -8.8e-203], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -8.8 \cdot 10^{-203}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if l < -8.7999999999999999e-203Initial program 71.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.9%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f646.8%
Simplified6.8%
Taylor expanded in h around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
sqrt-lowering-sqrt.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6441.7%
Simplified41.7%
if -8.7999999999999999e-203 < l Initial program 67.6%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6437.6%
Simplified37.6%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6438.2%
Applied egg-rr38.2%
(FPCore (d h l M D) :precision binary64 (if (<= l -8.8e-203) (* (- 0.0 d) (sqrt (/ 1.0 (* l h)))) (* d (sqrt (/ (/ 1.0 l) h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -8.8e-203) {
tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
} else {
tmp = d * sqrt(((1.0 / l) / h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-8.8d-203)) then
tmp = (0.0d0 - d) * sqrt((1.0d0 / (l * h)))
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -8.8e-203) {
tmp = (0.0 - d) * Math.sqrt((1.0 / (l * h)));
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -8.8e-203: tmp = (0.0 - d) * math.sqrt((1.0 / (l * h))) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -8.8e-203) tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(l * h)))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -8.8e-203) tmp = (0.0 - d) * sqrt((1.0 / (l * h))); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -8.8e-203], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -8.8 \cdot 10^{-203}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if l < -8.7999999999999999e-203Initial program 71.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.9%
Taylor expanded in l around -inf
*-commutativeN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f6440.4%
Simplified40.4%
if -8.7999999999999999e-203 < l Initial program 67.6%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified71.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6437.6%
Simplified37.6%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6438.2%
Applied egg-rr38.2%
Final simplification39.1%
(FPCore (d h l M D) :precision binary64 (if (<= l -4.1e-238) (sqrt (* (/ d l) (/ d h))) (* d (sqrt (/ (/ 1.0 l) h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -4.1e-238) {
tmp = sqrt(((d / l) * (d / h)));
} else {
tmp = d * sqrt(((1.0 / l) / h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-4.1d-238)) then
tmp = sqrt(((d / l) * (d / h)))
else
tmp = d * sqrt(((1.0d0 / l) / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -4.1e-238) {
tmp = Math.sqrt(((d / l) * (d / h)));
} else {
tmp = d * Math.sqrt(((1.0 / l) / h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -4.1e-238: tmp = math.sqrt(((d / l) * (d / h))) else: tmp = d * math.sqrt(((1.0 / l) / h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -4.1e-238) tmp = sqrt(Float64(Float64(d / l) * Float64(d / h))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -4.1e-238) tmp = sqrt(((d / l) * (d / h))); else tmp = d * sqrt(((1.0 / l) / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -4.1e-238], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -4.1 \cdot 10^{-238}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\
\end{array}
\end{array}
if l < -4.1000000000000001e-238Initial program 71.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.0%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.4%
Simplified7.4%
sqrt-divN/A
metadata-evalN/A
div-invN/A
rem-square-sqrtN/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6435.5%
Applied egg-rr35.5%
if -4.1000000000000001e-238 < l Initial program 67.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified70.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6438.8%
Simplified38.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6439.4%
Applied egg-rr39.4%
(FPCore (d h l M D) :precision binary64 (if (<= l -2.1e-236) (sqrt (* (/ d l) (/ d h))) (/ d (sqrt (* l h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -2.1e-236) {
tmp = sqrt(((d / l) * (d / h)));
} else {
tmp = d / sqrt((l * h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-2.1d-236)) then
tmp = sqrt(((d / l) * (d / h)))
else
tmp = d / sqrt((l * h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -2.1e-236) {
tmp = Math.sqrt(((d / l) * (d / h)));
} else {
tmp = d / Math.sqrt((l * h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -2.1e-236: tmp = math.sqrt(((d / l) * (d / h))) else: tmp = d / math.sqrt((l * h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -2.1e-236) tmp = sqrt(Float64(Float64(d / l) * Float64(d / h))); else tmp = Float64(d / sqrt(Float64(l * h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -2.1e-236) tmp = sqrt(((d / l) * (d / h))); else tmp = d / sqrt((l * h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -2.1e-236], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.1 \cdot 10^{-236}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
\end{array}
\end{array}
if l < -2.09999999999999979e-236Initial program 71.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified74.0%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f647.4%
Simplified7.4%
sqrt-divN/A
metadata-evalN/A
div-invN/A
rem-square-sqrtN/A
*-commutativeN/A
sqrt-prodN/A
pow1/2N/A
frac-timesN/A
sqrt-divN/A
pow1/2N/A
sqrt-divN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6435.5%
Applied egg-rr35.5%
if -2.09999999999999979e-236 < l Initial program 67.1%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified70.8%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6438.8%
Simplified38.8%
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6439.3%
Applied egg-rr39.3%
Final simplification37.6%
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
double code(double d, double h, double l, double M, double D) {
return d / sqrt((l * h));
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = d / sqrt((l * h))
end function
public static double code(double d, double h, double l, double M, double D) {
return d / Math.sqrt((l * h));
}
def code(d, h, l, M, D): return d / math.sqrt((l * h))
function code(d, h, l, M, D) return Float64(d / sqrt(Float64(l * h))) end
function tmp = code(d, h, l, M, D) tmp = d / sqrt((l * h)); end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{d}{\sqrt{\ell \cdot h}}
\end{array}
Initial program 69.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
Simplified72.2%
Taylor expanded in d around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6424.9%
Simplified24.9%
sqrt-divN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6425.2%
Applied egg-rr25.2%
Final simplification25.2%
herbie shell --seed 2024125
(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)))))