
(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}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 9e-11)
(/
2.0
(*
(*
(*
(fma 2.0 (/ (/ (pow t_m 3.0) k) k) t_m)
(/ (/ (pow (sin k) 2.0) l) (* (cos k) l)))
k)
k))
(/
(/
2.0
(*
(* (* (tan k) t_m) (/ (* (/ (sin k) l) t_m) l))
(+ (pow (/ k t_m) 2.0) 2.0)))
t_m))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9e-11) {
tmp = 2.0 / (((fma(2.0, ((pow(t_m, 3.0) / k) / k), t_m) * ((pow(sin(k), 2.0) / l) / (cos(k) * l))) * k) * k);
} else {
tmp = (2.0 / (((tan(k) * t_m) * (((sin(k) / l) * t_m) / l)) * (pow((k / t_m), 2.0) + 2.0))) / t_m;
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 9e-11) tmp = Float64(2.0 / Float64(Float64(Float64(fma(2.0, Float64(Float64((t_m ^ 3.0) / k) / k), t_m) * Float64(Float64((sin(k) ^ 2.0) / l) / Float64(cos(k) * l))) * k) * k)); else tmp = Float64(Float64(2.0 / Float64(Float64(Float64(tan(k) * t_m) * Float64(Float64(Float64(sin(k) / l) * t_m) / l)) * Float64((Float64(k / t_m) ^ 2.0) + 2.0))) / t_m); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9e-11], N[(2.0 / N[(N[(N[(N[(2.0 * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision] + t$95$m), $MachinePrecision] * N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * t$95$m), $MachinePrecision] * N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(2, \frac{\frac{{t\_m}^{3}}{k}}{k}, t\_m\right) \cdot \frac{\frac{{\sin k}^{2}}{\ell}}{\cos k \cdot \ell}\right) \cdot k\right) \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\left(\left(\tan k \cdot t\_m\right) \cdot \frac{\frac{\sin k}{\ell} \cdot t\_m}{\ell}\right) \cdot \left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right)}}{t\_m}\\
\end{array}
\end{array}
if t < 8.9999999999999999e-11Initial program 54.6%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites76.0%
if 8.9999999999999999e-11 < t Initial program 67.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6476.7
Applied rewrites76.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6485.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6485.9
Applied rewrites85.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6485.8
Applied rewrites82.4%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites88.2%
Final simplification78.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.3e-121)
(/ 2.0 (* (/ (pow (sin k) 2.0) (* (* (cos k) l) l)) (* (* k t_m) k)))
(/
(/
2.0
(*
(* (* (tan k) t_m) (/ (* (/ (sin k) l) t_m) l))
(+ (pow (/ k t_m) 2.0) 2.0)))
t_m))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.3e-121) {
tmp = 2.0 / ((pow(sin(k), 2.0) / ((cos(k) * l) * l)) * ((k * t_m) * k));
} else {
tmp = (2.0 / (((tan(k) * t_m) * (((sin(k) / l) * t_m) / l)) * (pow((k / t_m), 2.0) + 2.0))) / t_m;
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3.3d-121) then
tmp = 2.0d0 / (((sin(k) ** 2.0d0) / ((cos(k) * l) * l)) * ((k * t_m) * k))
else
tmp = (2.0d0 / (((tan(k) * t_m) * (((sin(k) / l) * t_m) / l)) * (((k / t_m) ** 2.0d0) + 2.0d0))) / t_m
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.3e-121) {
tmp = 2.0 / ((Math.pow(Math.sin(k), 2.0) / ((Math.cos(k) * l) * l)) * ((k * t_m) * k));
} else {
tmp = (2.0 / (((Math.tan(k) * t_m) * (((Math.sin(k) / l) * t_m) / l)) * (Math.pow((k / t_m), 2.0) + 2.0))) / t_m;
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3.3e-121: tmp = 2.0 / ((math.pow(math.sin(k), 2.0) / ((math.cos(k) * l) * l)) * ((k * t_m) * k)) else: tmp = (2.0 / (((math.tan(k) * t_m) * (((math.sin(k) / l) * t_m) / l)) * (math.pow((k / t_m), 2.0) + 2.0))) / t_m return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.3e-121) tmp = Float64(2.0 / Float64(Float64((sin(k) ^ 2.0) / Float64(Float64(cos(k) * l) * l)) * Float64(Float64(k * t_m) * k))); else tmp = Float64(Float64(2.0 / Float64(Float64(Float64(tan(k) * t_m) * Float64(Float64(Float64(sin(k) / l) * t_m) / l)) * Float64((Float64(k / t_m) ^ 2.0) + 2.0))) / t_m); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3.3e-121) tmp = 2.0 / (((sin(k) ^ 2.0) / ((cos(k) * l) * l)) * ((k * t_m) * k)); else tmp = (2.0 / (((tan(k) * t_m) * (((sin(k) / l) * t_m) / l)) * (((k / t_m) ^ 2.0) + 2.0))) / t_m; end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.3e-121], N[(2.0 / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * t$95$m), $MachinePrecision] * N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.3 \cdot 10^{-121}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\left(\cos k \cdot \ell\right) \cdot \ell} \cdot \left(\left(k \cdot t\_m\right) \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\left(\left(\tan k \cdot t\_m\right) \cdot \frac{\frac{\sin k}{\ell} \cdot t\_m}{\ell}\right) \cdot \left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right)}}{t\_m}\\
\end{array}
\end{array}
if t < 3.3000000000000001e-121Initial program 54.1%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6456.6
Applied rewrites56.6%
Taylor expanded in t around 0
associate-/l*N/A
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f6470.8
Applied rewrites70.8%
if 3.3000000000000001e-121 < t Initial program 64.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6473.6
Applied rewrites73.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6478.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6478.7
Applied rewrites78.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6479.2
Applied rewrites77.0%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites81.9%
Final simplification74.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.5e+16)
(* (/ (cos k) k) (/ (* (* l l) 2.0) (* (* (pow (sin k) 2.0) t_m) k)))
(/
2.0
(*
(fma (/ k t_m) (/ k t_m) 2.0)
(/ (* (* (* (/ (* (sin k) t_m) l) t_m) (tan k)) t_m) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.5e+16) {
tmp = (cos(k) / k) * (((l * l) * 2.0) / ((pow(sin(k), 2.0) * t_m) * k));
} else {
tmp = 2.0 / (fma((k / t_m), (k / t_m), 2.0) * ((((((sin(k) * t_m) / l) * t_m) * tan(k)) * t_m) / l));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.5e+16) tmp = Float64(Float64(cos(k) / k) * Float64(Float64(Float64(l * l) * 2.0) / Float64(Float64((sin(k) ^ 2.0) * t_m) * k))); else tmp = Float64(2.0 / Float64(fma(Float64(k / t_m), Float64(k / t_m), 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(sin(k) * t_m) / l) * t_m) * tan(k)) * t_m) / l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.5e+16], N[(N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{\cos k}{k} \cdot \frac{\left(\ell \cdot \ell\right) \cdot 2}{\left({\sin k}^{2} \cdot t\_m\right) \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right) \cdot \frac{\left(\left(\frac{\sin k \cdot t\_m}{\ell} \cdot t\_m\right) \cdot \tan k\right) \cdot t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 5.5e16Initial program 54.3%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6456.0
Applied rewrites56.0%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6469.9
Applied rewrites69.9%
Applied rewrites73.4%
if 5.5e16 < t Initial program 70.3%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6478.0
Applied rewrites78.0%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6478.0
Applied rewrites78.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
Applied rewrites88.3%
Final simplification76.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.4e-235)
(* (/ (cos k) (* (* (* (pow (sin k) 2.0) t_m) k) k)) (* (* l l) 2.0))
(if (<= t_m 325.0)
(* (* (* l 2.0) (/ (cos k) (* (pow (* (sin k) k) 2.0) t_m))) l)
(/
2.0
(*
(fma (/ k t_m) (/ k t_m) 2.0)
(/ (* (* (* (/ (* (sin k) t_m) l) t_m) (tan k)) t_m) l)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.4e-235) {
tmp = (cos(k) / (((pow(sin(k), 2.0) * t_m) * k) * k)) * ((l * l) * 2.0);
} else if (t_m <= 325.0) {
tmp = ((l * 2.0) * (cos(k) / (pow((sin(k) * k), 2.0) * t_m))) * l;
} else {
tmp = 2.0 / (fma((k / t_m), (k / t_m), 2.0) * ((((((sin(k) * t_m) / l) * t_m) * tan(k)) * t_m) / l));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.4e-235) tmp = Float64(Float64(cos(k) / Float64(Float64(Float64((sin(k) ^ 2.0) * t_m) * k) * k)) * Float64(Float64(l * l) * 2.0)); elseif (t_m <= 325.0) tmp = Float64(Float64(Float64(l * 2.0) * Float64(cos(k) / Float64((Float64(sin(k) * k) ^ 2.0) * t_m))) * l); else tmp = Float64(2.0 / Float64(fma(Float64(k / t_m), Float64(k / t_m), 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(sin(k) * t_m) / l) * t_m) * tan(k)) * t_m) / l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.4e-235], N[(N[(N[Cos[k], $MachinePrecision] / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 325.0], N[(N[(N[(l * 2.0), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(2.0 / N[(N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-235}:\\
\;\;\;\;\frac{\cos k}{\left(\left({\sin k}^{2} \cdot t\_m\right) \cdot k\right) \cdot k} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right)\\
\mathbf{elif}\;t\_m \leq 325:\\
\;\;\;\;\left(\left(\ell \cdot 2\right) \cdot \frac{\cos k}{{\left(\sin k \cdot k\right)}^{2} \cdot t\_m}\right) \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right) \cdot \frac{\left(\left(\frac{\sin k \cdot t\_m}{\ell} \cdot t\_m\right) \cdot \tan k\right) \cdot t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 1.39999999999999998e-235Initial program 54.2%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6456.3
Applied rewrites56.3%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6466.9
Applied rewrites66.9%
if 1.39999999999999998e-235 < t < 325Initial program 54.5%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6455.1
Applied rewrites55.1%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6479.6
Applied rewrites79.6%
Applied rewrites82.3%
if 325 < t Initial program 69.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6477.1
Applied rewrites77.1%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6477.1
Applied rewrites77.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
Applied rewrites87.0%
Final simplification74.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 325.0)
(* (* (* l 2.0) (/ (cos k) (* (pow (* (sin k) k) 2.0) t_m))) l)
(/
2.0
(*
(fma (/ k t_m) (/ k t_m) 2.0)
(/ (* (* (* (/ (* (sin k) t_m) l) t_m) (tan k)) t_m) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 325.0) {
tmp = ((l * 2.0) * (cos(k) / (pow((sin(k) * k), 2.0) * t_m))) * l;
} else {
tmp = 2.0 / (fma((k / t_m), (k / t_m), 2.0) * ((((((sin(k) * t_m) / l) * t_m) * tan(k)) * t_m) / l));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 325.0) tmp = Float64(Float64(Float64(l * 2.0) * Float64(cos(k) / Float64((Float64(sin(k) * k) ^ 2.0) * t_m))) * l); else tmp = Float64(2.0 / Float64(fma(Float64(k / t_m), Float64(k / t_m), 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(sin(k) * t_m) / l) * t_m) * tan(k)) * t_m) / l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 325.0], N[(N[(N[(l * 2.0), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(2.0 / N[(N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 325:\\
\;\;\;\;\left(\left(\ell \cdot 2\right) \cdot \frac{\cos k}{{\left(\sin k \cdot k\right)}^{2} \cdot t\_m}\right) \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right) \cdot \frac{\left(\left(\frac{\sin k \cdot t\_m}{\ell} \cdot t\_m\right) \cdot \tan k\right) \cdot t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 325Initial program 54.3%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6456.0
Applied rewrites56.0%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6470.0
Applied rewrites70.0%
Applied rewrites70.0%
if 325 < t Initial program 69.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6477.1
Applied rewrites77.1%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6477.1
Applied rewrites77.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
Applied rewrites87.0%
Final simplification73.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (* (sin k) t_m) l)) (t_3 (fma (/ k t_m) (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 8.5e-167)
(/
2.0
(*
(fma
(/ (fma 0.3333333333333333 (pow t_m 3.0) t_m) l)
(/ (* k k) l)
(* (/ (pow t_m 3.0) l) (/ 2.0 l)))
(* k k)))
(if (<= t_m 1.38e+51)
(/ 2.0 (* (* (* (/ (* t_m t_m) l) t_2) (tan k)) t_3))
(/ 2.0 (* t_3 (/ (* (* (* t_2 t_m) (tan k)) t_m) l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (sin(k) * t_m) / l;
double t_3 = fma((k / t_m), (k / t_m), 2.0);
double tmp;
if (t_m <= 8.5e-167) {
tmp = 2.0 / (fma((fma(0.3333333333333333, pow(t_m, 3.0), t_m) / l), ((k * k) / l), ((pow(t_m, 3.0) / l) * (2.0 / l))) * (k * k));
} else if (t_m <= 1.38e+51) {
tmp = 2.0 / (((((t_m * t_m) / l) * t_2) * tan(k)) * t_3);
} else {
tmp = 2.0 / (t_3 * ((((t_2 * t_m) * tan(k)) * t_m) / l));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(sin(k) * t_m) / l) t_3 = fma(Float64(k / t_m), Float64(k / t_m), 2.0) tmp = 0.0 if (t_m <= 8.5e-167) tmp = Float64(2.0 / Float64(fma(Float64(fma(0.3333333333333333, (t_m ^ 3.0), t_m) / l), Float64(Float64(k * k) / l), Float64(Float64((t_m ^ 3.0) / l) * Float64(2.0 / l))) * Float64(k * k))); elseif (t_m <= 1.38e+51) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_m * t_m) / l) * t_2) * tan(k)) * t_3)); else tmp = Float64(2.0 / Float64(t_3 * Float64(Float64(Float64(Float64(t_2 * t_m) * tan(k)) * t_m) / l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8.5e-167], N[(2.0 / N[(N[(N[(N[(0.3333333333333333 * N[Power[t$95$m, 3.0], $MachinePrecision] + t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(2.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.38e+51], N[(2.0 / N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$2), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$3 * N[(N[(N[(N[(t$95$2 * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k \cdot t\_m}{\ell}\\
t_3 := \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.5 \cdot 10^{-167}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, {t\_m}^{3}, t\_m\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{{t\_m}^{3}}{\ell} \cdot \frac{2}{\ell}\right) \cdot \left(k \cdot k\right)}\\
\mathbf{elif}\;t\_m \leq 1.38 \cdot 10^{+51}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_2\right) \cdot \tan k\right) \cdot t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \frac{\left(\left(t\_2 \cdot t\_m\right) \cdot \tan k\right) \cdot t\_m}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 8.4999999999999994e-167Initial program 53.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6455.6
Applied rewrites55.6%
Applied rewrites55.6%
Applied rewrites53.2%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites66.8%
if 8.4999999999999994e-167 < t < 1.38000000000000006e51Initial program 64.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6473.1
Applied rewrites73.1%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6473.1
Applied rewrites73.1%
if 1.38000000000000006e51 < t Initial program 66.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6475.3
Applied rewrites75.3%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6475.3
Applied rewrites75.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
Applied rewrites87.5%
Final simplification71.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (* (sin k) t_m) l)) (t_3 (fma (/ k t_m) (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 1.5e-163)
(/
2.0
(*
(fma
(* (fma 0.3333333333333333 (pow t_m 3.0) t_m) k)
(/ (/ k l) l)
(* (/ (pow t_m 3.0) l) (/ 2.0 l)))
(* k k)))
(if (<= t_m 1.38e+51)
(/ 2.0 (* (* (* (/ (* t_m t_m) l) t_2) (tan k)) t_3))
(/ 2.0 (* t_3 (/ (* (* (* t_2 t_m) (tan k)) t_m) l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (sin(k) * t_m) / l;
double t_3 = fma((k / t_m), (k / t_m), 2.0);
double tmp;
if (t_m <= 1.5e-163) {
tmp = 2.0 / (fma((fma(0.3333333333333333, pow(t_m, 3.0), t_m) * k), ((k / l) / l), ((pow(t_m, 3.0) / l) * (2.0 / l))) * (k * k));
} else if (t_m <= 1.38e+51) {
tmp = 2.0 / (((((t_m * t_m) / l) * t_2) * tan(k)) * t_3);
} else {
tmp = 2.0 / (t_3 * ((((t_2 * t_m) * tan(k)) * t_m) / l));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(sin(k) * t_m) / l) t_3 = fma(Float64(k / t_m), Float64(k / t_m), 2.0) tmp = 0.0 if (t_m <= 1.5e-163) tmp = Float64(2.0 / Float64(fma(Float64(fma(0.3333333333333333, (t_m ^ 3.0), t_m) * k), Float64(Float64(k / l) / l), Float64(Float64((t_m ^ 3.0) / l) * Float64(2.0 / l))) * Float64(k * k))); elseif (t_m <= 1.38e+51) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_m * t_m) / l) * t_2) * tan(k)) * t_3)); else tmp = Float64(2.0 / Float64(t_3 * Float64(Float64(Float64(Float64(t_2 * t_m) * tan(k)) * t_m) / l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.5e-163], N[(2.0 / N[(N[(N[(N[(0.3333333333333333 * N[Power[t$95$m, 3.0], $MachinePrecision] + t$95$m), $MachinePrecision] * k), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] / l), $MachinePrecision] + N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(2.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.38e+51], N[(2.0 / N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$2), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$3 * N[(N[(N[(N[(t$95$2 * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k \cdot t\_m}{\ell}\\
t_3 := \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.5 \cdot 10^{-163}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, {t\_m}^{3}, t\_m\right) \cdot k, \frac{\frac{k}{\ell}}{\ell}, \frac{{t\_m}^{3}}{\ell} \cdot \frac{2}{\ell}\right) \cdot \left(k \cdot k\right)}\\
\mathbf{elif}\;t\_m \leq 1.38 \cdot 10^{+51}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_2\right) \cdot \tan k\right) \cdot t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \frac{\left(\left(t\_2 \cdot t\_m\right) \cdot \tan k\right) \cdot t\_m}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 1.5000000000000001e-163Initial program 53.3%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.1%
if 1.5000000000000001e-163 < t < 1.38000000000000006e51Initial program 63.8%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6472.5
Applied rewrites72.5%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6472.5
Applied rewrites72.5%
if 1.38000000000000006e51 < t Initial program 66.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6475.3
Applied rewrites75.3%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6475.3
Applied rewrites75.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
Applied rewrites87.5%
Final simplification70.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (* (sin k) t_m) l)) (t_3 (fma (/ k t_m) (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 3.35e-164)
(/
(/ 2.0 t_m)
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (* (/ (/ t_m l) l) t_m) 2.0))
(* k k)))
(if (<= t_m 8.2e+55)
(/ 2.0 (* (* (* (/ (* t_m t_m) l) t_2) (tan k)) t_3))
(/ 2.0 (* t_3 (/ (* (* (* t_2 t_m) (tan k)) t_m) l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (sin(k) * t_m) / l;
double t_3 = fma((k / t_m), (k / t_m), 2.0);
double tmp;
if (t_m <= 3.35e-164) {
tmp = (2.0 / t_m) / (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((((t_m / l) / l) * t_m) * 2.0)) * (k * k));
} else if (t_m <= 8.2e+55) {
tmp = 2.0 / (((((t_m * t_m) / l) * t_2) * tan(k)) * t_3);
} else {
tmp = 2.0 / (t_3 * ((((t_2 * t_m) * tan(k)) * t_m) / l));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(sin(k) * t_m) / l) t_3 = fma(Float64(k / t_m), Float64(k / t_m), 2.0) tmp = 0.0 if (t_m <= 3.35e-164) tmp = Float64(Float64(2.0 / t_m) / Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(Float64(Float64(t_m / l) / l) * t_m) * 2.0)) * Float64(k * k))); elseif (t_m <= 8.2e+55) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_m * t_m) / l) * t_2) * tan(k)) * t_3)); else tmp = Float64(2.0 / Float64(t_3 * Float64(Float64(Float64(Float64(t_2 * t_m) * tan(k)) * t_m) / l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.35e-164], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8.2e+55], N[(2.0 / N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$2), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$3 * N[(N[(N[(N[(t$95$2 * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k \cdot t\_m}{\ell}\\
t_3 := \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.35 \cdot 10^{-164}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}\\
\mathbf{elif}\;t\_m \leq 8.2 \cdot 10^{+55}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_2\right) \cdot \tan k\right) \cdot t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \frac{\left(\left(t\_2 \cdot t\_m\right) \cdot \tan k\right) \cdot t\_m}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 3.35e-164Initial program 53.3%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6464.3
Applied rewrites64.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6473.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6473.8
Applied rewrites73.8%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6474.5
Applied rewrites74.6%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites64.6%
if 3.35e-164 < t < 8.19999999999999962e55Initial program 61.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6471.7
Applied rewrites71.7%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6471.6
Applied rewrites71.6%
if 8.19999999999999962e55 < t Initial program 69.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6476.3
Applied rewrites76.3%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6476.3
Applied rewrites76.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
Applied rewrites89.0%
Final simplification70.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.6e-197)
(/
(/ 2.0 t_m)
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (* (/ (/ t_m l) l) t_m) 2.0))
(* k k)))
(/
2.0
(*
(* (* (* (* (tan k) t_m) (/ (sin k) l)) (/ t_m l)) t_m)
(fma (/ k t_m) (/ k t_m) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.6e-197) {
tmp = (2.0 / t_m) / (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((((t_m / l) / l) * t_m) * 2.0)) * (k * k));
} else {
tmp = 2.0 / (((((tan(k) * t_m) * (sin(k) / l)) * (t_m / l)) * t_m) * fma((k / t_m), (k / t_m), 2.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.6e-197) tmp = Float64(Float64(2.0 / t_m) / Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(Float64(Float64(t_m / l) / l) * t_m) * 2.0)) * Float64(k * k))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(tan(k) * t_m) * Float64(sin(k) / l)) * Float64(t_m / l)) * t_m) * fma(Float64(k / t_m), Float64(k / t_m), 2.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.6e-197], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[Tan[k], $MachinePrecision] * t$95$m), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.6 \cdot 10^{-197}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\left(\tan k \cdot t\_m\right) \cdot \frac{\sin k}{\ell}\right) \cdot \frac{t\_m}{\ell}\right) \cdot t\_m\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 4.6000000000000001e-197Initial program 52.8%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6464.2
Applied rewrites64.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6474.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.1
Applied rewrites74.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6474.8
Applied rewrites74.8%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites64.4%
if 4.6000000000000001e-197 < t Initial program 65.3%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6473.5
Applied rewrites73.5%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6473.5
Applied rewrites73.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6478.0
Applied rewrites76.0%
Final simplification68.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.5e-160)
(/
(/ 2.0 t_m)
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (* (/ (/ t_m l) l) t_m) 2.0))
(* k k)))
(/
2.0
(*
(fma k (/ k (* t_m t_m)) 2.0)
(* (* (* (/ (* (sin k) t_m) l) (tan k)) (/ t_m l)) t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.5e-160) {
tmp = (2.0 / t_m) / (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((((t_m / l) / l) * t_m) * 2.0)) * (k * k));
} else {
tmp = 2.0 / (fma(k, (k / (t_m * t_m)), 2.0) * (((((sin(k) * t_m) / l) * tan(k)) * (t_m / l)) * t_m));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.5e-160) tmp = Float64(Float64(2.0 / t_m) / Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(Float64(Float64(t_m / l) / l) * t_m) * 2.0)) * Float64(k * k))); else tmp = Float64(2.0 / Float64(fma(k, Float64(k / Float64(t_m * t_m)), 2.0) * Float64(Float64(Float64(Float64(Float64(sin(k) * t_m) / l) * tan(k)) * Float64(t_m / l)) * t_m))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.5e-160], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.5 \cdot 10^{-160}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right) \cdot \left(\left(\left(\frac{\sin k \cdot t\_m}{\ell} \cdot \tan k\right) \cdot \frac{t\_m}{\ell}\right) \cdot t\_m\right)}\\
\end{array}
\end{array}
if t < 3.5000000000000003e-160Initial program 53.3%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6464.3
Applied rewrites64.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6473.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6473.8
Applied rewrites73.8%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6474.5
Applied rewrites74.6%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites64.6%
if 3.5000000000000003e-160 < t Initial program 65.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6473.9
Applied rewrites73.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6478.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6478.8
Applied rewrites78.8%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6477.8
Applied rewrites77.8%
Final simplification69.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (/ k l) t_m)))
(*
t_s
(if (<= l 3e-18)
(/ (/ 2.0 t_m) (* (* t_2 t_2) (+ (pow (/ k t_m) 2.0) 2.0)))
(if (<= l 4e+110)
(/ 2.0 (/ (* (pow (* k t_m) 2.0) 2.0) (/ (* l l) t_m)))
(/
2.0
(* 2.0 (* (* (* (/ (* (sin k) t_m) l) (tan k)) (/ t_m l)) t_m))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (k / l) * t_m;
double tmp;
if (l <= 3e-18) {
tmp = (2.0 / t_m) / ((t_2 * t_2) * (pow((k / t_m), 2.0) + 2.0));
} else if (l <= 4e+110) {
tmp = 2.0 / ((pow((k * t_m), 2.0) * 2.0) / ((l * l) / t_m));
} else {
tmp = 2.0 / (2.0 * (((((sin(k) * t_m) / l) * tan(k)) * (t_m / l)) * t_m));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (k / l) * t_m
if (l <= 3d-18) then
tmp = (2.0d0 / t_m) / ((t_2 * t_2) * (((k / t_m) ** 2.0d0) + 2.0d0))
else if (l <= 4d+110) then
tmp = 2.0d0 / ((((k * t_m) ** 2.0d0) * 2.0d0) / ((l * l) / t_m))
else
tmp = 2.0d0 / (2.0d0 * (((((sin(k) * t_m) / l) * tan(k)) * (t_m / l)) * t_m))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (k / l) * t_m;
double tmp;
if (l <= 3e-18) {
tmp = (2.0 / t_m) / ((t_2 * t_2) * (Math.pow((k / t_m), 2.0) + 2.0));
} else if (l <= 4e+110) {
tmp = 2.0 / ((Math.pow((k * t_m), 2.0) * 2.0) / ((l * l) / t_m));
} else {
tmp = 2.0 / (2.0 * (((((Math.sin(k) * t_m) / l) * Math.tan(k)) * (t_m / l)) * t_m));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = (k / l) * t_m tmp = 0 if l <= 3e-18: tmp = (2.0 / t_m) / ((t_2 * t_2) * (math.pow((k / t_m), 2.0) + 2.0)) elif l <= 4e+110: tmp = 2.0 / ((math.pow((k * t_m), 2.0) * 2.0) / ((l * l) / t_m)) else: tmp = 2.0 / (2.0 * (((((math.sin(k) * t_m) / l) * math.tan(k)) * (t_m / l)) * t_m)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(k / l) * t_m) tmp = 0.0 if (l <= 3e-18) tmp = Float64(Float64(2.0 / t_m) / Float64(Float64(t_2 * t_2) * Float64((Float64(k / t_m) ^ 2.0) + 2.0))); elseif (l <= 4e+110) tmp = Float64(2.0 / Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / Float64(Float64(l * l) / t_m))); else tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(Float64(Float64(Float64(sin(k) * t_m) / l) * tan(k)) * Float64(t_m / l)) * t_m))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k / l) * t_m; tmp = 0.0; if (l <= 3e-18) tmp = (2.0 / t_m) / ((t_2 * t_2) * (((k / t_m) ^ 2.0) + 2.0)); elseif (l <= 4e+110) tmp = 2.0 / ((((k * t_m) ^ 2.0) * 2.0) / ((l * l) / t_m)); else tmp = 2.0 / (2.0 * (((((sin(k) * t_m) / l) * tan(k)) * (t_m / l)) * t_m)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(k / l), $MachinePrecision] * t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 3e-18], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(t$95$2 * t$95$2), $MachinePrecision] * N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4e+110], N[(2.0 / N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(l * l), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(2.0 * N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{k}{\ell} \cdot t\_m\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 3 \cdot 10^{-18}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\left(t\_2 \cdot t\_2\right) \cdot \left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right)}\\
\mathbf{elif}\;\ell \leq 4 \cdot 10^{+110}:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{\frac{\ell \cdot \ell}{t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\left(\left(\frac{\sin k \cdot t\_m}{\ell} \cdot \tan k\right) \cdot \frac{t\_m}{\ell}\right) \cdot t\_m\right)}\\
\end{array}
\end{array}
\end{array}
if l < 2.99999999999999983e-18Initial program 61.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6472.7
Applied rewrites72.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6481.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6481.9
Applied rewrites81.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6482.7
Applied rewrites81.7%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
unpow2N/A
unpow2N/A
unpow2N/A
times-fracN/A
unswap-sqrN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6479.7
Applied rewrites79.7%
if 2.99999999999999983e-18 < l < 4.0000000000000001e110Initial program 64.3%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6468.7
Applied rewrites68.7%
Applied rewrites68.7%
Applied rewrites68.7%
Applied rewrites72.7%
if 4.0000000000000001e110 < l Initial program 34.1%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6448.3
Applied rewrites48.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6453.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6453.1
Applied rewrites53.1%
Taylor expanded in t around inf
Applied rewrites65.5%
Final simplification76.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (/ k l) t_m)))
(*
t_s
(if (<= (* l l) 2e-67)
(/ (/ 2.0 t_m) (* (* t_2 t_2) (+ (pow (/ k t_m) 2.0) 2.0)))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ t_m l)) l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (k / l) * t_m;
double tmp;
if ((l * l) <= 2e-67) {
tmp = (2.0 / t_m) / ((t_2 * t_2) * (pow((k / t_m), 2.0) + 2.0));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (k / l) * t_m
if ((l * l) <= 2d-67) then
tmp = (2.0d0 / t_m) / ((t_2 * t_2) * (((k / t_m) ** 2.0d0) + 2.0d0))
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (k / l) * t_m;
double tmp;
if ((l * l) <= 2e-67) {
tmp = (2.0 / t_m) / ((t_2 * t_2) * (Math.pow((k / t_m), 2.0) + 2.0));
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = (k / l) * t_m tmp = 0 if (l * l) <= 2e-67: tmp = (2.0 / t_m) / ((t_2 * t_2) * (math.pow((k / t_m), 2.0) + 2.0)) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(k / l) * t_m) tmp = 0.0 if (Float64(l * l) <= 2e-67) tmp = Float64(Float64(2.0 / t_m) / Float64(Float64(t_2 * t_2) * Float64((Float64(k / t_m) ^ 2.0) + 2.0))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k / l) * t_m; tmp = 0.0; if ((l * l) <= 2e-67) tmp = (2.0 / t_m) / ((t_2 * t_2) * (((k / t_m) ^ 2.0) + 2.0)); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(k / l), $MachinePrecision] * t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-67], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(t$95$2 * t$95$2), $MachinePrecision] * N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{k}{\ell} \cdot t\_m\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\left(t\_2 \cdot t\_2\right) \cdot \left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 1.99999999999999989e-67Initial program 65.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6478.4
Applied rewrites78.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6488.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6488.3
Applied rewrites88.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6489.1
Applied rewrites89.1%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
unpow2N/A
unpow2N/A
unpow2N/A
times-fracN/A
unswap-sqrN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6491.8
Applied rewrites91.8%
if 1.99999999999999989e-67 < (*.f64 l l) Initial program 50.8%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6454.4
Applied rewrites54.4%
Applied rewrites55.1%
Applied rewrites53.2%
Applied rewrites63.3%
Final simplification76.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.2e-26)
(/
(/ 2.0 t_m)
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (* (/ (/ t_m l) l) t_m) 2.0))
(* k k)))
(if (<= t_m 3.2e+150)
(/ 2.0 (* (/ k (/ l t_m)) (/ (* k 2.0) (/ l (* t_m t_m)))))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) t_m) (* l l)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e-26) {
tmp = (2.0 / t_m) / (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((((t_m / l) / l) * t_m) * 2.0)) * (k * k));
} else if (t_m <= 3.2e+150) {
tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m))));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * t_m) / (l * l));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.2e-26) tmp = Float64(Float64(2.0 / t_m) / Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(Float64(Float64(t_m / l) / l) * t_m) * 2.0)) * Float64(k * k))); elseif (t_m <= 3.2e+150) tmp = Float64(2.0 / Float64(Float64(k / Float64(l / t_m)) * Float64(Float64(k * 2.0) / Float64(l / Float64(t_m * t_m))))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * t_m) / Float64(l * l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.2e-26], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.2e+150], N[(2.0 / N[(N[(k / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(k * 2.0), $MachinePrecision] / N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.2 \cdot 10^{-26}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}\\
\mathbf{elif}\;t\_m \leq 3.2 \cdot 10^{+150}:\\
\;\;\;\;\frac{2}{\frac{k}{\frac{\ell}{t\_m}} \cdot \frac{k \cdot 2}{\frac{\ell}{t\_m \cdot t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot t\_m}{\ell \cdot \ell}}\\
\end{array}
\end{array}
if t < 5.2000000000000002e-26Initial program 54.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6465.2
Applied rewrites65.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6473.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6473.4
Applied rewrites73.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6474.0
Applied rewrites74.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.0%
if 5.2000000000000002e-26 < t < 3.20000000000000016e150Initial program 62.6%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6454.9
Applied rewrites54.9%
Applied rewrites72.2%
if 3.20000000000000016e150 < t Initial program 69.7%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6460.2
Applied rewrites60.2%
Applied rewrites60.2%
Applied rewrites59.6%
Applied rewrites87.4%
Final simplification68.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.4e-60)
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ t_m l)) l))
(/
(/ 2.0 t_m)
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (* (/ (/ t_m l) l) t_m) 2.0))
(* k k))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e-60) {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
} else {
tmp = (2.0 / t_m) / (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((((t_m / l) / l) * t_m) * 2.0)) * (k * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.4e-60) tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); else tmp = Float64(Float64(2.0 / t_m) / Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(Float64(Float64(t_m / l) / l) * t_m) * 2.0)) * Float64(k * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.4e-60], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 4.3999999999999998e-60Initial program 60.5%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6458.0
Applied rewrites58.0%
Applied rewrites58.6%
Applied rewrites55.0%
Applied rewrites73.7%
if 4.3999999999999998e-60 < k Initial program 52.5%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6461.1
Applied rewrites61.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6469.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.6
Applied rewrites69.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.4%
Final simplification71.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.4e-60)
(/ 2.0 (* (/ k (/ l t_m)) (/ (* k 2.0) (/ l (* t_m t_m)))))
(/
(/ 2.0 t_m)
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (* (/ (/ t_m l) l) t_m) 2.0))
(* k k))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e-60) {
tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m))));
} else {
tmp = (2.0 / t_m) / (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((((t_m / l) / l) * t_m) * 2.0)) * (k * k));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.4e-60) tmp = Float64(2.0 / Float64(Float64(k / Float64(l / t_m)) * Float64(Float64(k * 2.0) / Float64(l / Float64(t_m * t_m))))); else tmp = Float64(Float64(2.0 / t_m) / Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(Float64(Float64(t_m / l) / l) * t_m) * 2.0)) * Float64(k * k))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.4e-60], N[(2.0 / N[(N[(k / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(k * 2.0), $MachinePrecision] / N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{2}{\frac{k}{\frac{\ell}{t\_m}} \cdot \frac{k \cdot 2}{\frac{\ell}{t\_m \cdot t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 4.3999999999999998e-60Initial program 60.5%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6458.0
Applied rewrites58.0%
Applied rewrites70.2%
if 4.3999999999999998e-60 < k Initial program 52.5%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6461.1
Applied rewrites61.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6469.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.6
Applied rewrites69.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6470.2
Applied rewrites70.2%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites67.4%
Final simplification69.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.5e-79)
(/ 2.0 (* (/ k (/ l t_m)) (/ (* k 2.0) (/ l (* t_m t_m)))))
(/ (/ 2.0 t_m) (* (* (* (* (/ (/ t_m l) l) t_m) 2.0) k) k)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.5e-79) {
tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m))));
} else {
tmp = (2.0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0) * k) * k);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.5d-79) then
tmp = 2.0d0 / ((k / (l / t_m)) * ((k * 2.0d0) / (l / (t_m * t_m))))
else
tmp = (2.0d0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0d0) * k) * k)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.5e-79) {
tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m))));
} else {
tmp = (2.0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0) * k) * k);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2.5e-79: tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m)))) else: tmp = (2.0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0) * k) * k) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.5e-79) tmp = Float64(2.0 / Float64(Float64(k / Float64(l / t_m)) * Float64(Float64(k * 2.0) / Float64(l / Float64(t_m * t_m))))); else tmp = Float64(Float64(2.0 / t_m) / Float64(Float64(Float64(Float64(Float64(Float64(t_m / l) / l) * t_m) * 2.0) * k) * k)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2.5e-79) tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m)))); else tmp = (2.0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0) * k) * k); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.5e-79], N[(2.0 / N[(N[(k / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(k * 2.0), $MachinePrecision] / N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.5 \cdot 10^{-79}:\\
\;\;\;\;\frac{2}{\frac{k}{\frac{\ell}{t\_m}} \cdot \frac{k \cdot 2}{\frac{\ell}{t\_m \cdot t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\left(\left(\left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot k\right) \cdot k}\\
\end{array}
\end{array}
if k < 2.5e-79Initial program 60.6%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6458.1
Applied rewrites58.1%
Applied rewrites70.4%
if 2.5e-79 < k Initial program 52.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6460.9
Applied rewrites60.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6470.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6470.2
Applied rewrites70.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6470.8
Applied rewrites69.8%
Taylor expanded in k around 0
*-commutativeN/A
associate-*l/N/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6463.0
Applied rewrites63.0%
Final simplification67.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (/ 2.0 t_m) (* (* (* (* (/ (/ t_m l) l) t_m) 2.0) k) k))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((2.0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0) * k) * k));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((2.0d0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0d0) * k) * k))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((2.0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0) * k) * k));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((2.0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0) * k) * k))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(2.0 / t_m) / Float64(Float64(Float64(Float64(Float64(Float64(t_m / l) / l) * t_m) * 2.0) * k) * k))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((2.0 / t_m) / ((((((t_m / l) / l) * t_m) * 2.0) * k) * k)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{\frac{2}{t\_m}}{\left(\left(\left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot k\right) \cdot k}
\end{array}
Initial program 57.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6467.8
Applied rewrites67.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6475.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.6
Applied rewrites75.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6476.2
Applied rewrites75.5%
Taylor expanded in k around 0
*-commutativeN/A
associate-*l/N/A
associate-*l*N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6466.2
Applied rewrites66.2%
Final simplification66.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* (* (* k k) 2.0) (/ (* (/ t_m l) t_m) l)) t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((((k * k) * 2.0) * (((t_m / l) * t_m) / l)) * t_m));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((((k * k) * 2.0d0) * (((t_m / l) * t_m) / l)) * t_m))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((((k * k) * 2.0) * (((t_m / l) * t_m) / l)) * t_m));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((((k * k) * 2.0) * (((t_m / l) * t_m) / l)) * t_m))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * 2.0) * Float64(Float64(Float64(t_m / l) * t_m) / l)) * t_m))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((((k * k) * 2.0) * (((t_m / l) * t_m) / l)) * t_m)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\frac{t\_m}{\ell} \cdot t\_m}{\ell}\right) \cdot t\_m}
\end{array}
Initial program 57.6%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6456.7
Applied rewrites56.7%
Applied rewrites32.0%
Applied rewrites62.5%
Final simplification62.5%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* (/ t_m (* l l)) (* t_m t_m)) (* (* k k) 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((t_m / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / (((t_m / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0d0)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((t_m / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (((t_m / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(t_m / Float64(l * l)) * Float64(t_m * t_m)) * Float64(Float64(k * k) * 2.0)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / (((t_m / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(\frac{t\_m}{\ell \cdot \ell} \cdot \left(t\_m \cdot t\_m\right)\right) \cdot \left(\left(k \cdot k\right) \cdot 2\right)}
\end{array}
Initial program 57.6%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6456.7
Applied rewrites56.7%
Applied rewrites57.5%
Applied rewrites55.1%
Final simplification55.1%
herbie shell --seed 2024304
(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))))