
(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 29 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 2.0))))
(if (<= d -1.85e-305)
(*
(* (pow (/ d h) (/ 1.0 2.0)) (* (sqrt (- d)) (sqrt (/ -1.0 l))))
(+ 1.0 (* (/ h l) (* (pow t_0 2.0) (/ -1.0 2.0)))))
(if (<= d 3.05e-214)
(fma
(* (sqrt (/ 1.0 (* h l))) (* (* M D) -0.25))
(* (* M D) (/ h (* l (* d 2.0))))
(/ d (sqrt (* h l))))
(*
(/ (/ d (sqrt h)) (sqrt l))
(fma t_0 (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / (d * 2.0);
double tmp;
if (d <= -1.85e-305) {
tmp = (pow((d / h), (1.0 / 2.0)) * (sqrt(-d) * sqrt((-1.0 / l)))) * (1.0 + ((h / l) * (pow(t_0, 2.0) * (-1.0 / 2.0))));
} else if (d <= 3.05e-214) {
tmp = fma((sqrt((1.0 / (h * l))) * ((M * D) * -0.25)), ((M * D) * (h / (l * (d * 2.0)))), (d / sqrt((h * l))));
} else {
tmp = ((d / sqrt(h)) / sqrt(l)) * fma(t_0, ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) / Float64(d * 2.0)) tmp = 0.0 if (d <= -1.85e-305) tmp = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * Float64(sqrt(Float64(-d)) * sqrt(Float64(-1.0 / l)))) * Float64(1.0 + Float64(Float64(h / l) * Float64((t_0 ^ 2.0) * Float64(-1.0 / 2.0))))); elseif (d <= 3.05e-214) tmp = fma(Float64(sqrt(Float64(1.0 / Float64(h * l))) * Float64(Float64(M * D) * -0.25)), Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64(Float64(d / sqrt(h)) / sqrt(l)) * fma(t_0, Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0)); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.85e-305], N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] * N[Sqrt[N[(-1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[t$95$0, 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.05e-214], N[(N[(N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d \cdot 2}\\
\mathbf{if}\;d \leq -1.85 \cdot 10^{-305}:\\
\;\;\;\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{-1}{\ell}}\right)\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({t\_0}^{2} \cdot \frac{-1}{2}\right)\right)\\
\mathbf{elif}\;d \leq 3.05 \cdot 10^{-214}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\left(M \cdot D\right) \cdot -0.25\right), \left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, \frac{d}{\sqrt{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(t\_0, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
\end{array}
\end{array}
if d < -1.84999999999999989e-305Initial program 70.7%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
div-invN/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
neg-mul-1N/A
associate-/r*N/A
metadata-evalN/A
lower-/.f6479.0
Applied egg-rr79.0%
if -1.84999999999999989e-305 < d < 3.05e-214Initial program 33.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr33.4%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr29.3%
Applied egg-rr51.9%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6470.8
Simplified70.8%
if 3.05e-214 < d Initial program 84.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr85.3%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr87.6%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr87.6%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f6492.1
Applied egg-rr92.1%
Final simplification83.6%
(FPCore (d h l M D)
:precision binary64
(if (<=
(*
(+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ -1.0 2.0))))
(* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
-2e-169)
(*
(sqrt (/ (* d d) (* h l)))
(fma (/ (* h (* M D)) (* 2.0 (* d l))) (/ (* (* M D) -0.25) d) 1.0))
(/ (sqrt (/ d l)) (sqrt (/ h d)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= -2e-169) {
tmp = sqrt(((d * d) / (h * l))) * fma(((h * (M * D)) / (2.0 * (d * l))), (((M * D) * -0.25) / d), 1.0);
} else {
tmp = sqrt((d / l)) / sqrt((h / d));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (Float64(Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(-1.0 / 2.0)))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= -2e-169) tmp = Float64(sqrt(Float64(Float64(d * d) / Float64(h * l))) * fma(Float64(Float64(h * Float64(M * D)) / Float64(2.0 * Float64(d * l))), Float64(Float64(Float64(M * D) * -0.25) / d), 1.0)); else tmp = Float64(sqrt(Float64(d / l)) / sqrt(Float64(h / d))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], -2e-169], N[(N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(h * N[(M * D), $MachinePrecision]), $MachinePrecision] / N[(2.0 * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / d), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{-1}{2}\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -2 \cdot 10^{-169}:\\
\;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{h \cdot \left(M \cdot D\right)}{2 \cdot \left(d \cdot \ell\right)}, \frac{\left(M \cdot D\right) \cdot -0.25}{d}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{\ell}}}{\sqrt{\frac{h}{d}}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2.00000000000000004e-169Initial program 90.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr91.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f6458.9
Applied egg-rr58.9%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
Applied egg-rr41.2%
Applied egg-rr58.9%
if -2.00000000000000004e-169 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 58.3%
Taylor expanded in M around 0
Simplified62.3%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity62.3
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
Applied egg-rr63.2%
Final simplification61.3%
(FPCore (d h l M D)
:precision binary64
(if (<=
(*
(+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ -1.0 2.0))))
(* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
-0.002)
(*
(sqrt (/ (* d d) (* h l)))
(fma (* (* M D) (/ h (* l (* d 2.0)))) (* -0.25 (/ (* M D) d)) 1.0))
(/ (sqrt (/ d l)) (sqrt (/ h d)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= -0.002) {
tmp = sqrt(((d * d) / (h * l))) * fma(((M * D) * (h / (l * (d * 2.0)))), (-0.25 * ((M * D) / d)), 1.0);
} else {
tmp = sqrt((d / l)) / sqrt((h / d));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (Float64(Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(-1.0 / 2.0)))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= -0.002) tmp = Float64(sqrt(Float64(Float64(d * d) / Float64(h * l))) * fma(Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), Float64(-0.25 * Float64(Float64(M * D) / d)), 1.0)); else tmp = Float64(sqrt(Float64(d / l)) / sqrt(Float64(h / d))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], -0.002], N[(N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{-1}{2}\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -0.002:\\
\;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \mathsf{fma}\left(\left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, -0.25 \cdot \frac{M \cdot D}{d}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{\ell}}}{\sqrt{\frac{h}{d}}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2e-3Initial program 91.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr92.0%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f6461.5
Applied egg-rr61.5%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6461.5
Applied egg-rr60.6%
if -2e-3 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 59.3%
Taylor expanded in M around 0
Simplified60.3%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity60.3
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
Applied egg-rr61.2%
Final simplification60.9%
(FPCore (d h l M D)
:precision binary64
(if (<=
(*
(+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ -1.0 2.0))))
(* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
-0.002)
(*
(sqrt (/ (* d d) (* h l)))
(fma (* M (* D (* D (* M -0.5)))) (/ h (* l (* (* d d) 4.0))) 1.0))
(/ (sqrt (/ d l)) (sqrt (/ h d)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= -0.002) {
tmp = sqrt(((d * d) / (h * l))) * fma((M * (D * (D * (M * -0.5)))), (h / (l * ((d * d) * 4.0))), 1.0);
} else {
tmp = sqrt((d / l)) / sqrt((h / d));
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (Float64(Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(-1.0 / 2.0)))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= -0.002) tmp = Float64(sqrt(Float64(Float64(d * d) / Float64(h * l))) * fma(Float64(M * Float64(D * Float64(D * Float64(M * -0.5)))), Float64(h / Float64(l * Float64(Float64(d * d) * 4.0))), 1.0)); else tmp = Float64(sqrt(Float64(d / l)) / sqrt(Float64(h / d))); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], -0.002], N[(N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(M * N[(D * N[(D * N[(M * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / N[(l * N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{-1}{2}\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -0.002:\\
\;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \mathsf{fma}\left(M \cdot \left(D \cdot \left(D \cdot \left(M \cdot -0.5\right)\right)\right), \frac{h}{\ell \cdot \left(\left(d \cdot d\right) \cdot 4\right)}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{\ell}}}{\sqrt{\frac{h}{d}}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2e-3Initial program 91.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr92.0%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f6461.5
Applied egg-rr61.5%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
Applied egg-rr43.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
associate-/l*N/A
Applied egg-rr39.2%
if -2e-3 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 59.3%
Taylor expanded in M around 0
Simplified60.3%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity60.3
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
Applied egg-rr61.2%
Final simplification51.9%
(FPCore (d h l M D)
:precision binary64
(if (<=
(*
(+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ -1.0 2.0))))
(* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
-2e-169)
(* d (sqrt (sqrt (* (/ 1.0 l) (/ 1.0 l)))))
(/ (sqrt (/ d l)) (sqrt (/ h d)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= -2e-169) {
tmp = d * sqrt(sqrt(((1.0 / l) * (1.0 / l))));
} else {
tmp = sqrt((d / l)) / sqrt((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 (((1.0d0 + ((h / l) * ((((m * d_1) / (d * 2.0d0)) ** 2.0d0) * ((-1.0d0) / 2.0d0)))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))) <= (-2d-169)) then
tmp = d * sqrt(sqrt(((1.0d0 / l) * (1.0d0 / l))))
else
tmp = sqrt((d / l)) / sqrt((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 (((1.0 + ((h / l) * (Math.pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)))) <= -2e-169) {
tmp = d * Math.sqrt(Math.sqrt(((1.0 / l) * (1.0 / l))));
} else {
tmp = Math.sqrt((d / l)) / Math.sqrt((h / d));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if ((1.0 + ((h / l) * (math.pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))) <= -2e-169: tmp = d * math.sqrt(math.sqrt(((1.0 / l) * (1.0 / l)))) else: tmp = math.sqrt((d / l)) / math.sqrt((h / d)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (Float64(Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(-1.0 / 2.0)))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= -2e-169) tmp = Float64(d * sqrt(sqrt(Float64(Float64(1.0 / l) * Float64(1.0 / l))))); else tmp = Float64(sqrt(Float64(d / l)) / sqrt(Float64(h / d))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (((1.0 + ((h / l) * ((((M * D) / (d * 2.0)) ^ 2.0) * (-1.0 / 2.0)))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)))) <= -2e-169) tmp = d * sqrt(sqrt(((1.0 / l) * (1.0 / l)))); else tmp = sqrt((d / l)) / sqrt((h / d)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], -2e-169], N[(d * N[Sqrt[N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{-1}{2}\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq -2 \cdot 10^{-169}:\\
\;\;\;\;d \cdot \sqrt{\sqrt{\frac{1}{\ell} \cdot \frac{1}{\ell}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{\ell}}}{\sqrt{\frac{h}{d}}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2.00000000000000004e-169Initial program 90.9%
Taylor expanded in M around 0
Simplified0.7%
Taylor expanded in h around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f640.4
Simplified0.4%
lift-/.f640.4
rem-square-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6416.9
Applied egg-rr16.9%
if -2.00000000000000004e-169 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 58.3%
Taylor expanded in M around 0
Simplified62.3%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity62.3
lift-*.f64N/A
*-commutativeN/A
lift-pow.f64N/A
Applied egg-rr63.2%
Final simplification42.8%
(FPCore (d h l M D)
:precision binary64
(if (<=
(*
(+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ -1.0 2.0))))
(* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
0.0)
(* (- d) (sqrt (/ 1.0 (* h l))))
(* (sqrt (/ d l)) (sqrt (/ d h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= 0.0) {
tmp = -d * sqrt((1.0 / (h * l)));
} else {
tmp = sqrt((d / l)) * sqrt((d / 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 (((1.0d0 + ((h / l) * ((((m * d_1) / (d * 2.0d0)) ** 2.0d0) * ((-1.0d0) / 2.0d0)))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))) <= 0.0d0) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else
tmp = sqrt((d / l)) * sqrt((d / h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (Math.pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)))) <= 0.0) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if ((1.0 + ((h / l) * (math.pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))) <= 0.0: tmp = -d * math.sqrt((1.0 / (h * l))) else: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (Float64(Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(-1.0 / 2.0)))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= 0.0) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (((1.0 + ((h / l) * ((((M * D) / (d * 2.0)) ^ 2.0) * (-1.0 / 2.0)))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)))) <= 0.0) tmp = -d * sqrt((1.0 / (h * l))); else tmp = sqrt((d / l)) * sqrt((d / h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], 0.0], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{-1}{2}\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 0:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0Initial program 84.1%
Taylor expanded in M around 0
Simplified3.8%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6415.9
Simplified15.9%
if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 61.6%
Taylor expanded in M around 0
Simplified66.0%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity66.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6466.0
Applied egg-rr66.0%
Final simplification41.1%
(FPCore (d h l M D)
:precision binary64
(if (<=
(*
(+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ -1.0 2.0))))
(* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
0.0)
(* d (sqrt (/ 1.0 (* h l))))
(sqrt (* d (/ d (* h l))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= 0.0) {
tmp = d * sqrt((1.0 / (h * l)));
} else {
tmp = sqrt((d * (d / (h * l))));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (((1.0d0 + ((h / l) * ((((m * d_1) / (d * 2.0d0)) ** 2.0d0) * ((-1.0d0) / 2.0d0)))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))) <= 0.0d0) then
tmp = d * sqrt((1.0d0 / (h * l)))
else
tmp = sqrt((d * (d / (h * l))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (Math.pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)))) <= 0.0) {
tmp = d * Math.sqrt((1.0 / (h * l)));
} else {
tmp = Math.sqrt((d * (d / (h * l))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if ((1.0 + ((h / l) * (math.pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))) <= 0.0: tmp = d * math.sqrt((1.0 / (h * l))) else: tmp = math.sqrt((d * (d / (h * l)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (Float64(Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(-1.0 / 2.0)))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= 0.0) tmp = Float64(d * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = sqrt(Float64(d * Float64(d / Float64(h * l)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (((1.0 + ((h / l) * ((((M * D) / (d * 2.0)) ^ 2.0) * (-1.0 / 2.0)))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)))) <= 0.0) tmp = d * sqrt((1.0 / (h * l))); else tmp = sqrt((d * (d / (h * l)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], 0.0], N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(d * N[(d / N[(h * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{-1}{2}\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 0:\\
\;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0Initial program 84.1%
Taylor expanded in M around 0
Simplified3.8%
Taylor expanded in d around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6415.1
Simplified15.1%
if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 61.6%
Taylor expanded in M around 0
Simplified66.0%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity66.0
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
Applied egg-rr25.9%
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-neg.f64N/A
frac-2negN/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sqrt.f6443.8
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6452.3
Applied egg-rr52.3%
Final simplification33.9%
(FPCore (d h l M D)
:precision binary64
(if (<=
(*
(+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) (/ -1.0 2.0))))
(* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))))
0.0)
(/ d (sqrt (* h l)))
(sqrt (* d (/ d (* h l))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0)))) <= 0.0) {
tmp = d / sqrt((h * l));
} else {
tmp = sqrt((d * (d / (h * l))));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (((1.0d0 + ((h / l) * ((((m * d_1) / (d * 2.0d0)) ** 2.0d0) * ((-1.0d0) / 2.0d0)))) * (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0)))) <= 0.0d0) then
tmp = d / sqrt((h * l))
else
tmp = sqrt((d * (d / (h * l))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (((1.0 + ((h / l) * (Math.pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0)))) <= 0.0) {
tmp = d / Math.sqrt((h * l));
} else {
tmp = Math.sqrt((d * (d / (h * l))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if ((1.0 + ((h / l) * (math.pow(((M * D) / (d * 2.0)), 2.0) * (-1.0 / 2.0)))) * (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0)))) <= 0.0: tmp = d / math.sqrt((h * l)) else: tmp = math.sqrt((d * (d / (h * l)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (Float64(Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * Float64(-1.0 / 2.0)))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0)))) <= 0.0) tmp = Float64(d / sqrt(Float64(h * l))); else tmp = sqrt(Float64(d * Float64(d / Float64(h * l)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (((1.0 + ((h / l) * ((((M * D) / (d * 2.0)) ^ 2.0) * (-1.0 / 2.0)))) * (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0)))) <= 0.0) tmp = d / sqrt((h * l)); else tmp = sqrt((d * (d / (h * l)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], 0.0], N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(d * N[(d / N[(h * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot \frac{-1}{2}\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \leq 0:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0Initial program 84.1%
Taylor expanded in M around 0
Simplified3.8%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity3.8
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
Applied egg-rr4.4%
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-neg.f64N/A
frac-2negN/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
lower-/.f64N/A
lower-sqrt.f6415.1
Applied egg-rr15.1%
if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) Initial program 61.6%
Taylor expanded in M around 0
Simplified66.0%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity66.0
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
Applied egg-rr25.9%
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-neg.f64N/A
frac-2negN/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sqrt.f6443.8
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6452.3
Applied egg-rr52.3%
Final simplification33.9%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* M D) (* d 2.0))))
(if (<= d -1.85e-305)
(*
(+ 1.0 (* (/ h l) (* (pow t_0 2.0) (/ -1.0 2.0))))
(* (pow (/ d h) (/ 1.0 2.0)) (/ (sqrt (- d)) (sqrt (- l)))))
(if (<= d 3.05e-214)
(fma
(* (sqrt (/ 1.0 (* h l))) (* (* M D) -0.25))
(* (* M D) (/ h (* l (* d 2.0))))
(/ d (sqrt (* h l))))
(*
(/ (/ d (sqrt h)) (sqrt l))
(fma t_0 (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / (d * 2.0);
double tmp;
if (d <= -1.85e-305) {
tmp = (1.0 + ((h / l) * (pow(t_0, 2.0) * (-1.0 / 2.0)))) * (pow((d / h), (1.0 / 2.0)) * (sqrt(-d) / sqrt(-l)));
} else if (d <= 3.05e-214) {
tmp = fma((sqrt((1.0 / (h * l))) * ((M * D) * -0.25)), ((M * D) * (h / (l * (d * 2.0)))), (d / sqrt((h * l))));
} else {
tmp = ((d / sqrt(h)) / sqrt(l)) * fma(t_0, ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) / Float64(d * 2.0)) tmp = 0.0 if (d <= -1.85e-305) tmp = Float64(Float64(1.0 + Float64(Float64(h / l) * Float64((t_0 ^ 2.0) * Float64(-1.0 / 2.0)))) * Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))))); elseif (d <= 3.05e-214) tmp = fma(Float64(sqrt(Float64(1.0 / Float64(h * l))) * Float64(Float64(M * D) * -0.25)), Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64(Float64(d / sqrt(h)) / sqrt(l)) * fma(t_0, Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0)); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.85e-305], N[(N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[t$95$0, 2.0], $MachinePrecision] * N[(-1.0 / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.05e-214], N[(N[(N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d \cdot 2}\\
\mathbf{if}\;d \leq -1.85 \cdot 10^{-305}:\\
\;\;\;\;\left(1 + \frac{h}{\ell} \cdot \left({t\_0}^{2} \cdot \frac{-1}{2}\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right)\\
\mathbf{elif}\;d \leq 3.05 \cdot 10^{-214}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\left(M \cdot D\right) \cdot -0.25\right), \left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, \frac{d}{\sqrt{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(t\_0, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
\end{array}
\end{array}
if d < -1.84999999999999989e-305Initial program 70.7%
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6479.0
Applied egg-rr79.0%
if -1.84999999999999989e-305 < d < 3.05e-214Initial program 33.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr33.4%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr29.3%
Applied egg-rr51.9%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6470.8
Simplified70.8%
if 3.05e-214 < d Initial program 84.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr85.3%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr87.6%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr87.6%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f6492.1
Applied egg-rr92.1%
Final simplification83.5%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(fma (/ (* M D) (* d 2.0)) (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0)))
(if (<= d -1.85e-305)
(* t_0 (/ (/ (sqrt (- d)) (sqrt (- l))) (sqrt (/ h d))))
(if (<= d 3.05e-214)
(fma
(* (sqrt (/ 1.0 (* h l))) (* (* M D) -0.25))
(* (* M D) (/ h (* l (* d 2.0))))
(/ d (sqrt (* h l))))
(* (/ (/ d (sqrt h)) (sqrt l)) t_0)))))
double code(double d, double h, double l, double M, double D) {
double t_0 = fma(((M * D) / (d * 2.0)), ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
double tmp;
if (d <= -1.85e-305) {
tmp = t_0 * ((sqrt(-d) / sqrt(-l)) / sqrt((h / d)));
} else if (d <= 3.05e-214) {
tmp = fma((sqrt((1.0 / (h * l))) * ((M * D) * -0.25)), ((M * D) * (h / (l * (d * 2.0)))), (d / sqrt((h * l))));
} else {
tmp = ((d / sqrt(h)) / sqrt(l)) * t_0;
}
return tmp;
}
function code(d, h, l, M, D) t_0 = fma(Float64(Float64(M * D) / Float64(d * 2.0)), Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0) tmp = 0.0 if (d <= -1.85e-305) tmp = Float64(t_0 * Float64(Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))) / sqrt(Float64(h / d)))); elseif (d <= 3.05e-214) tmp = fma(Float64(sqrt(Float64(1.0 / Float64(h * l))) * Float64(Float64(M * D) * -0.25)), Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64(Float64(d / sqrt(h)) / sqrt(l)) * t_0); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[d, -1.85e-305], N[(t$95$0 * N[(N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.05e-214], N[(N[(N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\frac{M \cdot D}{d \cdot 2}, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
\mathbf{if}\;d \leq -1.85 \cdot 10^{-305}:\\
\;\;\;\;t\_0 \cdot \frac{\frac{\sqrt{-d}}{\sqrt{-\ell}}}{\sqrt{\frac{h}{d}}}\\
\mathbf{elif}\;d \leq 3.05 \cdot 10^{-214}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\left(M \cdot D\right) \cdot -0.25\right), \left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, \frac{d}{\sqrt{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot t\_0\\
\end{array}
\end{array}
if d < -1.84999999999999989e-305Initial program 70.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr70.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr70.7%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr70.7%
frac-2negN/A
sqrt-divN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-neg.f64N/A
lower-sqrt.f64N/A
lower-neg.f6479.0
Applied egg-rr79.0%
if -1.84999999999999989e-305 < d < 3.05e-214Initial program 33.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr33.4%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr29.3%
Applied egg-rr51.9%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6470.8
Simplified70.8%
if 3.05e-214 < d Initial program 84.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr85.3%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr87.6%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr87.6%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f6492.1
Applied egg-rr92.1%
Final simplification83.5%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (* h l)))
(t_1 (/ (* M D) (* d 2.0)))
(t_2 (fma t_1 (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0)))
(if (<= d -4.2e-80)
(* t_2 (* (sqrt (/ d l)) (sqrt (/ d h))))
(if (<= d -1.85e-305)
(* (/ -1.0 (/ t_0 d)) (fma (* t_1 -0.5) (* (/ h l) t_1) 1.0))
(if (<= d 3.05e-214)
(fma
(* (sqrt (/ 1.0 (* h l))) (* (* M D) -0.25))
(* (* M D) (/ h (* l (* d 2.0))))
(/ d t_0))
(* (/ (/ d (sqrt h)) (sqrt l)) t_2))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((h * l));
double t_1 = (M * D) / (d * 2.0);
double t_2 = fma(t_1, ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
double tmp;
if (d <= -4.2e-80) {
tmp = t_2 * (sqrt((d / l)) * sqrt((d / h)));
} else if (d <= -1.85e-305) {
tmp = (-1.0 / (t_0 / d)) * fma((t_1 * -0.5), ((h / l) * t_1), 1.0);
} else if (d <= 3.05e-214) {
tmp = fma((sqrt((1.0 / (h * l))) * ((M * D) * -0.25)), ((M * D) * (h / (l * (d * 2.0)))), (d / t_0));
} else {
tmp = ((d / sqrt(h)) / sqrt(l)) * t_2;
}
return tmp;
}
function code(d, h, l, M, D) t_0 = sqrt(Float64(h * l)) t_1 = Float64(Float64(M * D) / Float64(d * 2.0)) t_2 = fma(t_1, Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0) tmp = 0.0 if (d <= -4.2e-80) tmp = Float64(t_2 * Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)))); elseif (d <= -1.85e-305) tmp = Float64(Float64(-1.0 / Float64(t_0 / d)) * fma(Float64(t_1 * -0.5), Float64(Float64(h / l) * t_1), 1.0)); elseif (d <= 3.05e-214) tmp = fma(Float64(sqrt(Float64(1.0 / Float64(h * l))) * Float64(Float64(M * D) * -0.25)), Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), Float64(d / t_0)); else tmp = Float64(Float64(Float64(d / sqrt(h)) / sqrt(l)) * t_2); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[d, -4.2e-80], N[(t$95$2 * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1.85e-305], N[(N[(-1.0 / N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * -0.5), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * t$95$1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.05e-214], N[(N[(N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(d / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{h \cdot \ell}\\
t_1 := \frac{M \cdot D}{d \cdot 2}\\
t_2 := \mathsf{fma}\left(t\_1, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
\mathbf{if}\;d \leq -4.2 \cdot 10^{-80}:\\
\;\;\;\;t\_2 \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)\\
\mathbf{elif}\;d \leq -1.85 \cdot 10^{-305}:\\
\;\;\;\;\frac{-1}{\frac{t\_0}{d}} \cdot \mathsf{fma}\left(t\_1 \cdot -0.5, \frac{h}{\ell} \cdot t\_1, 1\right)\\
\mathbf{elif}\;d \leq 3.05 \cdot 10^{-214}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\left(M \cdot D\right) \cdot -0.25\right), \left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, \frac{d}{t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot t\_2\\
\end{array}
\end{array}
if d < -4.20000000000000003e-80Initial program 82.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr82.3%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr82.2%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr82.2%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
lift-sqrt.f64N/A
div-invN/A
lower-*.f64N/A
metadata-evalN/A
lift-sqrt.f64N/A
sqrt-divN/A
lift-/.f64N/A
clear-numN/A
lower-sqrt.f64N/A
lower-/.f6482.3
Applied egg-rr82.3%
if -4.20000000000000003e-80 < d < -1.84999999999999989e-305Initial program 48.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr48.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
frac-timesN/A
metadata-evalN/A
sqrt-divN/A
metadata-evalN/A
lower-/.f64N/A
Applied egg-rr33.0%
Taylor expanded in d around -inf
mul-1-negN/A
associate-*l/N/A
*-lft-identityN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6468.9
Simplified68.9%
if -1.84999999999999989e-305 < d < 3.05e-214Initial program 33.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr33.4%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr29.3%
Applied egg-rr51.9%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6470.8
Simplified70.8%
if 3.05e-214 < d Initial program 84.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr85.3%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr87.6%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr87.6%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f6492.1
Applied egg-rr92.1%
Final simplification82.9%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (* M D) (* d 2.0))) (t_1 (sqrt (/ 1.0 (* h l)))))
(if (<= d -1.85e-305)
(* (fma t_0 (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0) (* (- d) t_1))
(if (<= d 7.8e-212)
(fma
(* t_1 (* (* M D) -0.25))
(* (* M D) (/ h (* l (* d 2.0))))
(/ d (sqrt (* h l))))
(if (<= d 1e+152)
(*
(/ (/ d (sqrt h)) (sqrt l))
(fma
(/ (* (* M D) (* (* M D) -0.5)) (* (* d 2.0) (* d 2.0)))
(/ h l)
1.0))
(* (fma (* t_0 -0.5) (* (/ h l) t_0) 1.0) (* d t_1)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (M * D) / (d * 2.0);
double t_1 = sqrt((1.0 / (h * l)));
double tmp;
if (d <= -1.85e-305) {
tmp = fma(t_0, ((h / l) * (-0.25 * ((M * D) / d))), 1.0) * (-d * t_1);
} else if (d <= 7.8e-212) {
tmp = fma((t_1 * ((M * D) * -0.25)), ((M * D) * (h / (l * (d * 2.0)))), (d / sqrt((h * l))));
} else if (d <= 1e+152) {
tmp = ((d / sqrt(h)) / sqrt(l)) * fma((((M * D) * ((M * D) * -0.5)) / ((d * 2.0) * (d * 2.0))), (h / l), 1.0);
} else {
tmp = fma((t_0 * -0.5), ((h / l) * t_0), 1.0) * (d * t_1);
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(Float64(M * D) / Float64(d * 2.0)) t_1 = sqrt(Float64(1.0 / Float64(h * l))) tmp = 0.0 if (d <= -1.85e-305) tmp = Float64(fma(t_0, Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0) * Float64(Float64(-d) * t_1)); elseif (d <= 7.8e-212) tmp = fma(Float64(t_1 * Float64(Float64(M * D) * -0.25)), Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), Float64(d / sqrt(Float64(h * l)))); elseif (d <= 1e+152) tmp = Float64(Float64(Float64(d / sqrt(h)) / sqrt(l)) * fma(Float64(Float64(Float64(M * D) * Float64(Float64(M * D) * -0.5)) / Float64(Float64(d * 2.0) * Float64(d * 2.0))), Float64(h / l), 1.0)); else tmp = Float64(fma(Float64(t_0 * -0.5), Float64(Float64(h / l) * t_0), 1.0) * Float64(d * t_1)); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.85e-305], N[(N[(t$95$0 * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7.8e-212], N[(N[(t$95$1 * N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1e+152], N[(N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(M * D), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] / N[(N[(d * 2.0), $MachinePrecision] * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$0 * -0.5), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * t$95$0), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d \cdot 2}\\
t_1 := \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;d \leq -1.85 \cdot 10^{-305}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right) \cdot \left(\left(-d\right) \cdot t\_1\right)\\
\mathbf{elif}\;d \leq 7.8 \cdot 10^{-212}:\\
\;\;\;\;\mathsf{fma}\left(t\_1 \cdot \left(\left(M \cdot D\right) \cdot -0.25\right), \left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, \frac{d}{\sqrt{h \cdot \ell}}\right)\\
\mathbf{elif}\;d \leq 10^{+152}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \mathsf{fma}\left(\frac{\left(M \cdot D\right) \cdot \left(\left(M \cdot D\right) \cdot -0.5\right)}{\left(d \cdot 2\right) \cdot \left(d \cdot 2\right)}, \frac{h}{\ell}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0 \cdot -0.5, \frac{h}{\ell} \cdot t\_0, 1\right) \cdot \left(d \cdot t\_1\right)\\
\end{array}
\end{array}
if d < -1.84999999999999989e-305Initial program 70.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr70.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr70.7%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr70.7%
Taylor expanded in d around -inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6472.4
Simplified72.4%
if -1.84999999999999989e-305 < d < 7.8e-212Initial program 33.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr33.4%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr29.3%
Applied egg-rr51.9%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6470.8
Simplified70.8%
if 7.8e-212 < d < 1e152Initial program 84.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr85.4%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f6464.1
Applied egg-rr64.1%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
Applied egg-rr62.7%
lift-*.f64N/A
associate-/r*N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f6485.8
Applied egg-rr85.8%
if 1e152 < d Initial program 85.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr85.2%
Taylor expanded in d around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6488.6
Simplified88.6%
Final simplification78.0%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(fma (/ (* M D) (* d 2.0)) (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0))
(t_1 (sqrt (/ 1.0 (* h l)))))
(if (<= d -1.85e-305)
(* t_0 (* (- d) t_1))
(if (<= d 3.05e-214)
(fma
(* t_1 (* (* M D) -0.25))
(* (* M D) (/ h (* l (* d 2.0))))
(/ d (sqrt (* h l))))
(* (/ (/ d (sqrt h)) (sqrt l)) t_0)))))
double code(double d, double h, double l, double M, double D) {
double t_0 = fma(((M * D) / (d * 2.0)), ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
double t_1 = sqrt((1.0 / (h * l)));
double tmp;
if (d <= -1.85e-305) {
tmp = t_0 * (-d * t_1);
} else if (d <= 3.05e-214) {
tmp = fma((t_1 * ((M * D) * -0.25)), ((M * D) * (h / (l * (d * 2.0)))), (d / sqrt((h * l))));
} else {
tmp = ((d / sqrt(h)) / sqrt(l)) * t_0;
}
return tmp;
}
function code(d, h, l, M, D) t_0 = fma(Float64(Float64(M * D) / Float64(d * 2.0)), Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0) t_1 = sqrt(Float64(1.0 / Float64(h * l))) tmp = 0.0 if (d <= -1.85e-305) tmp = Float64(t_0 * Float64(Float64(-d) * t_1)); elseif (d <= 3.05e-214) tmp = fma(Float64(t_1 * Float64(Float64(M * D) * -0.25)), Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), Float64(d / sqrt(Float64(h * l)))); else tmp = Float64(Float64(Float64(d / sqrt(h)) / sqrt(l)) * t_0); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.85e-305], N[(t$95$0 * N[((-d) * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.05e-214], N[(N[(t$95$1 * N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\frac{M \cdot D}{d \cdot 2}, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
t_1 := \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;d \leq -1.85 \cdot 10^{-305}:\\
\;\;\;\;t\_0 \cdot \left(\left(-d\right) \cdot t\_1\right)\\
\mathbf{elif}\;d \leq 3.05 \cdot 10^{-214}:\\
\;\;\;\;\mathsf{fma}\left(t\_1 \cdot \left(\left(M \cdot D\right) \cdot -0.25\right), \left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, \frac{d}{\sqrt{h \cdot \ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot t\_0\\
\end{array}
\end{array}
if d < -1.84999999999999989e-305Initial program 70.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr70.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr70.7%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr70.7%
Taylor expanded in d around -inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6472.4
Simplified72.4%
if -1.84999999999999989e-305 < d < 3.05e-214Initial program 33.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr33.4%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr29.3%
Applied egg-rr51.9%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6470.8
Simplified70.8%
if 3.05e-214 < d Initial program 84.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr85.3%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr87.6%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr87.6%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
sqrt-divN/A
lift-sqrt.f64N/A
lower-/.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
pow1/2N/A
lower-/.f64N/A
pow1/2N/A
lower-sqrt.f6492.1
Applied egg-rr92.1%
Final simplification80.3%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ d (sqrt (* h l))))
(t_1
(fma (/ (* M D) (* d 2.0)) (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0))
(t_2 (sqrt (/ 1.0 (* h l)))))
(if (<= l -2e-310)
(* t_1 (* (- d) t_2))
(if (<= l 2.3e+35)
(* t_0 t_1)
(fma
(* t_2 (* (* M D) -0.25))
(* (* M D) (/ h (* l (* d 2.0))))
t_0)))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d / sqrt((h * l));
double t_1 = fma(((M * D) / (d * 2.0)), ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
double t_2 = sqrt((1.0 / (h * l)));
double tmp;
if (l <= -2e-310) {
tmp = t_1 * (-d * t_2);
} else if (l <= 2.3e+35) {
tmp = t_0 * t_1;
} else {
tmp = fma((t_2 * ((M * D) * -0.25)), ((M * D) * (h / (l * (d * 2.0)))), t_0);
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(d / sqrt(Float64(h * l))) t_1 = fma(Float64(Float64(M * D) / Float64(d * 2.0)), Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0) t_2 = sqrt(Float64(1.0 / Float64(h * l))) tmp = 0.0 if (l <= -2e-310) tmp = Float64(t_1 * Float64(Float64(-d) * t_2)); elseif (l <= 2.3e+35) tmp = Float64(t_0 * t_1); else tmp = fma(Float64(t_2 * Float64(Float64(M * D) * -0.25)), Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), t_0); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -2e-310], N[(t$95$1 * N[((-d) * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.3e+35], N[(t$95$0 * t$95$1), $MachinePrecision], N[(N[(t$95$2 * N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{d}{\sqrt{h \cdot \ell}}\\
t_1 := \mathsf{fma}\left(\frac{M \cdot D}{d \cdot 2}, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
t_2 := \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot \left(\left(-d\right) \cdot t\_2\right)\\
\mathbf{elif}\;\ell \leq 2.3 \cdot 10^{+35}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_2 \cdot \left(\left(M \cdot D\right) \cdot -0.25\right), \left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, t\_0\right)\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 69.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr69.7%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr69.6%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr69.6%
Taylor expanded in d around -inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6471.3
Simplified71.3%
if -1.999999999999994e-310 < l < 2.2999999999999998e35Initial program 80.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr81.9%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr81.6%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr81.6%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-/.f6485.2
Applied egg-rr85.2%
if 2.2999999999999998e35 < l Initial program 68.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr68.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr72.1%
Applied egg-rr65.0%
Taylor expanded in d around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6474.3
Simplified74.3%
Final simplification76.1%
(FPCore (d h l M D)
:precision binary64
(if (<= d -3.4e+146)
(* (- d) (sqrt (/ 1.0 (* h l))))
(if (<= d -2.2e-162)
(*
(sqrt (/ (* d d) (* h l)))
(fma (/ (* h (* M D)) (* 2.0 (* d l))) (/ (* (* M D) -0.25) d) 1.0))
(if (<= d -2e-310)
(* d (sqrt (sqrt (* (/ 1.0 l) (/ 1.0 l)))))
(*
(/ d (sqrt (* h l)))
(fma
(/ (* M D) (* d 2.0))
(* (/ h l) (* -0.25 (/ (* M D) d)))
1.0))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -3.4e+146) {
tmp = -d * sqrt((1.0 / (h * l)));
} else if (d <= -2.2e-162) {
tmp = sqrt(((d * d) / (h * l))) * fma(((h * (M * D)) / (2.0 * (d * l))), (((M * D) * -0.25) / d), 1.0);
} else if (d <= -2e-310) {
tmp = d * sqrt(sqrt(((1.0 / l) * (1.0 / l))));
} else {
tmp = (d / sqrt((h * l))) * fma(((M * D) / (d * 2.0)), ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (d <= -3.4e+146) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (d <= -2.2e-162) tmp = Float64(sqrt(Float64(Float64(d * d) / Float64(h * l))) * fma(Float64(Float64(h * Float64(M * D)) / Float64(2.0 * Float64(d * l))), Float64(Float64(Float64(M * D) * -0.25) / d), 1.0)); elseif (d <= -2e-310) tmp = Float64(d * sqrt(sqrt(Float64(Float64(1.0 / l) * Float64(1.0 / l))))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * fma(Float64(Float64(M * D) / Float64(d * 2.0)), Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0)); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -3.4e+146], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.2e-162], N[(N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(h * N[(M * D), $MachinePrecision]), $MachinePrecision] / N[(2.0 * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] / d), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2e-310], N[(d * N[Sqrt[N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -3.4 \cdot 10^{+146}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;d \leq -2.2 \cdot 10^{-162}:\\
\;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{h \cdot \left(M \cdot D\right)}{2 \cdot \left(d \cdot \ell\right)}, \frac{\left(M \cdot D\right) \cdot -0.25}{d}, 1\right)\\
\mathbf{elif}\;d \leq -2 \cdot 10^{-310}:\\
\;\;\;\;d \cdot \sqrt{\sqrt{\frac{1}{\ell} \cdot \frac{1}{\ell}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{M \cdot D}{d \cdot 2}, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
\end{array}
\end{array}
if d < -3.39999999999999991e146Initial program 79.9%
Taylor expanded in M around 0
Simplified51.0%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6464.8
Simplified64.8%
if -3.39999999999999991e146 < d < -2.1999999999999999e-162Initial program 75.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr75.6%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f6461.9
Applied egg-rr61.9%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
Applied egg-rr58.9%
Applied egg-rr66.5%
if -2.1999999999999999e-162 < d < -1.999999999999994e-310Initial program 45.9%
Taylor expanded in M around 0
Simplified11.5%
Taylor expanded in h around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f640.0
Simplified0.0%
lift-/.f640.0
rem-square-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6425.0
Applied egg-rr25.0%
if -1.999999999999994e-310 < d Initial program 76.0%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr76.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr77.9%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr77.9%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-/.f6476.5
Applied egg-rr76.5%
Final simplification66.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ d (sqrt (* h l))))
(t_1
(fma (/ (* M D) (* d 2.0)) (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0)))
(if (<= l -2e-310)
(* t_1 (* (- d) (sqrt (/ 1.0 (* h l)))))
(if (<= l 1.75e+141)
(* t_0 t_1)
(fma
(* (* (* M D) -0.25) (sqrt (/ 1.0 l)))
(* (* M D) (/ h (* l (* d 2.0))))
t_0)))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d / sqrt((h * l));
double t_1 = fma(((M * D) / (d * 2.0)), ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
double tmp;
if (l <= -2e-310) {
tmp = t_1 * (-d * sqrt((1.0 / (h * l))));
} else if (l <= 1.75e+141) {
tmp = t_0 * t_1;
} else {
tmp = fma((((M * D) * -0.25) * sqrt((1.0 / l))), ((M * D) * (h / (l * (d * 2.0)))), t_0);
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(d / sqrt(Float64(h * l))) t_1 = fma(Float64(Float64(M * D) / Float64(d * 2.0)), Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0) tmp = 0.0 if (l <= -2e-310) tmp = Float64(t_1 * Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))))); elseif (l <= 1.75e+141) tmp = Float64(t_0 * t_1); else tmp = fma(Float64(Float64(Float64(M * D) * -0.25) * sqrt(Float64(1.0 / l))), Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), t_0); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[l, -2e-310], N[(t$95$1 * N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.75e+141], N[(t$95$0 * t$95$1), $MachinePrecision], N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] * N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{d}{\sqrt{h \cdot \ell}}\\
t_1 := \mathsf{fma}\left(\frac{M \cdot D}{d \cdot 2}, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t\_1 \cdot \left(\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
\mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+141}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(M \cdot D\right) \cdot -0.25\right) \cdot \sqrt{\frac{1}{\ell}}, \left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, t\_0\right)\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 69.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr69.7%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr69.6%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr69.6%
Taylor expanded in d around -inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6471.3
Simplified71.3%
if -1.999999999999994e-310 < l < 1.75e141Initial program 79.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr80.2%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr80.7%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr80.7%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-/.f6484.4
Applied egg-rr84.4%
if 1.75e141 < l Initial program 68.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr68.4%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr70.8%
Applied egg-rr57.1%
Taylor expanded in h around inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6468.1
Simplified68.1%
Final simplification75.5%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ d (sqrt (* h l)))))
(if (<= l -2.1e-301)
(*
(* d (sqrt (/ 1.0 (* h l))))
(+ -1.0 (/ (/ (* (* M (* D (* M D))) (* h 0.5)) (* (* d d) 4.0)) l)))
(if (<= l 1.75e+141)
(*
t_0
(fma (/ (* M D) (* d 2.0)) (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0))
(fma
(* (* (* M D) -0.25) (sqrt (/ 1.0 l)))
(* (* M D) (/ h (* l (* d 2.0))))
t_0)))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d / sqrt((h * l));
double tmp;
if (l <= -2.1e-301) {
tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((((M * (D * (M * D))) * (h * 0.5)) / ((d * d) * 4.0)) / l));
} else if (l <= 1.75e+141) {
tmp = t_0 * fma(((M * D) / (d * 2.0)), ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
} else {
tmp = fma((((M * D) * -0.25) * sqrt((1.0 / l))), ((M * D) * (h / (l * (d * 2.0)))), t_0);
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(d / sqrt(Float64(h * l))) tmp = 0.0 if (l <= -2.1e-301) tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(Float64(Float64(M * Float64(D * Float64(M * D))) * Float64(h * 0.5)) / Float64(Float64(d * d) * 4.0)) / l))); elseif (l <= 1.75e+141) tmp = Float64(t_0 * fma(Float64(Float64(M * D) / Float64(d * 2.0)), Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0)); else tmp = fma(Float64(Float64(Float64(M * D) * -0.25) * sqrt(Float64(1.0 / l))), Float64(Float64(M * D) * Float64(h / Float64(l * Float64(d * 2.0)))), t_0); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2.1e-301], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(N[(N[(M * N[(D * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.75e+141], N[(t$95$0 * N[(N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(M * D), $MachinePrecision] * -0.25), $MachinePrecision] * N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * N[(h / N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{d}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;\ell \leq -2.1 \cdot 10^{-301}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \frac{\frac{\left(M \cdot \left(D \cdot \left(M \cdot D\right)\right)\right) \cdot \left(h \cdot 0.5\right)}{\left(d \cdot d\right) \cdot 4}}{\ell}\right)\\
\mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+141}:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(\frac{M \cdot D}{d \cdot 2}, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(\left(M \cdot D\right) \cdot -0.25\right) \cdot \sqrt{\frac{1}{\ell}}, \left(M \cdot D\right) \cdot \frac{h}{\ell \cdot \left(d \cdot 2\right)}, t\_0\right)\\
\end{array}
\end{array}
if l < -2.0999999999999999e-301Initial program 69.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6469.1
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied egg-rr59.4%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6464.4
Simplified64.4%
if -2.0999999999999999e-301 < l < 1.75e141Initial program 79.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr80.6%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr81.2%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr81.2%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-/.f6482.6
Applied egg-rr82.6%
if 1.75e141 < l Initial program 68.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr68.4%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr70.8%
Applied egg-rr57.1%
Taylor expanded in h around inf
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6468.1
Simplified68.1%
Final simplification71.5%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (* h l)))))
(if (<= d -3.4e+146)
(* (- d) t_0)
(if (<= d -1.6e-162)
(*
(sqrt (/ (* d d) (* h l)))
(fma
-0.5
(/ (* (* h (* M D)) (* (* M D) 0.5)) (* d (* d (* 2.0 l))))
1.0))
(if (<= d 2.4e-261)
(* d t_0)
(/
(*
d
(fma
-0.5
(/ (* (* M D) (* M (* h D))) (* (* d 2.0) (* l (* d 2.0))))
1.0))
(sqrt (* h l))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((1.0 / (h * l)));
double tmp;
if (d <= -3.4e+146) {
tmp = -d * t_0;
} else if (d <= -1.6e-162) {
tmp = sqrt(((d * d) / (h * l))) * fma(-0.5, (((h * (M * D)) * ((M * D) * 0.5)) / (d * (d * (2.0 * l)))), 1.0);
} else if (d <= 2.4e-261) {
tmp = d * t_0;
} else {
tmp = (d * fma(-0.5, (((M * D) * (M * (h * D))) / ((d * 2.0) * (l * (d * 2.0)))), 1.0)) / sqrt((h * l));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = sqrt(Float64(1.0 / Float64(h * l))) tmp = 0.0 if (d <= -3.4e+146) tmp = Float64(Float64(-d) * t_0); elseif (d <= -1.6e-162) tmp = Float64(sqrt(Float64(Float64(d * d) / Float64(h * l))) * fma(-0.5, Float64(Float64(Float64(h * Float64(M * D)) * Float64(Float64(M * D) * 0.5)) / Float64(d * Float64(d * Float64(2.0 * l)))), 1.0)); elseif (d <= 2.4e-261) tmp = Float64(d * t_0); else tmp = Float64(Float64(d * fma(-0.5, Float64(Float64(Float64(M * D) * Float64(M * Float64(h * D))) / Float64(Float64(d * 2.0) * Float64(l * Float64(d * 2.0)))), 1.0)) / sqrt(Float64(h * l))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -3.4e+146], N[((-d) * t$95$0), $MachinePrecision], If[LessEqual[d, -1.6e-162], N[(N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.5 * N[(N[(N[(h * N[(M * D), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.4e-261], N[(d * t$95$0), $MachinePrecision], N[(N[(d * N[(-0.5 * N[(N[(N[(M * D), $MachinePrecision] * N[(M * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(d * 2.0), $MachinePrecision] * N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;d \leq -3.4 \cdot 10^{+146}:\\
\;\;\;\;\left(-d\right) \cdot t\_0\\
\mathbf{elif}\;d \leq -1.6 \cdot 10^{-162}:\\
\;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \mathsf{fma}\left(-0.5, \frac{\left(h \cdot \left(M \cdot D\right)\right) \cdot \left(\left(M \cdot D\right) \cdot 0.5\right)}{d \cdot \left(d \cdot \left(2 \cdot \ell\right)\right)}, 1\right)\\
\mathbf{elif}\;d \leq 2.4 \cdot 10^{-261}:\\
\;\;\;\;d \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{d \cdot \mathsf{fma}\left(-0.5, \frac{\left(M \cdot D\right) \cdot \left(M \cdot \left(h \cdot D\right)\right)}{\left(d \cdot 2\right) \cdot \left(\ell \cdot \left(d \cdot 2\right)\right)}, 1\right)}{\sqrt{h \cdot \ell}}\\
\end{array}
\end{array}
if d < -3.39999999999999991e146Initial program 79.9%
Taylor expanded in M around 0
Simplified51.0%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6464.8
Simplified64.8%
if -3.39999999999999991e146 < d < -1.59999999999999988e-162Initial program 75.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr75.6%
Applied egg-rr61.9%
if -1.59999999999999988e-162 < d < 2.40000000000000014e-261Initial program 44.4%
Taylor expanded in M around 0
Simplified12.9%
Taylor expanded in d around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6426.6
Simplified26.6%
if 2.40000000000000014e-261 < d Initial program 77.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr78.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr79.9%
Applied egg-rr67.5%
Final simplification59.8%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (* h l)))))
(if (<= d -3.4e+146)
(* (- d) t_0)
(if (<= d -1.6e-162)
(*
(sqrt (/ (* d d) (* h l)))
(+ 1.0 (/ (* (* h (* M D)) (* D (* M -0.5))) (* l (* (* d d) 4.0)))))
(if (<= d 2.4e-261)
(* d t_0)
(/
(*
d
(fma
-0.5
(/ (* (* M D) (* M (* h D))) (* (* d 2.0) (* l (* d 2.0))))
1.0))
(sqrt (* h l))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((1.0 / (h * l)));
double tmp;
if (d <= -3.4e+146) {
tmp = -d * t_0;
} else if (d <= -1.6e-162) {
tmp = sqrt(((d * d) / (h * l))) * (1.0 + (((h * (M * D)) * (D * (M * -0.5))) / (l * ((d * d) * 4.0))));
} else if (d <= 2.4e-261) {
tmp = d * t_0;
} else {
tmp = (d * fma(-0.5, (((M * D) * (M * (h * D))) / ((d * 2.0) * (l * (d * 2.0)))), 1.0)) / sqrt((h * l));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = sqrt(Float64(1.0 / Float64(h * l))) tmp = 0.0 if (d <= -3.4e+146) tmp = Float64(Float64(-d) * t_0); elseif (d <= -1.6e-162) tmp = Float64(sqrt(Float64(Float64(d * d) / Float64(h * l))) * Float64(1.0 + Float64(Float64(Float64(h * Float64(M * D)) * Float64(D * Float64(M * -0.5))) / Float64(l * Float64(Float64(d * d) * 4.0))))); elseif (d <= 2.4e-261) tmp = Float64(d * t_0); else tmp = Float64(Float64(d * fma(-0.5, Float64(Float64(Float64(M * D) * Float64(M * Float64(h * D))) / Float64(Float64(d * 2.0) * Float64(l * Float64(d * 2.0)))), 1.0)) / sqrt(Float64(h * l))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -3.4e+146], N[((-d) * t$95$0), $MachinePrecision], If[LessEqual[d, -1.6e-162], N[(N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(N[(h * N[(M * D), $MachinePrecision]), $MachinePrecision] * N[(D * N[(M * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.4e-261], N[(d * t$95$0), $MachinePrecision], N[(N[(d * N[(-0.5 * N[(N[(N[(M * D), $MachinePrecision] * N[(M * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(d * 2.0), $MachinePrecision] * N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;d \leq -3.4 \cdot 10^{+146}:\\
\;\;\;\;\left(-d\right) \cdot t\_0\\
\mathbf{elif}\;d \leq -1.6 \cdot 10^{-162}:\\
\;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \left(1 + \frac{\left(h \cdot \left(M \cdot D\right)\right) \cdot \left(D \cdot \left(M \cdot -0.5\right)\right)}{\ell \cdot \left(\left(d \cdot d\right) \cdot 4\right)}\right)\\
\mathbf{elif}\;d \leq 2.4 \cdot 10^{-261}:\\
\;\;\;\;d \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{d \cdot \mathsf{fma}\left(-0.5, \frac{\left(M \cdot D\right) \cdot \left(M \cdot \left(h \cdot D\right)\right)}{\left(d \cdot 2\right) \cdot \left(\ell \cdot \left(d \cdot 2\right)\right)}, 1\right)}{\sqrt{h \cdot \ell}}\\
\end{array}
\end{array}
if d < -3.39999999999999991e146Initial program 79.9%
Taylor expanded in M around 0
Simplified51.0%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6464.8
Simplified64.8%
if -3.39999999999999991e146 < d < -1.59999999999999988e-162Initial program 75.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr75.6%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f6461.9
Applied egg-rr61.9%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
Applied egg-rr58.9%
Applied egg-rr61.9%
if -1.59999999999999988e-162 < d < 2.40000000000000014e-261Initial program 44.4%
Taylor expanded in M around 0
Simplified12.9%
Taylor expanded in d around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6426.6
Simplified26.6%
if 2.40000000000000014e-261 < d Initial program 77.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr78.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr79.9%
Applied egg-rr67.5%
Final simplification59.8%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (* h l)))))
(if (<= d -2.6e+146)
(* (- d) t_0)
(if (<= d -1.6e-162)
(*
(sqrt (/ (* d d) (* h l)))
(fma (* M (* D (* D (* M -0.5)))) (/ h (* l (* (* d d) 4.0))) 1.0))
(if (<= d 2.4e-261)
(* d t_0)
(/
(*
d
(fma
-0.5
(/ (* (* M D) (* M (* h D))) (* (* d 2.0) (* l (* d 2.0))))
1.0))
(sqrt (* h l))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((1.0 / (h * l)));
double tmp;
if (d <= -2.6e+146) {
tmp = -d * t_0;
} else if (d <= -1.6e-162) {
tmp = sqrt(((d * d) / (h * l))) * fma((M * (D * (D * (M * -0.5)))), (h / (l * ((d * d) * 4.0))), 1.0);
} else if (d <= 2.4e-261) {
tmp = d * t_0;
} else {
tmp = (d * fma(-0.5, (((M * D) * (M * (h * D))) / ((d * 2.0) * (l * (d * 2.0)))), 1.0)) / sqrt((h * l));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = sqrt(Float64(1.0 / Float64(h * l))) tmp = 0.0 if (d <= -2.6e+146) tmp = Float64(Float64(-d) * t_0); elseif (d <= -1.6e-162) tmp = Float64(sqrt(Float64(Float64(d * d) / Float64(h * l))) * fma(Float64(M * Float64(D * Float64(D * Float64(M * -0.5)))), Float64(h / Float64(l * Float64(Float64(d * d) * 4.0))), 1.0)); elseif (d <= 2.4e-261) tmp = Float64(d * t_0); else tmp = Float64(Float64(d * fma(-0.5, Float64(Float64(Float64(M * D) * Float64(M * Float64(h * D))) / Float64(Float64(d * 2.0) * Float64(l * Float64(d * 2.0)))), 1.0)) / sqrt(Float64(h * l))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -2.6e+146], N[((-d) * t$95$0), $MachinePrecision], If[LessEqual[d, -1.6e-162], N[(N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(M * N[(D * N[(D * N[(M * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / N[(l * N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.4e-261], N[(d * t$95$0), $MachinePrecision], N[(N[(d * N[(-0.5 * N[(N[(N[(M * D), $MachinePrecision] * N[(M * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(d * 2.0), $MachinePrecision] * N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;d \leq -2.6 \cdot 10^{+146}:\\
\;\;\;\;\left(-d\right) \cdot t\_0\\
\mathbf{elif}\;d \leq -1.6 \cdot 10^{-162}:\\
\;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \mathsf{fma}\left(M \cdot \left(D \cdot \left(D \cdot \left(M \cdot -0.5\right)\right)\right), \frac{h}{\ell \cdot \left(\left(d \cdot d\right) \cdot 4\right)}, 1\right)\\
\mathbf{elif}\;d \leq 2.4 \cdot 10^{-261}:\\
\;\;\;\;d \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{d \cdot \mathsf{fma}\left(-0.5, \frac{\left(M \cdot D\right) \cdot \left(M \cdot \left(h \cdot D\right)\right)}{\left(d \cdot 2\right) \cdot \left(\ell \cdot \left(d \cdot 2\right)\right)}, 1\right)}{\sqrt{h \cdot \ell}}\\
\end{array}
\end{array}
if d < -2.60000000000000014e146Initial program 79.9%
Taylor expanded in M around 0
Simplified51.0%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6464.8
Simplified64.8%
if -2.60000000000000014e146 < d < -1.59999999999999988e-162Initial program 75.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr75.6%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f6461.9
Applied egg-rr61.9%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
Applied egg-rr58.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
associate-/l*N/A
Applied egg-rr57.4%
if -1.59999999999999988e-162 < d < 2.40000000000000014e-261Initial program 44.4%
Taylor expanded in M around 0
Simplified12.9%
Taylor expanded in d around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6426.6
Simplified26.6%
if 2.40000000000000014e-261 < d Initial program 77.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr78.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr79.9%
Applied egg-rr67.5%
Final simplification58.7%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (* h l)))))
(if (<= d -2.6e+146)
(* (- d) t_0)
(if (<= d -1.6e-162)
(*
(sqrt (/ (* d d) (* h l)))
(fma (* M (* D (* D (* M -0.5)))) (/ h (* l (* (* d d) 4.0))) 1.0))
(if (<= d 2.4e-261)
(* d t_0)
(*
(/ d (sqrt (* h l)))
(fma
-0.5
(/ (* (* M D) (* M (* h D))) (* (* d 2.0) (* l (* d 2.0))))
1.0)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((1.0 / (h * l)));
double tmp;
if (d <= -2.6e+146) {
tmp = -d * t_0;
} else if (d <= -1.6e-162) {
tmp = sqrt(((d * d) / (h * l))) * fma((M * (D * (D * (M * -0.5)))), (h / (l * ((d * d) * 4.0))), 1.0);
} else if (d <= 2.4e-261) {
tmp = d * t_0;
} else {
tmp = (d / sqrt((h * l))) * fma(-0.5, (((M * D) * (M * (h * D))) / ((d * 2.0) * (l * (d * 2.0)))), 1.0);
}
return tmp;
}
function code(d, h, l, M, D) t_0 = sqrt(Float64(1.0 / Float64(h * l))) tmp = 0.0 if (d <= -2.6e+146) tmp = Float64(Float64(-d) * t_0); elseif (d <= -1.6e-162) tmp = Float64(sqrt(Float64(Float64(d * d) / Float64(h * l))) * fma(Float64(M * Float64(D * Float64(D * Float64(M * -0.5)))), Float64(h / Float64(l * Float64(Float64(d * d) * 4.0))), 1.0)); elseif (d <= 2.4e-261) tmp = Float64(d * t_0); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * fma(-0.5, Float64(Float64(Float64(M * D) * Float64(M * Float64(h * D))) / Float64(Float64(d * 2.0) * Float64(l * Float64(d * 2.0)))), 1.0)); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -2.6e+146], N[((-d) * t$95$0), $MachinePrecision], If[LessEqual[d, -1.6e-162], N[(N[Sqrt[N[(N[(d * d), $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(M * N[(D * N[(D * N[(M * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / N[(l * N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.4e-261], N[(d * t$95$0), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-0.5 * N[(N[(N[(M * D), $MachinePrecision] * N[(M * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(d * 2.0), $MachinePrecision] * N[(l * N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;d \leq -2.6 \cdot 10^{+146}:\\
\;\;\;\;\left(-d\right) \cdot t\_0\\
\mathbf{elif}\;d \leq -1.6 \cdot 10^{-162}:\\
\;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \mathsf{fma}\left(M \cdot \left(D \cdot \left(D \cdot \left(M \cdot -0.5\right)\right)\right), \frac{h}{\ell \cdot \left(\left(d \cdot d\right) \cdot 4\right)}, 1\right)\\
\mathbf{elif}\;d \leq 2.4 \cdot 10^{-261}:\\
\;\;\;\;d \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(-0.5, \frac{\left(M \cdot D\right) \cdot \left(M \cdot \left(h \cdot D\right)\right)}{\left(d \cdot 2\right) \cdot \left(\ell \cdot \left(d \cdot 2\right)\right)}, 1\right)\\
\end{array}
\end{array}
if d < -2.60000000000000014e146Initial program 79.9%
Taylor expanded in M around 0
Simplified51.0%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6464.8
Simplified64.8%
if -2.60000000000000014e146 < d < -1.59999999999999988e-162Initial program 75.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr75.6%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lower-sqrt.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
lower-*.f6461.9
Applied egg-rr61.9%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
Applied egg-rr58.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
associate-/l*N/A
Applied egg-rr57.4%
if -1.59999999999999988e-162 < d < 2.40000000000000014e-261Initial program 44.4%
Taylor expanded in M around 0
Simplified12.9%
Taylor expanded in d around 0
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f6426.6
Simplified26.6%
if 2.40000000000000014e-261 < d Initial program 77.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr78.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr79.9%
Applied egg-rr66.9%
Final simplification58.4%
(FPCore (d h l M D)
:precision binary64
(if (<= l -2.1e-301)
(*
(* d (sqrt (/ 1.0 (* h l))))
(+ -1.0 (/ (/ (* (* M (* D (* M D))) (* h 0.5)) (* (* d d) 4.0)) l)))
(*
(/ d (sqrt (* h l)))
(fma (/ (* M D) (* d 2.0)) (* (/ h l) (* -0.25 (/ (* M D) d))) 1.0))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -2.1e-301) {
tmp = (d * sqrt((1.0 / (h * l)))) * (-1.0 + ((((M * (D * (M * D))) * (h * 0.5)) / ((d * d) * 4.0)) / l));
} else {
tmp = (d / sqrt((h * l))) * fma(((M * D) / (d * 2.0)), ((h / l) * (-0.25 * ((M * D) / d))), 1.0);
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (l <= -2.1e-301) tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(h * l)))) * Float64(-1.0 + Float64(Float64(Float64(Float64(M * Float64(D * Float64(M * D))) * Float64(h * 0.5)) / Float64(Float64(d * d) * 4.0)) / l))); else tmp = Float64(Float64(d / sqrt(Float64(h * l))) * fma(Float64(Float64(M * D) / Float64(d * 2.0)), Float64(Float64(h / l) * Float64(-0.25 * Float64(Float64(M * D) / d))), 1.0)); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -2.1e-301], N[(N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(N[(N[(N[(M * N[(D * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * N[(-0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.1 \cdot 10^{-301}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \frac{\frac{\left(M \cdot \left(D \cdot \left(M \cdot D\right)\right)\right) \cdot \left(h \cdot 0.5\right)}{\left(d \cdot d\right) \cdot 4}}{\ell}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{M \cdot D}{d \cdot 2}, \frac{h}{\ell} \cdot \left(-0.25 \cdot \frac{M \cdot D}{d}\right), 1\right)\\
\end{array}
\end{array}
if l < -2.0999999999999999e-301Initial program 69.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6469.1
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied egg-rr59.4%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6464.4
Simplified64.4%
if -2.0999999999999999e-301 < l Initial program 76.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr77.2%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr78.2%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr78.2%
lift-/.f64N/A
lift-/.f64N/A
sqrt-undivN/A
div-invN/A
lift-/.f64N/A
lift-/.f64N/A
clear-numN/A
times-fracN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
lift-sqrt.f64N/A
lift-/.f6475.3
Applied egg-rr75.3%
Final simplification69.9%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.82e-178)
(* (- d) (sqrt (/ 1.0 (* h l))))
(if (<= l -2e-310)
(* d (sqrt (sqrt (* (/ 1.0 l) (/ 1.0 l)))))
(if (<= l 7.8e+121)
(*
(/ d (sqrt (* h l)))
(fma (* M (* D (* D (* M -0.5)))) (/ h (* l (* (* d d) 4.0))) 1.0))
(/ (/ d (sqrt h)) (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.82e-178) {
tmp = -d * sqrt((1.0 / (h * l)));
} else if (l <= -2e-310) {
tmp = d * sqrt(sqrt(((1.0 / l) * (1.0 / l))));
} else if (l <= 7.8e+121) {
tmp = (d / sqrt((h * l))) * fma((M * (D * (D * (M * -0.5)))), (h / (l * ((d * d) * 4.0))), 1.0);
} else {
tmp = (d / sqrt(h)) / sqrt(l);
}
return tmp;
}
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.82e-178) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (l <= -2e-310) tmp = Float64(d * sqrt(sqrt(Float64(Float64(1.0 / l) * Float64(1.0 / l))))); elseif (l <= 7.8e+121) tmp = Float64(Float64(d / sqrt(Float64(h * l))) * fma(Float64(M * Float64(D * Float64(D * Float64(M * -0.5)))), Float64(h / Float64(l * Float64(Float64(d * d) * 4.0))), 1.0)); else tmp = Float64(Float64(d / sqrt(h)) / sqrt(l)); end return tmp end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.82e-178], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -2e-310], N[(d * N[Sqrt[N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 7.8e+121], N[(N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(M * N[(D * N[(D * N[(M * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / N[(l * N[(N[(d * d), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.82 \cdot 10^{-178}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;d \cdot \sqrt{\sqrt{\frac{1}{\ell} \cdot \frac{1}{\ell}}}\\
\mathbf{elif}\;\ell \leq 7.8 \cdot 10^{+121}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(M \cdot \left(D \cdot \left(D \cdot \left(M \cdot -0.5\right)\right)\right), \frac{h}{\ell \cdot \left(\left(d \cdot d\right) \cdot 4\right)}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -1.8199999999999999e-178Initial program 67.9%
Taylor expanded in M around 0
Simplified35.9%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6439.5
Simplified39.5%
if -1.8199999999999999e-178 < l < -1.999999999999994e-310Initial program 75.8%
Taylor expanded in M around 0
Simplified22.1%
Taylor expanded in h around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f640.0
Simplified0.0%
lift-/.f640.0
rem-square-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6465.0
Applied egg-rr65.0%
if -1.999999999999994e-310 < l < 7.79999999999999967e121Initial program 80.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
sub-negN/A
+-commutativeN/A
Applied egg-rr81.8%
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
lift-/.f64N/A
rem-exp-logN/A
lift-/.f64N/A
pow-prod-downN/A
rem-exp-logN/A
rem-exp-logN/A
*-commutativeN/A
pow-prod-downN/A
lift-pow.f64N/A
lift-/.f64N/A
metadata-evalN/A
unpow1/2N/A
lift-/.f64N/A
clear-numN/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
lift-sqrt.f64N/A
Applied egg-rr82.3%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
lower-fma.f64N/A
Applied egg-rr82.3%
Applied egg-rr63.1%
if 7.79999999999999967e121 < l Initial program 65.6%
Taylor expanded in M around 0
Simplified51.1%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity51.1
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
Applied egg-rr0.0%
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-rgt-neg-outN/A
lift-neg.f64N/A
frac-2negN/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
Applied egg-rr62.1%
Final simplification53.8%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.82e-178)
(* (- d) (sqrt (/ 1.0 (* h l))))
(if (<= l -2e-310)
(* d (sqrt (sqrt (* (/ 1.0 l) (/ 1.0 l)))))
(/ (/ d (sqrt h)) (sqrt l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.82e-178) {
tmp = -d * sqrt((1.0 / (h * l)));
} else if (l <= -2e-310) {
tmp = d * sqrt(sqrt(((1.0 / l) * (1.0 / l))));
} else {
tmp = (d / sqrt(h)) / sqrt(l);
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-1.82d-178)) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else if (l <= (-2d-310)) then
tmp = d * sqrt(sqrt(((1.0d0 / l) * (1.0d0 / l))))
else
tmp = (d / sqrt(h)) / sqrt(l)
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.82e-178) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else if (l <= -2e-310) {
tmp = d * Math.sqrt(Math.sqrt(((1.0 / l) * (1.0 / l))));
} else {
tmp = (d / Math.sqrt(h)) / Math.sqrt(l);
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.82e-178: tmp = -d * math.sqrt((1.0 / (h * l))) elif l <= -2e-310: tmp = d * math.sqrt(math.sqrt(((1.0 / l) * (1.0 / l)))) else: tmp = (d / math.sqrt(h)) / math.sqrt(l) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.82e-178) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); elseif (l <= -2e-310) tmp = Float64(d * sqrt(sqrt(Float64(Float64(1.0 / l) * Float64(1.0 / l))))); else tmp = Float64(Float64(d / sqrt(h)) / sqrt(l)); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.82e-178) tmp = -d * sqrt((1.0 / (h * l))); elseif (l <= -2e-310) tmp = d * sqrt(sqrt(((1.0 / l) * (1.0 / l)))); else tmp = (d / sqrt(h)) / sqrt(l); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.82e-178], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -2e-310], N[(d * N[Sqrt[N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.82 \cdot 10^{-178}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{elif}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;d \cdot \sqrt{\sqrt{\frac{1}{\ell} \cdot \frac{1}{\ell}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if l < -1.8199999999999999e-178Initial program 67.9%
Taylor expanded in M around 0
Simplified35.9%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6439.5
Simplified39.5%
if -1.8199999999999999e-178 < l < -1.999999999999994e-310Initial program 75.8%
Taylor expanded in M around 0
Simplified22.1%
Taylor expanded in h around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f640.0
Simplified0.0%
lift-/.f640.0
rem-square-sqrtN/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6465.0
Applied egg-rr65.0%
if -1.999999999999994e-310 < l Initial program 76.0%
Taylor expanded in M around 0
Simplified37.3%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity37.3
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
Applied egg-rr0.0%
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-rgt-neg-outN/A
lift-neg.f64N/A
frac-2negN/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
Applied egg-rr43.6%
Final simplification44.3%
(FPCore (d h l M D) :precision binary64 (if (<= h 1.3e-233) (* (- d) (sqrt (/ 1.0 (* h l)))) (/ (/ d (sqrt h)) (sqrt l))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (h <= 1.3e-233) {
tmp = -d * sqrt((1.0 / (h * l)));
} else {
tmp = (d / sqrt(h)) / sqrt(l);
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (h <= 1.3d-233) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else
tmp = (d / sqrt(h)) / sqrt(l)
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (h <= 1.3e-233) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else {
tmp = (d / Math.sqrt(h)) / Math.sqrt(l);
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if h <= 1.3e-233: tmp = -d * math.sqrt((1.0 / (h * l))) else: tmp = (d / math.sqrt(h)) / math.sqrt(l) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (h <= 1.3e-233) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(Float64(d / sqrt(h)) / sqrt(l)); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (h <= 1.3e-233) tmp = -d * sqrt((1.0 / (h * l))); else tmp = (d / sqrt(h)) / sqrt(l); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[h, 1.3e-233], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;h \leq 1.3 \cdot 10^{-233}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}}\\
\end{array}
\end{array}
if h < 1.2999999999999999e-233Initial program 70.8%
Taylor expanded in M around 0
Simplified31.7%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6436.4
Simplified36.4%
if 1.2999999999999999e-233 < h Initial program 75.3%
Taylor expanded in M around 0
Simplified39.6%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity39.6
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
Applied egg-rr0.0%
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-*.f64N/A
lift-neg.f64N/A
distribute-rgt-neg-outN/A
lift-neg.f64N/A
frac-2negN/A
sqrt-divN/A
pow1/2N/A
lower-/.f64N/A
Applied egg-rr45.9%
Final simplification40.5%
(FPCore (d h l M D) :precision binary64 (if (<= d -1.02e-149) (* (- d) (sqrt (/ 1.0 (* h l)))) (/ 1.0 (/ (sqrt (* h l)) d))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.02e-149) {
tmp = -d * sqrt((1.0 / (h * l)));
} else {
tmp = 1.0 / (sqrt((h * l)) / d);
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= (-1.02d-149)) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else
tmp = 1.0d0 / (sqrt((h * l)) / d)
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.02e-149) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else {
tmp = 1.0 / (Math.sqrt((h * l)) / d);
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -1.02e-149: tmp = -d * math.sqrt((1.0 / (h * l))) else: tmp = 1.0 / (math.sqrt((h * l)) / d) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.02e-149) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(1.0 / Float64(sqrt(Float64(h * l)) / d)); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -1.02e-149) tmp = -d * sqrt((1.0 / (h * l))); else tmp = 1.0 / (sqrt((h * l)) / d); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.02e-149], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.02 \cdot 10^{-149}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\sqrt{h \cdot \ell}}{d}}\\
\end{array}
\end{array}
if d < -1.0200000000000001e-149Initial program 77.6%
Taylor expanded in M around 0
Simplified40.5%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6443.3
Simplified43.3%
if -1.0200000000000001e-149 < d Initial program 69.8%
Taylor expanded in M around 0
Simplified31.8%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity31.8
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
Applied egg-rr1.7%
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-neg.f64N/A
frac-2negN/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
clear-numN/A
lift-*.f64N/A
lift-*.f64N/A
frac-timesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
Applied egg-rr34.7%
Final simplification37.9%
(FPCore (d h l M D) :precision binary64 (if (<= d -1.02e-149) (* (- d) (sqrt (/ 1.0 (* h l)))) (/ d (sqrt (* h l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.02e-149) {
tmp = -d * sqrt((1.0 / (h * l)));
} else {
tmp = d / sqrt((h * l));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= (-1.02d-149)) then
tmp = -d * sqrt((1.0d0 / (h * l)))
else
tmp = d / sqrt((h * l))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.02e-149) {
tmp = -d * Math.sqrt((1.0 / (h * l)));
} else {
tmp = d / Math.sqrt((h * l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -1.02e-149: tmp = -d * math.sqrt((1.0 / (h * l))) else: tmp = d / math.sqrt((h * l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.02e-149) tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l)))); else tmp = Float64(d / sqrt(Float64(h * l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -1.02e-149) tmp = -d * sqrt((1.0 / (h * l))); else tmp = d / sqrt((h * l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.02e-149], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.02 \cdot 10^{-149}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\
\end{array}
\end{array}
if d < -1.0200000000000001e-149Initial program 77.6%
Taylor expanded in M around 0
Simplified40.5%
Taylor expanded in l around -inf
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6443.3
Simplified43.3%
if -1.0200000000000001e-149 < d Initial program 69.8%
Taylor expanded in M around 0
Simplified31.8%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity31.8
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
Applied egg-rr1.7%
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-neg.f64N/A
frac-2negN/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
lower-/.f64N/A
lower-sqrt.f6434.7
Applied egg-rr34.7%
Final simplification37.9%
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* h l))))
double code(double d, double h, double l, double M, double D) {
return d / sqrt((h * l));
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = d / sqrt((h * l))
end function
public static double code(double d, double h, double l, double M, double D) {
return d / Math.sqrt((h * l));
}
def code(d, h, l, M, D): return d / math.sqrt((h * l))
function code(d, h, l, M, D) return Float64(d / sqrt(Float64(h * l))) end
function tmp = code(d, h, l, M, D) tmp = d / sqrt((h * l)); end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{d}{\sqrt{h \cdot \ell}}
\end{array}
Initial program 72.7%
Taylor expanded in M around 0
Simplified35.1%
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
lift-/.f64N/A
lift-/.f64N/A
pow-to-expN/A
pow-to-expN/A
lift-pow.f64N/A
pow-to-expN/A
lift-pow.f64N/A
lift-*.f64N/A
*-lft-identityN/A
*-lft-identityN/A
*-rgt-identity35.1
lift-*.f64N/A
lift-pow.f64N/A
lift-pow.f64N/A
Applied egg-rr15.2%
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
lift-neg.f64N/A
sqrt-undivN/A
lift-*.f64N/A
associate-*r/N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-neg.f64N/A
frac-2negN/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
sqrt-divN/A
lift-*.f64N/A
sqrt-prodN/A
rem-square-sqrtN/A
lower-/.f64N/A
lower-sqrt.f6424.9
Applied egg-rr24.9%
(FPCore (d h l M D) :precision binary64 (/ d (sqrt l)))
double code(double d, double h, double l, double M, double D) {
return d / sqrt(l);
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = d / sqrt(l)
end function
public static double code(double d, double h, double l, double M, double D) {
return d / Math.sqrt(l);
}
def code(d, h, l, M, D): return d / math.sqrt(l)
function code(d, h, l, M, D) return Float64(d / sqrt(l)) end
function tmp = code(d, h, l, M, D) tmp = d / sqrt(l); end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{d}{\sqrt{\ell}}
\end{array}
Initial program 72.7%
Taylor expanded in M around 0
Simplified35.1%
Taylor expanded in h around inf
lower-*.f64N/A
lower-sqrt.f64N/A
lower-/.f643.1
Simplified3.1%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
lower-/.f64N/A
lower-sqrt.f643.1
Applied egg-rr3.1%
herbie shell --seed 2024214
(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)))))