
(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 14 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 (/ (/ 2.0 (/ (sin k) l)) (* k (* (* t (tan k)) (/ k l)))))
double code(double t, double l, double k) {
return (2.0 / (sin(k) / l)) / (k * ((t * tan(k)) * (k / l)));
}
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 / (sin(k) / l)) / (k * ((t * tan(k)) * (k / l)))
end function
public static double code(double t, double l, double k) {
return (2.0 / (Math.sin(k) / l)) / (k * ((t * Math.tan(k)) * (k / l)));
}
def code(t, l, k): return (2.0 / (math.sin(k) / l)) / (k * ((t * math.tan(k)) * (k / l)))
function code(t, l, k) return Float64(Float64(2.0 / Float64(sin(k) / l)) / Float64(k * Float64(Float64(t * tan(k)) * Float64(k / l)))) end
function tmp = code(t, l, k) tmp = (2.0 / (sin(k) / l)) / (k * ((t * tan(k)) * (k / l))); end
code[t_, l_, k_] := N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(t * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{2}{\frac{\sin k}{\ell}}}{k \cdot \left(\left(t \cdot \tan k\right) \cdot \frac{k}{\ell}\right)}
\end{array}
Initial program 42.2%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr36.3%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6491.0%
Simplified91.0%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6494.9%
Applied egg-rr94.9%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
/-lowering-/.f6497.1%
Applied egg-rr97.1%
(FPCore (t l k) :precision binary64 (* (/ l (sin k)) (/ 2.0 (* k (* (* t (tan k)) (/ k l))))))
double code(double t, double l, double k) {
return (l / sin(k)) * (2.0 / (k * ((t * tan(k)) * (k / l))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l / sin(k)) * (2.0d0 / (k * ((t * tan(k)) * (k / l))))
end function
public static double code(double t, double l, double k) {
return (l / Math.sin(k)) * (2.0 / (k * ((t * Math.tan(k)) * (k / l))));
}
def code(t, l, k): return (l / math.sin(k)) * (2.0 / (k * ((t * math.tan(k)) * (k / l))))
function code(t, l, k) return Float64(Float64(l / sin(k)) * Float64(2.0 / Float64(k * Float64(Float64(t * tan(k)) * Float64(k / l))))) end
function tmp = code(t, l, k) tmp = (l / sin(k)) * (2.0 / (k * ((t * tan(k)) * (k / l)))); end
code[t_, l_, k_] := N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(k * N[(N[(t * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{\sin k} \cdot \frac{2}{k \cdot \left(\left(t \cdot \tan k\right) \cdot \frac{k}{\ell}\right)}
\end{array}
Initial program 42.2%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr36.3%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6491.0%
Simplified91.0%
clear-numN/A
inv-powN/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
unpow-prod-downN/A
metadata-evalN/A
inv-powN/A
clear-numN/A
metadata-evalN/A
inv-powN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr94.9%
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f64N/A
/-lowering-/.f6496.8%
Applied egg-rr96.8%
(FPCore (t l k) :precision binary64 (if (<= k 2e-27) (/ (/ 2.0 (/ k l)) (* (/ k l) (* (tan k) (* k t)))) (* l (* l (/ 2.0 (* (sin k) (* (* t (tan k)) (* k k))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2e-27) {
tmp = (2.0 / (k / l)) / ((k / l) * (tan(k) * (k * t)));
} else {
tmp = l * (l * (2.0 / (sin(k) * ((t * tan(k)) * (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 <= 2d-27) then
tmp = (2.0d0 / (k / l)) / ((k / l) * (tan(k) * (k * t)))
else
tmp = l * (l * (2.0d0 / (sin(k) * ((t * tan(k)) * (k * k)))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2e-27) {
tmp = (2.0 / (k / l)) / ((k / l) * (Math.tan(k) * (k * t)));
} else {
tmp = l * (l * (2.0 / (Math.sin(k) * ((t * Math.tan(k)) * (k * k)))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2e-27: tmp = (2.0 / (k / l)) / ((k / l) * (math.tan(k) * (k * t))) else: tmp = l * (l * (2.0 / (math.sin(k) * ((t * math.tan(k)) * (k * k))))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2e-27) tmp = Float64(Float64(2.0 / Float64(k / l)) / Float64(Float64(k / l) * Float64(tan(k) * Float64(k * t)))); else tmp = Float64(l * Float64(l * Float64(2.0 / Float64(sin(k) * Float64(Float64(t * tan(k)) * Float64(k * k)))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2e-27) tmp = (2.0 / (k / l)) / ((k / l) * (tan(k) * (k * t))); else tmp = l * (l * (2.0 / (sin(k) * ((t * tan(k)) * (k * k))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2e-27], N[(N[(2.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(t * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-27}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{\ell}}}{\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{2}{\sin k \cdot \left(\left(t \cdot \tan k\right) \cdot \left(k \cdot k\right)\right)}\right)\\
\end{array}
\end{array}
if k < 2.0000000000000001e-27Initial program 43.6%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr34.1%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6489.9%
Simplified89.9%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6494.5%
Applied egg-rr94.5%
Taylor expanded in k around 0
/-lowering-/.f6482.3%
Simplified82.3%
if 2.0000000000000001e-27 < k Initial program 37.2%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr43.8%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6494.7%
Simplified94.7%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6496.4%
Applied egg-rr96.4%
associate-/l/N/A
associate-/r*N/A
clear-numN/A
un-div-invN/A
clear-numN/A
associate-*l/N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr83.4%
Final simplification82.6%
(FPCore (t l k) :precision binary64 (* 2.0 (/ l (* (sin k) (* (/ k l) (* (tan k) (* k t)))))))
double code(double t, double l, double k) {
return 2.0 * (l / (sin(k) * ((k / l) * (tan(k) * (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 = 2.0d0 * (l / (sin(k) * ((k / l) * (tan(k) * (k * t)))))
end function
public static double code(double t, double l, double k) {
return 2.0 * (l / (Math.sin(k) * ((k / l) * (Math.tan(k) * (k * t)))));
}
def code(t, l, k): return 2.0 * (l / (math.sin(k) * ((k / l) * (math.tan(k) * (k * t)))))
function code(t, l, k) return Float64(2.0 * Float64(l / Float64(sin(k) * Float64(Float64(k / l) * Float64(tan(k) * Float64(k * t)))))) end
function tmp = code(t, l, k) tmp = 2.0 * (l / (sin(k) * ((k / l) * (tan(k) * (k * t))))); end
code[t_, l_, k_] := N[(2.0 * N[(l / N[(N[Sin[k], $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{\ell}{\sin k \cdot \left(\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)\right)}
\end{array}
Initial program 42.2%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr36.3%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6491.0%
Simplified91.0%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr93.8%
Final simplification93.8%
(FPCore (t l k) :precision binary64 (* l (/ 2.0 (* (sin k) (* (/ k l) (* (tan k) (* k t)))))))
double code(double t, double l, double k) {
return l * (2.0 / (sin(k) * ((k / l) * (tan(k) * (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 * (2.0d0 / (sin(k) * ((k / l) * (tan(k) * (k * t)))))
end function
public static double code(double t, double l, double k) {
return l * (2.0 / (Math.sin(k) * ((k / l) * (Math.tan(k) * (k * t)))));
}
def code(t, l, k): return l * (2.0 / (math.sin(k) * ((k / l) * (math.tan(k) * (k * t)))))
function code(t, l, k) return Float64(l * Float64(2.0 / Float64(sin(k) * Float64(Float64(k / l) * Float64(tan(k) * Float64(k * t)))))) end
function tmp = code(t, l, k) tmp = l * (2.0 / (sin(k) * ((k / l) * (tan(k) * (k * t))))); end
code[t_, l_, k_] := N[(l * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\ell \cdot \frac{2}{\sin k \cdot \left(\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)\right)}
\end{array}
Initial program 42.2%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr36.3%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6491.0%
Simplified91.0%
associate-*r/N/A
associate-/r/N/A
*-lowering-*.f64N/A
Applied egg-rr93.5%
Final simplification93.5%
(FPCore (t l k)
:precision binary64
(if (<= k 4.6)
(/
(/ (* l (fma (* k k) 0.3333333333333333 2.0)) k)
(* (/ k l) (* (tan k) (* k t))))
(/ (* 2.0 (* l l)) (* k (* k (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4.6) {
tmp = ((l * fma((k * k), 0.3333333333333333, 2.0)) / k) / ((k / l) * (tan(k) * (k * t)));
} else {
tmp = (2.0 * (l * l)) / (k * (k * (t * pow(sin(k), 2.0))));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (k <= 4.6) tmp = Float64(Float64(Float64(l * fma(Float64(k * k), 0.3333333333333333, 2.0)) / k) / Float64(Float64(k / l) * Float64(tan(k) * Float64(k * t)))); else tmp = Float64(Float64(2.0 * Float64(l * l)) / Float64(k * Float64(k * Float64(t * (sin(k) ^ 2.0))))); end return tmp end
code[t_, l_, k_] := If[LessEqual[k, 4.6], N[(N[(N[(l * N[(N[(k * k), $MachinePrecision] * 0.3333333333333333 + 2.0), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.6:\\
\;\;\;\;\frac{\frac{\ell \cdot \mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right)}{k}}{\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(\ell \cdot \ell\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\\
\end{array}
\end{array}
if k < 4.5999999999999996Initial program 43.1%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr33.8%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6490.1%
Simplified90.1%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6494.6%
Applied egg-rr94.6%
Taylor expanded in k around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6471.3%
Simplified71.3%
if 4.5999999999999996 < k Initial program 38.6%
Taylor expanded in t around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f6485.6%
Simplified85.6%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.3%
Simplified69.3%
Final simplification70.8%
(FPCore (t l k)
:precision binary64
(if (<= k 28.0)
(/
(/ (* l (fma (* k k) 0.3333333333333333 2.0)) k)
(* (/ k l) (* (tan k) (* k t))))
(/ (* 2.0 (* l (* l (cos k)))) (* k (* k (* t (* k k)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 28.0) {
tmp = ((l * fma((k * k), 0.3333333333333333, 2.0)) / k) / ((k / l) * (tan(k) * (k * t)));
} else {
tmp = (2.0 * (l * (l * cos(k)))) / (k * (k * (t * (k * k))));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (k <= 28.0) tmp = Float64(Float64(Float64(l * fma(Float64(k * k), 0.3333333333333333, 2.0)) / k) / Float64(Float64(k / l) * Float64(tan(k) * Float64(k * t)))); else tmp = Float64(Float64(2.0 * Float64(l * Float64(l * cos(k)))) / Float64(k * Float64(k * Float64(t * Float64(k * k))))); end return tmp end
code[t_, l_, k_] := If[LessEqual[k, 28.0], N[(N[(N[(l * N[(N[(k * k), $MachinePrecision] * 0.3333333333333333 + 2.0), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 28:\\
\;\;\;\;\frac{\frac{\ell \cdot \mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right)}{k}}{\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)}\\
\end{array}
\end{array}
if k < 28Initial program 43.1%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr33.8%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6490.1%
Simplified90.1%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6494.6%
Applied egg-rr94.6%
Taylor expanded in k around 0
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6471.3%
Simplified71.3%
if 28 < k Initial program 38.6%
Taylor expanded in t around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
sin-lowering-sin.f6485.6%
Simplified85.6%
Taylor expanded in k around 0
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6465.3%
Simplified65.3%
Final simplification70.0%
(FPCore (t l k) :precision binary64 (/ (/ 2.0 (/ k l)) (* (/ k l) (* (tan k) (* k t)))))
double code(double t, double l, double k) {
return (2.0 / (k / l)) / ((k / l) * (tan(k) * (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 = (2.0d0 / (k / l)) / ((k / l) * (tan(k) * (k * t)))
end function
public static double code(double t, double l, double k) {
return (2.0 / (k / l)) / ((k / l) * (Math.tan(k) * (k * t)));
}
def code(t, l, k): return (2.0 / (k / l)) / ((k / l) * (math.tan(k) * (k * t)))
function code(t, l, k) return Float64(Float64(2.0 / Float64(k / l)) / Float64(Float64(k / l) * Float64(tan(k) * Float64(k * t)))) end
function tmp = code(t, l, k) tmp = (2.0 / (k / l)) / ((k / l) * (tan(k) * (k * t))); end
code[t_, l_, k_] := N[(N[(2.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{2}{\frac{k}{\ell}}}{\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)}
\end{array}
Initial program 42.2%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr36.3%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6491.0%
Simplified91.0%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
associate-*r*N/A
associate-/l*N/A
tan-quotN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
tan-lowering-tan.f6494.9%
Applied egg-rr94.9%
Taylor expanded in k around 0
/-lowering-/.f6478.5%
Simplified78.5%
Final simplification78.5%
(FPCore (t l k) :precision binary64 (* (/ l k) (/ 2.0 (* (/ k l) (* (tan k) (* k t))))))
double code(double t, double l, double k) {
return (l / k) * (2.0 / ((k / l) * (tan(k) * (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) * (2.0d0 / ((k / l) * (tan(k) * (k * t))))
end function
public static double code(double t, double l, double k) {
return (l / k) * (2.0 / ((k / l) * (Math.tan(k) * (k * t))));
}
def code(t, l, k): return (l / k) * (2.0 / ((k / l) * (math.tan(k) * (k * t))))
function code(t, l, k) return Float64(Float64(l / k) * Float64(2.0 / Float64(Float64(k / l) * Float64(tan(k) * Float64(k * t))))) end
function tmp = code(t, l, k) tmp = (l / k) * (2.0 / ((k / l) * (tan(k) * (k * t)))); end
code[t_, l_, k_] := N[(N[(l / k), $MachinePrecision] * N[(2.0 / N[(N[(k / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{k} \cdot \frac{2}{\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)}
\end{array}
Initial program 42.2%
associate-*l*N/A
*-commutativeN/A
associate-*l/N/A
times-fracN/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr36.3%
Taylor expanded in k around inf
/-lowering-/.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f6491.0%
Simplified91.0%
clear-numN/A
inv-powN/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
unpow-prod-downN/A
metadata-evalN/A
inv-powN/A
clear-numN/A
metadata-evalN/A
inv-powN/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr94.9%
Taylor expanded in k around 0
Simplified78.5%
Final simplification78.5%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 0.0) (* (* 2.0 l) (/ l (* k (* k (* k (* k t)))))) (* (/ 2.0 (* t (* k k))) (/ (* l l) (* k k)))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = (2.0 * l) * (l / (k * (k * (k * (k * t)))));
} else {
tmp = (2.0 / (t * (k * k))) * ((l * l) / (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 ((l * l) <= 0.0d0) then
tmp = (2.0d0 * l) * (l / (k * (k * (k * (k * t)))))
else
tmp = (2.0d0 / (t * (k * k))) * ((l * l) / (k * k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = (2.0 * l) * (l / (k * (k * (k * (k * t)))));
} else {
tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 0.0: tmp = (2.0 * l) * (l / (k * (k * (k * (k * t))))) else: tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k)) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(Float64(2.0 * l) * Float64(l / Float64(k * Float64(k * Float64(k * Float64(k * t)))))); else tmp = Float64(Float64(2.0 / Float64(t * Float64(k * k))) * Float64(Float64(l * l) / Float64(k * k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 0.0) tmp = (2.0 * l) * (l / (k * (k * (k * (k * t))))); else tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(2.0 * l), $MachinePrecision] * N[(l / N[(k * N[(k * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;\left(2 \cdot \ell\right) \cdot \frac{\ell}{k \cdot \left(k \cdot \left(k \cdot \left(k \cdot t\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot \left(k \cdot k\right)} \cdot \frac{\ell \cdot \ell}{k \cdot k}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 26.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
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6471.7%
Simplified71.7%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.4%
Applied egg-rr87.4%
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6489.5%
Applied egg-rr89.5%
if 0.0 < (*.f64 l l) Initial program 45.7%
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
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.4%
Simplified70.4%
associate-*r*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6473.9%
Applied egg-rr73.9%
Final simplification76.7%
(FPCore (t l k) :precision binary64 (* (/ (* 2.0 l) (* t (* k k))) (/ l (* k k))))
double code(double t, double l, double k) {
return ((2.0 * l) / (t * (k * k))) * (l / (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 = ((2.0d0 * l) / (t * (k * k))) * (l / (k * k))
end function
public static double code(double t, double l, double k) {
return ((2.0 * l) / (t * (k * k))) * (l / (k * k));
}
def code(t, l, k): return ((2.0 * l) / (t * (k * k))) * (l / (k * k))
function code(t, l, k) return Float64(Float64(Float64(2.0 * l) / Float64(t * Float64(k * k))) * Float64(l / Float64(k * k))) end
function tmp = code(t, l, k) tmp = ((2.0 * l) / (t * (k * k))) * (l / (k * k)); end
code[t_, l_, k_] := N[(N[(N[(2.0 * l), $MachinePrecision] / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2 \cdot \ell}{t \cdot \left(k \cdot k\right)} \cdot \frac{\ell}{k \cdot k}
\end{array}
Initial program 42.2%
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
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.6%
Simplified70.6%
associate-*r*N/A
associate-*r*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6477.8%
Applied egg-rr77.8%
(FPCore (t l k) :precision binary64 (* (/ l k) (/ (* 2.0 l) (* k (* k (* k t))))))
double code(double t, double l, double k) {
return (l / k) * ((2.0 * l) / (k * (k * (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) * ((2.0d0 * l) / (k * (k * (k * t))))
end function
public static double code(double t, double l, double k) {
return (l / k) * ((2.0 * l) / (k * (k * (k * t))));
}
def code(t, l, k): return (l / k) * ((2.0 * l) / (k * (k * (k * t))))
function code(t, l, k) return Float64(Float64(l / k) * Float64(Float64(2.0 * l) / Float64(k * Float64(k * Float64(k * t))))) end
function tmp = code(t, l, k) tmp = (l / k) * ((2.0 * l) / (k * (k * (k * t)))); end
code[t_, l_, k_] := N[(N[(l / k), $MachinePrecision] * N[(N[(2.0 * l), $MachinePrecision] / N[(k * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{k} \cdot \frac{2 \cdot \ell}{k \cdot \left(k \cdot \left(k \cdot t\right)\right)}
\end{array}
Initial program 42.2%
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
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.6%
Simplified70.6%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6474.5%
Applied egg-rr74.5%
associate-*r/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6476.7%
Applied egg-rr76.7%
Final simplification76.7%
(FPCore (t l k) :precision binary64 (* (* 2.0 l) (/ l (* k (* k (* k (* k t)))))))
double code(double t, double l, double k) {
return (2.0 * l) * (l / (k * (k * (k * (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 = (2.0d0 * l) * (l / (k * (k * (k * (k * t)))))
end function
public static double code(double t, double l, double k) {
return (2.0 * l) * (l / (k * (k * (k * (k * t)))));
}
def code(t, l, k): return (2.0 * l) * (l / (k * (k * (k * (k * t)))))
function code(t, l, k) return Float64(Float64(2.0 * l) * Float64(l / Float64(k * Float64(k * Float64(k * Float64(k * t)))))) end
function tmp = code(t, l, k) tmp = (2.0 * l) * (l / (k * (k * (k * (k * t))))); end
code[t_, l_, k_] := N[(N[(2.0 * l), $MachinePrecision] * N[(l / N[(k * N[(k * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(2 \cdot \ell\right) \cdot \frac{\ell}{k \cdot \left(k \cdot \left(k \cdot \left(k \cdot t\right)\right)\right)}
\end{array}
Initial program 42.2%
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
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.6%
Simplified70.6%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6474.5%
Applied egg-rr74.5%
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6474.9%
Applied egg-rr74.9%
Final simplification74.9%
(FPCore (t l k) :precision binary64 (* (* 2.0 l) (/ l (* k (* t (* k (* k k)))))))
double code(double t, double l, double k) {
return (2.0 * l) * (l / (k * (t * (k * (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 = (2.0d0 * l) * (l / (k * (t * (k * (k * k)))))
end function
public static double code(double t, double l, double k) {
return (2.0 * l) * (l / (k * (t * (k * (k * k)))));
}
def code(t, l, k): return (2.0 * l) * (l / (k * (t * (k * (k * k)))))
function code(t, l, k) return Float64(Float64(2.0 * l) * Float64(l / Float64(k * Float64(t * Float64(k * Float64(k * k)))))) end
function tmp = code(t, l, k) tmp = (2.0 * l) * (l / (k * (t * (k * (k * k))))); end
code[t_, l_, k_] := N[(N[(2.0 * l), $MachinePrecision] * N[(l / N[(k * N[(t * N[(k * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(2 \cdot \ell\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}
\end{array}
Initial program 42.2%
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
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.6%
Simplified70.6%
associate-*r*N/A
associate-/l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6474.5%
Applied egg-rr74.5%
Final simplification74.5%
herbie shell --seed 2024193
(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))))