
(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 27 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 1.85e-74)
(/ (cos k) (* (* k t_m) (* (/ (pow (sin k) 2.0) l) (/ k (* 2.0 l)))))
(/
2.0
(*
(* (/ (* (sin k) t_m) l) t_m)
(* (/ t_m l) (* (tan k) (+ (pow (/ k t_m) 2.0) 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 <= 1.85e-74) {
tmp = cos(k) / ((k * t_m) * ((pow(sin(k), 2.0) / l) * (k / (2.0 * l))));
} else {
tmp = 2.0 / ((((sin(k) * t_m) / l) * t_m) * ((t_m / l) * (tan(k) * (pow((k / t_m), 2.0) + 2.0))));
}
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 <= 1.85d-74) then
tmp = cos(k) / ((k * t_m) * (((sin(k) ** 2.0d0) / l) * (k / (2.0d0 * l))))
else
tmp = 2.0d0 / ((((sin(k) * t_m) / l) * t_m) * ((t_m / l) * (tan(k) * (((k / t_m) ** 2.0d0) + 2.0d0))))
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 <= 1.85e-74) {
tmp = Math.cos(k) / ((k * t_m) * ((Math.pow(Math.sin(k), 2.0) / l) * (k / (2.0 * l))));
} else {
tmp = 2.0 / ((((Math.sin(k) * t_m) / l) * t_m) * ((t_m / l) * (Math.tan(k) * (Math.pow((k / t_m), 2.0) + 2.0))));
}
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 <= 1.85e-74: tmp = math.cos(k) / ((k * t_m) * ((math.pow(math.sin(k), 2.0) / l) * (k / (2.0 * l)))) else: tmp = 2.0 / ((((math.sin(k) * t_m) / l) * t_m) * ((t_m / l) * (math.tan(k) * (math.pow((k / t_m), 2.0) + 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 <= 1.85e-74) tmp = Float64(cos(k) / Float64(Float64(k * t_m) * Float64(Float64((sin(k) ^ 2.0) / l) * Float64(k / Float64(2.0 * l))))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(sin(k) * t_m) / l) * t_m) * Float64(Float64(t_m / l) * Float64(tan(k) * Float64((Float64(k / t_m) ^ 2.0) + 2.0))))); 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 <= 1.85e-74) tmp = cos(k) / ((k * t_m) * (((sin(k) ^ 2.0) / l) * (k / (2.0 * l)))); else tmp = 2.0 / ((((sin(k) * t_m) / l) * t_m) * ((t_m / l) * (tan(k) * (((k / t_m) ^ 2.0) + 2.0)))); 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, 1.85e-74], N[(N[Cos[k], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(k / N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $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.85 \cdot 10^{-74}:\\
\;\;\;\;\frac{\cos k}{\left(k \cdot t\_m\right) \cdot \left(\frac{{\sin k}^{2}}{\ell} \cdot \frac{k}{2 \cdot \ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{\sin k \cdot t\_m}{\ell} \cdot t\_m\right) \cdot \left(\frac{t\_m}{\ell} \cdot \left(\tan k \cdot \left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right)\right)\right)}\\
\end{array}
\end{array}
if t < 1.84999999999999997e-74Initial program 46.9%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.0
Applied rewrites59.0%
Applied rewrites64.9%
Applied rewrites75.0%
if 1.84999999999999997e-74 < t Initial program 66.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6484.0
Applied rewrites84.0%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.9
Applied rewrites92.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
Applied rewrites97.4%
Final simplification82.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 (<= t_m 1.05e-42)
(/ (cos k) (* (* k t_m) (* (/ (pow (sin k) 2.0) l) (/ k (* 2.0 l)))))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 1.05e-42) {
tmp = cos(k) / ((k * t_m) * ((pow(sin(k), 2.0) / l) * (k / (2.0 * l))));
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 1.05e-42) tmp = Float64(cos(k) / Float64(Float64(k * t_m) * Float64(Float64((sin(k) ^ 2.0) / l) * Float64(k / Float64(2.0 * l))))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 1.05e-42], N[(N[Cos[k], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(k / N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 1.05 \cdot 10^{-42}:\\
\;\;\;\;\frac{\cos k}{\left(k \cdot t\_m\right) \cdot \left(\frac{{\sin k}^{2}}{\ell} \cdot \frac{k}{2 \cdot \ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 1.05000000000000003e-42Initial program 48.5%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6460.0
Applied rewrites60.0%
Applied rewrites65.6%
Applied rewrites75.7%
if 1.05000000000000003e-42 < t Initial program 65.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6484.6
Applied rewrites84.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6493.3
Applied rewrites93.3%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6493.3
Applied rewrites93.3%
Final simplification81.0%
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.05e-42)
(* (* (* 2.0 l) (/ l (* (pow (sin k) 2.0) k))) (/ (/ (cos k) t_m) k))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 1.05e-42) {
tmp = ((2.0 * l) * (l / (pow(sin(k), 2.0) * k))) * ((cos(k) / t_m) / k);
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 1.05e-42) tmp = Float64(Float64(Float64(2.0 * l) * Float64(l / Float64((sin(k) ^ 2.0) * k))) * Float64(Float64(cos(k) / t_m) / k)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 1.05e-42], N[(N[(N[(2.0 * l), $MachinePrecision] * N[(l / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 1.05 \cdot 10^{-42}:\\
\;\;\;\;\left(\left(2 \cdot \ell\right) \cdot \frac{\ell}{{\sin k}^{2} \cdot k}\right) \cdot \frac{\frac{\cos k}{t\_m}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 1.05000000000000003e-42Initial program 48.5%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6460.0
Applied rewrites60.0%
Applied rewrites65.6%
Applied rewrites74.5%
if 1.05000000000000003e-42 < t Initial program 65.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6484.6
Applied rewrites84.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6493.3
Applied rewrites93.3%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6493.3
Applied rewrites93.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 1.05e-42)
(* (* l (* l (/ 2.0 (* (pow (sin k) 2.0) k)))) (/ (/ (cos k) t_m) k))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 1.05e-42) {
tmp = (l * (l * (2.0 / (pow(sin(k), 2.0) * k)))) * ((cos(k) / t_m) / k);
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 1.05e-42) tmp = Float64(Float64(l * Float64(l * Float64(2.0 / Float64((sin(k) ^ 2.0) * k)))) * Float64(Float64(cos(k) / t_m) / k)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 1.05e-42], N[(N[(l * N[(l * N[(2.0 / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 1.05 \cdot 10^{-42}:\\
\;\;\;\;\left(\ell \cdot \left(\ell \cdot \frac{2}{{\sin k}^{2} \cdot k}\right)\right) \cdot \frac{\frac{\cos k}{t\_m}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 1.05000000000000003e-42Initial program 48.5%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6460.0
Applied rewrites60.0%
Applied rewrites65.6%
Applied rewrites74.2%
if 1.05000000000000003e-42 < t Initial program 65.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6484.6
Applied rewrites84.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6493.3
Applied rewrites93.3%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6493.3
Applied rewrites93.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 1e-48)
(/ (* (* (/ 2.0 k) (pow (/ l (sin k)) 2.0)) (cos k)) (* k t_m))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 1e-48) {
tmp = (((2.0 / k) * pow((l / sin(k)), 2.0)) * cos(k)) / (k * t_m);
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 1e-48) tmp = Float64(Float64(Float64(Float64(2.0 / k) * (Float64(l / sin(k)) ^ 2.0)) * cos(k)) / Float64(k * t_m)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 1e-48], N[(N[(N[(N[(2.0 / k), $MachinePrecision] * N[Power[N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 10^{-48}:\\
\;\;\;\;\frac{\left(\frac{2}{k} \cdot {\left(\frac{\ell}{\sin k}\right)}^{2}\right) \cdot \cos k}{k \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 9.9999999999999997e-49Initial program 48.7%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6460.3
Applied rewrites60.3%
Applied rewrites65.9%
Applied rewrites67.1%
if 9.9999999999999997e-49 < t Initial program 64.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6483.6
Applied rewrites83.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.2
Applied rewrites92.2%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6492.2
Applied rewrites92.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 9e-49)
(* (/ 2.0 (* (* k t_m) k)) (/ (* (* (cos k) l) l) (pow (sin k) 2.0)))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 9e-49) {
tmp = (2.0 / ((k * t_m) * k)) * (((cos(k) * l) * l) / pow(sin(k), 2.0));
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 9e-49) tmp = Float64(Float64(2.0 / Float64(Float64(k * t_m) * k)) * Float64(Float64(Float64(cos(k) * l) * l) / (sin(k) ^ 2.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 9e-49], N[(N[(2.0 / N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 9 \cdot 10^{-49}:\\
\;\;\;\;\frac{2}{\left(k \cdot t\_m\right) \cdot k} \cdot \frac{\left(\cos k \cdot \ell\right) \cdot \ell}{{\sin k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 9.0000000000000004e-49Initial program 48.7%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6466.1
Applied rewrites66.1%
Taylor expanded in t around 0
associate-*r/N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f6466.6
Applied rewrites66.6%
if 9.0000000000000004e-49 < t Initial program 64.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6483.6
Applied rewrites83.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.2
Applied rewrites92.2%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6492.2
Applied rewrites92.2%
Final simplification74.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 4.2e-81)
(* (/ (* (* l l) 2.0) (* (pow (sin k) 2.0) k)) (/ (pow k -1.0) t_m))
(/ (* (/ l k) (* l (pow t_m -2.0))) (* k 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 <= 4.2e-81) {
tmp = (((l * l) * 2.0) / (pow(sin(k), 2.0) * k)) * (pow(k, -1.0) / t_m);
} else {
tmp = ((l / k) * (l * pow(t_m, -2.0))) / (k * 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 <= 4.2d-81) then
tmp = (((l * l) * 2.0d0) / ((sin(k) ** 2.0d0) * k)) * ((k ** (-1.0d0)) / t_m)
else
tmp = ((l / k) * (l * (t_m ** (-2.0d0)))) / (k * 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 <= 4.2e-81) {
tmp = (((l * l) * 2.0) / (Math.pow(Math.sin(k), 2.0) * k)) * (Math.pow(k, -1.0) / t_m);
} else {
tmp = ((l / k) * (l * Math.pow(t_m, -2.0))) / (k * 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 <= 4.2e-81: tmp = (((l * l) * 2.0) / (math.pow(math.sin(k), 2.0) * k)) * (math.pow(k, -1.0) / t_m) else: tmp = ((l / k) * (l * math.pow(t_m, -2.0))) / (k * 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 <= 4.2e-81) tmp = Float64(Float64(Float64(Float64(l * l) * 2.0) / Float64((sin(k) ^ 2.0) * k)) * Float64((k ^ -1.0) / t_m)); else tmp = Float64(Float64(Float64(l / k) * Float64(l * (t_m ^ -2.0))) / Float64(k * 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 <= 4.2e-81) tmp = (((l * l) * 2.0) / ((sin(k) ^ 2.0) * k)) * ((k ^ -1.0) / t_m); else tmp = ((l / k) * (l * (t_m ^ -2.0))) / (k * 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, 4.2e-81], N[(N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, -1.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l * N[Power[t$95$m, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * 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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.2 \cdot 10^{-81}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot 2}{{\sin k}^{2} \cdot k} \cdot \frac{{k}^{-1}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{k} \cdot \left(\ell \cdot {t\_m}^{-2}\right)}{k \cdot t\_m}\\
\end{array}
\end{array}
if t < 4.1999999999999998e-81Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Applied rewrites64.5%
Taylor expanded in k around 0
Applied rewrites53.0%
if 4.1999999999999998e-81 < t Initial program 66.2%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6461.1
Applied rewrites61.1%
Applied rewrites61.1%
Applied rewrites75.7%
Final simplification60.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 (<= t_m 6.2e-93)
(/ (* (cos k) (* (* l l) 2.0)) (* (* k t_m) (* (pow (sin k) 2.0) k)))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 6.2e-93) {
tmp = (cos(k) * ((l * l) * 2.0)) / ((k * t_m) * (pow(sin(k), 2.0) * k));
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 6.2e-93) tmp = Float64(Float64(cos(k) * Float64(Float64(l * l) * 2.0)) / Float64(Float64(k * t_m) * Float64((sin(k) ^ 2.0) * k))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 6.2e-93], N[(N[(N[Cos[k], $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 6.2 \cdot 10^{-93}:\\
\;\;\;\;\frac{\cos k \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right)}{\left(k \cdot t\_m\right) \cdot \left({\sin k}^{2} \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 6.19999999999999999e-93Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Applied rewrites64.5%
Applied rewrites64.0%
if 6.19999999999999999e-93 < t Initial program 66.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.0
Applied rewrites92.0%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6492.0
Applied rewrites92.0%
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-49)
(* (* 2.0 (* l l)) (/ (cos k) (* (* (* (pow (sin k) 2.0) t_m) k) k)))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 9e-49) {
tmp = (2.0 * (l * l)) * (cos(k) / (((pow(sin(k), 2.0) * t_m) * k) * k));
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 9e-49) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(cos(k) / Float64(Float64(Float64((sin(k) ^ 2.0) * t_m) * k) * k))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 9e-49], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 9 \cdot 10^{-49}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\cos k}{\left(\left({\sin k}^{2} \cdot t\_m\right) \cdot k\right) \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 9.0000000000000004e-49Initial program 48.7%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6460.3
Applied rewrites60.3%
Taylor expanded in t around 0
Applied rewrites65.5%
if 9.0000000000000004e-49 < t Initial program 64.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6483.6
Applied rewrites83.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.2
Applied rewrites92.2%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6492.2
Applied rewrites92.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 6.2e-93)
(* (* (* 2.0 l) (* l (/ (cos k) t_m))) (pow (* (sin k) k) -2.0))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 6.2e-93) {
tmp = ((2.0 * l) * (l * (cos(k) / t_m))) * pow((sin(k) * k), -2.0);
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 6.2e-93) tmp = Float64(Float64(Float64(2.0 * l) * Float64(l * Float64(cos(k) / t_m))) * (Float64(sin(k) * k) ^ -2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 6.2e-93], N[(N[(N[(2.0 * l), $MachinePrecision] * N[(l * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 6.2 \cdot 10^{-93}:\\
\;\;\;\;\left(\left(2 \cdot \ell\right) \cdot \left(\ell \cdot \frac{\cos k}{t\_m}\right)\right) \cdot {\left(\sin k \cdot k\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 6.19999999999999999e-93Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Applied rewrites62.6%
if 6.19999999999999999e-93 < t Initial program 66.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.0
Applied rewrites92.0%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6492.0
Applied rewrites92.0%
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.1e-102)
(* (* 2.0 (* l l)) (/ (* (cos k) (pow (* (sin k) k) -2.0)) t_m))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 3.1e-102) {
tmp = (2.0 * (l * l)) * ((cos(k) * pow((sin(k) * k), -2.0)) / t_m);
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 3.1e-102) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(Float64(cos(k) * (Float64(sin(k) * k) ^ -2.0)) / t_m)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 3.1e-102], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 3.1 \cdot 10^{-102}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\cos k \cdot {\left(\sin k \cdot k\right)}^{-2}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 3.10000000000000013e-102Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Applied rewrites59.2%
if 3.10000000000000013e-102 < t Initial program 66.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.0
Applied rewrites92.0%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6492.0
Applied rewrites92.0%
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.1e-102)
(* (* 2.0 (* l l)) (/ (cos k) (* (pow (* k (sin k)) 2.0) t_m)))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 3.1e-102) {
tmp = (2.0 * (l * l)) * (cos(k) / (pow((k * sin(k)), 2.0) * t_m));
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 3.1e-102) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(cos(k) / Float64((Float64(k * sin(k)) ^ 2.0) * t_m))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 3.1e-102], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 3.1 \cdot 10^{-102}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\cos k}{{\left(k \cdot \sin k\right)}^{2} \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 3.10000000000000013e-102Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Applied rewrites59.3%
if 3.10000000000000013e-102 < t Initial program 66.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.0
Applied rewrites92.0%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6492.0
Applied rewrites92.0%
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.15e-104)
(*
(* 2.0 (* l l))
(/ (/ (cos k) t_m) (* (* (- 0.5 (* 0.5 (cos (+ k k)))) k) k)))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ (/ k t_m) 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 <= 1.15e-104) {
tmp = (2.0 * (l * l)) * ((cos(k) / t_m) / (((0.5 - (0.5 * cos((k + k)))) * k) * k));
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, ((k / t_m) / 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 <= 1.15e-104) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(Float64(cos(k) / t_m) / Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * k) * k))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(Float64(k / t_m) / 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, 1.15e-104], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / 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 1.15 \cdot 10^{-104}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\frac{\cos k}{t\_m}}{\left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot k\right) \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 1.15e-104Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Applied rewrites57.3%
if 1.15e-104 < t Initial program 66.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.0
Applied rewrites92.0%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f6492.0
Applied rewrites92.0%
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.15e-104)
(*
(* 2.0 (* l l))
(/ (/ (cos k) t_m) (* (* (- 0.5 (* 0.5 (cos (+ k k)))) k) k)))
(/
2.0
(*
(* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan k))
(fma k (/ k (* t_m 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 <= 1.15e-104) {
tmp = (2.0 * (l * l)) * ((cos(k) / t_m) / (((0.5 - (0.5 * cos((k + k)))) * k) * k));
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * fma(k, (k / (t_m * 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 <= 1.15e-104) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(Float64(cos(k) / t_m) / Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * k) * k))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * fma(k, Float64(k / Float64(t_m * 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, 1.15e-104], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $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 1.15 \cdot 10^{-104}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\frac{\cos k}{t\_m}}{\left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot k\right) \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 1.15e-104Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Applied rewrites57.3%
if 1.15e-104 < t Initial program 66.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6492.0
Applied rewrites92.0%
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-/.f6491.0
Applied rewrites91.0%
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 2.1e-40)
(*
(* 2.0 (* l l))
(/ (/ (cos k) t_m) (* (* (- 0.5 (* 0.5 (cos (+ k k)))) k) k)))
(if (<= t_m 1.85e+22)
(* (/ (/ l (pow t_m 3.0)) k) (/ l k))
(/
2.0
(* (* (* (/ t_m l) (* t_m (/ (* (sin k) t_m) l))) (tan 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) {
double tmp;
if (t_m <= 2.1e-40) {
tmp = (2.0 * (l * l)) * ((cos(k) / t_m) / (((0.5 - (0.5 * cos((k + k)))) * k) * k));
} else if (t_m <= 1.85e+22) {
tmp = ((l / pow(t_m, 3.0)) / k) * (l / k);
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * 2.0);
}
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 <= 2.1d-40) then
tmp = (2.0d0 * (l * l)) * ((cos(k) / t_m) / (((0.5d0 - (0.5d0 * cos((k + k)))) * k) * k))
else if (t_m <= 1.85d+22) then
tmp = ((l / (t_m ** 3.0d0)) / k) * (l / k)
else
tmp = 2.0d0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * 2.0d0)
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 <= 2.1e-40) {
tmp = (2.0 * (l * l)) * ((Math.cos(k) / t_m) / (((0.5 - (0.5 * Math.cos((k + k)))) * k) * k));
} else if (t_m <= 1.85e+22) {
tmp = ((l / Math.pow(t_m, 3.0)) / k) * (l / k);
} else {
tmp = 2.0 / ((((t_m / l) * (t_m * ((Math.sin(k) * t_m) / l))) * Math.tan(k)) * 2.0);
}
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 <= 2.1e-40: tmp = (2.0 * (l * l)) * ((math.cos(k) / t_m) / (((0.5 - (0.5 * math.cos((k + k)))) * k) * k)) elif t_m <= 1.85e+22: tmp = ((l / math.pow(t_m, 3.0)) / k) * (l / k) else: tmp = 2.0 / ((((t_m / l) * (t_m * ((math.sin(k) * t_m) / l))) * math.tan(k)) * 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 <= 2.1e-40) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(Float64(cos(k) / t_m) / Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * k) * k))); elseif (t_m <= 1.85e+22) tmp = Float64(Float64(Float64(l / (t_m ^ 3.0)) / k) * Float64(l / k)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(sin(k) * t_m) / l))) * tan(k)) * 2.0)); 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 <= 2.1e-40) tmp = (2.0 * (l * l)) * ((cos(k) / t_m) / (((0.5 - (0.5 * cos((k + k)))) * k) * k)); elseif (t_m <= 1.85e+22) tmp = ((l / (t_m ^ 3.0)) / k) * (l / k); else tmp = 2.0 / ((((t_m / l) * (t_m * ((sin(k) * t_m) / l))) * tan(k)) * 2.0); 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, 2.1e-40], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.85e+22], N[(N[(N[(l / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * 2.0), $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 2.1 \cdot 10^{-40}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\frac{\cos k}{t\_m}}{\left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot k\right) \cdot k}\\
\mathbf{elif}\;t\_m \leq 1.85 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{\ell}{{t\_m}^{3}}}{k} \cdot \frac{\ell}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right)\right) \cdot \tan k\right) \cdot 2}\\
\end{array}
\end{array}
if t < 2.10000000000000018e-40Initial program 48.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6460.2
Applied rewrites60.2%
Applied rewrites58.3%
if 2.10000000000000018e-40 < t < 1.8499999999999999e22Initial program 92.5%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6480.8
Applied rewrites80.8%
Applied rewrites94.9%
if 1.8499999999999999e22 < t Initial program 58.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6482.7
Applied rewrites82.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6493.4
Applied rewrites93.4%
Taylor expanded in t around inf
Applied rewrites87.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 (<= k 4.5e-6)
(/ (* (/ l k) (* l (pow t_m -2.0))) (* k t_m))
(*
(* 2.0 (* l l))
(/ (/ (cos k) t_m) (* (* (- 0.5 (* 0.5 (cos (+ k k)))) 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.5e-6) {
tmp = ((l / k) * (l * pow(t_m, -2.0))) / (k * t_m);
} else {
tmp = (2.0 * (l * l)) * ((cos(k) / t_m) / (((0.5 - (0.5 * cos((k + k)))) * 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 <= 4.5d-6) then
tmp = ((l / k) * (l * (t_m ** (-2.0d0)))) / (k * t_m)
else
tmp = (2.0d0 * (l * l)) * ((cos(k) / t_m) / (((0.5d0 - (0.5d0 * cos((k + k)))) * 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 <= 4.5e-6) {
tmp = ((l / k) * (l * Math.pow(t_m, -2.0))) / (k * t_m);
} else {
tmp = (2.0 * (l * l)) * ((Math.cos(k) / t_m) / (((0.5 - (0.5 * Math.cos((k + k)))) * 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 <= 4.5e-6: tmp = ((l / k) * (l * math.pow(t_m, -2.0))) / (k * t_m) else: tmp = (2.0 * (l * l)) * ((math.cos(k) / t_m) / (((0.5 - (0.5 * math.cos((k + k)))) * 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.5e-6) tmp = Float64(Float64(Float64(l / k) * Float64(l * (t_m ^ -2.0))) / Float64(k * t_m)); else tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(Float64(cos(k) / t_m) / Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * 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 <= 4.5e-6) tmp = ((l / k) * (l * (t_m ^ -2.0))) / (k * t_m); else tmp = (2.0 * (l * l)) * ((cos(k) / t_m) / (((0.5 - (0.5 * cos((k + k)))) * 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, 4.5e-6], N[(N[(N[(l / k), $MachinePrecision] * N[(l * N[Power[t$95$m, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * 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.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{\ell}{k} \cdot \left(\ell \cdot {t\_m}^{-2}\right)}{k \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\frac{\cos k}{t\_m}}{\left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot k\right) \cdot k}\\
\end{array}
\end{array}
if k < 4.50000000000000011e-6Initial program 56.6%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.0
Applied rewrites54.0%
Applied rewrites53.9%
Applied rewrites66.0%
if 4.50000000000000011e-6 < k Initial program 44.2%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6462.5
Applied rewrites62.5%
Applied rewrites62.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 2.5e-85)
(*
(* 2.0 (* l l))
(/ (- (/ (pow (* k k) -1.0) t_m) (/ 0.16666666666666666 t_m)) (* k k)))
(/ (* (/ l k) (* l (pow t_m -2.0))) (* k 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 <= 2.5e-85) {
tmp = (2.0 * (l * l)) * (((pow((k * k), -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k));
} else {
tmp = ((l / k) * (l * pow(t_m, -2.0))) / (k * 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 <= 2.5d-85) then
tmp = (2.0d0 * (l * l)) * (((((k * k) ** (-1.0d0)) / t_m) - (0.16666666666666666d0 / t_m)) / (k * k))
else
tmp = ((l / k) * (l * (t_m ** (-2.0d0)))) / (k * 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 <= 2.5e-85) {
tmp = (2.0 * (l * l)) * (((Math.pow((k * k), -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k));
} else {
tmp = ((l / k) * (l * Math.pow(t_m, -2.0))) / (k * 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 <= 2.5e-85: tmp = (2.0 * (l * l)) * (((math.pow((k * k), -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k)) else: tmp = ((l / k) * (l * math.pow(t_m, -2.0))) / (k * 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 <= 2.5e-85) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(Float64(Float64((Float64(k * k) ^ -1.0) / t_m) - Float64(0.16666666666666666 / t_m)) / Float64(k * k))); else tmp = Float64(Float64(Float64(l / k) * Float64(l * (t_m ^ -2.0))) / Float64(k * 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 <= 2.5e-85) tmp = (2.0 * (l * l)) * (((((k * k) ^ -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k)); else tmp = ((l / k) * (l * (t_m ^ -2.0))) / (k * 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, 2.5e-85], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(k * k), $MachinePrecision], -1.0], $MachinePrecision] / t$95$m), $MachinePrecision] - N[(0.16666666666666666 / t$95$m), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l * N[Power[t$95$m, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * 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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-85}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\frac{{\left(k \cdot k\right)}^{-1}}{t\_m} - \frac{0.16666666666666666}{t\_m}}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{k} \cdot \left(\ell \cdot {t\_m}^{-2}\right)}{k \cdot t\_m}\\
\end{array}
\end{array}
if t < 2.5000000000000001e-85Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Taylor expanded in k around 0
Applied rewrites35.5%
Taylor expanded in k around inf
Applied rewrites51.5%
if 2.5000000000000001e-85 < t Initial program 66.2%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6461.1
Applied rewrites61.1%
Applied rewrites61.1%
Applied rewrites75.7%
Final simplification59.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 (<= t_m 3.5e-81)
(*
(* 2.0 (* l l))
(/ (- (/ (pow (* k k) -1.0) t_m) (/ 0.16666666666666666 t_m)) (* k k)))
(/ (* l (* (pow t_m -3.0) (/ l 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 (t_m <= 3.5e-81) {
tmp = (2.0 * (l * l)) * (((pow((k * k), -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k));
} else {
tmp = (l * (pow(t_m, -3.0) * (l / 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 (t_m <= 3.5d-81) then
tmp = (2.0d0 * (l * l)) * (((((k * k) ** (-1.0d0)) / t_m) - (0.16666666666666666d0 / t_m)) / (k * k))
else
tmp = (l * ((t_m ** (-3.0d0)) * (l / 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 (t_m <= 3.5e-81) {
tmp = (2.0 * (l * l)) * (((Math.pow((k * k), -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k));
} else {
tmp = (l * (Math.pow(t_m, -3.0) * (l / 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 t_m <= 3.5e-81: tmp = (2.0 * (l * l)) * (((math.pow((k * k), -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k)) else: tmp = (l * (math.pow(t_m, -3.0) * (l / 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 (t_m <= 3.5e-81) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(Float64(Float64((Float64(k * k) ^ -1.0) / t_m) - Float64(0.16666666666666666 / t_m)) / Float64(k * k))); else tmp = Float64(Float64(l * Float64((t_m ^ -3.0) * Float64(l / 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 (t_m <= 3.5e-81) tmp = (2.0 * (l * l)) * (((((k * k) ^ -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k)); else tmp = (l * ((t_m ^ -3.0) * (l / 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[t$95$m, 3.5e-81], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(k * k), $MachinePrecision], -1.0], $MachinePrecision] / t$95$m), $MachinePrecision] - N[(0.16666666666666666 / t$95$m), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(N[Power[t$95$m, -3.0], $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $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^{-81}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\frac{{\left(k \cdot k\right)}^{-1}}{t\_m} - \frac{0.16666666666666666}{t\_m}}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \left({t\_m}^{-3} \cdot \frac{\ell}{k}\right)}{k}\\
\end{array}
\end{array}
if t < 3.49999999999999986e-81Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Taylor expanded in k around 0
Applied rewrites35.5%
Taylor expanded in k around inf
Applied rewrites51.5%
if 3.49999999999999986e-81 < t Initial program 66.2%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6461.1
Applied rewrites61.1%
Applied rewrites67.5%
Applied rewrites71.9%
Final simplification58.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 (<= t_m 1.55e-85)
(*
(* 2.0 (* l l))
(/ (- (/ (pow (* k k) -1.0) t_m) (/ 0.16666666666666666 t_m)) (* k k)))
(if (<= t_m 2.95e+75)
(* (/ l (* (* t_m t_m) t_m)) (/ (/ l k) k))
(/ (/ (* (/ (/ l t_m) (* t_m t_m)) l) 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 (t_m <= 1.55e-85) {
tmp = (2.0 * (l * l)) * (((pow((k * k), -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k));
} else if (t_m <= 2.95e+75) {
tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k);
} else {
tmp = ((((l / t_m) / (t_m * t_m)) * l) / 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 (t_m <= 1.55d-85) then
tmp = (2.0d0 * (l * l)) * (((((k * k) ** (-1.0d0)) / t_m) - (0.16666666666666666d0 / t_m)) / (k * k))
else if (t_m <= 2.95d+75) then
tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k)
else
tmp = ((((l / t_m) / (t_m * t_m)) * l) / 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 (t_m <= 1.55e-85) {
tmp = (2.0 * (l * l)) * (((Math.pow((k * k), -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k));
} else if (t_m <= 2.95e+75) {
tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k);
} else {
tmp = ((((l / t_m) / (t_m * t_m)) * l) / 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 t_m <= 1.55e-85: tmp = (2.0 * (l * l)) * (((math.pow((k * k), -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k)) elif t_m <= 2.95e+75: tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k) else: tmp = ((((l / t_m) / (t_m * t_m)) * l) / 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 (t_m <= 1.55e-85) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(Float64(Float64((Float64(k * k) ^ -1.0) / t_m) - Float64(0.16666666666666666 / t_m)) / Float64(k * k))); elseif (t_m <= 2.95e+75) tmp = Float64(Float64(l / Float64(Float64(t_m * t_m) * t_m)) * Float64(Float64(l / k) / k)); else tmp = Float64(Float64(Float64(Float64(Float64(l / t_m) / Float64(t_m * t_m)) * l) / 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 (t_m <= 1.55e-85) tmp = (2.0 * (l * l)) * (((((k * k) ^ -1.0) / t_m) - (0.16666666666666666 / t_m)) / (k * k)); elseif (t_m <= 2.95e+75) tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k); else tmp = ((((l / t_m) / (t_m * t_m)) * l) / 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[t$95$m, 1.55e-85], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(k * k), $MachinePrecision], -1.0], $MachinePrecision] / t$95$m), $MachinePrecision] - N[(0.16666666666666666 / t$95$m), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.95e+75], N[(N[(l / N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] / k), $MachinePrecision] / k), $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.55 \cdot 10^{-85}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{\frac{{\left(k \cdot k\right)}^{-1}}{t\_m} - \frac{0.16666666666666666}{t\_m}}{k \cdot k}\\
\mathbf{elif}\;t\_m \leq 2.95 \cdot 10^{+75}:\\
\;\;\;\;\frac{\ell}{\left(t\_m \cdot t\_m\right) \cdot t\_m} \cdot \frac{\frac{\ell}{k}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot t\_m} \cdot \ell}{k}}{k}\\
\end{array}
\end{array}
if t < 1.5500000000000001e-85Initial program 46.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6459.1
Applied rewrites59.1%
Taylor expanded in k around 0
Applied rewrites35.5%
Taylor expanded in k around inf
Applied rewrites51.5%
if 1.5500000000000001e-85 < t < 2.94999999999999991e75Initial program 75.1%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6469.0
Applied rewrites69.0%
Applied rewrites69.0%
Applied rewrites73.9%
if 2.94999999999999991e75 < t Initial program 59.0%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.8
Applied rewrites54.8%
Applied rewrites67.7%
Applied rewrites69.9%
Final simplification58.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 (<= k 1.55)
(/ (/ (* (/ (/ l t_m) (* t_m t_m)) l) k) k)
(* (* (/ -0.16666666666666666 (* (* k k) t_m)) (* 2.0 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 (k <= 1.55) {
tmp = ((((l / t_m) / (t_m * t_m)) * l) / k) / k;
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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) :: tmp
if (k <= 1.55d0) then
tmp = ((((l / t_m) / (t_m * t_m)) * l) / k) / k
else
tmp = (((-0.16666666666666666d0) / ((k * k) * t_m)) * (2.0d0 * 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 tmp;
if (k <= 1.55) {
tmp = ((((l / t_m) / (t_m * t_m)) * l) / k) / k;
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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): tmp = 0 if k <= 1.55: tmp = ((((l / t_m) / (t_m * t_m)) * l) / k) / k else: tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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 (k <= 1.55) tmp = Float64(Float64(Float64(Float64(Float64(l / t_m) / Float64(t_m * t_m)) * l) / k) / k); else tmp = Float64(Float64(Float64(-0.16666666666666666 / Float64(Float64(k * k) * t_m)) * Float64(2.0 * 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) tmp = 0.0; if (k <= 1.55) tmp = ((((l / t_m) / (t_m * t_m)) * l) / k) / k; else tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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_] := N[(t$95$s * If[LessEqual[k, 1.55], N[(N[(N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(-0.16666666666666666 / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] * l), $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 1.55:\\
\;\;\;\;\frac{\frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot t\_m} \cdot \ell}{k}}{k}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{-0.16666666666666666}{\left(k \cdot k\right) \cdot t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 1.55000000000000004Initial program 56.6%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.0
Applied rewrites54.0%
Applied rewrites60.8%
Applied rewrites62.9%
if 1.55000000000000004 < k Initial program 44.2%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6462.5
Applied rewrites62.5%
Taylor expanded in k around 0
Applied rewrites22.8%
Taylor expanded in k around inf
Applied rewrites51.5%
Applied rewrites58.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 1.55)
(* (/ l (* (* t_m t_m) t_m)) (/ (/ l k) k))
(* (* (/ -0.16666666666666666 (* (* k k) t_m)) (* 2.0 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 (k <= 1.55) {
tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k);
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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) :: tmp
if (k <= 1.55d0) then
tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k)
else
tmp = (((-0.16666666666666666d0) / ((k * k) * t_m)) * (2.0d0 * 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 tmp;
if (k <= 1.55) {
tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k);
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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): tmp = 0 if k <= 1.55: tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k) else: tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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 (k <= 1.55) tmp = Float64(Float64(l / Float64(Float64(t_m * t_m) * t_m)) * Float64(Float64(l / k) / k)); else tmp = Float64(Float64(Float64(-0.16666666666666666 / Float64(Float64(k * k) * t_m)) * Float64(2.0 * 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) tmp = 0.0; if (k <= 1.55) tmp = (l / ((t_m * t_m) * t_m)) * ((l / k) / k); else tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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_] := N[(t$95$s * If[LessEqual[k, 1.55], N[(N[(l / N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.16666666666666666 / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] * l), $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 1.55:\\
\;\;\;\;\frac{\ell}{\left(t\_m \cdot t\_m\right) \cdot t\_m} \cdot \frac{\frac{\ell}{k}}{k}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{-0.16666666666666666}{\left(k \cdot k\right) \cdot t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 1.55000000000000004Initial program 56.6%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.0
Applied rewrites54.0%
Applied rewrites53.9%
Applied rewrites59.3%
if 1.55000000000000004 < k Initial program 44.2%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6462.5
Applied rewrites62.5%
Taylor expanded in k around 0
Applied rewrites22.8%
Taylor expanded in k around inf
Applied rewrites51.5%
Applied rewrites58.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 6e+100)
(* (/ l (* t_m t_m)) (/ (/ l (* k k)) t_m))
(* (* (/ -0.16666666666666666 (* (* k k) t_m)) (* 2.0 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 (k <= 6e+100) {
tmp = (l / (t_m * t_m)) * ((l / (k * k)) / t_m);
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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) :: tmp
if (k <= 6d+100) then
tmp = (l / (t_m * t_m)) * ((l / (k * k)) / t_m)
else
tmp = (((-0.16666666666666666d0) / ((k * k) * t_m)) * (2.0d0 * 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 tmp;
if (k <= 6e+100) {
tmp = (l / (t_m * t_m)) * ((l / (k * k)) / t_m);
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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): tmp = 0 if k <= 6e+100: tmp = (l / (t_m * t_m)) * ((l / (k * k)) / t_m) else: tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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 (k <= 6e+100) tmp = Float64(Float64(l / Float64(t_m * t_m)) * Float64(Float64(l / Float64(k * k)) / t_m)); else tmp = Float64(Float64(Float64(-0.16666666666666666 / Float64(Float64(k * k) * t_m)) * Float64(2.0 * 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) tmp = 0.0; if (k <= 6e+100) tmp = (l / (t_m * t_m)) * ((l / (k * k)) / t_m); else tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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_] := N[(t$95$s * If[LessEqual[k, 6e+100], N[(N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.16666666666666666 / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] * l), $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 6 \cdot 10^{+100}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot t\_m} \cdot \frac{\frac{\ell}{k \cdot k}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{-0.16666666666666666}{\left(k \cdot k\right) \cdot t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 5.99999999999999971e100Initial program 57.5%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.7
Applied rewrites54.7%
Applied rewrites57.2%
if 5.99999999999999971e100 < k Initial program 34.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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6452.4
Applied rewrites52.4%
Taylor expanded in k around 0
Applied rewrites6.8%
Taylor expanded in k around inf
Applied rewrites48.2%
Applied rewrites57.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 6e+100)
(* (/ l t_m) (/ (/ l (* k k)) (* t_m t_m)))
(* (* (/ -0.16666666666666666 (* (* k k) t_m)) (* 2.0 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 (k <= 6e+100) {
tmp = (l / t_m) * ((l / (k * k)) / (t_m * t_m));
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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) :: tmp
if (k <= 6d+100) then
tmp = (l / t_m) * ((l / (k * k)) / (t_m * t_m))
else
tmp = (((-0.16666666666666666d0) / ((k * k) * t_m)) * (2.0d0 * 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 tmp;
if (k <= 6e+100) {
tmp = (l / t_m) * ((l / (k * k)) / (t_m * t_m));
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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): tmp = 0 if k <= 6e+100: tmp = (l / t_m) * ((l / (k * k)) / (t_m * t_m)) else: tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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 (k <= 6e+100) tmp = Float64(Float64(l / t_m) * Float64(Float64(l / Float64(k * k)) / Float64(t_m * t_m))); else tmp = Float64(Float64(Float64(-0.16666666666666666 / Float64(Float64(k * k) * t_m)) * Float64(2.0 * 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) tmp = 0.0; if (k <= 6e+100) tmp = (l / t_m) * ((l / (k * k)) / (t_m * t_m)); else tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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_] := N[(t$95$s * If[LessEqual[k, 6e+100], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.16666666666666666 / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] * l), $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 6 \cdot 10^{+100}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{k \cdot k}}{t\_m \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{-0.16666666666666666}{\left(k \cdot k\right) \cdot t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 5.99999999999999971e100Initial program 57.5%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.7
Applied rewrites54.7%
Applied rewrites57.2%
if 5.99999999999999971e100 < k Initial program 34.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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6452.4
Applied rewrites52.4%
Taylor expanded in k around 0
Applied rewrites6.8%
Taylor expanded in k around inf
Applied rewrites48.2%
Applied rewrites57.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 1.55)
(* (/ l (* (* t_m t_m) t_m)) (/ l (* k k)))
(* (* (/ -0.16666666666666666 (* (* k k) t_m)) (* 2.0 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 (k <= 1.55) {
tmp = (l / ((t_m * t_m) * t_m)) * (l / (k * k));
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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) :: tmp
if (k <= 1.55d0) then
tmp = (l / ((t_m * t_m) * t_m)) * (l / (k * k))
else
tmp = (((-0.16666666666666666d0) / ((k * k) * t_m)) * (2.0d0 * 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 tmp;
if (k <= 1.55) {
tmp = (l / ((t_m * t_m) * t_m)) * (l / (k * k));
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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): tmp = 0 if k <= 1.55: tmp = (l / ((t_m * t_m) * t_m)) * (l / (k * k)) else: tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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 (k <= 1.55) tmp = Float64(Float64(l / Float64(Float64(t_m * t_m) * t_m)) * Float64(l / Float64(k * k))); else tmp = Float64(Float64(Float64(-0.16666666666666666 / Float64(Float64(k * k) * t_m)) * Float64(2.0 * 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) tmp = 0.0; if (k <= 1.55) tmp = (l / ((t_m * t_m) * t_m)) * (l / (k * k)); else tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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_] := N[(t$95$s * If[LessEqual[k, 1.55], N[(N[(l / N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.16666666666666666 / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] * l), $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 1.55:\\
\;\;\;\;\frac{\ell}{\left(t\_m \cdot t\_m\right) \cdot t\_m} \cdot \frac{\ell}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{-0.16666666666666666}{\left(k \cdot k\right) \cdot t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 1.55000000000000004Initial program 56.6%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.0
Applied rewrites54.0%
Applied rewrites53.9%
if 1.55000000000000004 < k Initial program 44.2%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6462.5
Applied rewrites62.5%
Taylor expanded in k around 0
Applied rewrites22.8%
Taylor expanded in k around inf
Applied rewrites51.5%
Applied rewrites58.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 (<= l 2e+79)
(* (* 2.0 (* l l)) (/ -0.16666666666666666 (* (* k t_m) k)))
(* (* (/ -0.16666666666666666 (* (* k k) t_m)) (* 2.0 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 (l <= 2e+79) {
tmp = (2.0 * (l * l)) * (-0.16666666666666666 / ((k * t_m) * k));
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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) :: tmp
if (l <= 2d+79) then
tmp = (2.0d0 * (l * l)) * ((-0.16666666666666666d0) / ((k * t_m) * k))
else
tmp = (((-0.16666666666666666d0) / ((k * k) * t_m)) * (2.0d0 * 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 tmp;
if (l <= 2e+79) {
tmp = (2.0 * (l * l)) * (-0.16666666666666666 / ((k * t_m) * k));
} else {
tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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): tmp = 0 if l <= 2e+79: tmp = (2.0 * (l * l)) * (-0.16666666666666666 / ((k * t_m) * k)) else: tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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 (l <= 2e+79) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(-0.16666666666666666 / Float64(Float64(k * t_m) * k))); else tmp = Float64(Float64(Float64(-0.16666666666666666 / Float64(Float64(k * k) * t_m)) * Float64(2.0 * 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) tmp = 0.0; if (l <= 2e+79) tmp = (2.0 * (l * l)) * (-0.16666666666666666 / ((k * t_m) * k)); else tmp = ((-0.16666666666666666 / ((k * k) * t_m)) * (2.0 * 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_] := N[(t$95$s * If[LessEqual[l, 2e+79], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(-0.16666666666666666 / N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.16666666666666666 / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] * l), $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}\;\ell \leq 2 \cdot 10^{+79}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{-0.16666666666666666}{\left(k \cdot t\_m\right) \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{-0.16666666666666666}{\left(k \cdot k\right) \cdot t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if l < 1.99999999999999993e79Initial program 57.8%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6456.2
Applied rewrites56.2%
Taylor expanded in k around 0
Applied rewrites31.6%
Taylor expanded in k around inf
Applied rewrites30.3%
Taylor expanded in k around inf
Applied rewrites33.3%
if 1.99999999999999993e79 < l Initial program 33.4%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6450.8
Applied rewrites50.8%
Taylor expanded in k around 0
Applied rewrites41.7%
Taylor expanded in k around inf
Applied rewrites15.7%
Applied rewrites25.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 (* l l)) (/ -0.16666666666666666 (* (* k t_m) 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 * (l * l)) * (-0.16666666666666666 / ((k * t_m) * 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 * (l * l)) * ((-0.16666666666666666d0) / ((k * t_m) * 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 * (l * l)) * (-0.16666666666666666 / ((k * t_m) * 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 * (l * l)) * (-0.16666666666666666 / ((k * t_m) * 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 * Float64(l * l)) * Float64(-0.16666666666666666 / Float64(Float64(k * t_m) * 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 * (l * l)) * (-0.16666666666666666 / ((k * t_m) * 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 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(-0.16666666666666666 / N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{-0.16666666666666666}{\left(k \cdot t\_m\right) \cdot k}\right)
\end{array}
Initial program 53.4%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6455.3
Applied rewrites55.3%
Taylor expanded in k around 0
Applied rewrites33.4%
Taylor expanded in k around inf
Applied rewrites27.7%
Taylor expanded in k around inf
Applied rewrites30.1%
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 (* l l)) (/ -0.16666666666666666 (* (* k k) 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 * (l * l)) * (-0.16666666666666666 / ((k * k) * 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 * (l * l)) * ((-0.16666666666666666d0) / ((k * k) * 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 * (l * l)) * (-0.16666666666666666 / ((k * k) * 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 * (l * l)) * (-0.16666666666666666 / ((k * k) * 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(Float64(2.0 * Float64(l * l)) * Float64(-0.16666666666666666 / Float64(Float64(k * k) * 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 * (l * l)) * (-0.16666666666666666 / ((k * k) * 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[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(-0.16666666666666666 / N[(N[(k * k), $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 \left(\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{-0.16666666666666666}{\left(k \cdot k\right) \cdot t\_m}\right)
\end{array}
Initial program 53.4%
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
associate-/l/N/A
associate-/r*N/A
associate-/l/N/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
lower-pow.f64N/A
lower-sin.f6455.3
Applied rewrites55.3%
Taylor expanded in k around 0
Applied rewrites33.4%
Taylor expanded in k around inf
Applied rewrites27.7%
herbie shell --seed 2024321
(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))))