
(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 19 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}
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 6.8e+53)
(/ 2.0 (* (* (* (/ (tan k_m) l) (* (sin k_m) t)) k_m) (/ k_m l)))
(/
2.0
(*
(* (* (- 0.5 (* (cos (+ k_m k_m)) 0.5)) t) (/ k_m l))
(/ k_m (* (cos k_m) l))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 6.8e+53) {
tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l));
} else {
tmp = 2.0 / ((((0.5 - (cos((k_m + k_m)) * 0.5)) * t) * (k_m / l)) * (k_m / (cos(k_m) * l)));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (k_m <= 6.8d+53) then
tmp = 2.0d0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l))
else
tmp = 2.0d0 / ((((0.5d0 - (cos((k_m + k_m)) * 0.5d0)) * t) * (k_m / l)) * (k_m / (cos(k_m) * l)))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 6.8e+53) {
tmp = 2.0 / ((((Math.tan(k_m) / l) * (Math.sin(k_m) * t)) * k_m) * (k_m / l));
} else {
tmp = 2.0 / ((((0.5 - (Math.cos((k_m + k_m)) * 0.5)) * t) * (k_m / l)) * (k_m / (Math.cos(k_m) * l)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 6.8e+53: tmp = 2.0 / ((((math.tan(k_m) / l) * (math.sin(k_m) * t)) * k_m) * (k_m / l)) else: tmp = 2.0 / ((((0.5 - (math.cos((k_m + k_m)) * 0.5)) * t) * (k_m / l)) * (k_m / (math.cos(k_m) * l))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 6.8e+53) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) / l) * Float64(sin(k_m) * t)) * k_m) * Float64(k_m / l))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(0.5 - Float64(cos(Float64(k_m + k_m)) * 0.5)) * t) * Float64(k_m / l)) * Float64(k_m / Float64(cos(k_m) * l)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 6.8e+53) tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l)); else tmp = 2.0 / ((((0.5 - (cos((k_m + k_m)) * 0.5)) * t) * (k_m / l)) * (k_m / (cos(k_m) * l))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.8e+53], N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(0.5 - N[(N[Cos[N[(k$95$m + k$95$m), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(k$95$m / N[(N[Cos[k$95$m], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 6.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\tan k\_m}{\ell} \cdot \left(\sin k\_m \cdot t\right)\right) \cdot k\_m\right) \cdot \frac{k\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(0.5 - \cos \left(k\_m + k\_m\right) \cdot 0.5\right) \cdot t\right) \cdot \frac{k\_m}{\ell}\right) \cdot \frac{k\_m}{\cos k\_m \cdot \ell}}\\
\end{array}
\end{array}
if k < 6.79999999999999995e53Initial program 37.3%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6480.9
Applied rewrites80.9%
Applied rewrites91.4%
Applied rewrites92.1%
Applied rewrites94.1%
if 6.79999999999999995e53 < k Initial program 39.9%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6471.8
Applied rewrites71.8%
Applied rewrites98.1%
Final simplification94.9%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 6.8e+53)
(/ 2.0 (* (* (* (/ (tan k_m) l) (* (sin k_m) t)) k_m) (/ k_m l)))
(/
2.0
(*
(* (* (- 0.5 (* (cos (+ k_m k_m)) 0.5)) t) (/ k_m (* (cos k_m) l)))
(/ k_m l)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 6.8e+53) {
tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l));
} else {
tmp = 2.0 / ((((0.5 - (cos((k_m + k_m)) * 0.5)) * t) * (k_m / (cos(k_m) * l))) * (k_m / l));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (k_m <= 6.8d+53) then
tmp = 2.0d0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l))
else
tmp = 2.0d0 / ((((0.5d0 - (cos((k_m + k_m)) * 0.5d0)) * t) * (k_m / (cos(k_m) * l))) * (k_m / l))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 6.8e+53) {
tmp = 2.0 / ((((Math.tan(k_m) / l) * (Math.sin(k_m) * t)) * k_m) * (k_m / l));
} else {
tmp = 2.0 / ((((0.5 - (Math.cos((k_m + k_m)) * 0.5)) * t) * (k_m / (Math.cos(k_m) * l))) * (k_m / l));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 6.8e+53: tmp = 2.0 / ((((math.tan(k_m) / l) * (math.sin(k_m) * t)) * k_m) * (k_m / l)) else: tmp = 2.0 / ((((0.5 - (math.cos((k_m + k_m)) * 0.5)) * t) * (k_m / (math.cos(k_m) * l))) * (k_m / l)) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 6.8e+53) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) / l) * Float64(sin(k_m) * t)) * k_m) * Float64(k_m / l))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(0.5 - Float64(cos(Float64(k_m + k_m)) * 0.5)) * t) * Float64(k_m / Float64(cos(k_m) * l))) * Float64(k_m / l))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 6.8e+53) tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l)); else tmp = 2.0 / ((((0.5 - (cos((k_m + k_m)) * 0.5)) * t) * (k_m / (cos(k_m) * l))) * (k_m / l)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.8e+53], N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(0.5 - N[(N[Cos[N[(k$95$m + k$95$m), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * N[(k$95$m / N[(N[Cos[k$95$m], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 6.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\tan k\_m}{\ell} \cdot \left(\sin k\_m \cdot t\right)\right) \cdot k\_m\right) \cdot \frac{k\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(0.5 - \cos \left(k\_m + k\_m\right) \cdot 0.5\right) \cdot t\right) \cdot \frac{k\_m}{\cos k\_m \cdot \ell}\right) \cdot \frac{k\_m}{\ell}}\\
\end{array}
\end{array}
if k < 6.79999999999999995e53Initial program 37.3%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6480.9
Applied rewrites80.9%
Applied rewrites91.4%
Applied rewrites92.1%
Applied rewrites94.1%
if 6.79999999999999995e53 < k Initial program 39.9%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6471.8
Applied rewrites71.8%
Applied rewrites98.1%
Final simplification94.9%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 6.8e+53)
(/ 2.0 (* (* (* (/ (tan k_m) l) (* (sin k_m) t)) k_m) (/ k_m l)))
(/
2.0
(*
(* (fma -0.5 (cos (+ k_m k_m)) 0.5) (* (/ k_m l) t))
(/ k_m (* (cos k_m) l))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 6.8e+53) {
tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l));
} else {
tmp = 2.0 / ((fma(-0.5, cos((k_m + k_m)), 0.5) * ((k_m / l) * t)) * (k_m / (cos(k_m) * l)));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 6.8e+53) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) / l) * Float64(sin(k_m) * t)) * k_m) * Float64(k_m / l))); else tmp = Float64(2.0 / Float64(Float64(fma(-0.5, cos(Float64(k_m + k_m)), 0.5) * Float64(Float64(k_m / l) * t)) * Float64(k_m / Float64(cos(k_m) * l)))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.8e+53], N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(-0.5 * N[Cos[N[(k$95$m + k$95$m), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision] * N[(N[(k$95$m / l), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * N[(k$95$m / N[(N[Cos[k$95$m], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 6.8 \cdot 10^{+53}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\tan k\_m}{\ell} \cdot \left(\sin k\_m \cdot t\right)\right) \cdot k\_m\right) \cdot \frac{k\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\mathsf{fma}\left(-0.5, \cos \left(k\_m + k\_m\right), 0.5\right) \cdot \left(\frac{k\_m}{\ell} \cdot t\right)\right) \cdot \frac{k\_m}{\cos k\_m \cdot \ell}}\\
\end{array}
\end{array}
if k < 6.79999999999999995e53Initial program 37.3%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6480.9
Applied rewrites80.9%
Applied rewrites91.4%
Applied rewrites92.1%
Applied rewrites94.1%
if 6.79999999999999995e53 < k Initial program 39.9%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6471.8
Applied rewrites71.8%
Applied rewrites94.4%
Applied rewrites98.1%
Final simplification94.9%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) t)))
(if (<= t 2.3e-133)
(/ 2.0 (/ (* (* (* (* t_1 k_m) (tan k_m)) (/ 1.0 l)) k_m) l))
(/ 2.0 (* (* (* (/ (tan k_m) l) t_1) k_m) (/ k_m l))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * t;
double tmp;
if (t <= 2.3e-133) {
tmp = 2.0 / (((((t_1 * k_m) * tan(k_m)) * (1.0 / l)) * k_m) / l);
} else {
tmp = 2.0 / ((((tan(k_m) / l) * t_1) * k_m) * (k_m / l));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k_m) * t
if (t <= 2.3d-133) then
tmp = 2.0d0 / (((((t_1 * k_m) * tan(k_m)) * (1.0d0 / l)) * k_m) / l)
else
tmp = 2.0d0 / ((((tan(k_m) / l) * t_1) * k_m) * (k_m / l))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.sin(k_m) * t;
double tmp;
if (t <= 2.3e-133) {
tmp = 2.0 / (((((t_1 * k_m) * Math.tan(k_m)) * (1.0 / l)) * k_m) / l);
} else {
tmp = 2.0 / ((((Math.tan(k_m) / l) * t_1) * k_m) * (k_m / l));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): t_1 = math.sin(k_m) * t tmp = 0 if t <= 2.3e-133: tmp = 2.0 / (((((t_1 * k_m) * math.tan(k_m)) * (1.0 / l)) * k_m) / l) else: tmp = 2.0 / ((((math.tan(k_m) / l) * t_1) * k_m) * (k_m / l)) return tmp
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * t) tmp = 0.0 if (t <= 2.3e-133) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_1 * k_m) * tan(k_m)) * Float64(1.0 / l)) * k_m) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) / l) * t_1) * k_m) * Float64(k_m / l))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) t_1 = sin(k_m) * t; tmp = 0.0; if (t <= 2.3e-133) tmp = 2.0 / (((((t_1 * k_m) * tan(k_m)) * (1.0 / l)) * k_m) / l); else tmp = 2.0 / ((((tan(k_m) / l) * t_1) * k_m) * (k_m / l)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, 2.3e-133], N[(2.0 / N[(N[(N[(N[(N[(t$95$1 * k$95$m), $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * k$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot t\\
\mathbf{if}\;t \leq 2.3 \cdot 10^{-133}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(\left(t\_1 \cdot k\_m\right) \cdot \tan k\_m\right) \cdot \frac{1}{\ell}\right) \cdot k\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\tan k\_m}{\ell} \cdot t\_1\right) \cdot k\_m\right) \cdot \frac{k\_m}{\ell}}\\
\end{array}
\end{array}
if t < 2.3e-133Initial program 35.9%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6476.3
Applied rewrites76.3%
Applied rewrites91.1%
Applied rewrites91.4%
Applied rewrites93.0%
if 2.3e-133 < t Initial program 41.4%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6485.2
Applied rewrites85.2%
Applied rewrites93.7%
Applied rewrites92.5%
Applied rewrites97.8%
Final simplification94.6%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (sin k_m) t)))
(if (<= t 3e-134)
(/ 2.0 (/ (* (* (* t_1 k_m) (tan k_m)) (/ k_m l)) l))
(/ 2.0 (* (* (* (/ (tan k_m) l) t_1) k_m) (/ k_m l))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = sin(k_m) * t;
double tmp;
if (t <= 3e-134) {
tmp = 2.0 / ((((t_1 * k_m) * tan(k_m)) * (k_m / l)) / l);
} else {
tmp = 2.0 / ((((tan(k_m) / l) * t_1) * k_m) * (k_m / l));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k_m) * t
if (t <= 3d-134) then
tmp = 2.0d0 / ((((t_1 * k_m) * tan(k_m)) * (k_m / l)) / l)
else
tmp = 2.0d0 / ((((tan(k_m) / l) * t_1) * k_m) * (k_m / l))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.sin(k_m) * t;
double tmp;
if (t <= 3e-134) {
tmp = 2.0 / ((((t_1 * k_m) * Math.tan(k_m)) * (k_m / l)) / l);
} else {
tmp = 2.0 / ((((Math.tan(k_m) / l) * t_1) * k_m) * (k_m / l));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): t_1 = math.sin(k_m) * t tmp = 0 if t <= 3e-134: tmp = 2.0 / ((((t_1 * k_m) * math.tan(k_m)) * (k_m / l)) / l) else: tmp = 2.0 / ((((math.tan(k_m) / l) * t_1) * k_m) * (k_m / l)) return tmp
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(sin(k_m) * t) tmp = 0.0 if (t <= 3e-134) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_1 * k_m) * tan(k_m)) * Float64(k_m / l)) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) / l) * t_1) * k_m) * Float64(k_m / l))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) t_1 = sin(k_m) * t; tmp = 0.0; if (t <= 3e-134) tmp = 2.0 / ((((t_1 * k_m) * tan(k_m)) * (k_m / l)) / l); else tmp = 2.0 / ((((tan(k_m) / l) * t_1) * k_m) * (k_m / l)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, 3e-134], N[(2.0 / N[(N[(N[(N[(t$95$1 * k$95$m), $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \sin k\_m \cdot t\\
\mathbf{if}\;t \leq 3 \cdot 10^{-134}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(t\_1 \cdot k\_m\right) \cdot \tan k\_m\right) \cdot \frac{k\_m}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\tan k\_m}{\ell} \cdot t\_1\right) \cdot k\_m\right) \cdot \frac{k\_m}{\ell}}\\
\end{array}
\end{array}
if t < 3e-134Initial program 36.1%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6476.1
Applied rewrites76.1%
Applied rewrites91.1%
Applied rewrites91.4%
Applied rewrites93.0%
if 3e-134 < t Initial program 40.9%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6485.4
Applied rewrites85.4%
Applied rewrites93.8%
Applied rewrites92.6%
Applied rewrites97.8%
Final simplification94.6%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= t 2.3e-230) (/ 2.0 (/ (* (* (* (tan k_m) (sin k_m)) t) (* (/ k_m l) k_m)) l)) (/ 2.0 (* (* (* (/ (tan k_m) l) (* (sin k_m) t)) k_m) (/ k_m l)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 2.3e-230) {
tmp = 2.0 / ((((tan(k_m) * sin(k_m)) * t) * ((k_m / l) * k_m)) / l);
} else {
tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t <= 2.3d-230) then
tmp = 2.0d0 / ((((tan(k_m) * sin(k_m)) * t) * ((k_m / l) * k_m)) / l)
else
tmp = 2.0d0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 2.3e-230) {
tmp = 2.0 / ((((Math.tan(k_m) * Math.sin(k_m)) * t) * ((k_m / l) * k_m)) / l);
} else {
tmp = 2.0 / ((((Math.tan(k_m) / l) * (Math.sin(k_m) * t)) * k_m) * (k_m / l));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 2.3e-230: tmp = 2.0 / ((((math.tan(k_m) * math.sin(k_m)) * t) * ((k_m / l) * k_m)) / l) else: tmp = 2.0 / ((((math.tan(k_m) / l) * (math.sin(k_m) * t)) * k_m) * (k_m / l)) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 2.3e-230) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) * sin(k_m)) * t) * Float64(Float64(k_m / l) * k_m)) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) / l) * Float64(sin(k_m) * t)) * k_m) * Float64(k_m / l))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 2.3e-230) tmp = 2.0 / ((((tan(k_m) * sin(k_m)) * t) * ((k_m / l) * k_m)) / l); else tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 2.3e-230], N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * N[(N[(k$95$m / l), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.3 \cdot 10^{-230}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(\tan k\_m \cdot \sin k\_m\right) \cdot t\right) \cdot \left(\frac{k\_m}{\ell} \cdot k\_m\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\tan k\_m}{\ell} \cdot \left(\sin k\_m \cdot t\right)\right) \cdot k\_m\right) \cdot \frac{k\_m}{\ell}}\\
\end{array}
\end{array}
if t < 2.2999999999999998e-230Initial program 37.2%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6477.3
Applied rewrites77.3%
Applied rewrites92.3%
Applied rewrites92.7%
if 2.2999999999999998e-230 < t Initial program 38.5%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6481.9
Applied rewrites81.9%
Applied rewrites91.5%
Applied rewrites90.5%
Applied rewrites95.6%
Final simplification93.9%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= t 6.6e-231) (/ 2.0 (* (/ (* (/ k_m l) k_m) l) (* (* (tan k_m) (sin k_m)) t))) (/ 2.0 (* (* (* (/ (tan k_m) l) (* (sin k_m) t)) k_m) (/ k_m l)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 6.6e-231) {
tmp = 2.0 / ((((k_m / l) * k_m) / l) * ((tan(k_m) * sin(k_m)) * t));
} else {
tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t <= 6.6d-231) then
tmp = 2.0d0 / ((((k_m / l) * k_m) / l) * ((tan(k_m) * sin(k_m)) * t))
else
tmp = 2.0d0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 6.6e-231) {
tmp = 2.0 / ((((k_m / l) * k_m) / l) * ((Math.tan(k_m) * Math.sin(k_m)) * t));
} else {
tmp = 2.0 / ((((Math.tan(k_m) / l) * (Math.sin(k_m) * t)) * k_m) * (k_m / l));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 6.6e-231: tmp = 2.0 / ((((k_m / l) * k_m) / l) * ((math.tan(k_m) * math.sin(k_m)) * t)) else: tmp = 2.0 / ((((math.tan(k_m) / l) * (math.sin(k_m) * t)) * k_m) * (k_m / l)) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 6.6e-231) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k_m / l) * k_m) / l) * Float64(Float64(tan(k_m) * sin(k_m)) * t))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) / l) * Float64(sin(k_m) * t)) * k_m) * Float64(k_m / l))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 6.6e-231) tmp = 2.0 / ((((k_m / l) * k_m) / l) * ((tan(k_m) * sin(k_m)) * t)); else tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 6.6e-231], N[(2.0 / N[(N[(N[(N[(k$95$m / l), $MachinePrecision] * k$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Tan[k$95$m], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.6 \cdot 10^{-231}:\\
\;\;\;\;\frac{2}{\frac{\frac{k\_m}{\ell} \cdot k\_m}{\ell} \cdot \left(\left(\tan k\_m \cdot \sin k\_m\right) \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\tan k\_m}{\ell} \cdot \left(\sin k\_m \cdot t\right)\right) \cdot k\_m\right) \cdot \frac{k\_m}{\ell}}\\
\end{array}
\end{array}
if t < 6.60000000000000056e-231Initial program 37.2%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6477.3
Applied rewrites77.3%
Applied rewrites92.3%
Applied rewrites91.2%
if 6.60000000000000056e-231 < t Initial program 38.5%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6481.9
Applied rewrites81.9%
Applied rewrites91.5%
Applied rewrites90.5%
Applied rewrites95.6%
Final simplification93.0%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.75e-106)
(/
2.0
(*
(* (* (* (fma -0.3333333333333333 (* k_m k_m) 1.0) t) k_m) k_m)
(* (/ k_m (* (cos k_m) l)) (/ k_m l))))
(/ 2.0 (* (* (* (/ t l) (* (tan k_m) (sin k_m))) (/ k_m l)) k_m))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.75e-106) {
tmp = 2.0 / ((((fma(-0.3333333333333333, (k_m * k_m), 1.0) * t) * k_m) * k_m) * ((k_m / (cos(k_m) * l)) * (k_m / l)));
} else {
tmp = 2.0 / ((((t / l) * (tan(k_m) * sin(k_m))) * (k_m / l)) * k_m);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.75e-106) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(-0.3333333333333333, Float64(k_m * k_m), 1.0) * t) * k_m) * k_m) * Float64(Float64(k_m / Float64(cos(k_m) * l)) * Float64(k_m / l)))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t / l) * Float64(tan(k_m) * sin(k_m))) * Float64(k_m / l)) * k_m)); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.75e-106], N[(2.0 / N[(N[(N[(N[(N[(-0.3333333333333333 * N[(k$95$m * k$95$m), $MachinePrecision] + 1.0), $MachinePrecision] * t), $MachinePrecision] * k$95$m), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(N[(k$95$m / N[(N[Cos[k$95$m], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t / l), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.75 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\mathsf{fma}\left(-0.3333333333333333, k\_m \cdot k\_m, 1\right) \cdot t\right) \cdot k\_m\right) \cdot k\_m\right) \cdot \left(\frac{k\_m}{\cos k\_m \cdot \ell} \cdot \frac{k\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t}{\ell} \cdot \left(\tan k\_m \cdot \sin k\_m\right)\right) \cdot \frac{k\_m}{\ell}\right) \cdot k\_m}\\
\end{array}
\end{array}
if k < 1.75e-106Initial program 37.7%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6481.9
Applied rewrites81.9%
Applied rewrites93.9%
Taylor expanded in k around 0
Applied rewrites78.1%
if 1.75e-106 < k Initial program 37.8%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6473.8
Applied rewrites73.8%
Applied rewrites87.9%
Applied rewrites91.3%
Final simplification82.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.02e-9)
(/
2.0
(/
(*
(* (* (fma (* (* k_m k_m) t) 0.16666666666666666 t) k_m) k_m)
(* (/ k_m l) k_m))
l))
(/ 2.0 (* (/ k_m (* l l)) (* (* (* (sin k_m) t) k_m) (tan k_m))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.02e-9) {
tmp = 2.0 / ((((fma(((k_m * k_m) * t), 0.16666666666666666, t) * k_m) * k_m) * ((k_m / l) * k_m)) / l);
} else {
tmp = 2.0 / ((k_m / (l * l)) * (((sin(k_m) * t) * k_m) * tan(k_m)));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.02e-9) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(Float64(k_m * k_m) * t), 0.16666666666666666, t) * k_m) * k_m) * Float64(Float64(k_m / l) * k_m)) / l)); else tmp = Float64(2.0 / Float64(Float64(k_m / Float64(l * l)) * Float64(Float64(Float64(sin(k_m) * t) * k_m) * tan(k_m)))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.02e-9], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(k$95$m * k$95$m), $MachinePrecision] * t), $MachinePrecision] * 0.16666666666666666 + t), $MachinePrecision] * k$95$m), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(N[(k$95$m / l), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision] * k$95$m), $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.02 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(\mathsf{fma}\left(\left(k\_m \cdot k\_m\right) \cdot t, 0.16666666666666666, t\right) \cdot k\_m\right) \cdot k\_m\right) \cdot \left(\frac{k\_m}{\ell} \cdot k\_m\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{k\_m}{\ell \cdot \ell} \cdot \left(\left(\left(\sin k\_m \cdot t\right) \cdot k\_m\right) \cdot \tan k\_m\right)}\\
\end{array}
\end{array}
if k < 1.01999999999999999e-9Initial program 37.4%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6481.2
Applied rewrites81.2%
Applied rewrites91.9%
Applied rewrites91.7%
Taylor expanded in k around 0
Applied rewrites79.7%
if 1.01999999999999999e-9 < k Initial program 38.9%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6472.7
Applied rewrites72.7%
Applied rewrites92.3%
Applied rewrites92.1%
Applied rewrites74.5%
Final simplification78.5%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.02e-9)
(/
2.0
(/
(*
(* (* (fma (* (* k_m k_m) t) 0.16666666666666666 t) k_m) k_m)
(* (/ k_m l) k_m))
l))
(/ 2.0 (* (/ (* (* (tan k_m) t) (sin k_m)) (* l l)) (* k_m k_m)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.02e-9) {
tmp = 2.0 / ((((fma(((k_m * k_m) * t), 0.16666666666666666, t) * k_m) * k_m) * ((k_m / l) * k_m)) / l);
} else {
tmp = 2.0 / ((((tan(k_m) * t) * sin(k_m)) / (l * l)) * (k_m * k_m));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.02e-9) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(Float64(k_m * k_m) * t), 0.16666666666666666, t) * k_m) * k_m) * Float64(Float64(k_m / l) * k_m)) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) * t) * sin(k_m)) / Float64(l * l)) * Float64(k_m * k_m))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.02e-9], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(k$95$m * k$95$m), $MachinePrecision] * t), $MachinePrecision] * 0.16666666666666666 + t), $MachinePrecision] * k$95$m), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(N[(k$95$m / l), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] * t), $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.02 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(\mathsf{fma}\left(\left(k\_m \cdot k\_m\right) \cdot t, 0.16666666666666666, t\right) \cdot k\_m\right) \cdot k\_m\right) \cdot \left(\frac{k\_m}{\ell} \cdot k\_m\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k\_m \cdot t\right) \cdot \sin k\_m}{\ell \cdot \ell} \cdot \left(k\_m \cdot k\_m\right)}\\
\end{array}
\end{array}
if k < 1.01999999999999999e-9Initial program 37.4%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6481.2
Applied rewrites81.2%
Applied rewrites91.9%
Applied rewrites91.7%
Taylor expanded in k around 0
Applied rewrites79.7%
if 1.01999999999999999e-9 < k Initial program 38.9%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6472.7
Applied rewrites72.7%
Applied rewrites92.3%
Applied rewrites92.1%
Applied rewrites74.1%
Final simplification78.4%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (/ 2.0 (* (* (* (/ (tan k_m) l) (* (sin k_m) t)) k_m) (/ k_m l))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = 2.0d0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return 2.0 / ((((Math.tan(k_m) / l) * (Math.sin(k_m) * t)) * k_m) * (k_m / l));
}
k_m = math.fabs(k) def code(t, l, k_m): return 2.0 / ((((math.tan(k_m) / l) * (math.sin(k_m) * t)) * k_m) * (k_m / l))
k_m = abs(k) function code(t, l, k_m) return Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) / l) * Float64(sin(k_m) * t)) * k_m) * Float64(k_m / l))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * k_m) * (k_m / l)); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\frac{2}{\left(\left(\frac{\tan k\_m}{\ell} \cdot \left(\sin k\_m \cdot t\right)\right) \cdot k\_m\right) \cdot \frac{k\_m}{\ell}}
\end{array}
Initial program 37.7%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6479.2
Applied rewrites79.2%
Applied rewrites92.0%
Applied rewrites91.8%
Applied rewrites94.2%
Final simplification94.2%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (/ 2.0 (* (* (* (/ (tan k_m) l) (* (sin k_m) t)) (/ k_m l)) k_m)))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * (k_m / l)) * k_m);
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = 2.0d0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * (k_m / l)) * k_m)
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return 2.0 / ((((Math.tan(k_m) / l) * (Math.sin(k_m) * t)) * (k_m / l)) * k_m);
}
k_m = math.fabs(k) def code(t, l, k_m): return 2.0 / ((((math.tan(k_m) / l) * (math.sin(k_m) * t)) * (k_m / l)) * k_m)
k_m = abs(k) function code(t, l, k_m) return Float64(2.0 / Float64(Float64(Float64(Float64(tan(k_m) / l) * Float64(sin(k_m) * t)) * Float64(k_m / l)) * k_m)) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = 2.0 / ((((tan(k_m) / l) * (sin(k_m) * t)) * (k_m / l)) * k_m); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(2.0 / N[(N[(N[(N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * N[(k$95$m / l), $MachinePrecision]), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\frac{2}{\left(\left(\frac{\tan k\_m}{\ell} \cdot \left(\sin k\_m \cdot t\right)\right) \cdot \frac{k\_m}{\ell}\right) \cdot k\_m}
\end{array}
Initial program 37.7%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6479.2
Applied rewrites79.2%
Applied rewrites92.0%
Applied rewrites91.8%
Applied rewrites92.7%
Final simplification92.7%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (* (* k_m k_m) t)))
(if (<= l 3.4e+189)
(/
2.0
(/
(* (* (* (fma t_1 0.16666666666666666 t) k_m) k_m) (* (/ k_m l) k_m))
l))
(/ 2.0 (* t_1 (/ (* k_m k_m) (* (* (cos k_m) l) l)))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = (k_m * k_m) * t;
double tmp;
if (l <= 3.4e+189) {
tmp = 2.0 / ((((fma(t_1, 0.16666666666666666, t) * k_m) * k_m) * ((k_m / l) * k_m)) / l);
} else {
tmp = 2.0 / (t_1 * ((k_m * k_m) / ((cos(k_m) * l) * l)));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(Float64(k_m * k_m) * t) tmp = 0.0 if (l <= 3.4e+189) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(t_1, 0.16666666666666666, t) * k_m) * k_m) * Float64(Float64(k_m / l) * k_m)) / l)); else tmp = Float64(2.0 / Float64(t_1 * Float64(Float64(k_m * k_m) / Float64(Float64(cos(k_m) * l) * l)))); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[(k$95$m * k$95$m), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[l, 3.4e+189], N[(2.0 / N[(N[(N[(N[(N[(t$95$1 * 0.16666666666666666 + t), $MachinePrecision] * k$95$m), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(N[(k$95$m / l), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$1 * N[(N[(k$95$m * k$95$m), $MachinePrecision] / N[(N[(N[Cos[k$95$m], $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \left(k\_m \cdot k\_m\right) \cdot t\\
\mathbf{if}\;\ell \leq 3.4 \cdot 10^{+189}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(\mathsf{fma}\left(t\_1, 0.16666666666666666, t\right) \cdot k\_m\right) \cdot k\_m\right) \cdot \left(\frac{k\_m}{\ell} \cdot k\_m\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_1 \cdot \frac{k\_m \cdot k\_m}{\left(\cos k\_m \cdot \ell\right) \cdot \ell}}\\
\end{array}
\end{array}
if l < 3.39999999999999983e189Initial program 37.0%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6480.2
Applied rewrites80.2%
Applied rewrites91.6%
Applied rewrites92.6%
Taylor expanded in k around 0
Applied rewrites77.1%
if 3.39999999999999983e189 < l Initial program 45.8%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6468.7
Applied rewrites68.7%
Taylor expanded in k around 0
Applied rewrites68.6%
Final simplification76.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(/
2.0
(/
(*
(* (* (fma (* (* k_m k_m) t) 0.16666666666666666 t) k_m) k_m)
(* (/ k_m l) k_m))
l)))k_m = fabs(k);
double code(double t, double l, double k_m) {
return 2.0 / ((((fma(((k_m * k_m) * t), 0.16666666666666666, t) * k_m) * k_m) * ((k_m / l) * k_m)) / l);
}
k_m = abs(k) function code(t, l, k_m) return Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(Float64(k_m * k_m) * t), 0.16666666666666666, t) * k_m) * k_m) * Float64(Float64(k_m / l) * k_m)) / l)) end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(2.0 / N[(N[(N[(N[(N[(N[(N[(k$95$m * k$95$m), $MachinePrecision] * t), $MachinePrecision] * 0.16666666666666666 + t), $MachinePrecision] * k$95$m), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(N[(k$95$m / l), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\frac{2}{\frac{\left(\left(\mathsf{fma}\left(\left(k\_m \cdot k\_m\right) \cdot t, 0.16666666666666666, t\right) \cdot k\_m\right) \cdot k\_m\right) \cdot \left(\frac{k\_m}{\ell} \cdot k\_m\right)}{\ell}}
\end{array}
Initial program 37.7%
Taylor expanded in t around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6479.2
Applied rewrites79.2%
Applied rewrites92.0%
Applied rewrites91.8%
Taylor expanded in k around 0
Applied rewrites75.3%
Final simplification75.3%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (/ (* l 2.0) (* (* k_m k_m) t)) (/ l (* k_m k_m))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return ((l * 2.0) / ((k_m * k_m) * t)) * (l / (k_m * k_m));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = ((l * 2.0d0) / ((k_m * k_m) * t)) * (l / (k_m * k_m))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return ((l * 2.0) / ((k_m * k_m) * t)) * (l / (k_m * k_m));
}
k_m = math.fabs(k) def code(t, l, k_m): return ((l * 2.0) / ((k_m * k_m) * t)) * (l / (k_m * k_m))
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(Float64(l * 2.0) / Float64(Float64(k_m * k_m) * t)) * Float64(l / Float64(k_m * k_m))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = ((l * 2.0) / ((k_m * k_m) * t)) * (l / (k_m * k_m)); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(N[(l * 2.0), $MachinePrecision] / N[(N[(k$95$m * k$95$m), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\frac{\ell \cdot 2}{\left(k\_m \cdot k\_m\right) \cdot t} \cdot \frac{\ell}{k\_m \cdot k\_m}
\end{array}
Initial program 37.7%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.3
Applied rewrites66.3%
Applied rewrites75.3%
Final simplification75.3%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (* (/ 2.0 (* (* (* (* k_m k_m) k_m) t) k_m)) l) l))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return ((2.0 / ((((k_m * k_m) * k_m) * t) * k_m)) * l) * l;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = ((2.0d0 / ((((k_m * k_m) * k_m) * t) * k_m)) * l) * l
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return ((2.0 / ((((k_m * k_m) * k_m) * t) * k_m)) * l) * l;
}
k_m = math.fabs(k) def code(t, l, k_m): return ((2.0 / ((((k_m * k_m) * k_m) * t) * k_m)) * l) * l
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(Float64(2.0 / Float64(Float64(Float64(Float64(k_m * k_m) * k_m) * t) * k_m)) * l) * l) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = ((2.0 / ((((k_m * k_m) * k_m) * t) * k_m)) * l) * l; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(N[(2.0 / N[(N[(N[(N[(k$95$m * k$95$m), $MachinePrecision] * k$95$m), $MachinePrecision] * t), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\left(\frac{2}{\left(\left(\left(k\_m \cdot k\_m\right) \cdot k\_m\right) \cdot t\right) \cdot k\_m} \cdot \ell\right) \cdot \ell
\end{array}
Initial program 37.7%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.3
Applied rewrites66.3%
Applied rewrites72.5%
Final simplification72.5%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (/ -0.11666666666666667 (/ t (* l l))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return -0.11666666666666667 / (t / (l * l));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = (-0.11666666666666667d0) / (t / (l * l))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return -0.11666666666666667 / (t / (l * l));
}
k_m = math.fabs(k) def code(t, l, k_m): return -0.11666666666666667 / (t / (l * l))
k_m = abs(k) function code(t, l, k_m) return Float64(-0.11666666666666667 / Float64(t / Float64(l * l))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = -0.11666666666666667 / (t / (l * l)); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(-0.11666666666666667 / N[(t / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\frac{-0.11666666666666667}{\frac{t}{\ell \cdot \ell}}
\end{array}
Initial program 37.7%
Taylor expanded in k around 0
Applied rewrites30.0%
Taylor expanded in k around inf
Applied rewrites14.5%
Taylor expanded in k around 0
Applied rewrites21.6%
Applied rewrites21.7%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (/ -0.11666666666666667 t) (* l l)))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return (-0.11666666666666667 / t) * (l * l);
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = ((-0.11666666666666667d0) / t) * (l * l)
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return (-0.11666666666666667 / t) * (l * l);
}
k_m = math.fabs(k) def code(t, l, k_m): return (-0.11666666666666667 / t) * (l * l)
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(-0.11666666666666667 / t) * Float64(l * l)) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = (-0.11666666666666667 / t) * (l * l); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(-0.11666666666666667 / t), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\frac{-0.11666666666666667}{t} \cdot \left(\ell \cdot \ell\right)
\end{array}
Initial program 37.7%
Taylor expanded in k around 0
Applied rewrites30.0%
Taylor expanded in k around inf
Applied rewrites14.5%
Taylor expanded in k around 0
Applied rewrites21.6%
Applied rewrites21.6%
Final simplification21.6%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* (* (/ l t) -0.11666666666666667) l))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return ((l / t) * -0.11666666666666667) * l;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = ((l / t) * (-0.11666666666666667d0)) * l
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return ((l / t) * -0.11666666666666667) * l;
}
k_m = math.fabs(k) def code(t, l, k_m): return ((l / t) * -0.11666666666666667) * l
k_m = abs(k) function code(t, l, k_m) return Float64(Float64(Float64(l / t) * -0.11666666666666667) * l) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = ((l / t) * -0.11666666666666667) * l; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(N[(N[(l / t), $MachinePrecision] * -0.11666666666666667), $MachinePrecision] * l), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\left(\frac{\ell}{t} \cdot -0.11666666666666667\right) \cdot \ell
\end{array}
Initial program 37.7%
Taylor expanded in k around 0
Applied rewrites30.0%
Taylor expanded in k around inf
Applied rewrites14.5%
Taylor expanded in k around 0
Applied rewrites21.6%
Applied rewrites19.4%
Final simplification19.4%
herbie shell --seed 2024240
(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))))