
(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 24 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 2.2e-122)
(/ (cos k) (* (* k t_m) (* (/ (pow (sin k) 2.0) l) (/ k (* 2.0 l)))))
(*
(/ l t_m)
(pow
(/
(*
(+ (pow (/ k t_m) 2.0) 2.0)
(* (* (tan k) t_m) (/ (* (sin k) t_m) l)))
2.0)
-1.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.2e-122) {
tmp = cos(k) / ((k * t_m) * ((pow(sin(k), 2.0) / l) * (k / (2.0 * l))));
} else {
tmp = (l / t_m) * pow((((pow((k / t_m), 2.0) + 2.0) * ((tan(k) * t_m) * ((sin(k) * t_m) / l))) / 2.0), -1.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.2d-122) then
tmp = cos(k) / ((k * t_m) * (((sin(k) ** 2.0d0) / l) * (k / (2.0d0 * l))))
else
tmp = (l / t_m) * ((((((k / t_m) ** 2.0d0) + 2.0d0) * ((tan(k) * t_m) * ((sin(k) * t_m) / l))) / 2.0d0) ** (-1.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.2e-122) {
tmp = Math.cos(k) / ((k * t_m) * ((Math.pow(Math.sin(k), 2.0) / l) * (k / (2.0 * l))));
} else {
tmp = (l / t_m) * Math.pow((((Math.pow((k / t_m), 2.0) + 2.0) * ((Math.tan(k) * t_m) * ((Math.sin(k) * t_m) / l))) / 2.0), -1.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.2e-122: tmp = math.cos(k) / ((k * t_m) * ((math.pow(math.sin(k), 2.0) / l) * (k / (2.0 * l)))) else: tmp = (l / t_m) * math.pow((((math.pow((k / t_m), 2.0) + 2.0) * ((math.tan(k) * t_m) * ((math.sin(k) * t_m) / l))) / 2.0), -1.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.2e-122) 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(Float64(l / t_m) * (Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 2.0) * Float64(Float64(tan(k) * t_m) * Float64(Float64(sin(k) * t_m) / l))) / 2.0) ^ -1.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.2e-122) tmp = cos(k) / ((k * t_m) * (((sin(k) ^ 2.0) / l) * (k / (2.0 * l)))); else tmp = (l / t_m) * ((((((k / t_m) ^ 2.0) + 2.0) * ((tan(k) * t_m) * ((sin(k) * t_m) / l))) / 2.0) ^ -1.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.2e-122], 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[(N[(l / t$95$m), $MachinePrecision] * N[Power[N[(N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * t$95$m), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision], -1.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.2 \cdot 10^{-122}:\\
\;\;\;\;\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{\ell}{t\_m} \cdot {\left(\frac{\left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right) \cdot \left(\left(\tan k \cdot t\_m\right) \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}{2}\right)}^{-1}\\
\end{array}
\end{array}
if t < 2.2e-122Initial program 47.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.f6465.3
Applied rewrites65.3%
Applied rewrites72.3%
Applied rewrites77.5%
if 2.2e-122 < t Initial program 64.0%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.3
Applied rewrites37.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites89.6%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6493.7
lift-*.f64N/A
*-commutativeN/A
lift-*.f6493.7
Applied rewrites93.7%
lift-/.f64N/A
clear-numN/A
inv-powN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/l*N/A
unpow-prod-downN/A
Applied rewrites95.7%
Final simplification84.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
(if (<= t_m 5.2e-128)
(/ (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 <= 5.2e-128) {
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 <= 5.2e-128) 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(t_m / l) * Float64(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, 5.2e-128], 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[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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 5.2 \cdot 10^{-128}:\\
\;\;\;\;\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{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 5.19999999999999961e-128Initial program 47.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.f6465.3
Applied rewrites65.3%
Applied rewrites72.3%
Applied rewrites77.5%
if 5.19999999999999961e-128 < t Initial program 64.0%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.3
Applied rewrites37.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites89.6%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6493.7
lift-*.f64N/A
*-commutativeN/A
lift-*.f6493.7
Applied rewrites93.7%
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.8
Applied rewrites93.8%
Final simplification83.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 5.2e-128)
(* (* 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 <= 5.2e-128) {
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 <= 5.2e-128) 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(t_m / l) * Float64(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, 5.2e-128], 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[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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 5.2 \cdot 10^{-128}:\\
\;\;\;\;\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(\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 5.19999999999999961e-128Initial program 47.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.f6465.3
Applied rewrites65.3%
Applied rewrites72.3%
Applied rewrites77.9%
if 5.19999999999999961e-128 < t Initial program 64.0%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.3
Applied rewrites37.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites89.6%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6493.7
lift-*.f64N/A
*-commutativeN/A
lift-*.f6493.7
Applied rewrites93.7%
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.8
Applied rewrites93.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.2e-128)
(/ (* (* (/ 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 <= 5.2e-128) {
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 <= 5.2e-128) 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(t_m / l) * Float64(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, 5.2e-128], 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[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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 5.2 \cdot 10^{-128}:\\
\;\;\;\;\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(\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 5.19999999999999961e-128Initial program 47.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.f6465.3
Applied rewrites65.3%
Applied rewrites72.3%
Applied rewrites73.5%
if 5.19999999999999961e-128 < t Initial program 64.0%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.3
Applied rewrites37.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites89.6%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6493.7
lift-*.f64N/A
*-commutativeN/A
lift-*.f6493.7
Applied rewrites93.7%
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.8
Applied rewrites93.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.65e-145)
(/ (* (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 <= 2.65e-145) {
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 <= 2.65e-145) 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(t_m / l) * Float64(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, 2.65e-145], 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[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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 2.65 \cdot 10^{-145}:\\
\;\;\;\;\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(\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 2.65e-145Initial program 49.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.f6464.4
Applied rewrites64.4%
Applied rewrites71.6%
Applied rewrites69.2%
if 2.65e-145 < t Initial program 61.4%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.8
Applied rewrites37.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites90.0%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6494.0
lift-*.f64N/A
*-commutativeN/A
lift-*.f6494.0
Applied rewrites94.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-/.f6494.0
Applied rewrites94.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.65e-145)
(* (* 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 <= 2.65e-145) {
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 <= 2.65e-145) 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(t_m / l) * Float64(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, 2.65e-145], 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[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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 2.65 \cdot 10^{-145}:\\
\;\;\;\;\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(\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 2.65e-145Initial program 49.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.f6464.4
Applied rewrites64.4%
Taylor expanded in k around 0
Applied rewrites38.8%
Taylor expanded in t around 0
Applied rewrites68.8%
if 2.65e-145 < t Initial program 61.4%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.8
Applied rewrites37.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites90.0%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6494.0
lift-*.f64N/A
*-commutativeN/A
lift-*.f6494.0
Applied rewrites94.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-/.f6494.0
Applied rewrites94.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.65e-145)
(*
(/ (* (* l l) 2.0) (* (- 0.5 (* 0.5 (cos (+ k k)))) 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 <= 2.65e-145) {
tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * cos((k + k)))) * 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 <= 2.65e-145) tmp = Float64(Float64(Float64(Float64(l * l) * 2.0) / Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * k)) * Float64(Float64(cos(k) / t_m) / k)); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * Float64(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, 2.65e-145], N[(N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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 2.65 \cdot 10^{-145}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot 2}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot k} \cdot \frac{\frac{\cos k}{t\_m}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 2.65e-145Initial program 49.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.f6464.4
Applied rewrites64.4%
Applied rewrites71.6%
Applied rewrites67.4%
if 2.65e-145 < t Initial program 61.4%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.8
Applied rewrites37.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites90.0%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6494.0
lift-*.f64N/A
*-commutativeN/A
lift-*.f6494.0
Applied rewrites94.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-/.f6494.0
Applied rewrites94.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.35e-145)
(*
(/ (* (* l l) 2.0) (* (- 0.5 (* 0.5 (cos (+ k k)))) k))
(/ (/ (cos k) t_m) k))
(if (<= t_m 5.6e+102)
(/
2.0
(*
(* (* (/ (* t_m t_m) l) (* (/ t_m l) k)) (tan k))
(+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
(/
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.35e-145) {
tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * cos((k + k)))) * k)) * ((cos(k) / t_m) / k);
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / (((((t_m * t_m) / l) * ((t_m / l) * k)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0));
} 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.35d-145) then
tmp = (((l * l) * 2.0d0) / ((0.5d0 - (0.5d0 * cos((k + k)))) * k)) * ((cos(k) / t_m) / k)
else if (t_m <= 5.6d+102) then
tmp = 2.0d0 / (((((t_m * t_m) / l) * ((t_m / l) * k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))
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.35e-145) {
tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * Math.cos((k + k)))) * k)) * ((Math.cos(k) / t_m) / k);
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / (((((t_m * t_m) / l) * ((t_m / l) * k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t_m), 2.0)) + 1.0));
} 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.35e-145: tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * math.cos((k + k)))) * k)) * ((math.cos(k) / t_m) / k) elif t_m <= 5.6e+102: tmp = 2.0 / (((((t_m * t_m) / l) * ((t_m / l) * k)) * math.tan(k)) * ((1.0 + math.pow((k / t_m), 2.0)) + 1.0)) 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.35e-145) tmp = Float64(Float64(Float64(Float64(l * l) * 2.0) / Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * k)) * Float64(Float64(cos(k) / t_m) / k)); elseif (t_m <= 5.6e+102) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_m * t_m) / l) * Float64(Float64(t_m / l) * k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * Float64(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.35e-145) tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * cos((k + k)))) * k)) * ((cos(k) / t_m) / k); elseif (t_m <= 5.6e+102) tmp = 2.0 / (((((t_m * t_m) / l) * ((t_m / l) * k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0)); 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.35e-145], N[(N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(2.0 / N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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.35 \cdot 10^{-145}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot 2}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot k} \cdot \frac{\frac{\cos k}{t\_m}}{k}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m \cdot t\_m}{\ell} \cdot \left(\frac{t\_m}{\ell} \cdot k\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot 2}\\
\end{array}
\end{array}
if t < 2.3500000000000001e-145Initial program 49.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.f6464.4
Applied rewrites64.4%
Applied rewrites71.6%
Applied rewrites67.4%
if 2.3500000000000001e-145 < t < 5.60000000000000037e102Initial program 68.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
unpow3N/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6489.4
Applied rewrites89.4%
Taylor expanded in k around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f6491.2
Applied rewrites91.2%
if 5.60000000000000037e102 < t Initial program 53.5%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.0
Applied rewrites37.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites88.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6497.2
lift-*.f64N/A
*-commutativeN/A
lift-*.f6497.2
Applied rewrites97.2%
Taylor expanded in t around inf
Applied rewrites97.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 2.65e-145)
(*
(/ (* (* l l) 2.0) (* (- 0.5 (* 0.5 (cos (+ k k)))) 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 <= 2.65e-145) {
tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * cos((k + k)))) * 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 <= 2.65e-145) tmp = Float64(Float64(Float64(Float64(l * l) * 2.0) / Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * k)) * Float64(Float64(cos(k) / t_m) / k)); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * Float64(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, 2.65e-145], N[(N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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 2.65 \cdot 10^{-145}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot 2}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot k} \cdot \frac{\frac{\cos k}{t\_m}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 2.65e-145Initial program 49.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.f6464.4
Applied rewrites64.4%
Applied rewrites71.6%
Applied rewrites67.4%
if 2.65e-145 < t Initial program 61.4%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.8
Applied rewrites37.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites90.0%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6494.0
lift-*.f64N/A
*-commutativeN/A
lift-*.f6494.0
Applied rewrites94.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-/.f6494.0
Applied rewrites94.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (/ k l))))
(*
t_s
(if (<= t_m 2.35e-145)
(*
(/ (* (* l l) 2.0) (* (- 0.5 (* 0.5 (cos (+ k k)))) k))
(/ (/ (cos k) t_m) k))
(if (<= t_m 1.95e+99)
(/ 2.0 (* (* t_m (* t_2 t_2)) (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
(/
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 t_2 = t_m * (k / l);
double tmp;
if (t_m <= 2.35e-145) {
tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * cos((k + k)))) * k)) * ((cos(k) / t_m) / k);
} else if (t_m <= 1.95e+99) {
tmp = 2.0 / ((t_m * (t_2 * t_2)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0));
} 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) :: t_2
real(8) :: tmp
t_2 = t_m * (k / l)
if (t_m <= 2.35d-145) then
tmp = (((l * l) * 2.0d0) / ((0.5d0 - (0.5d0 * cos((k + k)))) * k)) * ((cos(k) / t_m) / k)
else if (t_m <= 1.95d+99) then
tmp = 2.0d0 / ((t_m * (t_2 * t_2)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))
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 t_2 = t_m * (k / l);
double tmp;
if (t_m <= 2.35e-145) {
tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * Math.cos((k + k)))) * k)) * ((Math.cos(k) / t_m) / k);
} else if (t_m <= 1.95e+99) {
tmp = 2.0 / ((t_m * (t_2 * t_2)) * ((1.0 + Math.pow((k / t_m), 2.0)) + 1.0));
} 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): t_2 = t_m * (k / l) tmp = 0 if t_m <= 2.35e-145: tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * math.cos((k + k)))) * k)) * ((math.cos(k) / t_m) / k) elif t_m <= 1.95e+99: tmp = 2.0 / ((t_m * (t_2 * t_2)) * ((1.0 + math.pow((k / t_m), 2.0)) + 1.0)) 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) t_2 = Float64(t_m * Float64(k / l)) tmp = 0.0 if (t_m <= 2.35e-145) tmp = Float64(Float64(Float64(Float64(l * l) * 2.0) / Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * k)) * Float64(Float64(cos(k) / t_m) / k)); elseif (t_m <= 1.95e+99) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(t_2 * t_2)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * Float64(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) t_2 = t_m * (k / l); tmp = 0.0; if (t_m <= 2.35e-145) tmp = (((l * l) * 2.0) / ((0.5 - (0.5 * cos((k + k)))) * k)) * ((cos(k) / t_m) / k); elseif (t_m <= 1.95e+99) tmp = 2.0 / ((t_m * (t_2 * t_2)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0)); 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_] := Block[{t$95$2 = N[(t$95$m * N[(k / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.35e-145], N[(N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.95e+99], N[(2.0 / N[(N[(t$95$m * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.35 \cdot 10^{-145}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot 2}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot k} \cdot \frac{\frac{\cos k}{t\_m}}{k}\\
\mathbf{elif}\;t\_m \leq 1.95 \cdot 10^{+99}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(t\_2 \cdot t\_2\right)\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot 2}\\
\end{array}
\end{array}
\end{array}
if t < 2.3500000000000001e-145Initial program 49.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.f6464.4
Applied rewrites64.4%
Applied rewrites71.6%
Applied rewrites67.4%
if 2.3500000000000001e-145 < t < 1.94999999999999997e99Initial program 68.2%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6438.6
Applied rewrites38.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites91.1%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
unpow2N/A
unpow2N/A
unpow2N/A
times-fracN/A
unswap-sqrN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6491.1
Applied rewrites91.1%
if 1.94999999999999997e99 < t Initial program 53.5%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.0
Applied rewrites37.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites88.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6497.2
lift-*.f64N/A
*-commutativeN/A
lift-*.f6497.2
Applied rewrites97.2%
Taylor expanded in t around inf
Applied rewrites97.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (/ k l))))
(*
t_s
(if (<= (* l l) 20000000000000.0)
(/
2.0
(*
(* t_m (* (fma (* 0.16666666666666666 k) k 1.0) (* t_2 t_2)))
(+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
(/
2.0
(* (* t_m (* (/ t_m l) (* (/ (* (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 t_2 = t_m * (k / l);
double tmp;
if ((l * l) <= 20000000000000.0) {
tmp = 2.0 / ((t_m * (fma((0.16666666666666666 * k), k, 1.0) * (t_2 * t_2))) * ((1.0 + pow((k / t_m), 2.0)) + 1.0));
} else {
tmp = 2.0 / ((t_m * ((t_m / l) * (((sin(k) * t_m) / l) * 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) t_2 = Float64(t_m * Float64(k / l)) tmp = 0.0 if (Float64(l * l) <= 20000000000000.0) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(fma(Float64(0.16666666666666666 * k), k, 1.0) * Float64(t_2 * t_2))) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))); else tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(t_m / l) * Float64(Float64(Float64(sin(k) * t_m) / l) * tan(k)))) * 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_] := Block[{t$95$2 = N[(t$95$m * N[(k / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 20000000000000.0], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(0.16666666666666666 * k), $MachinePrecision] * k + 1.0), $MachinePrecision] * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 20000000000000:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(\mathsf{fma}\left(0.16666666666666666 \cdot k, k, 1\right) \cdot \left(t\_2 \cdot t\_2\right)\right)\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \left(\frac{\sin k \cdot t\_m}{\ell} \cdot \tan k\right)\right)\right) \cdot 2}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 2e13Initial program 63.6%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6422.3
Applied rewrites22.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites87.8%
Taylor expanded in k around 0
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft1-inN/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-/l*N/A
unpow2N/A
unpow2N/A
unpow2N/A
times-fracN/A
unswap-sqrN/A
lower-*.f64N/A
Applied rewrites88.1%
if 2e13 < (*.f64 l l) Initial program 42.3%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f649.2
Applied rewrites9.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites66.1%
Taylor expanded in t around inf
Applied rewrites74.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (/ k l))))
(*
t_s
(if (<= l 780000000.0)
(/
2.0
(*
(* t_m (* (fma (* 0.16666666666666666 k) k 1.0) (* t_2 t_2)))
(+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
(/
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 t_2 = t_m * (k / l);
double tmp;
if (l <= 780000000.0) {
tmp = 2.0 / ((t_m * (fma((0.16666666666666666 * k), k, 1.0) * (t_2 * t_2))) * ((1.0 + pow((k / t_m), 2.0)) + 1.0));
} 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.0, t) function code(t_s, t_m, l, k) t_2 = Float64(t_m * Float64(k / l)) tmp = 0.0 if (l <= 780000000.0) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(fma(Float64(0.16666666666666666 * k), k, 1.0) * Float64(t_2 * t_2))) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * Float64(Float64(t_m * Float64(Float64(sin(k) * t_m) / l)) * tan(k))) * 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_] := Block[{t$95$2 = N[(t$95$m * N[(k / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 780000000.0], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(0.16666666666666666 * k), $MachinePrecision] * k + 1.0), $MachinePrecision] * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 780000000:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(\mathsf{fma}\left(0.16666666666666666 \cdot k, k, 1\right) \cdot \left(t\_2 \cdot t\_2\right)\right)\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{\sin k \cdot t\_m}{\ell}\right) \cdot \tan k\right)\right) \cdot 2}\\
\end{array}
\end{array}
\end{array}
if l < 7.8e8Initial program 56.4%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6415.3
Applied rewrites15.3%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites80.1%
Taylor expanded in k around 0
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft1-inN/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-/l*N/A
unpow2N/A
unpow2N/A
unpow2N/A
times-fracN/A
unswap-sqrN/A
lower-*.f64N/A
Applied rewrites78.3%
if 7.8e8 < l Initial program 44.4%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6419.8
Applied rewrites19.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites69.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6472.8
lift-*.f64N/A
*-commutativeN/A
lift-*.f6472.8
Applied rewrites72.8%
Taylor expanded in t around inf
Applied rewrites82.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (/ k l))))
(*
t_s
(if (<= t_m 2.1e-153)
(*
(* 2.0 (* l l))
(/ (/ (cos k) t_m) (* (* (- 0.5 (* 0.5 (cos (+ k k)))) k) k)))
(/
2.0
(*
(* t_m (* (fma (* 0.16666666666666666 k) k 1.0) (* t_2 t_2)))
(+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * (k / l);
double tmp;
if (t_m <= 2.1e-153) {
tmp = (2.0 * (l * l)) * ((cos(k) / t_m) / (((0.5 - (0.5 * cos((k + k)))) * k) * k));
} else {
tmp = 2.0 / ((t_m * (fma((0.16666666666666666 * k), k, 1.0) * (t_2 * t_2))) * ((1.0 + pow((k / t_m), 2.0)) + 1.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(t_m * Float64(k / l)) tmp = 0.0 if (t_m <= 2.1e-153) 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(t_m * Float64(fma(Float64(0.16666666666666666 * k), k, 1.0) * Float64(t_2 * t_2))) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.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_] := Block[{t$95$2 = N[(t$95$m * N[(k / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.1e-153], 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[(t$95$m * N[(N[(N[(0.16666666666666666 * k), $MachinePrecision] * k + 1.0), $MachinePrecision] * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.1 \cdot 10^{-153}:\\
\;\;\;\;\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(t\_m \cdot \left(\mathsf{fma}\left(0.16666666666666666 \cdot k, k, 1\right) \cdot \left(t\_2 \cdot t\_2\right)\right)\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.10000000000000004e-153Initial program 50.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.f6463.7
Applied rewrites63.7%
Applied rewrites62.7%
if 2.10000000000000004e-153 < t Initial program 59.6%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6437.7
Applied rewrites37.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites89.3%
Taylor expanded in k around 0
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft1-inN/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-/l*N/A
unpow2N/A
unpow2N/A
unpow2N/A
times-fracN/A
unswap-sqrN/A
lower-*.f64N/A
Applied rewrites84.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (/ k l))))
(*
t_s
(if (<= (* l l) 2e+151)
(/
2.0
(*
(* t_m (* (fma (* 0.16666666666666666 k) k 1.0) (* t_2 t_2)))
(+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
(/ (* (/ l t_m) l) (pow (* k t_m) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * (k / l);
double tmp;
if ((l * l) <= 2e+151) {
tmp = 2.0 / ((t_m * (fma((0.16666666666666666 * k), k, 1.0) * (t_2 * t_2))) * ((1.0 + pow((k / t_m), 2.0)) + 1.0));
} else {
tmp = ((l / t_m) * l) / pow((k * t_m), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(t_m * Float64(k / l)) tmp = 0.0 if (Float64(l * l) <= 2e+151) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(fma(Float64(0.16666666666666666 * k), k, 1.0) * Float64(t_2 * t_2))) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))); else tmp = Float64(Float64(Float64(l / t_m) * l) / (Float64(k * t_m) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(t$95$m * N[(k / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e+151], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(0.16666666666666666 * k), $MachinePrecision] * k + 1.0), $MachinePrecision] * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / t$95$m), $MachinePrecision] * l), $MachinePrecision] / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{+151}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(\mathsf{fma}\left(0.16666666666666666 \cdot k, k, 1\right) \cdot \left(t\_2 \cdot t\_2\right)\right)\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m} \cdot \ell}{{\left(k \cdot t\_m\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 2.00000000000000003e151Initial program 62.6%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6419.8
Applied rewrites19.8%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites86.7%
Taylor expanded in k around 0
distribute-lft-inN/A
associate-*r*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft1-inN/A
lower-*.f64N/A
unpow2N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-/l*N/A
unpow2N/A
unpow2N/A
unpow2N/A
times-fracN/A
unswap-sqrN/A
lower-*.f64N/A
Applied rewrites86.3%
if 2.00000000000000003e151 < (*.f64 l l) Initial program 37.8%
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-*.f6450.6
Applied rewrites50.6%
Applied rewrites54.0%
Applied rewrites65.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* t_m (/ k l))))
(*
t_s
(if (<= (* l l) 1e-64)
(/ 2.0 (* (* t_m (* t_2 t_2)) (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
(/ (* (/ l t_m) l) (pow (* k t_m) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m * (k / l);
double tmp;
if ((l * l) <= 1e-64) {
tmp = 2.0 / ((t_m * (t_2 * t_2)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0));
} else {
tmp = ((l / t_m) * l) / pow((k * t_m), 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) :: t_2
real(8) :: tmp
t_2 = t_m * (k / l)
if ((l * l) <= 1d-64) then
tmp = 2.0d0 / ((t_m * (t_2 * t_2)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))
else
tmp = ((l / t_m) * l) / ((k * t_m) ** 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 t_2 = t_m * (k / l);
double tmp;
if ((l * l) <= 1e-64) {
tmp = 2.0 / ((t_m * (t_2 * t_2)) * ((1.0 + Math.pow((k / t_m), 2.0)) + 1.0));
} else {
tmp = ((l / t_m) * l) / Math.pow((k * t_m), 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): t_2 = t_m * (k / l) tmp = 0 if (l * l) <= 1e-64: tmp = 2.0 / ((t_m * (t_2 * t_2)) * ((1.0 + math.pow((k / t_m), 2.0)) + 1.0)) else: tmp = ((l / t_m) * l) / math.pow((k * t_m), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(t_m * Float64(k / l)) tmp = 0.0 if (Float64(l * l) <= 1e-64) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(t_2 * t_2)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))); else tmp = Float64(Float64(Float64(l / t_m) * l) / (Float64(k * t_m) ^ 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) t_2 = t_m * (k / l); tmp = 0.0; if ((l * l) <= 1e-64) tmp = 2.0 / ((t_m * (t_2 * t_2)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0)); else tmp = ((l / t_m) * l) / ((k * t_m) ^ 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_] := Block[{t$95$2 = N[(t$95$m * N[(k / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-64], N[(2.0 / N[(N[(t$95$m * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / t$95$m), $MachinePrecision] * l), $MachinePrecision] / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t\_m \cdot \frac{k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-64}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(t\_2 \cdot t\_2\right)\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m} \cdot \ell}{{\left(k \cdot t\_m\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.99999999999999965e-65Initial program 62.0%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6422.9
Applied rewrites22.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites89.7%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
unpow2N/A
unpow2N/A
unpow2N/A
times-fracN/A
unswap-sqrN/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6490.7
Applied rewrites90.7%
if 9.99999999999999965e-65 < (*.f64 l l) Initial program 46.9%
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-*.f6452.4
Applied rewrites52.4%
Applied rewrites54.6%
Applied rewrites69.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.1e-88)
(* (/ (* (* l l) 2.0) (* (* k k) k)) (/ (/ (cos k) t_m) k))
(if (<= t_m 4e+103)
(/ (* (/ l k) (* l (pow t_m -3.0))) k)
(/ (* (/ l t_m) l) (pow (* k t_m) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.1e-88) {
tmp = (((l * l) * 2.0) / ((k * k) * k)) * ((cos(k) / t_m) / k);
} else if (t_m <= 4e+103) {
tmp = ((l / k) * (l * pow(t_m, -3.0))) / k;
} else {
tmp = ((l / t_m) * l) / pow((k * t_m), 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.1d-88) then
tmp = (((l * l) * 2.0d0) / ((k * k) * k)) * ((cos(k) / t_m) / k)
else if (t_m <= 4d+103) then
tmp = ((l / k) * (l * (t_m ** (-3.0d0)))) / k
else
tmp = ((l / t_m) * l) / ((k * t_m) ** 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.1e-88) {
tmp = (((l * l) * 2.0) / ((k * k) * k)) * ((Math.cos(k) / t_m) / k);
} else if (t_m <= 4e+103) {
tmp = ((l / k) * (l * Math.pow(t_m, -3.0))) / k;
} else {
tmp = ((l / t_m) * l) / Math.pow((k * t_m), 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.1e-88: tmp = (((l * l) * 2.0) / ((k * k) * k)) * ((math.cos(k) / t_m) / k) elif t_m <= 4e+103: tmp = ((l / k) * (l * math.pow(t_m, -3.0))) / k else: tmp = ((l / t_m) * l) / math.pow((k * t_m), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.1e-88) tmp = Float64(Float64(Float64(Float64(l * l) * 2.0) / Float64(Float64(k * k) * k)) * Float64(Float64(cos(k) / t_m) / k)); elseif (t_m <= 4e+103) tmp = Float64(Float64(Float64(l / k) * Float64(l * (t_m ^ -3.0))) / k); else tmp = Float64(Float64(Float64(l / t_m) * l) / (Float64(k * t_m) ^ 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.1e-88) tmp = (((l * l) * 2.0) / ((k * k) * k)) * ((cos(k) / t_m) / k); elseif (t_m <= 4e+103) tmp = ((l / k) * (l * (t_m ^ -3.0))) / k; else tmp = ((l / t_m) * l) / ((k * t_m) ^ 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.1e-88], N[(N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4e+103], N[(N[(N[(l / k), $MachinePrecision] * N[(l * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(l / t$95$m), $MachinePrecision] * l), $MachinePrecision] / N[Power[N[(k * t$95$m), $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 1.1 \cdot 10^{-88}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot 2}{\left(k \cdot k\right) \cdot k} \cdot \frac{\frac{\cos k}{t\_m}}{k}\\
\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+103}:\\
\;\;\;\;\frac{\frac{\ell}{k} \cdot \left(\ell \cdot {t\_m}^{-3}\right)}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m} \cdot \ell}{{\left(k \cdot t\_m\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.10000000000000002e-88Initial program 47.6%
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.f6464.1
Applied rewrites64.1%
Applied rewrites71.5%
Taylor expanded in k around 0
Applied rewrites57.1%
if 1.10000000000000002e-88 < t < 4e103Initial program 80.4%
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-*.f6481.1
Applied rewrites81.1%
Applied rewrites81.1%
Applied rewrites88.7%
if 4e103 < t Initial program 53.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-*.f6451.7
Applied rewrites51.7%
Applied rewrites51.7%
Applied rewrites86.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-88)
(* (/ 2.0 (pow k 4.0)) (/ (* l l) t_m))
(if (<= t_m 4e+103)
(/ (* (/ l k) (* l (pow t_m -3.0))) k)
(/ (* (/ l t_m) l) (pow (* k t_m) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.05e-88) {
tmp = (2.0 / pow(k, 4.0)) * ((l * l) / t_m);
} else if (t_m <= 4e+103) {
tmp = ((l / k) * (l * pow(t_m, -3.0))) / k;
} else {
tmp = ((l / t_m) * l) / pow((k * t_m), 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.05d-88) then
tmp = (2.0d0 / (k ** 4.0d0)) * ((l * l) / t_m)
else if (t_m <= 4d+103) then
tmp = ((l / k) * (l * (t_m ** (-3.0d0)))) / k
else
tmp = ((l / t_m) * l) / ((k * t_m) ** 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.05e-88) {
tmp = (2.0 / Math.pow(k, 4.0)) * ((l * l) / t_m);
} else if (t_m <= 4e+103) {
tmp = ((l / k) * (l * Math.pow(t_m, -3.0))) / k;
} else {
tmp = ((l / t_m) * l) / Math.pow((k * t_m), 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.05e-88: tmp = (2.0 / math.pow(k, 4.0)) * ((l * l) / t_m) elif t_m <= 4e+103: tmp = ((l / k) * (l * math.pow(t_m, -3.0))) / k else: tmp = ((l / t_m) * l) / math.pow((k * t_m), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.05e-88) tmp = Float64(Float64(2.0 / (k ^ 4.0)) * Float64(Float64(l * l) / t_m)); elseif (t_m <= 4e+103) tmp = Float64(Float64(Float64(l / k) * Float64(l * (t_m ^ -3.0))) / k); else tmp = Float64(Float64(Float64(l / t_m) * l) / (Float64(k * t_m) ^ 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.05e-88) tmp = (2.0 / (k ^ 4.0)) * ((l * l) / t_m); elseif (t_m <= 4e+103) tmp = ((l / k) * (l * (t_m ^ -3.0))) / k; else tmp = ((l / t_m) * l) / ((k * t_m) ^ 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.05e-88], N[(N[(2.0 / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4e+103], N[(N[(N[(l / k), $MachinePrecision] * N[(l * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(l / t$95$m), $MachinePrecision] * l), $MachinePrecision] / N[Power[N[(k * t$95$m), $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 1.05 \cdot 10^{-88}:\\
\;\;\;\;\frac{2}{{k}^{4}} \cdot \frac{\ell \cdot \ell}{t\_m}\\
\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+103}:\\
\;\;\;\;\frac{\frac{\ell}{k} \cdot \left(\ell \cdot {t\_m}^{-3}\right)}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m} \cdot \ell}{{\left(k \cdot t\_m\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.05e-88Initial program 47.6%
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.f6464.1
Applied rewrites64.1%
Taylor expanded in k around 0
Applied rewrites54.4%
if 1.05e-88 < t < 4e103Initial program 80.4%
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-*.f6481.1
Applied rewrites81.1%
Applied rewrites81.1%
Applied rewrites88.7%
if 4e103 < t Initial program 53.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-*.f6451.7
Applied rewrites51.7%
Applied rewrites51.7%
Applied rewrites86.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 6400000000000.0)
(/ (* (/ l t_m) (/ l k)) (* (* t_m 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 (k <= 6400000000000.0) {
tmp = ((l / t_m) * (l / k)) / ((t_m * 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 (k <= 6400000000000.0d0) then
tmp = ((l / t_m) * (l / k)) / ((t_m * 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 (k <= 6400000000000.0) {
tmp = ((l / t_m) * (l / k)) / ((t_m * 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 k <= 6400000000000.0: tmp = ((l / t_m) * (l / k)) / ((t_m * 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 (k <= 6400000000000.0) tmp = Float64(Float64(Float64(l / t_m) * Float64(l / k)) / Float64(Float64(t_m * t_m) * k)); else tmp = Float64(Float64(Float64(Float64(-0.16666666666666666 / 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 <= 6400000000000.0) tmp = ((l / t_m) * (l / k)) / ((t_m * 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[k, 6400000000000.0], N[(N[(N[(l / t$95$m), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(-0.16666666666666666 / N[(k * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $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 6400000000000:\\
\;\;\;\;\frac{\frac{\ell}{t\_m} \cdot \frac{\ell}{k}}{\left(t\_m \cdot t\_m\right) \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\frac{-0.16666666666666666}{k \cdot k}}{t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 6.4e12Initial program 55.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-*.f6456.8
Applied rewrites56.8%
Applied rewrites58.9%
Applied rewrites67.1%
if 6.4e12 < k Initial program 47.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.f6472.9
Applied rewrites72.9%
Taylor expanded in k around 0
Applied rewrites16.7%
Taylor expanded in k around inf
Applied rewrites60.9%
Applied rewrites67.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 16500000000000.0)
(* (/ 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 <= 16500000000000.0) {
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 <= 16500000000000.0d0) 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 <= 16500000000000.0) {
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 <= 16500000000000.0: 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 <= 16500000000000.0) tmp = Float64(Float64(l / Float64(Float64(t_m * t_m) * t_m)) * Float64(Float64(l / k) / k)); else tmp = Float64(Float64(Float64(Float64(-0.16666666666666666 / 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 <= 16500000000000.0) 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, 16500000000000.0], 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[(-0.16666666666666666 / N[(k * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $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 16500000000000:\\
\;\;\;\;\frac{\ell}{\left(t\_m \cdot t\_m\right) \cdot t\_m} \cdot \frac{\frac{\ell}{k}}{k}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\frac{-0.16666666666666666}{k \cdot k}}{t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 1.65e13Initial program 55.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-*.f6456.8
Applied rewrites56.8%
Applied rewrites56.8%
Applied rewrites59.8%
if 1.65e13 < k Initial program 47.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.f6472.9
Applied rewrites72.9%
Taylor expanded in k around 0
Applied rewrites16.7%
Taylor expanded in k around inf
Applied rewrites60.9%
Applied rewrites67.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 16500000000000.0)
(* (/ 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 <= 16500000000000.0) {
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 <= 16500000000000.0d0) 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 <= 16500000000000.0) {
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 <= 16500000000000.0: 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 <= 16500000000000.0) tmp = Float64(Float64(l / t_m) * Float64(Float64(l / Float64(k * k)) / Float64(t_m * t_m))); else tmp = Float64(Float64(Float64(Float64(-0.16666666666666666 / 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 <= 16500000000000.0) 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, 16500000000000.0], 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[(N[(-0.16666666666666666 / N[(k * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $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 16500000000000:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{k \cdot k}}{t\_m \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\frac{-0.16666666666666666}{k \cdot k}}{t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 1.65e13Initial program 55.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-*.f6456.8
Applied rewrites56.8%
Applied rewrites60.1%
if 1.65e13 < k Initial program 47.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.f6472.9
Applied rewrites72.9%
Taylor expanded in k around 0
Applied rewrites16.7%
Taylor expanded in k around inf
Applied rewrites60.9%
Applied rewrites67.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 6400000000000.0)
(/ (* (/ l t_m) l) (* (* t_m t_m) (* 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 <= 6400000000000.0) {
tmp = ((l / t_m) * l) / ((t_m * t_m) * (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 <= 6400000000000.0d0) then
tmp = ((l / t_m) * l) / ((t_m * t_m) * (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 <= 6400000000000.0) {
tmp = ((l / t_m) * l) / ((t_m * t_m) * (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 <= 6400000000000.0: tmp = ((l / t_m) * l) / ((t_m * t_m) * (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 <= 6400000000000.0) tmp = Float64(Float64(Float64(l / t_m) * l) / Float64(Float64(t_m * t_m) * Float64(k * k))); else tmp = Float64(Float64(Float64(Float64(-0.16666666666666666 / 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 <= 6400000000000.0) tmp = ((l / t_m) * l) / ((t_m * t_m) * (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, 6400000000000.0], N[(N[(N[(l / t$95$m), $MachinePrecision] * l), $MachinePrecision] / N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(-0.16666666666666666 / N[(k * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $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 6400000000000:\\
\;\;\;\;\frac{\frac{\ell}{t\_m} \cdot \ell}{\left(t\_m \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\frac{-0.16666666666666666}{k \cdot k}}{t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 6.4e12Initial program 55.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-*.f6456.8
Applied rewrites56.8%
Applied rewrites58.9%
Applied rewrites58.9%
if 6.4e12 < k Initial program 47.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.f6472.9
Applied rewrites72.9%
Taylor expanded in k around 0
Applied rewrites16.7%
Taylor expanded in k around inf
Applied rewrites60.9%
Applied rewrites67.3%
Final simplification60.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 16500000000000.0)
(* (/ 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 <= 16500000000000.0) {
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 <= 16500000000000.0d0) 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 <= 16500000000000.0) {
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 <= 16500000000000.0: 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 <= 16500000000000.0) tmp = Float64(Float64(l / Float64(Float64(t_m * t_m) * t_m)) * Float64(l / Float64(k * k))); else tmp = Float64(Float64(Float64(Float64(-0.16666666666666666 / 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 <= 16500000000000.0) 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, 16500000000000.0], 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[(N[(-0.16666666666666666 / N[(k * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $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 16500000000000:\\
\;\;\;\;\frac{\ell}{\left(t\_m \cdot t\_m\right) \cdot t\_m} \cdot \frac{\ell}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\frac{-0.16666666666666666}{k \cdot k}}{t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if k < 1.65e13Initial program 55.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-*.f6456.8
Applied rewrites56.8%
Applied rewrites56.8%
if 1.65e13 < k Initial program 47.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.f6472.9
Applied rewrites72.9%
Taylor expanded in k around 0
Applied rewrites16.7%
Taylor expanded in k around inf
Applied rewrites60.9%
Applied rewrites67.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 (<= l 1e+126)
(* (* 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 <= 1e+126) {
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 <= 1d+126) 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 <= 1e+126) {
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 <= 1e+126: 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 <= 1e+126) tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64(-0.16666666666666666 / Float64(Float64(k * t_m) * k))); else tmp = Float64(Float64(Float64(Float64(-0.16666666666666666 / 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 <= 1e+126) 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, 1e+126], 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[(N[(-0.16666666666666666 / N[(k * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $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 10^{+126}:\\
\;\;\;\;\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{\frac{-0.16666666666666666}{k \cdot k}}{t\_m} \cdot \left(2 \cdot \ell\right)\right) \cdot \ell\\
\end{array}
\end{array}
if l < 9.99999999999999925e125Initial program 56.3%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
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.8
Applied rewrites59.8%
Taylor expanded in k around 0
Applied rewrites33.8%
Taylor expanded in k around inf
Applied rewrites35.6%
Taylor expanded in k around inf
Applied rewrites36.3%
if 9.99999999999999925e125 < l Initial program 35.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.f6458.6
Applied rewrites58.6%
Taylor expanded in k around 0
Applied rewrites48.6%
Taylor expanded in k around inf
Applied rewrites7.4%
Applied rewrites14.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* 2.0 (* 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.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.7
Applied rewrites59.7%
Taylor expanded in k around 0
Applied rewrites35.6%
Taylor expanded in k around inf
Applied rewrites32.2%
Taylor expanded in k around inf
Applied rewrites32.8%
herbie shell --seed 2024316
(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))))