
(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 17 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) (/ k l)) (sin k)) t) (/ k (* (cos k) l)))))
double code(double t, double l, double k) {
return 2.0 / ((((sin(k) * (k / l)) * sin(k)) * t) * (k / (cos(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) * (k / l)) * sin(k)) * t) * (k / (cos(k) * l)))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.sin(k) * (k / l)) * Math.sin(k)) * t) * (k / (Math.cos(k) * l)));
}
def code(t, l, k): return 2.0 / ((((math.sin(k) * (k / l)) * math.sin(k)) * t) * (k / (math.cos(k) * l)))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64(sin(k) * Float64(k / l)) * sin(k)) * t) * Float64(k / Float64(cos(k) * l)))) end
function tmp = code(t, l, k) tmp = 2.0 / ((((sin(k) * (k / l)) * sin(k)) * t) * (k / (cos(k) * l))); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\left(\sin k \cdot \frac{k}{\ell}\right) \cdot \sin k\right) \cdot t\right) \cdot \frac{k}{\cos k \cdot \ell}}
\end{array}
Initial program 33.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.3%
Applied rewrites97.4%
Applied rewrites98.2%
Final simplification98.2%
(FPCore (t l k) :precision binary64 (if (<= k 2.9e+131) (* (* (pow (sin k) -2.0) l) (* (/ 2.0 (* (* k k) t)) (* (cos k) l))) (/ (/ (/ 2.0 (tan k)) (* (* (pow l -2.0) (sin k)) k)) (* k t))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.9e+131) {
tmp = (pow(sin(k), -2.0) * l) * ((2.0 / ((k * k) * t)) * (cos(k) * l));
} else {
tmp = ((2.0 / tan(k)) / ((pow(l, -2.0) * sin(k)) * k)) / (k * t);
}
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 <= 2.9d+131) then
tmp = ((sin(k) ** (-2.0d0)) * l) * ((2.0d0 / ((k * k) * t)) * (cos(k) * l))
else
tmp = ((2.0d0 / tan(k)) / (((l ** (-2.0d0)) * sin(k)) * k)) / (k * t)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.9e+131) {
tmp = (Math.pow(Math.sin(k), -2.0) * l) * ((2.0 / ((k * k) * t)) * (Math.cos(k) * l));
} else {
tmp = ((2.0 / Math.tan(k)) / ((Math.pow(l, -2.0) * Math.sin(k)) * k)) / (k * t);
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.9e+131: tmp = (math.pow(math.sin(k), -2.0) * l) * ((2.0 / ((k * k) * t)) * (math.cos(k) * l)) else: tmp = ((2.0 / math.tan(k)) / ((math.pow(l, -2.0) * math.sin(k)) * k)) / (k * t) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.9e+131) tmp = Float64(Float64((sin(k) ^ -2.0) * l) * Float64(Float64(2.0 / Float64(Float64(k * k) * t)) * Float64(cos(k) * l))); else tmp = Float64(Float64(Float64(2.0 / tan(k)) / Float64(Float64((l ^ -2.0) * sin(k)) * k)) / Float64(k * t)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.9e+131) tmp = ((sin(k) ^ -2.0) * l) * ((2.0 / ((k * k) * t)) * (cos(k) * l)); else tmp = ((2.0 / tan(k)) / (((l ^ -2.0) * sin(k)) * k)) / (k * t); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.9e+131], N[(N[(N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision] * l), $MachinePrecision] * N[(N[(2.0 / N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[l, -2.0], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.9 \cdot 10^{+131}:\\
\;\;\;\;\left({\sin k}^{-2} \cdot \ell\right) \cdot \left(\frac{2}{\left(k \cdot k\right) \cdot t} \cdot \left(\cos k \cdot \ell\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{\tan k}}{\left({\ell}^{-2} \cdot \sin k\right) \cdot k}}{k \cdot t}\\
\end{array}
\end{array}
if k < 2.9000000000000001e131Initial program 31.9%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.4%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6480.3
Applied rewrites80.3%
Applied rewrites91.9%
if 2.9000000000000001e131 < k Initial program 40.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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites94.8%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6454.8
Applied rewrites54.8%
Applied rewrites75.9%
Applied rewrites78.5%
Final simplification89.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 2.15e-77)
(/ 2.0 (* (* t_1 t_1) t))
(if (<= k 1.35e+130)
(* (* (* (pow (sin k) -2.0) l) (/ 2.0 (* (* k k) t))) (* (cos k) l))
(/ 2.0 (* (* (* (tan k) k) (* (pow l -2.0) (sin k))) (* k t)))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 2.15e-77) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else if (k <= 1.35e+130) {
tmp = ((pow(sin(k), -2.0) * l) * (2.0 / ((k * k) * t))) * (cos(k) * l);
} else {
tmp = 2.0 / (((tan(k) * k) * (pow(l, -2.0) * sin(k))) * (k * t));
}
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.15d-77) then
tmp = 2.0d0 / ((t_1 * t_1) * t)
else if (k <= 1.35d+130) then
tmp = (((sin(k) ** (-2.0d0)) * l) * (2.0d0 / ((k * k) * t))) * (cos(k) * l)
else
tmp = 2.0d0 / (((tan(k) * k) * ((l ** (-2.0d0)) * sin(k))) * (k * t))
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.15e-77) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else if (k <= 1.35e+130) {
tmp = ((Math.pow(Math.sin(k), -2.0) * l) * (2.0 / ((k * k) * t))) * (Math.cos(k) * l);
} else {
tmp = 2.0 / (((Math.tan(k) * k) * (Math.pow(l, -2.0) * Math.sin(k))) * (k * t));
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 2.15e-77: tmp = 2.0 / ((t_1 * t_1) * t) elif k <= 1.35e+130: tmp = ((math.pow(math.sin(k), -2.0) * l) * (2.0 / ((k * k) * t))) * (math.cos(k) * l) else: tmp = 2.0 / (((math.tan(k) * k) * (math.pow(l, -2.0) * math.sin(k))) * (k * t)) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 2.15e-77) tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t)); elseif (k <= 1.35e+130) tmp = Float64(Float64(Float64((sin(k) ^ -2.0) * l) * Float64(2.0 / Float64(Float64(k * k) * t))) * Float64(cos(k) * l)); else tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * k) * Float64((l ^ -2.0) * sin(k))) * Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 2.15e-77) tmp = 2.0 / ((t_1 * t_1) * t); elseif (k <= 1.35e+130) tmp = (((sin(k) ^ -2.0) * l) * (2.0 / ((k * k) * t))) * (cos(k) * l); else tmp = 2.0 / (((tan(k) * k) * ((l ^ -2.0) * sin(k))) * (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 2.15e-77], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.35e+130], N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision] * l), $MachinePrecision] * N[(2.0 / N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * k), $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 2.15 \cdot 10^{-77}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
\mathbf{elif}\;k \leq 1.35 \cdot 10^{+130}:\\
\;\;\;\;\left(\left({\sin k}^{-2} \cdot \ell\right) \cdot \frac{2}{\left(k \cdot k\right) \cdot t}\right) \cdot \left(\cos k \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\tan k \cdot k\right) \cdot \left({\ell}^{-2} \cdot \sin k\right)\right) \cdot \left(k \cdot t\right)}\\
\end{array}
\end{array}
if k < 2.1500000000000001e-77Initial program 36.2%
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.f6477.9
Applied rewrites77.9%
Applied rewrites69.5%
Applied rewrites82.8%
if 2.1500000000000001e-77 < k < 1.3499999999999999e130Initial program 13.4%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites99.3%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6494.8
Applied rewrites94.8%
Applied rewrites99.3%
if 1.3499999999999999e130 < k Initial program 38.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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites92.8%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6454.8
Applied rewrites54.8%
Applied rewrites74.9%
Applied rewrites77.4%
Final simplification84.4%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (cos k) l)) (t_2 (* (pow (sin k) -2.0) l)))
(if (<= t 1.4e-42)
(* (/ (* t_2 t_1) (* k t)) (/ 2.0 k))
(* t_2 (* (/ 2.0 (* (* k k) t)) t_1)))))
double code(double t, double l, double k) {
double t_1 = cos(k) * l;
double t_2 = pow(sin(k), -2.0) * l;
double tmp;
if (t <= 1.4e-42) {
tmp = ((t_2 * t_1) / (k * t)) * (2.0 / k);
} else {
tmp = t_2 * ((2.0 / ((k * k) * t)) * t_1);
}
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) :: t_2
real(8) :: tmp
t_1 = cos(k) * l
t_2 = (sin(k) ** (-2.0d0)) * l
if (t <= 1.4d-42) then
tmp = ((t_2 * t_1) / (k * t)) * (2.0d0 / k)
else
tmp = t_2 * ((2.0d0 / ((k * k) * t)) * t_1)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.cos(k) * l;
double t_2 = Math.pow(Math.sin(k), -2.0) * l;
double tmp;
if (t <= 1.4e-42) {
tmp = ((t_2 * t_1) / (k * t)) * (2.0 / k);
} else {
tmp = t_2 * ((2.0 / ((k * k) * t)) * t_1);
}
return tmp;
}
def code(t, l, k): t_1 = math.cos(k) * l t_2 = math.pow(math.sin(k), -2.0) * l tmp = 0 if t <= 1.4e-42: tmp = ((t_2 * t_1) / (k * t)) * (2.0 / k) else: tmp = t_2 * ((2.0 / ((k * k) * t)) * t_1) return tmp
function code(t, l, k) t_1 = Float64(cos(k) * l) t_2 = Float64((sin(k) ^ -2.0) * l) tmp = 0.0 if (t <= 1.4e-42) tmp = Float64(Float64(Float64(t_2 * t_1) / Float64(k * t)) * Float64(2.0 / k)); else tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(Float64(k * k) * t)) * t_1)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = cos(k) * l; t_2 = (sin(k) ^ -2.0) * l; tmp = 0.0; if (t <= 1.4e-42) tmp = ((t_2 * t_1) / (k * t)) * (2.0 / k); else tmp = t_2 * ((2.0 / ((k * k) * t)) * t_1); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision] * l), $MachinePrecision]}, If[LessEqual[t, 1.4e-42], N[(N[(N[(t$95$2 * t$95$1), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[(2.0 / k), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(N[(2.0 / N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \cos k \cdot \ell\\
t_2 := {\sin k}^{-2} \cdot \ell\\
\mathbf{if}\;t \leq 1.4 \cdot 10^{-42}:\\
\;\;\;\;\frac{t\_2 \cdot t\_1}{k \cdot t} \cdot \frac{2}{k}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\left(k \cdot k\right) \cdot t} \cdot t\_1\right)\\
\end{array}
\end{array}
if t < 1.39999999999999999e-42Initial program 32.9%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.8%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6475.1
Applied rewrites75.1%
Applied rewrites89.3%
if 1.39999999999999999e-42 < t Initial program 33.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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites93.9%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6480.2
Applied rewrites80.2%
Applied rewrites92.4%
Final simplification90.2%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (pow (sin k) 2.0) (/ k l)) t) (/ k (* (cos k) l)))))
double code(double t, double l, double k) {
return 2.0 / (((pow(sin(k), 2.0) * (k / l)) * t) * (k / (cos(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) ** 2.0d0) * (k / l)) * t) * (k / (cos(k) * l)))
end function
public static double code(double t, double l, double k) {
return 2.0 / (((Math.pow(Math.sin(k), 2.0) * (k / l)) * t) * (k / (Math.cos(k) * l)));
}
def code(t, l, k): return 2.0 / (((math.pow(math.sin(k), 2.0) * (k / l)) * t) * (k / (math.cos(k) * l)))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64((sin(k) ^ 2.0) * Float64(k / l)) * t) * Float64(k / Float64(cos(k) * l)))) end
function tmp = code(t, l, k) tmp = 2.0 / ((((sin(k) ^ 2.0) * (k / l)) * t) * (k / (cos(k) * l))); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left({\sin k}^{2} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \frac{k}{\cos k \cdot \ell}}
\end{array}
Initial program 33.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.3%
Applied rewrites97.4%
Final simplification97.4%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (pow (sin k) 2.0) t) (/ k (* (cos k) l))) (/ k l))))
double code(double t, double l, double k) {
return 2.0 / (((pow(sin(k), 2.0) * t) * (k / (cos(k) * l))) * (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) ** 2.0d0) * t) * (k / (cos(k) * l))) * (k / l))
end function
public static double code(double t, double l, double k) {
return 2.0 / (((Math.pow(Math.sin(k), 2.0) * t) * (k / (Math.cos(k) * l))) * (k / l));
}
def code(t, l, k): return 2.0 / (((math.pow(math.sin(k), 2.0) * t) * (k / (math.cos(k) * l))) * (k / l))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64((sin(k) ^ 2.0) * t) * Float64(k / Float64(cos(k) * l))) * Float64(k / l))) end
function tmp = code(t, l, k) tmp = 2.0 / ((((sin(k) ^ 2.0) * t) * (k / (cos(k) * l))) * (k / l)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left({\sin k}^{2} \cdot t\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \frac{k}{\ell}}
\end{array}
Initial program 33.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.3%
Applied rewrites97.0%
Final simplification97.0%
(FPCore (t l k) :precision binary64 (if (<= k 1.35e+130) (* (* (pow (sin k) -2.0) l) (* (/ 2.0 (* (* k k) t)) (* (cos k) l))) (/ 2.0 (* (* (* (tan k) k) (* (pow l -2.0) (sin k))) (* k t)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.35e+130) {
tmp = (pow(sin(k), -2.0) * l) * ((2.0 / ((k * k) * t)) * (cos(k) * l));
} else {
tmp = 2.0 / (((tan(k) * k) * (pow(l, -2.0) * sin(k))) * (k * t));
}
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.35d+130) then
tmp = ((sin(k) ** (-2.0d0)) * l) * ((2.0d0 / ((k * k) * t)) * (cos(k) * l))
else
tmp = 2.0d0 / (((tan(k) * k) * ((l ** (-2.0d0)) * sin(k))) * (k * t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.35e+130) {
tmp = (Math.pow(Math.sin(k), -2.0) * l) * ((2.0 / ((k * k) * t)) * (Math.cos(k) * l));
} else {
tmp = 2.0 / (((Math.tan(k) * k) * (Math.pow(l, -2.0) * Math.sin(k))) * (k * t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.35e+130: tmp = (math.pow(math.sin(k), -2.0) * l) * ((2.0 / ((k * k) * t)) * (math.cos(k) * l)) else: tmp = 2.0 / (((math.tan(k) * k) * (math.pow(l, -2.0) * math.sin(k))) * (k * t)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.35e+130) tmp = Float64(Float64((sin(k) ^ -2.0) * l) * Float64(Float64(2.0 / Float64(Float64(k * k) * t)) * Float64(cos(k) * l))); else tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * k) * Float64((l ^ -2.0) * sin(k))) * Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.35e+130) tmp = ((sin(k) ^ -2.0) * l) * ((2.0 / ((k * k) * t)) * (cos(k) * l)); else tmp = 2.0 / (((tan(k) * k) * ((l ^ -2.0) * sin(k))) * (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.35e+130], N[(N[(N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision] * l), $MachinePrecision] * N[(N[(2.0 / N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * k), $MachinePrecision] * N[(N[Power[l, -2.0], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.35 \cdot 10^{+130}:\\
\;\;\;\;\left({\sin k}^{-2} \cdot \ell\right) \cdot \left(\frac{2}{\left(k \cdot k\right) \cdot t} \cdot \left(\cos k \cdot \ell\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\tan k \cdot k\right) \cdot \left({\ell}^{-2} \cdot \sin k\right)\right) \cdot \left(k \cdot t\right)}\\
\end{array}
\end{array}
if k < 1.3499999999999999e130Initial program 32.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.7%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6480.5
Applied rewrites80.5%
Applied rewrites92.2%
if 1.3499999999999999e130 < k Initial program 38.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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites92.8%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6454.8
Applied rewrites54.8%
Applied rewrites74.9%
Applied rewrites77.4%
Final simplification89.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 2.5e-8)
(/ 2.0 (* (* t_1 t_1) t))
(if (<= k 1.3e+155)
(/ 2.0 (* (* (/ (sin k) l) (/ (tan k) l)) (* (* k k) t)))
(* (/ l k) (* (/ l (* k t)) -0.3333333333333333))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 2.5e-8) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else if (k <= 1.3e+155) {
tmp = 2.0 / (((sin(k) / l) * (tan(k) / l)) * ((k * k) * t));
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
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.5d-8) then
tmp = 2.0d0 / ((t_1 * t_1) * t)
else if (k <= 1.3d+155) then
tmp = 2.0d0 / (((sin(k) / l) * (tan(k) / l)) * ((k * k) * t))
else
tmp = (l / k) * ((l / (k * t)) * (-0.3333333333333333d0))
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.5e-8) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else if (k <= 1.3e+155) {
tmp = 2.0 / (((Math.sin(k) / l) * (Math.tan(k) / l)) * ((k * k) * t));
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 2.5e-8: tmp = 2.0 / ((t_1 * t_1) * t) elif k <= 1.3e+155: tmp = 2.0 / (((math.sin(k) / l) * (math.tan(k) / l)) * ((k * k) * t)) else: tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 2.5e-8) tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t)); elseif (k <= 1.3e+155) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) / l) * Float64(tan(k) / l)) * Float64(Float64(k * k) * t))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / Float64(k * t)) * -0.3333333333333333)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 2.5e-8) tmp = 2.0 / ((t_1 * t_1) * t); elseif (k <= 1.3e+155) tmp = 2.0 / (((sin(k) / l) * (tan(k) / l)) * ((k * k) * t)); else tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 2.5e-8], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.3e+155], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 2.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
\mathbf{elif}\;k \leq 1.3 \cdot 10^{+155}:\\
\;\;\;\;\frac{2}{\left(\frac{\sin k}{\ell} \cdot \frac{\tan k}{\ell}\right) \cdot \left(\left(k \cdot k\right) \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{\ell}{k \cdot t} \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if k < 2.4999999999999999e-8Initial program 34.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.f6479.0
Applied rewrites79.0%
Applied rewrites70.9%
Applied rewrites83.6%
if 2.4999999999999999e-8 < k < 1.3000000000000001e155Initial program 20.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites96.7%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6491.8
Applied rewrites91.8%
Applied rewrites89.1%
Applied rewrites92.0%
if 1.3000000000000001e155 < k Initial program 39.4%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites94.2%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites0.0%
Taylor expanded in k around inf
Applied rewrites61.3%
Applied rewrites61.3%
Final simplification81.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 9.6e-40)
(/ 2.0 (* (* t_1 t_1) t))
(if (<= k 1.3e+155)
(* (/ (/ (* (/ l (sin k)) l) (tan k)) (* (* k k) t)) 2.0)
(* (/ l k) (* (/ l (* k t)) -0.3333333333333333))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 9.6e-40) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else if (k <= 1.3e+155) {
tmp = ((((l / sin(k)) * l) / tan(k)) / ((k * k) * t)) * 2.0;
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
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 <= 9.6d-40) then
tmp = 2.0d0 / ((t_1 * t_1) * t)
else if (k <= 1.3d+155) then
tmp = ((((l / sin(k)) * l) / tan(k)) / ((k * k) * t)) * 2.0d0
else
tmp = (l / k) * ((l / (k * t)) * (-0.3333333333333333d0))
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 <= 9.6e-40) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else if (k <= 1.3e+155) {
tmp = ((((l / Math.sin(k)) * l) / Math.tan(k)) / ((k * k) * t)) * 2.0;
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 9.6e-40: tmp = 2.0 / ((t_1 * t_1) * t) elif k <= 1.3e+155: tmp = ((((l / math.sin(k)) * l) / math.tan(k)) / ((k * k) * t)) * 2.0 else: tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 9.6e-40) tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t)); elseif (k <= 1.3e+155) tmp = Float64(Float64(Float64(Float64(Float64(l / sin(k)) * l) / tan(k)) / Float64(Float64(k * k) * t)) * 2.0); else tmp = Float64(Float64(l / k) * Float64(Float64(l / Float64(k * t)) * -0.3333333333333333)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 9.6e-40) tmp = 2.0 / ((t_1 * t_1) * t); elseif (k <= 1.3e+155) tmp = ((((l / sin(k)) * l) / tan(k)) / ((k * k) * t)) * 2.0; else tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 9.6e-40], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.3e+155], N[(N[(N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 9.6 \cdot 10^{-40}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
\mathbf{elif}\;k \leq 1.3 \cdot 10^{+155}:\\
\;\;\;\;\frac{\frac{\frac{\ell}{\sin k} \cdot \ell}{\tan k}}{\left(k \cdot k\right) \cdot t} \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{\ell}{k \cdot t} \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if k < 9.59999999999999965e-40Initial program 35.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.f6478.7
Applied rewrites78.7%
Applied rewrites70.5%
Applied rewrites83.3%
if 9.59999999999999965e-40 < k < 1.3000000000000001e155Initial program 18.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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites96.9%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6492.4
Applied rewrites92.4%
Applied rewrites89.9%
Applied rewrites92.4%
if 1.3000000000000001e155 < k Initial program 39.4%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites94.2%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites0.0%
Taylor expanded in k around inf
Applied rewrites61.3%
Applied rewrites61.3%
Final simplification81.8%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 1.95e-41)
(/ 2.0 (* (* t_1 t_1) t))
(* (/ (/ (* (/ l (sin k)) l) (tan k)) (* k t)) (/ 2.0 k)))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 1.95e-41) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else {
tmp = ((((l / sin(k)) * l) / tan(k)) / (k * t)) * (2.0 / 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 <= 1.95d-41) then
tmp = 2.0d0 / ((t_1 * t_1) * t)
else
tmp = ((((l / sin(k)) * l) / tan(k)) / (k * t)) * (2.0d0 / 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 <= 1.95e-41) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else {
tmp = ((((l / Math.sin(k)) * l) / Math.tan(k)) / (k * t)) * (2.0 / k);
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 1.95e-41: tmp = 2.0 / ((t_1 * t_1) * t) else: tmp = ((((l / math.sin(k)) * l) / math.tan(k)) / (k * t)) * (2.0 / k) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 1.95e-41) tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t)); else tmp = Float64(Float64(Float64(Float64(Float64(l / sin(k)) * l) / tan(k)) / Float64(k * t)) * Float64(2.0 / k)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 1.95e-41) tmp = 2.0 / ((t_1 * t_1) * t); else tmp = ((((l / sin(k)) * l) / tan(k)) / (k * t)) * (2.0 / k); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 1.95e-41], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[(2.0 / k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 1.95 \cdot 10^{-41}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell}{\sin k} \cdot \ell}{\tan k}}{k \cdot t} \cdot \frac{2}{k}\\
\end{array}
\end{array}
if k < 1.94999999999999995e-41Initial program 35.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.f6478.7
Applied rewrites78.7%
Applied rewrites70.5%
Applied rewrites83.3%
if 1.94999999999999995e-41 < k Initial program 28.3%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.6%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6472.4
Applied rewrites72.4%
Applied rewrites82.1%
Applied rewrites83.4%
Final simplification83.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= l 1.82e-193)
(/ 2.0 (* (* t_1 t_1) t))
(/ (* (- -2.0) (/ (* (/ l (sin k)) l) (tan k))) (* (* k t) k)))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (l <= 1.82e-193) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else {
tmp = (-(-2.0) * (((l / sin(k)) * l) / tan(k))) / ((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) :: t_1
real(8) :: tmp
t_1 = (k / l) * k
if (l <= 1.82d-193) then
tmp = 2.0d0 / ((t_1 * t_1) * t)
else
tmp = (-(-2.0d0) * (((l / sin(k)) * l) / tan(k))) / ((k * t) * 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 (l <= 1.82e-193) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else {
tmp = (-(-2.0) * (((l / Math.sin(k)) * l) / Math.tan(k))) / ((k * t) * k);
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if l <= 1.82e-193: tmp = 2.0 / ((t_1 * t_1) * t) else: tmp = (-(-2.0) * (((l / math.sin(k)) * l) / math.tan(k))) / ((k * t) * k) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (l <= 1.82e-193) tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t)); else tmp = Float64(Float64(Float64(-(-2.0)) * Float64(Float64(Float64(l / sin(k)) * l) / tan(k))) / Float64(Float64(k * t) * k)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (l <= 1.82e-193) tmp = 2.0 / ((t_1 * t_1) * t); else tmp = (-(-2.0) * (((l / sin(k)) * l) / tan(k))) / ((k * t) * k); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[l, 1.82e-193], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[((--2.0) * N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(k * t), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;\ell \leq 1.82 \cdot 10^{-193}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(--2\right) \cdot \frac{\frac{\ell}{\sin k} \cdot \ell}{\tan k}}{\left(k \cdot t\right) \cdot k}\\
\end{array}
\end{array}
if l < 1.8200000000000001e-193Initial program 34.8%
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.f6475.1
Applied rewrites75.1%
Applied rewrites65.2%
Applied rewrites79.1%
if 1.8200000000000001e-193 < l Initial program 30.8%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites94.0%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6475.6
Applied rewrites75.6%
Applied rewrites81.4%
Applied rewrites83.4%
Final simplification80.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 2.5e-8)
(/ 2.0 (* (* t_1 t_1) t))
(if (<= k 1.3e+155)
(/ 2.0 (* (* (/ (sin k) (* l l)) (tan k)) (* (* k k) t)))
(* (/ l k) (* (/ l (* k t)) -0.3333333333333333))))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 2.5e-8) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else if (k <= 1.3e+155) {
tmp = 2.0 / (((sin(k) / (l * l)) * tan(k)) * ((k * k) * t));
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
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.5d-8) then
tmp = 2.0d0 / ((t_1 * t_1) * t)
else if (k <= 1.3d+155) then
tmp = 2.0d0 / (((sin(k) / (l * l)) * tan(k)) * ((k * k) * t))
else
tmp = (l / k) * ((l / (k * t)) * (-0.3333333333333333d0))
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.5e-8) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else if (k <= 1.3e+155) {
tmp = 2.0 / (((Math.sin(k) / (l * l)) * Math.tan(k)) * ((k * k) * t));
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 2.5e-8: tmp = 2.0 / ((t_1 * t_1) * t) elif k <= 1.3e+155: tmp = 2.0 / (((math.sin(k) / (l * l)) * math.tan(k)) * ((k * k) * t)) else: tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 2.5e-8) tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t)); elseif (k <= 1.3e+155) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) / Float64(l * l)) * tan(k)) * Float64(Float64(k * k) * t))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / Float64(k * t)) * -0.3333333333333333)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 2.5e-8) tmp = 2.0 / ((t_1 * t_1) * t); elseif (k <= 1.3e+155) tmp = 2.0 / (((sin(k) / (l * l)) * tan(k)) * ((k * k) * t)); else tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 2.5e-8], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.3e+155], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 2.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
\mathbf{elif}\;k \leq 1.3 \cdot 10^{+155}:\\
\;\;\;\;\frac{2}{\left(\frac{\sin k}{\ell \cdot \ell} \cdot \tan k\right) \cdot \left(\left(k \cdot k\right) \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{\ell}{k \cdot t} \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if k < 2.4999999999999999e-8Initial program 34.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.f6479.0
Applied rewrites79.0%
Applied rewrites70.9%
Applied rewrites83.6%
if 2.4999999999999999e-8 < k < 1.3000000000000001e155Initial program 20.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites96.7%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6491.8
Applied rewrites91.8%
Applied rewrites91.8%
if 1.3000000000000001e155 < k Initial program 39.4%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites94.2%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites0.0%
Taylor expanded in k around inf
Applied rewrites61.3%
Applied rewrites61.3%
Final simplification81.8%
(FPCore (t l k)
:precision binary64
(if (<= k 6500.0)
(/
2.0
(*
(/ (* (* (fma (* (* k k) t) -0.3333333333333333 t) k) k) (/ l k))
(/ k (* (cos k) l))))
(* (/ l k) (* (/ l (* k t)) -0.3333333333333333))))
double code(double t, double l, double k) {
double tmp;
if (k <= 6500.0) {
tmp = 2.0 / ((((fma(((k * k) * t), -0.3333333333333333, t) * k) * k) / (l / k)) * (k / (cos(k) * l)));
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (k <= 6500.0) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(Float64(k * k) * t), -0.3333333333333333, t) * k) * k) / Float64(l / k)) * Float64(k / Float64(cos(k) * l)))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / Float64(k * t)) * -0.3333333333333333)); end return tmp end
code[t_, l_, k_] := If[LessEqual[k, 6500.0], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * -0.3333333333333333 + t), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6500:\\
\;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(\left(k \cdot k\right) \cdot t, -0.3333333333333333, t\right) \cdot k\right) \cdot k}{\frac{\ell}{k}} \cdot \frac{k}{\cos k \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{\ell}{k \cdot t} \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if k < 6500Initial program 34.1%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.2%
Taylor expanded in k around 0
Applied rewrites80.5%
Applied rewrites82.2%
if 6500 < k Initial program 30.4%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.4%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites21.7%
Taylor expanded in k around inf
Applied rewrites55.9%
Applied rewrites55.9%
Final simplification75.5%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ k l) k)))
(if (<= k 480000000000.0)
(/ 2.0 (* (* t_1 t_1) t))
(* (/ l k) (* (/ l (* k t)) -0.3333333333333333)))))
double code(double t, double l, double k) {
double t_1 = (k / l) * k;
double tmp;
if (k <= 480000000000.0) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
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 <= 480000000000.0d0) then
tmp = 2.0d0 / ((t_1 * t_1) * t)
else
tmp = (l / k) * ((l / (k * t)) * (-0.3333333333333333d0))
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 <= 480000000000.0) {
tmp = 2.0 / ((t_1 * t_1) * t);
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
return tmp;
}
def code(t, l, k): t_1 = (k / l) * k tmp = 0 if k <= 480000000000.0: tmp = 2.0 / ((t_1 * t_1) * t) else: tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333) return tmp
function code(t, l, k) t_1 = Float64(Float64(k / l) * k) tmp = 0.0 if (k <= 480000000000.0) tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t)); else tmp = Float64(Float64(l / k) * Float64(Float64(l / Float64(k * t)) * -0.3333333333333333)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / l) * k; tmp = 0.0; if (k <= 480000000000.0) tmp = 2.0 / ((t_1 * t_1) * t); else tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[k, 480000000000.0], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;k \leq 480000000000:\\
\;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{\ell}{k \cdot t} \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if k < 4.8e11Initial program 33.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.f6477.3
Applied rewrites77.3%
Applied rewrites69.4%
Applied rewrites81.7%
if 4.8e11 < k Initial program 32.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.2%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites20.9%
Taylor expanded in k around inf
Applied rewrites57.4%
Applied rewrites57.4%
Final simplification75.8%
(FPCore (t l k) :precision binary64 (if (<= k 480000000000.0) (* (* (/ l k) (/ l k)) (/ 2.0 (* (* k k) t))) (* (/ l k) (* (/ l (* k t)) -0.3333333333333333))))
double code(double t, double l, double k) {
double tmp;
if (k <= 480000000000.0) {
tmp = ((l / k) * (l / k)) * (2.0 / ((k * k) * t));
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
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 <= 480000000000.0d0) then
tmp = ((l / k) * (l / k)) * (2.0d0 / ((k * k) * t))
else
tmp = (l / k) * ((l / (k * t)) * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 480000000000.0) {
tmp = ((l / k) * (l / k)) * (2.0 / ((k * k) * t));
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 480000000000.0: tmp = ((l / k) * (l / k)) * (2.0 / ((k * k) * t)) else: tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 480000000000.0) tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(2.0 / Float64(Float64(k * k) * t))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / Float64(k * t)) * -0.3333333333333333)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 480000000000.0) tmp = ((l / k) * (l / k)) * (2.0 / ((k * k) * t)); else tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 480000000000.0], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 480000000000:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{2}{\left(k \cdot k\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{\ell}{k \cdot t} \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if k < 4.8e11Initial program 33.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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.3%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6478.7
Applied rewrites78.7%
Taylor expanded in k around 0
Applied rewrites78.8%
if 4.8e11 < k Initial program 32.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.2%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites20.9%
Taylor expanded in k around inf
Applied rewrites57.4%
Applied rewrites57.4%
Final simplification73.6%
(FPCore (t l k) :precision binary64 (if (<= k 480000000000.0) (/ 2.0 (* (* (/ (* k k) (* l l)) (* k k)) t)) (* (/ l k) (* (/ l (* k t)) -0.3333333333333333))))
double code(double t, double l, double k) {
double tmp;
if (k <= 480000000000.0) {
tmp = 2.0 / ((((k * k) / (l * l)) * (k * k)) * t);
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
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 <= 480000000000.0d0) then
tmp = 2.0d0 / ((((k * k) / (l * l)) * (k * k)) * t)
else
tmp = (l / k) * ((l / (k * t)) * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 480000000000.0) {
tmp = 2.0 / ((((k * k) / (l * l)) * (k * k)) * t);
} else {
tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 480000000000.0: tmp = 2.0 / ((((k * k) / (l * l)) * (k * k)) * t) else: tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 480000000000.0) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) / Float64(l * l)) * Float64(k * k)) * t)); else tmp = Float64(Float64(l / k) * Float64(Float64(l / Float64(k * t)) * -0.3333333333333333)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 480000000000.0) tmp = 2.0 / ((((k * k) / (l * l)) * (k * k)) * t); else tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 480000000000.0], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 480000000000:\\
\;\;\;\;\frac{2}{\left(\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot k\right)\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{\ell}{k \cdot t} \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if k < 4.8e11Initial program 33.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.f6477.3
Applied rewrites77.3%
Applied rewrites69.4%
if 4.8e11 < k Initial program 32.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.2%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites20.9%
Taylor expanded in k around inf
Applied rewrites57.4%
Applied rewrites57.4%
Final simplification66.5%
(FPCore (t l k) :precision binary64 (* (/ l k) (* (/ l (* k t)) -0.3333333333333333)))
double code(double t, double l, double k) {
return (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
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) * ((l / (k * t)) * (-0.3333333333333333d0))
end function
public static double code(double t, double l, double k) {
return (l / k) * ((l / (k * t)) * -0.3333333333333333);
}
def code(t, l, k): return (l / k) * ((l / (k * t)) * -0.3333333333333333)
function code(t, l, k) return Float64(Float64(l / k) * Float64(Float64(l / Float64(k * t)) * -0.3333333333333333)) end
function tmp = code(t, l, k) tmp = (l / k) * ((l / (k * t)) * -0.3333333333333333); end
code[t_, l_, k_] := N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{k} \cdot \left(\frac{\ell}{k \cdot t} \cdot -0.3333333333333333\right)
\end{array}
Initial program 33.2%
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
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-/.f64N/A
Applied rewrites95.3%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites40.2%
Taylor expanded in k around inf
Applied rewrites32.2%
Applied rewrites32.2%
Final simplification32.2%
herbie shell --seed 2024312
(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))))