
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.2e+34)
(/
(* l 2.0)
(fma
k
(* (* t_m (* k (tan k))) (/ (sin k) l))
(* t_m (* (* (tan k) (sin k)) (/ (* 2.0 (* t_m t_m)) l)))))
(/
2.0
(*
(/ t_m l)
(*
(* t_m (/ (* t_m (sin k)) l))
(* (tan k) (fma k (/ (/ k t_m) t_m) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.2e+34) {
tmp = (l * 2.0) / fma(k, ((t_m * (k * tan(k))) * (sin(k) / l)), (t_m * ((tan(k) * sin(k)) * ((2.0 * (t_m * t_m)) / l))));
} else {
tmp = 2.0 / ((t_m / l) * ((t_m * ((t_m * sin(k)) / l)) * (tan(k) * fma(k, ((k / t_m) / t_m), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.2e+34) tmp = Float64(Float64(l * 2.0) / fma(k, Float64(Float64(t_m * Float64(k * tan(k))) * Float64(sin(k) / l)), Float64(t_m * Float64(Float64(tan(k) * sin(k)) * Float64(Float64(2.0 * Float64(t_m * t_m)) / l))))); else tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(t_m * Float64(Float64(t_m * sin(k)) / l)) * Float64(tan(k) * fma(k, Float64(Float64(k / t_m) / t_m), 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.2e+34], N[(N[(l * 2.0), $MachinePrecision] / N[(k * N[(N[(t$95$m * N[(k * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[(N[(N[Tan[k], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.2 \cdot 10^{+34}:\\
\;\;\;\;\frac{\ell \cdot 2}{\mathsf{fma}\left(k, \left(t\_m \cdot \left(k \cdot \tan k\right)\right) \cdot \frac{\sin k}{\ell}, t\_m \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \frac{2 \cdot \left(t\_m \cdot t\_m\right)}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{t\_m \cdot \sin k}{\ell}\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)\right)\right)}\\
\end{array}
\end{array}
if t < 3.1999999999999998e34Initial program 45.6%
Applied rewrites39.4%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites76.7%
Applied rewrites84.5%
Applied rewrites84.6%
if 3.1999999999999998e34 < t Initial program 71.9%
Applied rewrites76.9%
Applied rewrites99.8%
associate-/r*N/A
lower-/.f64N/A
lower-/.f6499.8
Applied rewrites99.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.04e+18)
(/
2.0
(* (/ t_m l) (* (* (tan k) (/ (sin k) l)) (fma 2.0 (* t_m t_m) (* k k)))))
(/
2.0
(*
(/ t_m l)
(*
(* t_m (/ (* t_m (sin k)) l))
(* (tan k) (fma k (/ (/ k t_m) t_m) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.04e+18) {
tmp = 2.0 / ((t_m / l) * ((tan(k) * (sin(k) / l)) * fma(2.0, (t_m * t_m), (k * k))));
} else {
tmp = 2.0 / ((t_m / l) * ((t_m * ((t_m * sin(k)) / l)) * (tan(k) * fma(k, ((k / t_m) / t_m), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.04e+18) tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(tan(k) * Float64(sin(k) / l)) * fma(2.0, Float64(t_m * t_m), Float64(k * k))))); else tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(t_m * Float64(Float64(t_m * sin(k)) / l)) * Float64(tan(k) * fma(k, Float64(Float64(k / t_m) / t_m), 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.04e+18], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(N[(k / t$95$m), $MachinePrecision] / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.04 \cdot 10^{+18}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(\tan k \cdot \frac{\sin k}{\ell}\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{t\_m \cdot \sin k}{\ell}\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{\frac{k}{t\_m}}{t\_m}, 2\right)\right)\right)}\\
\end{array}
\end{array}
if t < 1.04e18Initial program 45.7%
Applied rewrites39.0%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites76.9%
Applied rewrites81.4%
if 1.04e18 < t Initial program 70.0%
Applied rewrites74.8%
Applied rewrites98.1%
associate-/r*N/A
lower-/.f64N/A
lower-/.f6498.1
Applied rewrites98.1%
Final simplification85.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 0.23)
(/
2.0
(* (/ t_m l) (* (* (tan k) (/ (sin k) l)) (fma 2.0 (* t_m t_m) (* k k)))))
(/
2.0
(*
(/ t_m l)
(*
(* t_m (/ (* t_m (sin k)) l))
(* (tan k) (fma k (/ k (* t_m t_m)) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 0.23) {
tmp = 2.0 / ((t_m / l) * ((tan(k) * (sin(k) / l)) * fma(2.0, (t_m * t_m), (k * k))));
} else {
tmp = 2.0 / ((t_m / l) * ((t_m * ((t_m * sin(k)) / l)) * (tan(k) * fma(k, (k / (t_m * t_m)), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 0.23) tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(tan(k) * Float64(sin(k) / l)) * fma(2.0, Float64(t_m * t_m), Float64(k * k))))); else tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(t_m * Float64(Float64(t_m * sin(k)) / l)) * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 0.23], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 0.23:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(\tan k \cdot \frac{\sin k}{\ell}\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(t\_m \cdot \frac{t\_m \cdot \sin k}{\ell}\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)\right)}\\
\end{array}
\end{array}
if t < 0.23000000000000001Initial program 44.9%
Applied rewrites38.1%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites76.5%
Applied rewrites81.2%
if 0.23000000000000001 < t Initial program 71.4%
Applied rewrites75.9%
Applied rewrites98.2%
Final simplification85.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.2e-49)
(/
2.0
(* (/ t_m l) (* (* (tan k) (/ (sin k) l)) (fma 2.0 (* t_m t_m) (* k k)))))
(/
2.0
(*
(sin k)
(*
t_m
(*
(/ t_m l)
(* (/ t_m l) (* (tan k) (fma k (/ k (* t_m t_m)) 2.0))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e-49) {
tmp = 2.0 / ((t_m / l) * ((tan(k) * (sin(k) / l)) * fma(2.0, (t_m * t_m), (k * k))));
} else {
tmp = 2.0 / (sin(k) * (t_m * ((t_m / l) * ((t_m / l) * (tan(k) * fma(k, (k / (t_m * t_m)), 2.0))))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.2e-49) tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(tan(k) * Float64(sin(k) / l)) * fma(2.0, Float64(t_m * t_m), Float64(k * k))))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(t_m * Float64(Float64(t_m / l) * Float64(Float64(t_m / l) * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.2e-49], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $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}\;t\_m \leq 5.2 \cdot 10^{-49}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(\tan k \cdot \frac{\sin k}{\ell}\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \left(\frac{t\_m}{\ell} \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)\right)\right)\right)}\\
\end{array}
\end{array}
if t < 5.1999999999999999e-49Initial program 43.8%
Applied rewrites37.1%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites77.4%
Applied rewrites82.3%
if 5.1999999999999999e-49 < t Initial program 70.9%
Applied rewrites74.8%
times-fracN/A
lift-/.f64N/A
lift-/.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6488.7
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
Applied rewrites94.3%
Final simplification85.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.1e+65)
(/
2.0
(* (/ t_m l) (* (* (tan k) (/ (sin k) l)) (fma 2.0 (* t_m t_m) (* k k)))))
(* l (/ (/ (/ l (* t_m k)) (* 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.1e+65) {
tmp = 2.0 / ((t_m / l) * ((tan(k) * (sin(k) / l)) * fma(2.0, (t_m * t_m), (k * k))));
} else {
tmp = l * (((l / (t_m * k)) / (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.1e+65) tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(tan(k) * Float64(sin(k) / l)) * fma(2.0, Float64(t_m * t_m), Float64(k * k))))); else tmp = Float64(l * Float64(Float64(Float64(l / Float64(t_m * k)) / 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.1e+65], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * k), $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.1 \cdot 10^{+65}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(\tan k \cdot \frac{\sin k}{\ell}\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot k}}{t\_m}\\
\end{array}
\end{array}
if t < 3.09999999999999991e65Initial program 47.9%
Applied rewrites42.6%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites77.2%
Applied rewrites81.7%
if 3.09999999999999991e65 < t Initial program 67.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-*.f6462.4
Applied rewrites62.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6465.1
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6476.0
Applied rewrites76.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6482.9
Applied rewrites82.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6495.6
Applied rewrites95.6%
Final simplification84.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.65e-52)
(* l (/ (/ (/ l (* t_m k)) (* t_m k)) t_m))
(*
l
(/
2.0
(* t_m (* (* (tan k) (/ (sin k) l)) (fma 2.0 (* 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.65e-52) {
tmp = l * (((l / (t_m * k)) / (t_m * k)) / t_m);
} else {
tmp = l * (2.0 / (t_m * ((tan(k) * (sin(k) / l)) * fma(2.0, (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.65e-52) tmp = Float64(l * Float64(Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * k)) / t_m)); else tmp = Float64(l * Float64(2.0 / Float64(t_m * Float64(Float64(tan(k) * Float64(sin(k) / l)) * fma(2.0, Float64(t_m * 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.65e-52], N[(l * N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 / N[(t$95$m * N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + 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.65 \cdot 10^{-52}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot k}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{2}{t\_m \cdot \left(\left(\tan k \cdot \frac{\sin k}{\ell}\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 1.64999999999999998e-52Initial program 52.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-*.f6449.3
Applied rewrites49.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6454.2
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6461.0
Applied rewrites61.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6466.2
Applied rewrites66.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6476.2
Applied rewrites76.2%
if 1.64999999999999998e-52 < k Initial program 49.9%
Applied rewrites49.6%
Taylor expanded in t around 0
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites82.2%
Applied rewrites82.2%
Final simplification78.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.35e-27)
(/
2.0
(*
k
(/
(*
k
(fma
t_m
(* 2.0 (/ (* t_m t_m) l))
(* (fma t_m (* (* t_m t_m) 0.3333333333333333) t_m) (/ (* k k) l))))
l)))
(* l (/ (/ (/ l (* t_m k)) (* 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.35e-27) {
tmp = 2.0 / (k * ((k * fma(t_m, (2.0 * ((t_m * t_m) / l)), (fma(t_m, ((t_m * t_m) * 0.3333333333333333), t_m) * ((k * k) / l)))) / l));
} else {
tmp = l * (((l / (t_m * k)) / (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.35e-27) tmp = Float64(2.0 / Float64(k * Float64(Float64(k * fma(t_m, Float64(2.0 * Float64(Float64(t_m * t_m) / l)), Float64(fma(t_m, Float64(Float64(t_m * t_m) * 0.3333333333333333), t_m) * Float64(Float64(k * k) / l)))) / l))); else tmp = Float64(l * Float64(Float64(Float64(l / Float64(t_m * k)) / 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.35e-27], N[(2.0 / N[(k * N[(N[(k * N[(t$95$m * N[(2.0 * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + t$95$m), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * k), $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.35 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{k \cdot \frac{k \cdot \mathsf{fma}\left(t\_m, 2 \cdot \frac{t\_m \cdot t\_m}{\ell}, \mathsf{fma}\left(t\_m, \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333, t\_m\right) \cdot \frac{k \cdot k}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot k}}{t\_m}\\
\end{array}
\end{array}
if t < 2.35000000000000016e-27Initial program 43.7%
Applied rewrites36.8%
Taylor expanded in k around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites57.6%
Applied rewrites60.9%
if 2.35000000000000016e-27 < t Initial program 73.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-*.f6461.7
Applied rewrites61.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6463.6
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6471.1
Applied rewrites71.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6478.1
Applied rewrites78.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6486.8
Applied rewrites86.8%
Final simplification67.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 2.5e-52)
(/
2.0
(*
k
(*
k
(/
(fma
t_m
(* 2.0 (/ (* t_m t_m) l))
(* (fma t_m (* (* t_m t_m) 0.3333333333333333) t_m) (/ (* k k) l)))
l))))
(* l (/ (/ (/ l (* t_m k)) (* 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.5e-52) {
tmp = 2.0 / (k * (k * (fma(t_m, (2.0 * ((t_m * t_m) / l)), (fma(t_m, ((t_m * t_m) * 0.3333333333333333), t_m) * ((k * k) / l))) / l)));
} else {
tmp = l * (((l / (t_m * k)) / (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.5e-52) tmp = Float64(2.0 / Float64(k * Float64(k * Float64(fma(t_m, Float64(2.0 * Float64(Float64(t_m * t_m) / l)), Float64(fma(t_m, Float64(Float64(t_m * t_m) * 0.3333333333333333), t_m) * Float64(Float64(k * k) / l))) / l)))); else tmp = Float64(l * Float64(Float64(Float64(l / Float64(t_m * k)) / 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.5e-52], N[(2.0 / N[(k * N[(k * N[(N[(t$95$m * N[(2.0 * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + t$95$m), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * k), $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.5 \cdot 10^{-52}:\\
\;\;\;\;\frac{2}{k \cdot \left(k \cdot \frac{\mathsf{fma}\left(t\_m, 2 \cdot \frac{t\_m \cdot t\_m}{\ell}, \mathsf{fma}\left(t\_m, \left(t\_m \cdot t\_m\right) \cdot 0.3333333333333333, t\_m\right) \cdot \frac{k \cdot k}{\ell}\right)}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot k}}{t\_m}\\
\end{array}
\end{array}
if t < 2.5e-52Initial program 43.5%
Applied rewrites36.8%
Taylor expanded in k around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites58.3%
Applied rewrites60.2%
if 2.5e-52 < t Initial program 71.3%
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-*.f6459.4
Applied rewrites59.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6461.4
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6468.2
Applied rewrites68.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6474.6
Applied rewrites74.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6482.6
Applied rewrites82.6%
Final simplification66.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.8e-43)
(/
2.0
(*
(/ t_m l)
(*
(* k k)
(fma
(* k k)
(/ (fma (* t_m t_m) 0.3333333333333333 1.0) l)
(/ (* 2.0 (* t_m t_m)) l)))))
(* l (/ (/ (/ l (* t_m k)) (* 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 <= 1.8e-43) {
tmp = 2.0 / ((t_m / l) * ((k * k) * fma((k * k), (fma((t_m * t_m), 0.3333333333333333, 1.0) / l), ((2.0 * (t_m * t_m)) / l))));
} else {
tmp = l * (((l / (t_m * k)) / (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 <= 1.8e-43) tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(k * k) * fma(Float64(k * k), Float64(fma(Float64(t_m * t_m), 0.3333333333333333, 1.0) / l), Float64(Float64(2.0 * Float64(t_m * t_m)) / l))))); else tmp = Float64(l * Float64(Float64(Float64(l / Float64(t_m * k)) / 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, 1.8e-43], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333 + 1.0), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * k), $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 1.8 \cdot 10^{-43}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(k \cdot k\right) \cdot \mathsf{fma}\left(k \cdot k, \frac{\mathsf{fma}\left(t\_m \cdot t\_m, 0.3333333333333333, 1\right)}{\ell}, \frac{2 \cdot \left(t\_m \cdot t\_m\right)}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot k}}{t\_m}\\
\end{array}
\end{array}
if t < 1.7999999999999999e-43Initial program 43.4%
Applied rewrites33.3%
Applied rewrites56.5%
Taylor expanded in k around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
distribute-lft-inN/A
rgt-mult-inverseN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites63.1%
if 1.7999999999999999e-43 < t Initial program 72.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-*.f6460.6
Applied rewrites60.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6462.4
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6469.5
Applied rewrites69.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6476.3
Applied rewrites76.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6484.5
Applied rewrites84.5%
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
(let* ((t_2 (fma -0.3333333333333333 (/ (* k k) l) (/ -2.0 l))))
(*
t_s
(if (<= t_m 4.9e-119)
(/ (* l -2.0) (* (* t_m (* t_m t_2)) (* t_m (* k k))))
(if (<= t_m 1.12e-27)
(* (/ l k) (/ -2.0 (* (* k t_2) (* t_m (* t_m t_m)))))
(* l (/ (/ (/ l (* t_m k)) (* 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 = fma(-0.3333333333333333, ((k * k) / l), (-2.0 / l));
double tmp;
if (t_m <= 4.9e-119) {
tmp = (l * -2.0) / ((t_m * (t_m * t_2)) * (t_m * (k * k)));
} else if (t_m <= 1.12e-27) {
tmp = (l / k) * (-2.0 / ((k * t_2) * (t_m * (t_m * t_m))));
} else {
tmp = l * (((l / (t_m * k)) / (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 = fma(-0.3333333333333333, Float64(Float64(k * k) / l), Float64(-2.0 / l)) tmp = 0.0 if (t_m <= 4.9e-119) tmp = Float64(Float64(l * -2.0) / Float64(Float64(t_m * Float64(t_m * t_2)) * Float64(t_m * Float64(k * k)))); elseif (t_m <= 1.12e-27) tmp = Float64(Float64(l / k) * Float64(-2.0 / Float64(Float64(k * t_2) * Float64(t_m * Float64(t_m * t_m))))); else tmp = Float64(l * Float64(Float64(Float64(l / Float64(t_m * k)) / 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[(-0.3333333333333333 * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(-2.0 / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.9e-119], N[(N[(l * -2.0), $MachinePrecision] / N[(N[(t$95$m * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.12e-27], N[(N[(l / k), $MachinePrecision] * N[(-2.0 / N[(N[(k * t$95$2), $MachinePrecision] * N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * k), $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 := \mathsf{fma}\left(-0.3333333333333333, \frac{k \cdot k}{\ell}, \frac{-2}{\ell}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.9 \cdot 10^{-119}:\\
\;\;\;\;\frac{\ell \cdot -2}{\left(t\_m \cdot \left(t\_m \cdot t\_2\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1.12 \cdot 10^{-27}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{-2}{\left(k \cdot t\_2\right) \cdot \left(t\_m \cdot \left(t\_m \cdot t\_m\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot k}}{t\_m}\\
\end{array}
\end{array}
\end{array}
if t < 4.9e-119Initial program 42.7%
Applied rewrites34.9%
Taylor expanded in k around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites59.0%
Taylor expanded in t around -inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6450.9
Applied rewrites50.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6463.7
Applied rewrites63.7%
if 4.9e-119 < t < 1.1199999999999999e-27Initial program 53.0%
Applied rewrites53.7%
Taylor expanded in k around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites44.8%
Taylor expanded in t around -inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6440.1
Applied rewrites40.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
times-fracN/A
Applied rewrites59.9%
if 1.1199999999999999e-27 < t Initial program 73.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-*.f6461.7
Applied rewrites61.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6463.6
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6471.1
Applied rewrites71.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6478.1
Applied rewrites78.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6486.8
Applied rewrites86.8%
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 (<= t_m 1.56e-52)
(/
2.0
(*
(/ t_m l)
(*
(* k k)
(* (* k k) (fma 0.16666666666666666 (/ (* k k) l) (/ 1.0 l))))))
(* l (/ (/ (/ l (* t_m k)) (* 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 <= 1.56e-52) {
tmp = 2.0 / ((t_m / l) * ((k * k) * ((k * k) * fma(0.16666666666666666, ((k * k) / l), (1.0 / l)))));
} else {
tmp = l * (((l / (t_m * k)) / (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 <= 1.56e-52) tmp = Float64(2.0 / Float64(Float64(t_m / l) * Float64(Float64(k * k) * Float64(Float64(k * k) * fma(0.16666666666666666, Float64(Float64(k * k) / l), Float64(1.0 / l)))))); else tmp = Float64(l * Float64(Float64(Float64(l / Float64(t_m * k)) / 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, 1.56e-52], N[(2.0 / N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(0.16666666666666666 * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * k), $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 1.56 \cdot 10^{-52}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell} \cdot \left(\left(k \cdot k\right) \cdot \left(\left(k \cdot k\right) \cdot \mathsf{fma}\left(0.16666666666666666, \frac{k \cdot k}{\ell}, \frac{1}{\ell}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot k}}{t\_m}\\
\end{array}
\end{array}
if t < 1.5600000000000001e-52Initial program 43.5%
Applied rewrites33.3%
Applied rewrites56.8%
Taylor expanded in k around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites35.4%
Taylor expanded in t around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f6457.5
Applied rewrites57.5%
if 1.5600000000000001e-52 < t Initial program 71.3%
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-*.f6459.4
Applied rewrites59.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6461.4
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6468.2
Applied rewrites68.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6474.6
Applied rewrites74.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6482.6
Applied rewrites82.6%
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
(if (<= t_m 2.6e-29)
(/
(* l -2.0)
(*
(* t_m (* t_m (fma -0.3333333333333333 (/ (* k k) l) (/ -2.0 l))))
(* t_m (* k k))))
(* l (/ (/ (/ l (* t_m k)) (* 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.6e-29) {
tmp = (l * -2.0) / ((t_m * (t_m * fma(-0.3333333333333333, ((k * k) / l), (-2.0 / l)))) * (t_m * (k * k)));
} else {
tmp = l * (((l / (t_m * k)) / (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.6e-29) tmp = Float64(Float64(l * -2.0) / Float64(Float64(t_m * Float64(t_m * fma(-0.3333333333333333, Float64(Float64(k * k) / l), Float64(-2.0 / l)))) * Float64(t_m * Float64(k * k)))); else tmp = Float64(l * Float64(Float64(Float64(l / Float64(t_m * k)) / 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.6e-29], N[(N[(l * -2.0), $MachinePrecision] / N[(N[(t$95$m * N[(t$95$m * N[(-0.3333333333333333 * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(-2.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * k), $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.6 \cdot 10^{-29}:\\
\;\;\;\;\frac{\ell \cdot -2}{\left(t\_m \cdot \left(t\_m \cdot \mathsf{fma}\left(-0.3333333333333333, \frac{k \cdot k}{\ell}, \frac{-2}{\ell}\right)\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot k}}{t\_m}\\
\end{array}
\end{array}
if t < 2.6000000000000002e-29Initial program 43.7%
Applied rewrites36.8%
Taylor expanded in k around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
Applied rewrites57.6%
Taylor expanded in t around -inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6449.8
Applied rewrites49.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6461.3
Applied rewrites61.3%
if 2.6000000000000002e-29 < t Initial program 73.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-*.f6461.7
Applied rewrites61.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6463.6
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6471.1
Applied rewrites71.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6478.1
Applied rewrites78.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6486.8
Applied rewrites86.8%
Final simplification67.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 1.75e+156)
(* l (/ (/ (/ l (* t_m k)) (* t_m k)) t_m))
(* (/ 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 <= 1.75e+156) {
tmp = l * (((l / (t_m * k)) / (t_m * k)) / t_m);
} 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 <= 1.75d+156) then
tmp = l * (((l / (t_m * k)) / (t_m * k)) / t_m)
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 <= 1.75e+156) {
tmp = l * (((l / (t_m * k)) / (t_m * k)) / t_m);
} 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 <= 1.75e+156: tmp = l * (((l / (t_m * k)) / (t_m * k)) / t_m) 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 <= 1.75e+156) tmp = Float64(l * Float64(Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * k)) / t_m)); 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 <= 1.75e+156) tmp = l * (((l / (t_m * k)) / (t_m * k)) / t_m); 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, 1.75e+156], N[(l * N[(N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $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 1.75 \cdot 10^{+156}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot k}}{t\_m}\\
\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 < 1.7500000000000002e156Initial program 52.3%
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%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6453.0
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.7
Applied rewrites58.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6463.1
Applied rewrites63.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f6471.3
Applied rewrites71.3%
if 1.7500000000000002e156 < k Initial program 43.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-*.f6443.7
Applied rewrites43.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6461.6
Applied rewrites61.6%
Final simplification70.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 5.5e-160)
(* l (/ l (* (* t_m k) (* t_m (* 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 <= 5.5e-160) {
tmp = l * (l / ((t_m * k) * (t_m * (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 <= 5.5d-160) then
tmp = l * (l / ((t_m * k) * (t_m * (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 <= 5.5e-160) {
tmp = l * (l / ((t_m * k) * (t_m * (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 <= 5.5e-160: tmp = l * (l / ((t_m * k) * (t_m * (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 <= 5.5e-160) tmp = Float64(l * Float64(l / Float64(Float64(t_m * k) * Float64(t_m * 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 <= 5.5e-160) tmp = l * (l / ((t_m * k) * (t_m * (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, 5.5e-160], N[(l * N[(l / N[(N[(t$95$m * k), $MachinePrecision] * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $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 5.5 \cdot 10^{-160}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\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 < 5.5e-160Initial program 53.3%
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-*.f6446.0
Applied rewrites46.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6450.0
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6456.8
Applied rewrites56.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6463.0
Applied rewrites63.0%
associate-*r*N/A
lift-*.f64N/A
lower-*.f6468.9
Applied rewrites68.9%
if 5.5e-160 < 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-*.f6451.8
Applied rewrites51.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6465.8
Applied rewrites65.8%
Final simplification67.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 4.4e-202)
(* l (/ l (* (* t_m k) (* t_m (* t_m k)))))
(* (/ l t_m) (/ l (* t_m (* 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 tmp;
if (k <= 4.4e-202) {
tmp = l * (l / ((t_m * k) * (t_m * (t_m * k))));
} else {
tmp = (l / t_m) * (l / (t_m * (k * (t_m * k))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.4d-202) then
tmp = l * (l / ((t_m * k) * (t_m * (t_m * k))))
else
tmp = (l / t_m) * (l / (t_m * (k * (t_m * k))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e-202) {
tmp = l * (l / ((t_m * k) * (t_m * (t_m * k))));
} else {
tmp = (l / t_m) * (l / (t_m * (k * (t_m * k))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 4.4e-202: tmp = l * (l / ((t_m * k) * (t_m * (t_m * k)))) else: tmp = (l / t_m) * (l / (t_m * (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) tmp = 0.0 if (k <= 4.4e-202) tmp = Float64(l * Float64(l / Float64(Float64(t_m * k) * Float64(t_m * Float64(t_m * k))))); else tmp = Float64(Float64(l / t_m) * Float64(l / Float64(t_m * Float64(k * Float64(t_m * k))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 4.4e-202) tmp = l * (l / ((t_m * k) * (t_m * (t_m * k)))); else tmp = (l / t_m) * (l / (t_m * (k * (t_m * k)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.4e-202], N[(l * N[(l / N[(N[(t$95$m * k), $MachinePrecision] * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(l / N[(t$95$m * N[(k * N[(t$95$m * 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 4.4 \cdot 10^{-202}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 4.40000000000000016e-202Initial program 54.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-*.f6447.9
Applied rewrites47.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6451.4
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6457.8
Applied rewrites57.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.2
Applied rewrites62.2%
associate-*r*N/A
lift-*.f64N/A
lower-*.f6467.8
Applied rewrites67.8%
if 4.40000000000000016e-202 < k Initial program 48.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-*.f6449.2
Applied rewrites49.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6454.4
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.6
Applied rewrites58.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6464.0
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.1
Applied rewrites68.1%
Final simplification67.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 1.02e+157)
(* 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 <= 1.02e+157) {
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 <= 1.02d+157) 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 <= 1.02e+157) {
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 <= 1.02e+157: 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 <= 1.02e+157) tmp = Float64(l * Float64(l / Float64(Float64(t_m * k) * Float64(t_m * Float64(t_m * k))))); else tmp = Float64(Float64(l * 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 <= 1.02e+157) 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, 1.02e+157], N[(l * N[(l / N[(N[(t$95$m * k), $MachinePrecision] * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] / N[(t$95$m * 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 1.02 \cdot 10^{+157}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \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.02000000000000003e157Initial program 52.3%
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%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6453.0
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.7
Applied rewrites58.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6463.1
Applied rewrites63.1%
associate-*r*N/A
lift-*.f64N/A
lower-*.f6467.0
Applied rewrites67.0%
if 1.02000000000000003e157 < k Initial program 43.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-*.f6443.7
Applied rewrites43.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6454.7
Applied rewrites54.7%
Final simplification65.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 k) (* t_m (* t_m k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / ((t_m * k) * (t_m * (t_m * k)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (l / ((t_m * k) * (t_m * (t_m * k)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / ((t_m * k) * (t_m * (t_m * k)))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (l / ((t_m * k) * (t_m * (t_m * k)))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(l / Float64(Float64(t_m * k) * Float64(t_m * Float64(t_m * k)))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (l / ((t_m * k) * (t_m * (t_m * k))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(N[(t$95$m * k), $MachinePrecision] * N[(t$95$m * N[(t$95$m * 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 \left(\ell \cdot \frac{\ell}{\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\right)
\end{array}
Initial program 51.3%
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-*.f6448.5
Applied rewrites48.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6452.8
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.2
Applied rewrites58.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.1
Applied rewrites62.1%
associate-*r*N/A
lift-*.f64N/A
lower-*.f6465.5
Applied rewrites65.5%
Final simplification65.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 k) (* k (* t_m t_m)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / ((t_m * k) * (k * (t_m * t_m)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (l / ((t_m * k) * (k * (t_m * t_m)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / ((t_m * k) * (k * (t_m * t_m)))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (l / ((t_m * k) * (k * (t_m * t_m)))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(l / Float64(Float64(t_m * k) * Float64(k * Float64(t_m * t_m)))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (l / ((t_m * k) * (k * (t_m * t_m))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(N[(t$95$m * k), $MachinePrecision] * N[(k * N[(t$95$m * t$95$m), $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}{\left(t\_m \cdot k\right) \cdot \left(k \cdot \left(t\_m \cdot t\_m\right)\right)}\right)
\end{array}
Initial program 51.3%
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-*.f6448.5
Applied rewrites48.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6452.8
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.2
Applied rewrites58.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.1
Applied rewrites62.1%
Final simplification62.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 (* l (/ l (* k (* k (* t_m (* t_m t_m))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (k * (k * (t_m * (t_m * t_m))))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (l / (k * (k * (t_m * (t_m * t_m))))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (k * (k * (t_m * (t_m * t_m))))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (l / (k * (k * (t_m * (t_m * t_m))))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(l / Float64(k * Float64(k * Float64(t_m * Float64(t_m * t_m))))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (l / (k * (k * (t_m * (t_m * t_m)))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(k * N[(k * N[(t$95$m * N[(t$95$m * t$95$m), $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}{k \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot t\_m\right)\right)\right)}\right)
\end{array}
Initial program 51.3%
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-*.f6448.5
Applied rewrites48.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6452.8
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.2
Applied rewrites58.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6462.1
Applied rewrites62.1%
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
pow2N/A
lift-*.f64N/A
pow-prod-downN/A
pow2N/A
lift-*.f64N/A
pow2N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6457.1
Applied rewrites57.1%
Final simplification57.1%
herbie shell --seed 2024212
(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))))