
(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 26 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
(let* ((t_2 (* (tan k) (/ k l))) (t_3 (/ (sin k) l)))
(*
t_s
(if (<= t_m 1.85e-109)
(/
2.0
(*
(fma (/ 2.0 l) (* t_m (* (* t_m t_m) (tan k))) (* t_2 (* t_m k)))
t_3))
(if (<= t_m 1.25e+154)
(/
(/ 2.0 t_3)
(* t_m (fma k t_2 (* 2.0 (* (* t_m t_m) (/ (tan k) l))))))
(* l (/ (/ l (* k (* t_m (* t_m k)))) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = tan(k) * (k / l);
double t_3 = sin(k) / l;
double tmp;
if (t_m <= 1.85e-109) {
tmp = 2.0 / (fma((2.0 / l), (t_m * ((t_m * t_m) * tan(k))), (t_2 * (t_m * k))) * t_3);
} else if (t_m <= 1.25e+154) {
tmp = (2.0 / t_3) / (t_m * fma(k, t_2, (2.0 * ((t_m * t_m) * (tan(k) / l)))));
} else {
tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(tan(k) * Float64(k / l)) t_3 = Float64(sin(k) / l) tmp = 0.0 if (t_m <= 1.85e-109) tmp = Float64(2.0 / Float64(fma(Float64(2.0 / l), Float64(t_m * Float64(Float64(t_m * t_m) * tan(k))), Float64(t_2 * Float64(t_m * k))) * t_3)); elseif (t_m <= 1.25e+154) tmp = Float64(Float64(2.0 / t_3) / Float64(t_m * fma(k, t_2, Float64(2.0 * Float64(Float64(t_m * t_m) * Float64(tan(k) / l)))))); else tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.85e-109], N[(2.0 / N[(N[(N[(2.0 / l), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(N[(2.0 / t$95$3), $MachinePrecision] / N[(t$95$m * N[(k * t$95$2 + N[(2.0 * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \tan k \cdot \frac{k}{\ell}\\
t_3 := \frac{\sin k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.85 \cdot 10^{-109}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), t\_2 \cdot \left(t\_m \cdot k\right)\right) \cdot t\_3}\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
\;\;\;\;\frac{\frac{2}{t\_3}}{t\_m \cdot \mathsf{fma}\left(k, t\_2, 2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{\tan k}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
\end{array}
if t < 1.8499999999999999e-109Initial program 49.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites44.0%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites89.0%
Applied rewrites89.2%
if 1.8499999999999999e-109 < t < 1.25000000000000001e154Initial program 70.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites87.2%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites96.6%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
Applied rewrites96.8%
if 1.25000000000000001e154 < t Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.0
Applied rewrites56.0%
Applied rewrites65.8%
Applied rewrites74.7%
Applied rewrites83.2%
Final simplification90.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 3e+110)
(/
2.0
(*
(fma
(/ 2.0 l)
(* t_m (* (* t_m t_m) (tan k)))
(* (* (tan k) (/ k l)) (* t_m k)))
(/ (sin k) l)))
(/
2.0
(*
(* (tan k) (* (/ (pow t_m 1.5) l) (/ (* (sin k) (pow t_m 1.5)) l)))
(fma (* k (/ k t_m)) (/ 1.0 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 <= 3e+110) {
tmp = 2.0 / (fma((2.0 / l), (t_m * ((t_m * t_m) * tan(k))), ((tan(k) * (k / l)) * (t_m * k))) * (sin(k) / l));
} else {
tmp = 2.0 / ((tan(k) * ((pow(t_m, 1.5) / l) * ((sin(k) * pow(t_m, 1.5)) / l))) * fma((k * (k / t_m)), (1.0 / 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 <= 3e+110) tmp = Float64(2.0 / Float64(fma(Float64(2.0 / l), Float64(t_m * Float64(Float64(t_m * t_m) * tan(k))), Float64(Float64(tan(k) * Float64(k / l)) * Float64(t_m * k))) * Float64(sin(k) / l))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((t_m ^ 1.5) / l) * Float64(Float64(sin(k) * (t_m ^ 1.5)) / l))) * fma(Float64(k * Float64(k / t_m)), Float64(1.0 / 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, 3e+110], N[(2.0 / N[(N[(N[(2.0 / l), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3 \cdot 10^{+110}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t\_m \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \frac{\sin k \cdot {t\_m}^{1.5}}{\ell}\right)\right) \cdot \mathsf{fma}\left(k \cdot \frac{k}{t\_m}, \frac{1}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 3.00000000000000007e110Initial program 55.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites55.1%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites91.1%
Applied rewrites90.6%
if 3.00000000000000007e110 < t Initial program 54.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
sqr-powN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
metadata-eval85.0
Applied rewrites85.0%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
lift-/.f64N/A
div-invN/A
associate-*r*N/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f6485.0
Applied rewrites85.0%
Final simplification89.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3e+110)
(/
2.0
(*
(fma
(/ 2.0 l)
(* t_m (* (* t_m t_m) (tan k)))
(* (* (tan k) (/ k l)) (* t_m k)))
(/ (sin k) l)))
(/
2.0
(*
(* (tan k) (* (/ (pow t_m 1.5) l) (/ (* (sin k) (pow t_m 1.5)) l)))
(fma (/ k t_m) (/ k t_m) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3e+110) {
tmp = 2.0 / (fma((2.0 / l), (t_m * ((t_m * t_m) * tan(k))), ((tan(k) * (k / l)) * (t_m * k))) * (sin(k) / l));
} else {
tmp = 2.0 / ((tan(k) * ((pow(t_m, 1.5) / l) * ((sin(k) * pow(t_m, 1.5)) / l))) * fma((k / t_m), (k / t_m), 2.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3e+110) tmp = Float64(2.0 / Float64(fma(Float64(2.0 / l), Float64(t_m * Float64(Float64(t_m * t_m) * tan(k))), Float64(Float64(tan(k) * Float64(k / l)) * Float64(t_m * k))) * Float64(sin(k) / l))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((t_m ^ 1.5) / l) * Float64(Float64(sin(k) * (t_m ^ 1.5)) / l))) * fma(Float64(k / t_m), Float64(k / t_m), 2.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3e+110], N[(2.0 / N[(N[(N[(2.0 / l), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3 \cdot 10^{+110}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t\_m \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \frac{\sin k \cdot {t\_m}^{1.5}}{\ell}\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\
\end{array}
\end{array}
if t < 3.00000000000000007e110Initial program 55.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites55.1%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites91.1%
Applied rewrites90.6%
if 3.00000000000000007e110 < t Initial program 54.4%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-pow.f64N/A
sqr-powN/A
associate-*l*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
metadata-eval85.0
Applied rewrites85.0%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6485.0
Applied rewrites85.0%
Final simplification89.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1e-188)
(/ 2.0 (* (/ (sin k) l) (/ (* k (* k (* t_m (sin k)))) (* l (cos k)))))
(if (<= t_m 1.25e+154)
(*
l
(/
(/
2.0
(*
t_m
(fma k (* (tan k) (/ k l)) (* 2.0 (* (* t_m t_m) (/ (tan k) l))))))
(sin k)))
(* l (/ (/ l (* k (* t_m (* t_m k)))) t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-188) {
tmp = 2.0 / ((sin(k) / l) * ((k * (k * (t_m * sin(k)))) / (l * cos(k))));
} else if (t_m <= 1.25e+154) {
tmp = l * ((2.0 / (t_m * fma(k, (tan(k) * (k / l)), (2.0 * ((t_m * t_m) * (tan(k) / l)))))) / sin(k));
} else {
tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1e-188) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(k * Float64(k * Float64(t_m * sin(k)))) / Float64(l * cos(k))))); elseif (t_m <= 1.25e+154) tmp = Float64(l * Float64(Float64(2.0 / Float64(t_m * fma(k, Float64(tan(k) * Float64(k / l)), Float64(2.0 * Float64(Float64(t_m * t_m) * Float64(tan(k) / l)))))) / sin(k))); else tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-188], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * N[(k * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(l * N[(N[(2.0 / N[(t$95$m * N[(k * N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-188}:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
\;\;\;\;\ell \cdot \frac{\frac{2}{t\_m \cdot \mathsf{fma}\left(k, \tan k \cdot \frac{k}{\ell}, 2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{\tan k}{\ell}\right)\right)}}{\sin k}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
if t < 9.9999999999999995e-189Initial program 52.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites45.5%
Taylor expanded in k around inf
lower-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f6473.0
Applied rewrites73.0%
if 9.9999999999999995e-189 < t < 1.25000000000000001e154Initial program 59.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites73.2%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites95.0%
Applied rewrites94.2%
if 1.25000000000000001e154 < t Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.0
Applied rewrites56.0%
Applied rewrites65.8%
Applied rewrites74.7%
Applied rewrites83.2%
Final simplification81.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 2e+121)
(/
2.0
(*
(fma
(/ 2.0 l)
(* t_m (* (* t_m t_m) (tan k)))
(* (* (tan k) (/ k l)) (* t_m k)))
(/ (sin k) l)))
(* l (/ (/ l (* k (* t_m (* t_m k)))) t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2e+121) {
tmp = 2.0 / (fma((2.0 / l), (t_m * ((t_m * t_m) * tan(k))), ((tan(k) * (k / l)) * (t_m * k))) * (sin(k) / l));
} else {
tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2e+121) tmp = Float64(2.0 / Float64(fma(Float64(2.0 / l), Float64(t_m * Float64(Float64(t_m * t_m) * tan(k))), Float64(Float64(tan(k) * Float64(k / l)) * Float64(t_m * k))) * Float64(sin(k) / l))); else tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2e+121], N[(2.0 / N[(N[(N[(2.0 / l), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2 \cdot 10^{+121}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t\_m \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
if t < 2.00000000000000007e121Initial program 55.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites55.8%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites90.9%
Applied rewrites90.4%
if 2.00000000000000007e121 < t Initial program 55.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.7
Applied rewrites52.7%
Applied rewrites66.1%
Applied rewrites73.6%
Applied rewrites85.8%
Final simplification89.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.5e-188)
(/ 2.0 (* (/ (sin k) l) (/ (* k (* k (* t_m (sin k)))) (* l (cos k)))))
(if (<= t_m 1.25e+154)
(*
l
(/
2.0
(*
(sin k)
(*
t_m
(fma k (* (tan k) (/ k l)) (* 2.0 (* (* t_m t_m) (/ (tan k) l))))))))
(* l (/ (/ l (* k (* t_m (* t_m k)))) t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.5e-188) {
tmp = 2.0 / ((sin(k) / l) * ((k * (k * (t_m * sin(k)))) / (l * cos(k))));
} else if (t_m <= 1.25e+154) {
tmp = l * (2.0 / (sin(k) * (t_m * fma(k, (tan(k) * (k / l)), (2.0 * ((t_m * t_m) * (tan(k) / l)))))));
} else {
tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.5e-188) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(k * Float64(k * Float64(t_m * sin(k)))) / Float64(l * cos(k))))); elseif (t_m <= 1.25e+154) tmp = Float64(l * Float64(2.0 / Float64(sin(k) * Float64(t_m * fma(k, Float64(tan(k) * Float64(k / l)), Float64(2.0 * Float64(Float64(t_m * t_m) * Float64(tan(k) / l)))))))); else tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.5e-188], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * N[(k * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(l * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(t$95$m * N[(k * N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.5 \cdot 10^{-188}:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
\;\;\;\;\ell \cdot \frac{2}{\sin k \cdot \left(t\_m \cdot \mathsf{fma}\left(k, \tan k \cdot \frac{k}{\ell}, 2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{\tan k}{\ell}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
if t < 3.5e-188Initial program 52.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites45.5%
Taylor expanded in k around inf
lower-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f6473.0
Applied rewrites73.0%
if 3.5e-188 < t < 1.25000000000000001e154Initial program 59.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites73.2%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites95.0%
Applied rewrites94.1%
if 1.25000000000000001e154 < t Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.0
Applied rewrites56.0%
Applied rewrites65.8%
Applied rewrites74.7%
Applied rewrites83.2%
Final simplification81.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 (/ (sin k) l)))
(*
t_s
(if (<= t_m 8.2e-98)
(/ 2.0 (* t_2 (/ (* k (* k (* t_m (sin k)))) (* l (cos k)))))
(if (<= t_m 1.25e+154)
(/
2.0
(*
t_2
(*
(* t_m t_m)
(* (* (tan k) (fma k (/ k (* t_m t_m)) 2.0)) (/ t_m l)))))
(* l (/ (/ l (* k (* t_m (* t_m k)))) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) / l;
double tmp;
if (t_m <= 8.2e-98) {
tmp = 2.0 / (t_2 * ((k * (k * (t_m * sin(k)))) / (l * cos(k))));
} else if (t_m <= 1.25e+154) {
tmp = 2.0 / (t_2 * ((t_m * t_m) * ((tan(k) * fma(k, (k / (t_m * t_m)), 2.0)) * (t_m / l))));
} else {
tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) / l) tmp = 0.0 if (t_m <= 8.2e-98) tmp = Float64(2.0 / Float64(t_2 * Float64(Float64(k * Float64(k * Float64(t_m * sin(k)))) / Float64(l * cos(k))))); elseif (t_m <= 1.25e+154) tmp = Float64(2.0 / Float64(t_2 * Float64(Float64(t_m * t_m) * Float64(Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)) * Float64(t_m / l))))); else tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8.2e-98], N[(2.0 / N[(t$95$2 * N[(N[(k * N[(k * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(2.0 / N[(t$95$2 * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
\end{array}
if t < 8.1999999999999996e-98Initial program 48.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites43.9%
Taylor expanded in k around inf
lower-/.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f6475.7
Applied rewrites75.7%
if 8.1999999999999996e-98 < t < 1.25000000000000001e154Initial program 72.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites91.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites96.2%
if 1.25000000000000001e154 < t Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.0
Applied rewrites56.0%
Applied rewrites65.8%
Applied rewrites74.7%
Applied rewrites83.2%
Final simplification81.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (sin k) l)))
(*
t_s
(if (<= t_m 2.6e-99)
(/ 2.0 (* t_2 (* t_m (* (* k k) (/ (sin k) (* l (cos k)))))))
(if (<= t_m 1.25e+154)
(/
2.0
(*
t_2
(*
(* t_m t_m)
(* (* (tan k) (fma k (/ k (* t_m t_m)) 2.0)) (/ t_m l)))))
(* l (/ (/ l (* k (* t_m (* t_m k)))) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) / l;
double tmp;
if (t_m <= 2.6e-99) {
tmp = 2.0 / (t_2 * (t_m * ((k * k) * (sin(k) / (l * cos(k))))));
} else if (t_m <= 1.25e+154) {
tmp = 2.0 / (t_2 * ((t_m * t_m) * ((tan(k) * fma(k, (k / (t_m * t_m)), 2.0)) * (t_m / l))));
} else {
tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) / l) tmp = 0.0 if (t_m <= 2.6e-99) tmp = Float64(2.0 / Float64(t_2 * Float64(t_m * Float64(Float64(k * k) * Float64(sin(k) / Float64(l * cos(k))))))); elseif (t_m <= 1.25e+154) tmp = Float64(2.0 / Float64(t_2 * Float64(Float64(t_m * t_m) * Float64(Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)) * Float64(t_m / l))))); else tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.6e-99], N[(2.0 / N[(t$95$2 * N[(t$95$m * N[(N[(k * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(2.0 / N[(t$95$2 * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.6 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \left(t\_m \cdot \left(\left(k \cdot k\right) \cdot \frac{\sin k}{\ell \cdot \cos k}\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
\end{array}
if t < 2.60000000000000005e-99Initial program 48.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites43.9%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites89.3%
Taylor expanded in k around inf
Applied rewrites69.4%
if 2.60000000000000005e-99 < t < 1.25000000000000001e154Initial program 72.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites91.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites96.2%
if 1.25000000000000001e154 < t Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.0
Applied rewrites56.0%
Applied rewrites65.8%
Applied rewrites74.7%
Applied rewrites83.2%
Final simplification77.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.55e-99)
(/ (* 2.0 (* l (* l (cos k)))) (* k (* k (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 1.25e+154)
(/
2.0
(*
(/ (sin k) l)
(*
(* t_m t_m)
(* (* (tan k) (fma k (/ k (* t_m t_m)) 2.0)) (/ t_m l)))))
(* l (/ (/ l (* k (* t_m (* t_m k)))) t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.55e-99) {
tmp = (2.0 * (l * (l * cos(k)))) / (k * (k * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 1.25e+154) {
tmp = 2.0 / ((sin(k) / l) * ((t_m * t_m) * ((tan(k) * fma(k, (k / (t_m * t_m)), 2.0)) * (t_m / l))));
} else {
tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.55e-99) tmp = Float64(Float64(2.0 * Float64(l * Float64(l * cos(k)))) / Float64(k * Float64(k * Float64(t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 1.25e+154) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(t_m * t_m) * Float64(Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)) * Float64(t_m / l))))); else tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.55e-99], N[(N[(2.0 * N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.55 \cdot 10^{-99}:\\
\;\;\;\;\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t\_m \cdot {\sin k}^{2}\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
if t < 2.5499999999999999e-99Initial program 48.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6447.7
Applied rewrites47.7%
Applied rewrites58.8%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6469.6
Applied rewrites69.6%
if 2.5499999999999999e-99 < t < 1.25000000000000001e154Initial program 72.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites91.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites96.2%
if 1.25000000000000001e154 < t Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.0
Applied rewrites56.0%
Applied rewrites65.8%
Applied rewrites74.7%
Applied rewrites83.2%
Final simplification77.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.8e-100)
(/
(* (cos k) (* 2.0 (* l l)))
(* k (* (- 0.5 (* 0.5 (cos (+ k k)))) (* t_m k))))
(if (<= t_m 1.25e+154)
(/
2.0
(*
(/ (sin k) l)
(*
(* t_m t_m)
(* (* (tan k) (fma k (/ k (* t_m t_m)) 2.0)) (/ t_m l)))))
(* l (/ (/ l (* k (* t_m (* t_m k)))) t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.8e-100) {
tmp = (cos(k) * (2.0 * (l * l))) / (k * ((0.5 - (0.5 * cos((k + k)))) * (t_m * k)));
} else if (t_m <= 1.25e+154) {
tmp = 2.0 / ((sin(k) / l) * ((t_m * t_m) * ((tan(k) * fma(k, (k / (t_m * t_m)), 2.0)) * (t_m / l))));
} else {
tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.8e-100) tmp = Float64(Float64(cos(k) * Float64(2.0 * Float64(l * l))) / Float64(k * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * Float64(t_m * k)))); elseif (t_m <= 1.25e+154) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(t_m * t_m) * Float64(Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)) * Float64(t_m / l))))); else tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.8e-100], N[(N[(N[Cos[k], $MachinePrecision] * N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-100}:\\
\;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
if t < 4.8000000000000005e-100Initial program 48.8%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.2
Applied rewrites64.2%
Applied rewrites66.1%
if 4.8000000000000005e-100 < t < 1.25000000000000001e154Initial program 72.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites91.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites96.2%
if 1.25000000000000001e154 < t Initial program 59.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.0
Applied rewrites56.0%
Applied rewrites65.8%
Applied rewrites74.7%
Applied rewrites83.2%
Final simplification75.1%
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 (- 0.5 (* 0.5 (cos (+ k k))))) (t_3 (/ (* t_m t_m) l)))
(*
t_s
(if (<= k 2.8e-221)
(* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
(if (<= k 0.031)
(/
2.0
(*
(/ (sin k) l)
(*
t_m
(*
k
(fma
k
(* k (fma t_3 0.6666666666666666 (/ 1.0 l)))
(* 2.0 t_3))))))
(if (<= k 3.1e+153)
(* (* 2.0 l) (* l (/ (cos k) (* t_2 (* t_m (* k k))))))
(/ (/ (/ (* (* l l) (* 2.0 (cos k))) t_2) (* t_m k)) k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 0.5 - (0.5 * cos((k + k)));
double t_3 = (t_m * t_m) / l;
double tmp;
if (k <= 2.8e-221) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else if (k <= 0.031) {
tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_3, 0.6666666666666666, (1.0 / l))), (2.0 * t_3)))));
} else if (k <= 3.1e+153) {
tmp = (2.0 * l) * (l * (cos(k) / (t_2 * (t_m * (k * k)))));
} else {
tmp = ((((l * l) * (2.0 * cos(k))) / t_2) / (t_m * k)) / k;
}
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(0.5 - Float64(0.5 * cos(Float64(k + k)))) t_3 = Float64(Float64(t_m * t_m) / l) tmp = 0.0 if (k <= 2.8e-221) tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k)))); elseif (k <= 0.031) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_3, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_3)))))); elseif (k <= 3.1e+153) tmp = Float64(Float64(2.0 * l) * Float64(l * Float64(cos(k) / Float64(t_2 * Float64(t_m * Float64(k * k)))))); else tmp = Float64(Float64(Float64(Float64(Float64(l * l) * Float64(2.0 * cos(k))) / t_2) / Float64(t_m * k)) / k); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$3 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.1e+153], N[(N[(2.0 * l), $MachinePrecision] * N[(l * N[(N[Cos[k], $MachinePrecision] / N[(t$95$2 * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 0.5 - 0.5 \cdot \cos \left(k + k\right)\\
t_3 := \frac{t\_m \cdot t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
\mathbf{elif}\;k \leq 0.031:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_3, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_3\right)\right)\right)}\\
\mathbf{elif}\;k \leq 3.1 \cdot 10^{+153}:\\
\;\;\;\;\left(2 \cdot \ell\right) \cdot \left(\ell \cdot \frac{\cos k}{t\_2 \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \cos k\right)}{t\_2}}{t\_m \cdot k}}{k}\\
\end{array}
\end{array}
\end{array}
if k < 2.80000000000000019e-221Initial program 58.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.6
Applied rewrites54.6%
Applied rewrites66.5%
Applied rewrites67.9%
Applied rewrites72.8%
if 2.80000000000000019e-221 < k < 0.031Initial program 63.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites66.1%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites96.9%
Taylor expanded in k around 0
Applied rewrites94.5%
if 0.031 < k < 3.1e153Initial program 46.8%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6478.4
Applied rewrites78.4%
Applied rewrites82.0%
if 3.1e153 < k Initial program 40.8%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.5
Applied rewrites54.5%
Applied rewrites87.7%
Final simplification80.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (* t_m t_m) l)))
(*
t_s
(if (<= k 2.8e-221)
(* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
(if (<= k 0.031)
(/
2.0
(*
(/ (sin k) l)
(*
t_m
(*
k
(fma
k
(* k (fma t_2 0.6666666666666666 (/ 1.0 l)))
(* 2.0 t_2))))))
(/
(* (cos k) (* 2.0 (* l l)))
(* k (* (- 0.5 (* 0.5 (cos (+ k 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) {
double t_2 = (t_m * t_m) / l;
double tmp;
if (k <= 2.8e-221) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else if (k <= 0.031) {
tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
} else {
tmp = (cos(k) * (2.0 * (l * l))) / (k * ((0.5 - (0.5 * cos((k + k)))) * (t_m * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(t_m * t_m) / l) tmp = 0.0 if (k <= 2.8e-221) tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k)))); elseif (k <= 0.031) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2)))))); else tmp = Float64(Float64(cos(k) * Float64(2.0 * Float64(l * l))) / Float64(k * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * Float64(t_m * k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] * N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
\mathbf{elif}\;k \leq 0.031:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot k\right)\right)}\\
\end{array}
\end{array}
\end{array}
if k < 2.80000000000000019e-221Initial program 58.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.6
Applied rewrites54.6%
Applied rewrites66.5%
Applied rewrites67.9%
Applied rewrites72.8%
if 2.80000000000000019e-221 < k < 0.031Initial program 63.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites66.1%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites96.9%
Taylor expanded in k around 0
Applied rewrites94.5%
if 0.031 < k Initial program 43.8%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.4
Applied rewrites66.4%
Applied rewrites78.5%
Final simplification79.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 t_m) l)))
(*
t_s
(if (<= k 2.8e-221)
(* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
(if (<= k 0.031)
(/
2.0
(*
(/ (sin k) l)
(*
t_m
(*
k
(fma
k
(* k (fma t_2 0.6666666666666666 (/ 1.0 l)))
(* 2.0 t_2))))))
(/
(* (cos k) (* 2.0 (* l l)))
(* k (* k (* t_m (- 0.5 (* 0.5 (cos (+ k k)))))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (t_m * t_m) / l;
double tmp;
if (k <= 2.8e-221) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else if (k <= 0.031) {
tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
} else {
tmp = (cos(k) * (2.0 * (l * l))) / (k * (k * (t_m * (0.5 - (0.5 * cos((k + k)))))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(t_m * t_m) / l) tmp = 0.0 if (k <= 2.8e-221) tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k)))); elseif (k <= 0.031) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2)))))); else tmp = Float64(Float64(cos(k) * Float64(2.0 * Float64(l * l))) / Float64(k * Float64(k * Float64(t_m * Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] * N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * N[(t$95$m * N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
\mathbf{elif}\;k \leq 0.031:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(k \cdot \left(t\_m \cdot \left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if k < 2.80000000000000019e-221Initial program 58.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.6
Applied rewrites54.6%
Applied rewrites66.5%
Applied rewrites67.9%
Applied rewrites72.8%
if 2.80000000000000019e-221 < k < 0.031Initial program 63.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites66.1%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites96.9%
Taylor expanded in k around 0
Applied rewrites94.5%
if 0.031 < k Initial program 43.8%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.4
Applied rewrites66.4%
Applied rewrites78.5%
Final simplification79.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 t_m) l)))
(*
t_s
(if (<= k 2.8e-221)
(* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
(if (<= k 0.031)
(/
2.0
(*
(/ (sin k) l)
(*
t_m
(*
k
(fma
k
(* k (fma t_2 0.6666666666666666 (/ 1.0 l)))
(* 2.0 t_2))))))
(*
(* 2.0 l)
(*
l
(/ (cos k) (* (- 0.5 (* 0.5 (cos (+ k k)))) (* t_m (* k k)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (t_m * t_m) / l;
double tmp;
if (k <= 2.8e-221) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else if (k <= 0.031) {
tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
} else {
tmp = (2.0 * l) * (l * (cos(k) / ((0.5 - (0.5 * cos((k + k)))) * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(t_m * t_m) / l) tmp = 0.0 if (k <= 2.8e-221) tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k)))); elseif (k <= 0.031) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2)))))); else tmp = Float64(Float64(2.0 * l) * Float64(l * Float64(cos(k) / Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * Float64(t_m * Float64(k * k)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * l), $MachinePrecision] * N[(l * N[(N[Cos[k], $MachinePrecision] / N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
\mathbf{elif}\;k \leq 0.031:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \ell\right) \cdot \left(\ell \cdot \frac{\cos k}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\right)\\
\end{array}
\end{array}
\end{array}
if k < 2.80000000000000019e-221Initial program 58.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.6
Applied rewrites54.6%
Applied rewrites66.5%
Applied rewrites67.9%
Applied rewrites72.8%
if 2.80000000000000019e-221 < k < 0.031Initial program 63.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites66.1%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites96.9%
Taylor expanded in k around 0
Applied rewrites94.5%
if 0.031 < k Initial program 43.8%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.4
Applied rewrites66.4%
Applied rewrites68.4%
Final simplification76.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (* t_m t_m) l)))
(*
t_s
(if (<= k 2.8e-221)
(* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
(if (<= k 0.031)
(/
2.0
(*
(/ (sin k) l)
(*
t_m
(*
k
(fma
k
(* k (fma t_2 0.6666666666666666 (/ 1.0 l)))
(* 2.0 t_2))))))
(*
(cos k)
(/
(* 2.0 (* l l))
(* (- 0.5 (* 0.5 (cos (+ k k)))) (* t_m (* k k))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (t_m * t_m) / l;
double tmp;
if (k <= 2.8e-221) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else if (k <= 0.031) {
tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
} else {
tmp = cos(k) * ((2.0 * (l * l)) / ((0.5 - (0.5 * cos((k + k)))) * (t_m * (k * k))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(t_m * t_m) / l) tmp = 0.0 if (k <= 2.8e-221) tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k)))); elseif (k <= 0.031) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2)))))); else tmp = Float64(cos(k) * Float64(Float64(2.0 * Float64(l * l)) / Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * Float64(t_m * Float64(k * k))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[k], $MachinePrecision] * N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
\mathbf{elif}\;k \leq 0.031:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos k \cdot \frac{2 \cdot \left(\ell \cdot \ell\right)}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
\end{array}
if k < 2.80000000000000019e-221Initial program 58.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.6
Applied rewrites54.6%
Applied rewrites66.5%
Applied rewrites67.9%
Applied rewrites72.8%
if 2.80000000000000019e-221 < k < 0.031Initial program 63.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites66.1%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites96.9%
Taylor expanded in k around 0
Applied rewrites94.5%
if 0.031 < k Initial program 43.8%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6466.4
Applied rewrites66.4%
Applied rewrites66.3%
Final simplification76.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 t_m) l)))
(*
t_s
(if (<= t_m 2e+121)
(/
2.0
(*
(/ (sin k) l)
(*
t_m
(*
k
(fma k (* k (fma t_2 0.6666666666666666 (/ 1.0 l))) (* 2.0 t_2))))))
(* l (/ (/ l (* k (* t_m (* t_m k)))) t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (t_m * t_m) / l;
double tmp;
if (t_m <= 2e+121) {
tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
} else {
tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(t_m * t_m) / l) tmp = 0.0 if (t_m <= 2e+121) tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2)))))); else tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2e+121], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2 \cdot 10^{+121}:\\
\;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
\end{array}
if t < 2.00000000000000007e121Initial program 55.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites55.8%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites90.9%
Taylor expanded in k around 0
Applied rewrites73.6%
if 2.00000000000000007e121 < t Initial program 55.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.7
Applied rewrites52.7%
Applied rewrites66.1%
Applied rewrites73.6%
Applied rewrites85.8%
Final simplification75.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.6e-161)
(* l (/ l (* t_m (* t_m (* t_m (* k k))))))
(if (<= t_m 4.5e-48)
(/
2.0
(*
(* (tan k) (/ (/ k (/ l t_m)) (/ l (* t_m t_m))))
(+ 1.0 (/ (* k k) (* t_m t_m)))))
(* l (/ (/ (/ l t_m) (* t_m (* t_m k))) k))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.6e-161) {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
} else if (t_m <= 4.5e-48) {
tmp = 2.0 / ((tan(k) * ((k / (l / t_m)) / (l / (t_m * t_m)))) * (1.0 + ((k * k) / (t_m * t_m))));
} else {
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.6d-161) then
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
else if (t_m <= 4.5d-48) then
tmp = 2.0d0 / ((tan(k) * ((k / (l / t_m)) / (l / (t_m * t_m)))) * (1.0d0 + ((k * k) / (t_m * t_m))))
else
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.6e-161) {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
} else if (t_m <= 4.5e-48) {
tmp = 2.0 / ((Math.tan(k) * ((k / (l / t_m)) / (l / (t_m * t_m)))) * (1.0 + ((k * k) / (t_m * t_m))));
} else {
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.6e-161: tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))) elif t_m <= 4.5e-48: tmp = 2.0 / ((math.tan(k) * ((k / (l / t_m)) / (l / (t_m * t_m)))) * (1.0 + ((k * k) / (t_m * t_m)))) else: tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.6e-161) tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))); elseif (t_m <= 4.5e-48) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(k / Float64(l / t_m)) / Float64(l / Float64(t_m * t_m)))) * Float64(1.0 + Float64(Float64(k * k) / Float64(t_m * t_m))))); else tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(t_m * k))) / k)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.6e-161) tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))); elseif (t_m <= 4.5e-48) tmp = 2.0 / ((tan(k) * ((k / (l / t_m)) / (l / (t_m * t_m)))) * (1.0 + ((k * k) / (t_m * t_m)))); else tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.6e-161], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.5e-48], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(k / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(k * k), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-161}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 4.5 \cdot 10^{-48}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \frac{\frac{k}{\frac{\ell}{t\_m}}}{\frac{\ell}{t\_m \cdot t\_m}}\right) \cdot \left(1 + \frac{k \cdot k}{t\_m \cdot t\_m}\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot k\right)}}{k}\\
\end{array}
\end{array}
if t < 1.59999999999999993e-161Initial program 51.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6450.0
Applied rewrites50.0%
Applied rewrites61.1%
if 1.59999999999999993e-161 < t < 4.49999999999999988e-48Initial program 39.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6439.2
Applied rewrites39.2%
Taylor expanded in k around inf
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6439.2
Applied rewrites39.2%
Applied rewrites62.3%
if 4.49999999999999988e-48 < t Initial program 67.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.5
Applied rewrites63.5%
Applied rewrites73.0%
Applied rewrites76.6%
Applied rewrites86.1%
Final simplification69.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.12e-145)
(* l (/ l (* t_m (* t_m (* t_m (* k k))))))
(if (<= t_m 4.2e-51)
(/
2.0
(*
(+ 1.0 (/ (* k k) (* t_m t_m)))
(* (tan k) (* (* t_m t_m) (* t_m (/ k (* l l)))))))
(* l (/ (/ (/ l t_m) (* t_m (* t_m k))) k))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.12e-145) {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
} else if (t_m <= 4.2e-51) {
tmp = 2.0 / ((1.0 + ((k * k) / (t_m * t_m))) * (tan(k) * ((t_m * t_m) * (t_m * (k / (l * l))))));
} else {
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.12d-145) then
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
else if (t_m <= 4.2d-51) then
tmp = 2.0d0 / ((1.0d0 + ((k * k) / (t_m * t_m))) * (tan(k) * ((t_m * t_m) * (t_m * (k / (l * l))))))
else
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.12e-145) {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
} else if (t_m <= 4.2e-51) {
tmp = 2.0 / ((1.0 + ((k * k) / (t_m * t_m))) * (Math.tan(k) * ((t_m * t_m) * (t_m * (k / (l * l))))));
} else {
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.12e-145: tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))) elif t_m <= 4.2e-51: tmp = 2.0 / ((1.0 + ((k * k) / (t_m * t_m))) * (math.tan(k) * ((t_m * t_m) * (t_m * (k / (l * l)))))) else: tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.12e-145) tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))); elseif (t_m <= 4.2e-51) tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(Float64(k * k) / Float64(t_m * t_m))) * Float64(tan(k) * Float64(Float64(t_m * t_m) * Float64(t_m * Float64(k / Float64(l * l))))))); else tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(t_m * k))) / k)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.12e-145) tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))); elseif (t_m <= 4.2e-51) tmp = 2.0 / ((1.0 + ((k * k) / (t_m * t_m))) * (tan(k) * ((t_m * t_m) * (t_m * (k / (l * l)))))); else tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.12e-145], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.2e-51], N[(2.0 / N[(N[(1.0 + N[(N[(k * k), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(t$95$m * N[(k / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.12 \cdot 10^{-145}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{2}{\left(1 + \frac{k \cdot k}{t\_m \cdot t\_m}\right) \cdot \left(\tan k \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(t\_m \cdot \frac{k}{\ell \cdot \ell}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot k\right)}}{k}\\
\end{array}
\end{array}
if t < 1.12000000000000001e-145Initial program 51.5%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6449.7
Applied rewrites49.7%
Applied rewrites60.6%
if 1.12000000000000001e-145 < t < 4.20000000000000003e-51Initial program 39.7%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6439.9
Applied rewrites39.9%
Taylor expanded in k around inf
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6439.9
Applied rewrites39.9%
Applied rewrites59.3%
if 4.20000000000000003e-51 < t Initial program 67.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.5
Applied rewrites63.5%
Applied rewrites73.0%
Applied rewrites76.6%
Applied rewrites86.1%
Final simplification68.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.75e-23)
(* l (/ (/ (/ l t_m) (* t_m (* t_m k))) k))
(if (<= k 5e+146)
(/
2.0
(*
(* k k)
(* (/ (* k k) (* l l)) (fma 2.0 (/ (* t_m (* t_m t_m)) (* k k)) t_m))))
(* l (/ l (* t_m (* t_m (* t_m (* k k))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.75e-23) {
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
} else if (k <= 5e+146) {
tmp = 2.0 / ((k * k) * (((k * k) / (l * l)) * fma(2.0, ((t_m * (t_m * t_m)) / (k * k)), t_m)));
} else {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.75e-23) tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(t_m * k))) / k)); elseif (k <= 5e+146) tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(Float64(k * k) / Float64(l * l)) * fma(2.0, Float64(Float64(t_m * Float64(t_m * t_m)) / Float64(k * k)), t_m)))); else tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.75e-23], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5e+146], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] + t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.75 \cdot 10^{-23}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot k\right)}}{k}\\
\mathbf{elif}\;k \leq 5 \cdot 10^{+146}:\\
\;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{\ell \cdot \ell} \cdot \mathsf{fma}\left(2, \frac{t\_m \cdot \left(t\_m \cdot t\_m\right)}{k \cdot k}, t\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
\end{array}
\end{array}
if k < 1.74999999999999997e-23Initial program 59.2%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6457.2
Applied rewrites57.2%
Applied rewrites67.7%
Applied rewrites69.8%
Applied rewrites76.7%
if 1.74999999999999997e-23 < k < 4.9999999999999999e146Initial program 52.8%
Taylor expanded in k around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
times-fracN/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites80.4%
Taylor expanded in k around 0
Applied rewrites60.3%
if 4.9999999999999999e146 < k Initial program 38.4%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6435.7
Applied rewrites35.7%
Applied rewrites51.9%
Final simplification71.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 (<= k 1.3e-155)
(* l (/ (/ (/ l t_m) (* t_m (* t_m k))) k))
(* l (/ (/ (/ l t_m) (* t_m (* k k))) t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.3e-155) {
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
} else {
tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.3d-155) then
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k)
else
tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.3e-155) {
tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
} else {
tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.3e-155: tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k) else: tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.3e-155) tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(t_m * k))) / k)); else tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(k * k))) / t_m)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.3e-155) tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k); else tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.3e-155], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.3 \cdot 10^{-155}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot k\right)}}{k}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(k \cdot k\right)}}{t\_m}\\
\end{array}
\end{array}
if k < 1.30000000000000004e-155Initial program 57.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.6
Applied rewrites52.6%
Applied rewrites65.6%
Applied rewrites68.2%
Applied rewrites72.9%
if 1.30000000000000004e-155 < k Initial program 52.6%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.9
Applied rewrites52.9%
Applied rewrites59.3%
Applied rewrites64.5%
Final simplification69.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.2e-155)
(* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
(* l (/ (/ (/ l t_m) (* t_m (* k k))) t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.2e-155) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else {
tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.2d-155) then
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)))
else
tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.2e-155) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else {
tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2.2e-155: tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k))) else: tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.2e-155) tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k)))); else tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(k * k))) / t_m)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2.2e-155) tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k))); else tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.2e-155], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-155}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(k \cdot k\right)}}{t\_m}\\
\end{array}
\end{array}
if k < 2.1999999999999999e-155Initial program 57.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.6
Applied rewrites52.6%
Applied rewrites65.6%
Applied rewrites68.2%
Applied rewrites72.7%
if 2.1999999999999999e-155 < k Initial program 52.6%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.9
Applied rewrites52.9%
Applied rewrites59.3%
Applied rewrites64.5%
Final simplification69.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.2e-155)
(* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
(* (/ l t_m) (/ l (* t_m (* t_m (* k k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.2e-155) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else {
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.2d-155) then
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)))
else
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.2e-155) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else {
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2.2e-155: tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k))) else: tmp = (l / t_m) * (l / (t_m * (t_m * (k * k)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.2e-155) tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k)))); else tmp = Float64(Float64(l / t_m) * Float64(l / Float64(t_m * Float64(t_m * Float64(k * k))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2.2e-155) tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k))); else tmp = (l / t_m) * (l / (t_m * (t_m * (k * k)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.2e-155], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-155}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 2.1999999999999999e-155Initial program 57.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.6
Applied rewrites52.6%
Applied rewrites65.6%
Applied rewrites68.2%
Applied rewrites72.7%
if 2.1999999999999999e-155 < k Initial program 52.6%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.9
Applied rewrites52.9%
Applied rewrites63.6%
Final simplification68.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1e-123)
(* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
(* l (/ l (* t_m (* t_m (* t_m (* k k)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-123) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1d-123) then
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)))
else
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-123) {
tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
} else {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1e-123: tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k))) else: tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1e-123) tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k)))); else tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1e-123) tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k))); else tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-123], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 10^{-123}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
\end{array}
\end{array}
if k < 1.0000000000000001e-123Initial program 59.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.0
Applied rewrites55.0%
Applied rewrites67.3%
Applied rewrites69.8%
Applied rewrites74.1%
if 1.0000000000000001e-123 < k Initial program 48.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6449.1
Applied rewrites49.1%
Applied rewrites56.0%
Final simplification67.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 (<= k 1e-123)
(* l (/ l (* t_m (* k (* t_m (* t_m k))))))
(* l (/ l (* t_m (* t_m (* t_m (* k k)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-123) {
tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))));
} else {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1d-123) then
tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))))
else
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-123) {
tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))));
} else {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1e-123: tmp = l * (l / (t_m * (k * (t_m * (t_m * k))))) else: tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1e-123) tmp = Float64(l * Float64(l / Float64(t_m * Float64(k * Float64(t_m * Float64(t_m * k)))))); else tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1e-123) tmp = l * (l / (t_m * (k * (t_m * (t_m * k))))); else tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-123], N[(l * N[(l / N[(t$95$m * N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 10^{-123}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
\end{array}
\end{array}
if k < 1.0000000000000001e-123Initial program 59.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.0
Applied rewrites55.0%
Applied rewrites67.3%
Applied rewrites74.7%
if 1.0000000000000001e-123 < k Initial program 48.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6449.1
Applied rewrites49.1%
Applied rewrites56.0%
Final simplification67.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 1e-123)
(* l (/ l (* t_m (* t_m (* k (* t_m k))))))
(* l (/ l (* t_m (* t_m (* t_m (* k k)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-123) {
tmp = l * (l / (t_m * (t_m * (k * (t_m * k)))));
} else {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1d-123) then
tmp = l * (l / (t_m * (t_m * (k * (t_m * k)))))
else
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e-123) {
tmp = l * (l / (t_m * (t_m * (k * (t_m * k)))));
} else {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1e-123: tmp = l * (l / (t_m * (t_m * (k * (t_m * k))))) else: tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1e-123) tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(k * Float64(t_m * k)))))); else tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1e-123) tmp = l * (l / (t_m * (t_m * (k * (t_m * k))))); else tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-123], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 10^{-123}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot \left(t\_m \cdot k\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
\end{array}
\end{array}
if k < 1.0000000000000001e-123Initial program 59.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.0
Applied rewrites55.0%
Applied rewrites67.3%
Applied rewrites69.8%
if 1.0000000000000001e-123 < k Initial program 48.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6449.1
Applied rewrites49.1%
Applied rewrites56.0%
Final simplification64.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 (* l (/ l (* t_m (* t_m (* t_m (* k k))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (t_m * (t_m * (t_m * (k * k))))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (l / (t_m * (t_m * (t_m * (k * k))))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (t_m * (t_m * (t_m * (k * k))))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (l / (t_m * (t_m * (t_m * (k * k))))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k))))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (l / (t_m * (t_m * (t_m * (k * k)))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\right)
\end{array}
Initial program 55.6%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.7
Applied rewrites52.7%
Applied rewrites62.9%
Final simplification62.9%
herbie shell --seed 2024232
(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))))