
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
(FPCore (t l k) :precision binary64 (/ (/ l k) (* (* (/ k (* l 2.0)) (sin k)) (* (tan k) t))))
double code(double t, double l, double k) {
return (l / k) / (((k / (l * 2.0)) * sin(k)) * (tan(k) * t));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l / k) / (((k / (l * 2.0d0)) * sin(k)) * (tan(k) * t))
end function
public static double code(double t, double l, double k) {
return (l / k) / (((k / (l * 2.0)) * Math.sin(k)) * (Math.tan(k) * t));
}
def code(t, l, k): return (l / k) / (((k / (l * 2.0)) * math.sin(k)) * (math.tan(k) * t))
function code(t, l, k) return Float64(Float64(l / k) / Float64(Float64(Float64(k / Float64(l * 2.0)) * sin(k)) * Float64(tan(k) * t))) end
function tmp = code(t, l, k) tmp = (l / k) / (((k / (l * 2.0)) * sin(k)) * (tan(k) * t)); end
code[t_, l_, k_] := N[(N[(l / k), $MachinePrecision] / N[(N[(N[(k / N[(l * 2.0), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\ell}{k}}{\left(\frac{k}{\ell \cdot 2} \cdot \sin k\right) \cdot \left(\tan k \cdot t\right)}
\end{array}
Initial program 33.5%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified74.6%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr82.9%
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6495.5%
Applied egg-rr95.5%
associate-/r/N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6499.0%
Applied egg-rr99.0%
(FPCore (t l k)
:precision binary64
(if (<= k 4.2e-144)
(/ (/ l k) (/ k (/ (* l 2.0) (* k (* k t)))))
(if (<= k 9.8e+153)
(* l (/ (/ (* l 2.0) (* (sin k) (* (tan k) t))) (* k k)))
(* (/ 2.0 k) (/ (/ (* l l) (* t (* (sin k) (tan k)))) k)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4.2e-144) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else if (k <= 9.8e+153) {
tmp = l * (((l * 2.0) / (sin(k) * (tan(k) * t))) / (k * k));
} else {
tmp = (2.0 / k) * (((l * l) / (t * (sin(k) * tan(k)))) / k);
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.2d-144) then
tmp = (l / k) / (k / ((l * 2.0d0) / (k * (k * t))))
else if (k <= 9.8d+153) then
tmp = l * (((l * 2.0d0) / (sin(k) * (tan(k) * t))) / (k * k))
else
tmp = (2.0d0 / k) * (((l * l) / (t * (sin(k) * tan(k)))) / k)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4.2e-144) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else if (k <= 9.8e+153) {
tmp = l * (((l * 2.0) / (Math.sin(k) * (Math.tan(k) * t))) / (k * k));
} else {
tmp = (2.0 / k) * (((l * l) / (t * (Math.sin(k) * Math.tan(k)))) / k);
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4.2e-144: tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))) elif k <= 9.8e+153: tmp = l * (((l * 2.0) / (math.sin(k) * (math.tan(k) * t))) / (k * k)) else: tmp = (2.0 / k) * (((l * l) / (t * (math.sin(k) * math.tan(k)))) / k) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4.2e-144) tmp = Float64(Float64(l / k) / Float64(k / Float64(Float64(l * 2.0) / Float64(k * Float64(k * t))))); elseif (k <= 9.8e+153) tmp = Float64(l * Float64(Float64(Float64(l * 2.0) / Float64(sin(k) * Float64(tan(k) * t))) / Float64(k * k))); else tmp = Float64(Float64(2.0 / k) * Float64(Float64(Float64(l * l) / Float64(t * Float64(sin(k) * tan(k)))) / k)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4.2e-144) tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))); elseif (k <= 9.8e+153) tmp = l * (((l * 2.0) / (sin(k) * (tan(k) * t))) / (k * k)); else tmp = (2.0 / k) * (((l * l) / (t * (sin(k) * tan(k)))) / k); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4.2e-144], N[(N[(l / k), $MachinePrecision] / N[(k / N[(N[(l * 2.0), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.8e+153], N[(l * N[(N[(N[(l * 2.0), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / k), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] / N[(t * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.2 \cdot 10^{-144}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{k}{\frac{\ell \cdot 2}{k \cdot \left(k \cdot t\right)}}}\\
\mathbf{elif}\;k \leq 9.8 \cdot 10^{+153}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell \cdot 2}{\sin k \cdot \left(\tan k \cdot t\right)}}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k} \cdot \frac{\frac{\ell \cdot \ell}{t \cdot \left(\sin k \cdot \tan k\right)}}{k}\\
\end{array}
\end{array}
if k < 4.2000000000000002e-144Initial program 41.4%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified80.5%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr88.5%
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6497.5%
Applied egg-rr97.5%
Taylor expanded in k around 0
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.3%
Simplified82.3%
if 4.2000000000000002e-144 < k < 9.80000000000000003e153Initial program 19.7%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified77.0%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr89.5%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
*-lowering-*.f6495.9%
Applied egg-rr95.9%
if 9.80000000000000003e153 < k Initial program 31.2%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified50.5%
associate-*l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr60.7%
Final simplification82.6%
(FPCore (t l k) :precision binary64 (if (<= k 5.2e-17) (/ (/ l k) (/ k (/ (* l 2.0) (* k (* k t))))) (* (/ l k) (/ (* l 2.0) (* (* k t) (* (sin k) (tan k)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5.2e-17) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = (l / k) * ((l * 2.0) / ((k * t) * (sin(k) * tan(k))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 5.2d-17) then
tmp = (l / k) / (k / ((l * 2.0d0) / (k * (k * t))))
else
tmp = (l / k) * ((l * 2.0d0) / ((k * t) * (sin(k) * tan(k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5.2e-17) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = (l / k) * ((l * 2.0) / ((k * t) * (Math.sin(k) * Math.tan(k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5.2e-17: tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))) else: tmp = (l / k) * ((l * 2.0) / ((k * t) * (math.sin(k) * math.tan(k)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5.2e-17) tmp = Float64(Float64(l / k) / Float64(k / Float64(Float64(l * 2.0) / Float64(k * Float64(k * t))))); else tmp = Float64(Float64(l / k) * Float64(Float64(l * 2.0) / Float64(Float64(k * t) * Float64(sin(k) * tan(k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5.2e-17) tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))); else tmp = (l / k) * ((l * 2.0) / ((k * t) * (sin(k) * tan(k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5.2e-17], N[(N[(l / k), $MachinePrecision] / N[(k / N[(N[(l * 2.0), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l * 2.0), $MachinePrecision] / N[(N[(k * t), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{k}{\frac{\ell \cdot 2}{k \cdot \left(k \cdot t\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell \cdot 2}{\left(k \cdot t\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 5.20000000000000006e-17Initial program 36.8%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified78.3%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr89.2%
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6497.4%
Applied egg-rr97.4%
Taylor expanded in k around 0
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.3%
Simplified85.3%
if 5.20000000000000006e-17 < k Initial program 26.1%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified66.1%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr68.4%
times-fracN/A
*-lowering-*.f64N/A
*-commutativeN/A
un-div-invN/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
tan-lowering-tan.f64N/A
/-lowering-/.f6492.1%
Applied egg-rr92.1%
Final simplification87.4%
(FPCore (t l k) :precision binary64 (if (<= k 4e-144) (/ (/ l k) (/ k (/ (* l 2.0) (* k (* k t))))) (* l (/ (/ (* l 2.0) (* (sin k) (* (tan k) t))) (* k k)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4e-144) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = l * (((l * 2.0) / (sin(k) * (tan(k) * t))) / (k * k));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4d-144) then
tmp = (l / k) / (k / ((l * 2.0d0) / (k * (k * t))))
else
tmp = l * (((l * 2.0d0) / (sin(k) * (tan(k) * t))) / (k * k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4e-144) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = l * (((l * 2.0) / (Math.sin(k) * (Math.tan(k) * t))) / (k * k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4e-144: tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))) else: tmp = l * (((l * 2.0) / (math.sin(k) * (math.tan(k) * t))) / (k * k)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4e-144) tmp = Float64(Float64(l / k) / Float64(k / Float64(Float64(l * 2.0) / Float64(k * Float64(k * t))))); else tmp = Float64(l * Float64(Float64(Float64(l * 2.0) / Float64(sin(k) * Float64(tan(k) * t))) / Float64(k * k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4e-144) tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))); else tmp = l * (((l * 2.0) / (sin(k) * (tan(k) * t))) / (k * k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4e-144], N[(N[(l / k), $MachinePrecision] / N[(k / N[(N[(l * 2.0), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l * 2.0), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{-144}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{k}{\frac{\ell \cdot 2}{k \cdot \left(k \cdot t\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell \cdot 2}{\sin k \cdot \left(\tan k \cdot t\right)}}{k \cdot k}\\
\end{array}
\end{array}
if k < 3.9999999999999998e-144Initial program 41.4%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified80.5%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr88.5%
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6497.5%
Applied egg-rr97.5%
Taylor expanded in k around 0
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.3%
Simplified82.3%
if 3.9999999999999998e-144 < k Initial program 23.9%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified67.3%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr75.9%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
*-lowering-*.f6480.4%
Applied egg-rr80.4%
Final simplification81.4%
(FPCore (t l k) :precision binary64 (if (<= k 1.2) (/ (/ l k) (/ k (/ (* l 2.0) (* k (* k t))))) (/ 1.0 (/ k (/ (/ (* l 2.0) (/ k l)) (/ k (/ (/ (cos k) t) k)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.2) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = 1.0 / (k / (((l * 2.0) / (k / l)) / (k / ((cos(k) / t) / k))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.2d0) then
tmp = (l / k) / (k / ((l * 2.0d0) / (k * (k * t))))
else
tmp = 1.0d0 / (k / (((l * 2.0d0) / (k / l)) / (k / ((cos(k) / t) / k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.2) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = 1.0 / (k / (((l * 2.0) / (k / l)) / (k / ((Math.cos(k) / t) / k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.2: tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))) else: tmp = 1.0 / (k / (((l * 2.0) / (k / l)) / (k / ((math.cos(k) / t) / k)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.2) tmp = Float64(Float64(l / k) / Float64(k / Float64(Float64(l * 2.0) / Float64(k * Float64(k * t))))); else tmp = Float64(1.0 / Float64(k / Float64(Float64(Float64(l * 2.0) / Float64(k / l)) / Float64(k / Float64(Float64(cos(k) / t) / k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.2) tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))); else tmp = 1.0 / (k / (((l * 2.0) / (k / l)) / (k / ((cos(k) / t) / k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.2], N[(N[(l / k), $MachinePrecision] / N[(k / N[(N[(l * 2.0), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(k / N[(N[(N[(l * 2.0), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(k / N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.2:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{k}{\frac{\ell \cdot 2}{k \cdot \left(k \cdot t\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{k}{\frac{\frac{\ell \cdot 2}{\frac{k}{\ell}}}{\frac{k}{\frac{\frac{\cos k}{t}}{k}}}}}\\
\end{array}
\end{array}
if k < 1.19999999999999996Initial program 35.4%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified78.6%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr89.6%
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6497.5%
Applied egg-rr97.5%
Taylor expanded in k around 0
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.2%
Simplified85.2%
if 1.19999999999999996 < k Initial program 28.6%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified64.1%
Taylor expanded in k around 0
unpow2N/A
*-lowering-*.f6448.6%
Simplified48.6%
times-fracN/A
associate-*r/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
clear-numN/A
associate-/r*N/A
clear-numN/A
Applied egg-rr51.6%
Final simplification75.9%
(FPCore (t l k) :precision binary64 (if (<= k 1.2) (/ (/ l k) (/ k (/ (* l 2.0) (* k (* k t))))) (/ (/ (/ (* l 2.0) (/ k l)) (/ k (/ (/ (cos k) t) k))) k)))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.2) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = (((l * 2.0) / (k / l)) / (k / ((cos(k) / t) / k))) / k;
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.2d0) then
tmp = (l / k) / (k / ((l * 2.0d0) / (k * (k * t))))
else
tmp = (((l * 2.0d0) / (k / l)) / (k / ((cos(k) / t) / k))) / k
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.2) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = (((l * 2.0) / (k / l)) / (k / ((Math.cos(k) / t) / k))) / k;
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.2: tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))) else: tmp = (((l * 2.0) / (k / l)) / (k / ((math.cos(k) / t) / k))) / k return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.2) tmp = Float64(Float64(l / k) / Float64(k / Float64(Float64(l * 2.0) / Float64(k * Float64(k * t))))); else tmp = Float64(Float64(Float64(Float64(l * 2.0) / Float64(k / l)) / Float64(k / Float64(Float64(cos(k) / t) / k))) / k); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.2) tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))); else tmp = (((l * 2.0) / (k / l)) / (k / ((cos(k) / t) / k))) / k; end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.2], N[(N[(l / k), $MachinePrecision] / N[(k / N[(N[(l * 2.0), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l * 2.0), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(k / N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.2:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{k}{\frac{\ell \cdot 2}{k \cdot \left(k \cdot t\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot 2}{\frac{k}{\ell}}}{\frac{k}{\frac{\frac{\cos k}{t}}{k}}}}{k}\\
\end{array}
\end{array}
if k < 1.19999999999999996Initial program 35.4%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified78.6%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr89.6%
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6497.5%
Applied egg-rr97.5%
Taylor expanded in k around 0
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.2%
Simplified85.2%
if 1.19999999999999996 < k Initial program 28.6%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified64.1%
Taylor expanded in k around 0
unpow2N/A
*-lowering-*.f6448.6%
Simplified48.6%
times-fracN/A
associate-*r/N/A
/-lowering-/.f64N/A
Applied egg-rr51.6%
Final simplification75.9%
(FPCore (t l k) :precision binary64 (if (<= k 390.0) (/ (/ l k) (/ k (/ (* l 2.0) (* k (* k t))))) (/ (/ (* (/ (* l l) t) -0.6666666666666666) k) k)))
double code(double t, double l, double k) {
double tmp;
if (k <= 390.0) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k;
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 390.0d0) then
tmp = (l / k) / (k / ((l * 2.0d0) / (k * (k * t))))
else
tmp = ((((l * l) / t) * (-0.6666666666666666d0)) / k) / k
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 390.0) {
tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t))));
} else {
tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k;
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 390.0: tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))) else: tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k return tmp
function code(t, l, k) tmp = 0.0 if (k <= 390.0) tmp = Float64(Float64(l / k) / Float64(k / Float64(Float64(l * 2.0) / Float64(k * Float64(k * t))))); else tmp = Float64(Float64(Float64(Float64(Float64(l * l) / t) * -0.6666666666666666) / k) / k); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 390.0) tmp = (l / k) / (k / ((l * 2.0) / (k * (k * t)))); else tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k; end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 390.0], N[(N[(l / k), $MachinePrecision] / N[(k / N[(N[(l * 2.0), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.6666666666666666), $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 390:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{k}{\frac{\ell \cdot 2}{k \cdot \left(k \cdot t\right)}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \ell}{t} \cdot -0.6666666666666666}{k}}{k}\\
\end{array}
\end{array}
if k < 390Initial program 35.3%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
Simplified78.7%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr89.6%
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6497.5%
Applied egg-rr97.5%
Taylor expanded in k around 0
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.3%
Simplified85.3%
if 390 < k Initial program 29.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified40.1%
Taylor expanded in k around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.0%
Simplified29.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
/-lowering-/.f64N/A
Simplified14.2%
Taylor expanded in k around inf
associate-*r/N/A
associate-/l/N/A
associate-*r/N/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6449.1%
Simplified49.1%
Final simplification75.4%
(FPCore (t l k) :precision binary64 (if (<= k 390.0) (* l (* (/ 2.0 k) (/ (/ (/ l (* k t)) k) k))) (/ (/ (* (/ (* l l) t) -0.6666666666666666) k) k)))
double code(double t, double l, double k) {
double tmp;
if (k <= 390.0) {
tmp = l * ((2.0 / k) * (((l / (k * t)) / k) / k));
} else {
tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k;
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 390.0d0) then
tmp = l * ((2.0d0 / k) * (((l / (k * t)) / k) / k))
else
tmp = ((((l * l) / t) * (-0.6666666666666666d0)) / k) / k
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 390.0) {
tmp = l * ((2.0 / k) * (((l / (k * t)) / k) / k));
} else {
tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k;
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 390.0: tmp = l * ((2.0 / k) * (((l / (k * t)) / k) / k)) else: tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k return tmp
function code(t, l, k) tmp = 0.0 if (k <= 390.0) tmp = Float64(l * Float64(Float64(2.0 / k) * Float64(Float64(Float64(l / Float64(k * t)) / k) / k))); else tmp = Float64(Float64(Float64(Float64(Float64(l * l) / t) * -0.6666666666666666) / k) / k); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 390.0) tmp = l * ((2.0 / k) * (((l / (k * t)) / k) / k)); else tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k; end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 390.0], N[(l * N[(N[(2.0 / k), $MachinePrecision] * N[(N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.6666666666666666), $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 390:\\
\;\;\;\;\ell \cdot \left(\frac{2}{k} \cdot \frac{\frac{\frac{\ell}{k \cdot t}}{k}}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \ell}{t} \cdot -0.6666666666666666}{k}}{k}\\
\end{array}
\end{array}
if k < 390Initial program 35.3%
Taylor expanded in k around 0
associate-/l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6464.4%
Simplified64.4%
associate-/r*N/A
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6474.1%
Applied egg-rr74.1%
div-invN/A
associate-/r*N/A
frac-timesN/A
div-invN/A
*-rgt-identityN/A
clear-numN/A
un-div-invN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6478.8%
Applied egg-rr78.8%
associate-/r*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-/l/N/A
/-lowering-/.f64N/A
*-lowering-*.f6483.5%
Applied egg-rr83.5%
if 390 < k Initial program 29.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified40.1%
Taylor expanded in k around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.0%
Simplified29.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
/-lowering-/.f64N/A
Simplified14.2%
Taylor expanded in k around inf
associate-*r/N/A
associate-/l/N/A
associate-*r/N/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6449.1%
Simplified49.1%
Final simplification74.1%
(FPCore (t l k) :precision binary64 (if (<= k 390.0) (* l (* (/ 2.0 k) (/ (/ l t) (* k (* k k))))) (/ (/ (* (/ (* l l) t) -0.6666666666666666) k) k)))
double code(double t, double l, double k) {
double tmp;
if (k <= 390.0) {
tmp = l * ((2.0 / k) * ((l / t) / (k * (k * k))));
} else {
tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k;
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 390.0d0) then
tmp = l * ((2.0d0 / k) * ((l / t) / (k * (k * k))))
else
tmp = ((((l * l) / t) * (-0.6666666666666666d0)) / k) / k
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 390.0) {
tmp = l * ((2.0 / k) * ((l / t) / (k * (k * k))));
} else {
tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k;
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 390.0: tmp = l * ((2.0 / k) * ((l / t) / (k * (k * k)))) else: tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k return tmp
function code(t, l, k) tmp = 0.0 if (k <= 390.0) tmp = Float64(l * Float64(Float64(2.0 / k) * Float64(Float64(l / t) / Float64(k * Float64(k * k))))); else tmp = Float64(Float64(Float64(Float64(Float64(l * l) / t) * -0.6666666666666666) / k) / k); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 390.0) tmp = l * ((2.0 / k) * ((l / t) / (k * (k * k)))); else tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k; end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 390.0], N[(l * N[(N[(2.0 / k), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] / N[(k * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.6666666666666666), $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 390:\\
\;\;\;\;\ell \cdot \left(\frac{2}{k} \cdot \frac{\frac{\ell}{t}}{k \cdot \left(k \cdot k\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \ell}{t} \cdot -0.6666666666666666}{k}}{k}\\
\end{array}
\end{array}
if k < 390Initial program 35.3%
Taylor expanded in k around 0
associate-/l*N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6464.4%
Simplified64.4%
associate-/r*N/A
associate-/r*N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
cube-unmultN/A
*-lowering-*.f64N/A
cube-unmultN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6474.1%
Applied egg-rr74.1%
div-invN/A
associate-/r*N/A
frac-timesN/A
div-invN/A
*-rgt-identityN/A
clear-numN/A
un-div-invN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6478.8%
Applied egg-rr78.8%
if 390 < k Initial program 29.0%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified40.1%
Taylor expanded in k around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6429.0%
Simplified29.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
/-lowering-/.f64N/A
Simplified14.2%
Taylor expanded in k around inf
associate-*r/N/A
associate-/l/N/A
associate-*r/N/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6449.1%
Simplified49.1%
Final simplification70.7%
(FPCore (t l k) :precision binary64 (/ (/ (* (/ (* l l) t) -0.6666666666666666) k) k))
double code(double t, double l, double k) {
return ((((l * l) / t) * -0.6666666666666666) / k) / k;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((((l * l) / t) * (-0.6666666666666666d0)) / k) / k
end function
public static double code(double t, double l, double k) {
return ((((l * l) / t) * -0.6666666666666666) / k) / k;
}
def code(t, l, k): return ((((l * l) / t) * -0.6666666666666666) / k) / k
function code(t, l, k) return Float64(Float64(Float64(Float64(Float64(l * l) / t) * -0.6666666666666666) / k) / k) end
function tmp = code(t, l, k) tmp = ((((l * l) / t) * -0.6666666666666666) / k) / k; end
code[t_, l_, k_] := N[(N[(N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.6666666666666666), $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{\ell \cdot \ell}{t} \cdot -0.6666666666666666}{k}}{k}
\end{array}
Initial program 33.5%
associate-/r*N/A
/-lowering-/.f64N/A
Simplified42.4%
Taylor expanded in k around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6432.1%
Simplified32.1%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
/-lowering-/.f64N/A
Simplified44.4%
Taylor expanded in k around inf
associate-*r/N/A
associate-/l/N/A
associate-*r/N/A
unpow2N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6427.9%
Simplified27.9%
herbie shell --seed 2024163
(FPCore (t l k)
:name "Toniolo and Linder, Equation (10-)"
:precision binary64
(/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))