
(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 (* (tan k) (* (* (* (/ (sin k) l) k) t) (/ k l)))))
double code(double t, double l, double k) {
return 2.0 / (tan(k) * ((((sin(k) / l) * k) * t) * (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 / (tan(k) * ((((sin(k) / l) * k) * t) * (k / l)))
end function
public static double code(double t, double l, double k) {
return 2.0 / (Math.tan(k) * ((((Math.sin(k) / l) * k) * t) * (k / l)));
}
def code(t, l, k): return 2.0 / (math.tan(k) * ((((math.sin(k) / l) * k) * t) * (k / l)))
function code(t, l, k) return Float64(2.0 / Float64(tan(k) * Float64(Float64(Float64(Float64(sin(k) / l) * k) * t) * Float64(k / l)))) end
function tmp = code(t, l, k) tmp = 2.0 / (tan(k) * ((((sin(k) / l) * k) * t) * (k / l))); end
code[t_, l_, k_] := N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * t), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\tan k \cdot \left(\left(\left(\frac{\sin k}{\ell} \cdot k\right) \cdot t\right) \cdot \frac{k}{\ell}\right)}
\end{array}
Initial program 29.0%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites89.3%
Applied rewrites95.1%
Applied rewrites99.5%
Applied rewrites99.6%
Final simplification99.6%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 8e-18)
(/ 2.0 (* (* t_1 t) t_1))
(/ 2.0 (* (* (* (* (/ k l) t) (/ k l)) (sin k)) (tan k))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 8e-18) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / (((((k / l) * t) * (k / l)) * 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) :: t_1
real(8) :: tmp
t_1 = (k / l) * k
if (k <= 8d-18) then
tmp = 2.0d0 / ((t_1 * t) * t_1)
else
tmp = 2.0d0 / (((((k / l) * t) * (k / l)) * sin(k)) * tan(k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 8e-18) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / (((((k / l) * t) * (k / l)) * Math.sin(k)) * Math.tan(k));
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 8e-18: tmp = 2.0 / ((t_1 * t) * t_1) else: tmp = 2.0 / (((((k / l) * t) * (k / l)) * math.sin(k)) * math.tan(k)) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 8e-18) tmp = Float64(2.0 / Float64(Float64(t_1 * t) * t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(k / l) * t) * Float64(k / l)) * sin(k)) * tan(k))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 8e-18) tmp = 2.0 / ((t_1 * t) * t_1); else tmp = 2.0 / (((((k / l) * t) * (k / l)) * sin(k)) * tan(k)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 8e-18], N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(k / l), $MachinePrecision] * t), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 8 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\frac{k}{\ell} \cdot t\right) \cdot \frac{k}{\ell}\right) \cdot \sin k\right) \cdot \tan k}\\
\end{array}
\end{array}
if k < 8.0000000000000006e-18Initial program 31.1%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6464.5
Applied rewrites64.5%
Applied rewrites66.4%
Applied rewrites77.1%
if 8.0000000000000006e-18 < k Initial program 24.5%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites91.6%
Applied rewrites99.6%
Applied rewrites99.5%
Applied rewrites99.5%
Final simplification84.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 2.7e-13)
(/ 2.0 (* (* t_1 t) t_1))
(/ 2.0 (* (* (* (* (/ (sin k) l) k) (/ k l)) t) (tan k))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 2.7e-13) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / (((((sin(k) / l) * k) * (k / l)) * t) * 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) :: t_1
real(8) :: tmp
t_1 = (k / l) * k
if (k <= 2.7d-13) then
tmp = 2.0d0 / ((t_1 * t) * t_1)
else
tmp = 2.0d0 / (((((sin(k) / l) * k) * (k / l)) * t) * tan(k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 2.7e-13) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / (((((Math.sin(k) / l) * k) * (k / l)) * t) * Math.tan(k));
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 2.7e-13: tmp = 2.0 / ((t_1 * t) * t_1) else: tmp = 2.0 / (((((math.sin(k) / l) * k) * (k / l)) * t) * math.tan(k)) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 2.7e-13) tmp = Float64(2.0 / Float64(Float64(t_1 * t) * t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(sin(k) / l) * k) * Float64(k / l)) * t) * tan(k))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 2.7e-13) tmp = 2.0 / ((t_1 * t) * t_1); else tmp = 2.0 / (((((sin(k) / l) * k) * (k / l)) * t) * tan(k)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 2.7e-13], N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 2.7 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \tan k}\\
\end{array}
\end{array}
if k < 2.70000000000000011e-13Initial program 31.5%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6464.7
Applied rewrites64.7%
Applied rewrites66.5%
Applied rewrites77.2%
if 2.70000000000000011e-13 < k Initial program 23.6%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites91.5%
Applied rewrites99.6%
Applied rewrites99.5%
Applied rewrites97.2%
Final simplification83.5%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 2.7e-13)
(/ 2.0 (* (* t_1 t) t_1))
(/ 2.0 (/ (* (* (* k t) (* (tan k) (sin k))) k) (* l l))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 2.7e-13) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / ((((k * t) * (tan(k) * sin(k))) * k) / (l * l));
}
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) :: t_1
real(8) :: tmp
t_1 = (k / l) * k
if (k <= 2.7d-13) then
tmp = 2.0d0 / ((t_1 * t) * t_1)
else
tmp = 2.0d0 / ((((k * t) * (tan(k) * sin(k))) * k) / (l * l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 2.7e-13) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / ((((k * t) * (Math.tan(k) * Math.sin(k))) * k) / (l * l));
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 2.7e-13: tmp = 2.0 / ((t_1 * t) * t_1) else: tmp = 2.0 / ((((k * t) * (math.tan(k) * math.sin(k))) * k) / (l * l)) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 2.7e-13) tmp = Float64(2.0 / Float64(Float64(t_1 * t) * t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * t) * Float64(tan(k) * sin(k))) * k) / Float64(l * l))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 2.7e-13) tmp = 2.0 / ((t_1 * t) * t_1); else tmp = 2.0 / ((((k * t) * (tan(k) * sin(k))) * k) / (l * l)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 2.7e-13], N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * t), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 2.7 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k}{\ell \cdot \ell}}\\
\end{array}
\end{array}
if k < 2.70000000000000011e-13Initial program 31.5%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6464.7
Applied rewrites64.7%
Applied rewrites66.5%
Applied rewrites77.2%
if 2.70000000000000011e-13 < k Initial program 23.6%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites91.5%
Applied rewrites99.6%
Applied rewrites72.3%
Applied rewrites72.3%
Final simplification75.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 2.7e-13)
(/ 2.0 (* (* t_1 t) t_1))
(/ 2.0 (/ (* (* (* (tan k) (sin k)) k) (* k t)) (* l l))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 2.7e-13) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / ((((tan(k) * sin(k)) * k) * (k * t)) / (l * l));
}
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) :: t_1
real(8) :: tmp
t_1 = (k / l) * k
if (k <= 2.7d-13) then
tmp = 2.0d0 / ((t_1 * t) * t_1)
else
tmp = 2.0d0 / ((((tan(k) * sin(k)) * k) * (k * t)) / (l * l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 2.7e-13) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / ((((Math.tan(k) * Math.sin(k)) * k) * (k * t)) / (l * l));
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 2.7e-13: tmp = 2.0 / ((t_1 * t) * t_1) else: tmp = 2.0 / ((((math.tan(k) * math.sin(k)) * k) * (k * t)) / (l * l)) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 2.7e-13) tmp = Float64(2.0 / Float64(Float64(t_1 * t) * t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k) * sin(k)) * k) * Float64(k * t)) / Float64(l * l))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 2.7e-13) tmp = 2.0 / ((t_1 * t) * t_1); else tmp = 2.0 / ((((tan(k) * sin(k)) * k) * (k * t)) / (l * l)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 2.7e-13], N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Tan[k], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 2.7 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(\tan k \cdot \sin k\right) \cdot k\right) \cdot \left(k \cdot t\right)}{\ell \cdot \ell}}\\
\end{array}
\end{array}
if k < 2.70000000000000011e-13Initial program 31.5%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6464.7
Applied rewrites64.7%
Applied rewrites66.5%
Applied rewrites77.2%
if 2.70000000000000011e-13 < k Initial program 23.6%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites91.5%
Applied rewrites99.6%
Applied rewrites72.3%
Applied rewrites72.3%
Final simplification75.7%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ k l) t) (tan k)) (* (/ (sin k) l) k))))
double code(double t, double l, double k) {
return 2.0 / ((((k / l) * t) * tan(k)) * ((sin(k) / l) * 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 / ((((k / l) * t) * tan(k)) * ((sin(k) / l) * k))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((k / l) * t) * Math.tan(k)) * ((Math.sin(k) / l) * k));
}
def code(t, l, k): return 2.0 / ((((k / l) * t) * math.tan(k)) * ((math.sin(k) / l) * k))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64(k / l) * t) * tan(k)) * Float64(Float64(sin(k) / l) * k))) end
function tmp = code(t, l, k) tmp = 2.0 / ((((k / l) * t) * tan(k)) * ((sin(k) / l) * k)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(k / l), $MachinePrecision] * t), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{k}{\ell} \cdot t\right) \cdot \tan k\right) \cdot \left(\frac{\sin k}{\ell} \cdot k\right)}
\end{array}
Initial program 29.0%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites89.3%
Applied rewrites95.1%
Applied rewrites99.5%
Applied rewrites99.6%
Final simplification99.6%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (* (sin k) t) (/ k l)) (tan k)) (/ k l))))
double code(double t, double l, double k) {
return 2.0 / ((((sin(k) * t) * (k / l)) * 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) * t) * (k / l)) * tan(k)) * (k / l))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.sin(k) * t) * (k / l)) * Math.tan(k)) * (k / l));
}
def code(t, l, k): return 2.0 / ((((math.sin(k) * t) * (k / l)) * math.tan(k)) * (k / l))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64(sin(k) * t) * Float64(k / l)) * tan(k)) * Float64(k / l))) end
function tmp = code(t, l, k) tmp = 2.0 / ((((sin(k) * t) * (k / l)) * tan(k)) * (k / l)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\left(\sin k \cdot t\right) \cdot \frac{k}{\ell}\right) \cdot \tan k\right) \cdot \frac{k}{\ell}}
\end{array}
Initial program 29.0%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites89.3%
Applied rewrites95.1%
Applied rewrites99.5%
Applied rewrites98.1%
Final simplification98.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= (* l l) 5e+94)
(/ 2.0 (* (* t_1 t) t_1))
(/
2.0
(*
(*
(*
(fma
(* (/ t l) (fma 0.044444444444444446 (* k k) -0.3333333333333333))
(* k k)
(/ t l))
(* k k))
k)
(/ (/ k (cos k)) l))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if ((l * l) <= 5e+94) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / (((fma(((t / l) * fma(0.044444444444444446, (k * k), -0.3333333333333333)), (k * k), (t / l)) * (k * k)) * k) * ((k / cos(k)) / l));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (Float64(l * l) <= 5e+94) tmp = Float64(2.0 / Float64(Float64(t_1 * t) * t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(fma(Float64(Float64(t / l) * fma(0.044444444444444446, Float64(k * k), -0.3333333333333333)), Float64(k * k), Float64(t / l)) * Float64(k * k)) * k) * Float64(Float64(k / cos(k)) / l))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e+94], N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(t / l), $MachinePrecision] * N[(0.044444444444444446 * N[(k * k), $MachinePrecision] + -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(t / l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{+94}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(\frac{t}{\ell} \cdot \mathsf{fma}\left(0.044444444444444446, k \cdot k, -0.3333333333333333\right), k \cdot k, \frac{t}{\ell}\right) \cdot \left(k \cdot k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\cos k}}{\ell}}\\
\end{array}
\end{array}
if (*.f64 l l) < 5.0000000000000001e94Initial program 30.7%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6476.1
Applied rewrites76.1%
Applied rewrites78.4%
Applied rewrites88.7%
if 5.0000000000000001e94 < (*.f64 l l) Initial program 26.7%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites89.4%
Taylor expanded in k around 0
Applied rewrites46.5%
Applied rewrites49.3%
Final simplification71.6%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 34.0)
(/ 2.0 (* (* t_1 t) t_1))
(/ 2.0 (* (* (* (* k k) t) (/ k l)) (/ (/ k (cos k)) l))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 34.0) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / ((((k * k) * t) * (k / l)) * ((k / cos(k)) / l));
}
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) :: t_1
real(8) :: tmp
t_1 = (k / l) * k
if (k <= 34.0d0) then
tmp = 2.0d0 / ((t_1 * t) * t_1)
else
tmp = 2.0d0 / ((((k * k) * t) * (k / l)) * ((k / cos(k)) / l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 34.0) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / ((((k * k) * t) * (k / l)) * ((k / Math.cos(k)) / l));
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 34.0: tmp = 2.0 / ((t_1 * t) * t_1) else: tmp = 2.0 / ((((k * k) * t) * (k / l)) * ((k / math.cos(k)) / l)) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 34.0) tmp = Float64(2.0 / Float64(Float64(t_1 * t) * t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * t) * Float64(k / l)) * Float64(Float64(k / cos(k)) / l))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 34.0) tmp = 2.0 / ((t_1 * t) * t_1); else tmp = 2.0 / ((((k * k) * t) * (k / l)) * ((k / cos(k)) / l)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 34.0], N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 34:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(k \cdot k\right) \cdot t\right) \cdot \frac{k}{\ell}\right) \cdot \frac{\frac{k}{\cos k}}{\ell}}\\
\end{array}
\end{array}
if k < 34Initial program 30.7%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6465.2
Applied rewrites65.2%
Applied rewrites67.0%
Applied rewrites77.4%
if 34 < k Initial program 25.0%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites91.0%
Applied rewrites99.6%
Taylor expanded in k around 0
Applied rewrites58.4%
Final simplification71.8%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 34.0)
(/ 2.0 (* (* t_1 t) t_1))
(/ 2.0 (* (/ (* (* (* k k) t) (/ k (cos k))) l) (/ k l))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 34.0) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / (((((k * k) * t) * (k / cos(k))) / l) * (k / l));
}
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) :: t_1
real(8) :: tmp
t_1 = (k / l) * k
if (k <= 34.0d0) then
tmp = 2.0d0 / ((t_1 * t) * t_1)
else
tmp = 2.0d0 / (((((k * k) * t) * (k / cos(k))) / l) * (k / l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 34.0) {
tmp = 2.0 / ((t_1 * t) * t_1);
} else {
tmp = 2.0 / (((((k * k) * t) * (k / Math.cos(k))) / l) * (k / l));
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 34.0: tmp = 2.0 / ((t_1 * t) * t_1) else: tmp = 2.0 / (((((k * k) * t) * (k / math.cos(k))) / l) * (k / l)) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 34.0) tmp = Float64(2.0 / Float64(Float64(t_1 * t) * t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(k * k) * t) * Float64(k / cos(k))) / l) * Float64(k / l))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 34.0) tmp = 2.0 / ((t_1 * t) * t_1); else tmp = 2.0 / (((((k * k) * t) * (k / cos(k))) / l) * (k / l)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 34.0], N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 34:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \frac{k}{\cos k}}{\ell} \cdot \frac{k}{\ell}}\\
\end{array}
\end{array}
if k < 34Initial program 30.7%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6465.2
Applied rewrites65.2%
Applied rewrites67.0%
Applied rewrites77.4%
if 34 < k Initial program 25.0%
Taylor expanded in t around 0
unpow2N/A
associate-*l*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
times-fracN/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites91.0%
Applied rewrites90.9%
Taylor expanded in k around 0
Applied rewrites58.3%
Final simplification71.7%
(FPCore (t l k) :precision binary64 (let* ((t_1 (* (/ k l) k))) (/ 2.0 (* (* t_1 t) t_1))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
return 2.0 / ((t_1 * t) * t_1);
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
t_1 = (k / l) * k
code = 2.0d0 / ((t_1 * t) * t_1)
end function
public static double code(double t, double l, double k) {
double t_1 = (k / l) * k;
return 2.0 / ((t_1 * t) * t_1);
}
def code(t, l, k): t_1 = (k / l) * k return 2.0 / ((t_1 * t) * t_1)
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) return Float64(2.0 / Float64(Float64(t_1 * t) * t_1)) end
function tmp = code(t, l, k) t_1 = (k / l) * k; tmp = 2.0 / ((t_1 * t) * t_1); end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}
\end{array}
\end{array}
Initial program 29.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6462.3
Applied rewrites62.3%
Applied rewrites63.6%
Applied rewrites70.9%
Final simplification70.9%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ k l) k) (/ k l)) (* k t))))
double code(double t, double l, double k) {
return 2.0 / ((((k / l) * k) * (k / l)) * (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) * (k / l)) * (k * t))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((k / l) * k) * (k / l)) * (k * t));
}
def code(t, l, k): return 2.0 / ((((k / l) * k) * (k / l)) * (k * t))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64(k / l) * k) * Float64(k / l)) * Float64(k * t))) end
function tmp = code(t, l, k) tmp = 2.0 / ((((k / l) * k) * (k / l)) * (k * t)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{k}{\ell} \cdot k\right) \cdot \frac{k}{\ell}\right) \cdot \left(k \cdot t\right)}
\end{array}
Initial program 29.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6462.3
Applied rewrites62.3%
Applied rewrites63.6%
Applied rewrites65.8%
Applied rewrites66.5%
Final simplification66.5%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (/ (/ k l) l) (* k k)) (* k t))))
double code(double t, double l, double k) {
return 2.0 / ((((k / l) / 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 = 2.0d0 / ((((k / l) / l) * (k * k)) * (k * t))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((k / l) / l) * (k * k)) * (k * t));
}
def code(t, l, k): return 2.0 / ((((k / l) / l) * (k * k)) * (k * t))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64(k / l) / l) * Float64(k * k)) * Float64(k * t))) end
function tmp = code(t, l, k) tmp = 2.0 / ((((k / l) / l) * (k * k)) * (k * t)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(k / l), $MachinePrecision] / l), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\frac{\frac{k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot \left(k \cdot t\right)}
\end{array}
Initial program 29.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6462.3
Applied rewrites62.3%
Applied rewrites63.6%
Applied rewrites65.8%
Applied rewrites62.7%
Final simplification62.7%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ k (* l l)) k) k) (* k t))))
double code(double t, double l, double k) {
return 2.0 / ((((k / (l * 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 = 2.0d0 / ((((k / (l * l)) * k) * k) * (k * t))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((k / (l * l)) * k) * k) * (k * t));
}
def code(t, l, k): return 2.0 / ((((k / (l * l)) * k) * k) * (k * t))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64(k / Float64(l * l)) * k) * k) * Float64(k * t))) end
function tmp = code(t, l, k) tmp = 2.0 / ((((k / (l * l)) * k) * k) * (k * t)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(k / N[(l * l), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{k}{\ell \cdot \ell} \cdot k\right) \cdot k\right) \cdot \left(k \cdot t\right)}
\end{array}
Initial program 29.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6462.3
Applied rewrites62.3%
Applied rewrites63.6%
Applied rewrites65.8%
Taylor expanded in k around 0
Applied rewrites58.6%
Final simplification58.6%
herbie shell --seed 2024249
(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))))