
(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 22 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 (/ (sin k) l)))
(*
t_s
(if (<= t_m 2.9e+20)
(/
2.0
(/
(fma
(* t_m (* t_2 (* k (tan k))))
k
(* (* t_2 (tan k)) (* 2.0 (* t_m (* t_m t_m)))))
l))
(if (<= t_m 9.2e+187)
(/
2.0
(*
(* t_m (* t_m t_2))
(/ (* t_m (* (tan k) (fma k (/ k (* t_m t_m)) 2.0))) l)))
(/
2.0
(*
(* (tan k) (* t_m (* (/ (* t_m (sin k)) l) (/ t_m l))))
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) / l;
double tmp;
if (t_m <= 2.9e+20) {
tmp = 2.0 / (fma((t_m * (t_2 * (k * tan(k)))), k, ((t_2 * tan(k)) * (2.0 * (t_m * (t_m * t_m))))) / l);
} else if (t_m <= 9.2e+187) {
tmp = 2.0 / ((t_m * (t_m * t_2)) * ((t_m * (tan(k) * fma(k, (k / (t_m * t_m)), 2.0))) / l));
} else {
tmp = 2.0 / ((tan(k) * (t_m * (((t_m * sin(k)) / l) * (t_m / l)))) * ((pow((k / t_m), 2.0) + 1.0) + 1.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) / l) tmp = 0.0 if (t_m <= 2.9e+20) tmp = Float64(2.0 / Float64(fma(Float64(t_m * Float64(t_2 * Float64(k * tan(k)))), k, Float64(Float64(t_2 * tan(k)) * Float64(2.0 * Float64(t_m * Float64(t_m * t_m))))) / l)); elseif (t_m <= 9.2e+187) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(t_m * t_2)) * Float64(Float64(t_m * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))) / l))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_m * Float64(Float64(Float64(t_m * sin(k)) / l) * Float64(t_m / l)))) * Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.9e+20], N[(2.0 / N[(N[(N[(t$95$m * N[(t$95$2 * N[(k * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k + N[(N[(t$95$2 * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.2e+187], N[(2.0 / N[(N[(t$95$m * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{+20}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(t\_m \cdot \left(t\_2 \cdot \left(k \cdot \tan k\right)\right), k, \left(t\_2 \cdot \tan k\right) \cdot \left(2 \cdot \left(t\_m \cdot \left(t\_m \cdot t\_m\right)\right)\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 9.2 \cdot 10^{+187}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(t\_m \cdot t\_2\right)\right) \cdot \frac{t\_m \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m \cdot \sin k}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right) \cdot \left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.9e20Initial program 55.1%
Applied rewrites47.2%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites80.5%
Applied rewrites87.2%
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
Applied rewrites89.2%
if 2.9e20 < t < 9.20000000000000015e187Initial program 51.6%
Applied rewrites59.0%
Applied rewrites71.4%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
Applied rewrites99.3%
if 9.20000000000000015e187 < t Initial program 52.7%
lift-pow.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
div-invN/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6456.7
Applied rewrites56.7%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
un-div-invN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
times-fracN/A
lift-*.f64N/A
associate-*l/N/A
lift-/.f64N/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
lower-/.f6488.5
Applied rewrites88.5%
Final simplification90.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (sin k) l)) (t_3 (* t_2 (tan k))))
(*
t_s
(if (<= t_m 2.9e+20)
(/ 2.0 (/ (* t_m (fma k (* k t_3) (* t_3 (* 2.0 (* t_m t_m))))) l))
(if (<= t_m 9.2e+187)
(/
2.0
(*
(* t_m (* t_m t_2))
(/ (* t_m (* (tan k) (fma k (/ k (* t_m t_m)) 2.0))) l)))
(/
2.0
(*
(* (tan k) (* t_m (* (/ (* t_m (sin k)) l) (/ t_m l))))
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) / l;
double t_3 = t_2 * tan(k);
double tmp;
if (t_m <= 2.9e+20) {
tmp = 2.0 / ((t_m * fma(k, (k * t_3), (t_3 * (2.0 * (t_m * t_m))))) / l);
} else if (t_m <= 9.2e+187) {
tmp = 2.0 / ((t_m * (t_m * t_2)) * ((t_m * (tan(k) * fma(k, (k / (t_m * t_m)), 2.0))) / l));
} else {
tmp = 2.0 / ((tan(k) * (t_m * (((t_m * sin(k)) / l) * (t_m / l)))) * ((pow((k / t_m), 2.0) + 1.0) + 1.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) / l) t_3 = Float64(t_2 * tan(k)) tmp = 0.0 if (t_m <= 2.9e+20) tmp = Float64(2.0 / Float64(Float64(t_m * fma(k, Float64(k * t_3), Float64(t_3 * Float64(2.0 * Float64(t_m * t_m))))) / l)); elseif (t_m <= 9.2e+187) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(t_m * t_2)) * Float64(Float64(t_m * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))) / l))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_m * Float64(Float64(Float64(t_m * sin(k)) / l) * Float64(t_m / l)))) * Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.9e+20], N[(2.0 / N[(N[(t$95$m * N[(k * N[(k * t$95$3), $MachinePrecision] + N[(t$95$3 * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.2e+187], N[(2.0 / N[(N[(t$95$m * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t_3 := t\_2 \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{+20}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \mathsf{fma}\left(k, k \cdot t\_3, t\_3 \cdot \left(2 \cdot \left(t\_m \cdot t\_m\right)\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 9.2 \cdot 10^{+187}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(t\_m \cdot t\_2\right)\right) \cdot \frac{t\_m \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m \cdot \sin k}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right) \cdot \left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.9e20Initial program 55.1%
Applied rewrites47.2%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites80.5%
Applied rewrites87.2%
if 2.9e20 < t < 9.20000000000000015e187Initial program 51.6%
Applied rewrites59.0%
Applied rewrites71.4%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
Applied rewrites99.3%
if 9.20000000000000015e187 < t Initial program 52.7%
lift-pow.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
div-invN/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6456.7
Applied rewrites56.7%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
un-div-invN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
times-fracN/A
lift-*.f64N/A
associate-*l/N/A
lift-/.f64N/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
lower-/.f6488.5
Applied rewrites88.5%
Final simplification89.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (sin k) l)) (t_3 (* t_2 (tan k))))
(*
t_s
(if (<= t_m 2.9e-46)
(/ (* 2.0 l) (* t_m (fma (* k k) t_3 (* t_3 (* 2.0 (* t_m t_m))))))
(if (<= t_m 9.2e+187)
(/
2.0
(*
(* t_m (* t_m t_2))
(/ (* t_m (* (tan k) (fma k (/ k (* t_m t_m)) 2.0))) l)))
(/
2.0
(*
(* (tan k) (* t_m (* (/ (* t_m (sin k)) l) (/ t_m l))))
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) / l;
double t_3 = t_2 * tan(k);
double tmp;
if (t_m <= 2.9e-46) {
tmp = (2.0 * l) / (t_m * fma((k * k), t_3, (t_3 * (2.0 * (t_m * t_m)))));
} else if (t_m <= 9.2e+187) {
tmp = 2.0 / ((t_m * (t_m * t_2)) * ((t_m * (tan(k) * fma(k, (k / (t_m * t_m)), 2.0))) / l));
} else {
tmp = 2.0 / ((tan(k) * (t_m * (((t_m * sin(k)) / l) * (t_m / l)))) * ((pow((k / t_m), 2.0) + 1.0) + 1.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) / l) t_3 = Float64(t_2 * tan(k)) tmp = 0.0 if (t_m <= 2.9e-46) tmp = Float64(Float64(2.0 * l) / Float64(t_m * fma(Float64(k * k), t_3, Float64(t_3 * Float64(2.0 * Float64(t_m * t_m)))))); elseif (t_m <= 9.2e+187) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(t_m * t_2)) * Float64(Float64(t_m * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))) / l))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_m * Float64(Float64(Float64(t_m * sin(k)) / l) * Float64(t_m / l)))) * Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.9e-46], N[(N[(2.0 * l), $MachinePrecision] / N[(t$95$m * N[(N[(k * k), $MachinePrecision] * t$95$3 + N[(t$95$3 * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.2e+187], N[(2.0 / N[(N[(t$95$m * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t_3 := t\_2 \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-46}:\\
\;\;\;\;\frac{2 \cdot \ell}{t\_m \cdot \mathsf{fma}\left(k \cdot k, t\_3, t\_3 \cdot \left(2 \cdot \left(t\_m \cdot t\_m\right)\right)\right)}\\
\mathbf{elif}\;t\_m \leq 9.2 \cdot 10^{+187}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(t\_m \cdot t\_2\right)\right) \cdot \frac{t\_m \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m \cdot \sin k}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right) \cdot \left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.90000000000000005e-46Initial program 54.4%
Applied rewrites45.6%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites81.4%
Applied rewrites85.3%
if 2.90000000000000005e-46 < t < 9.20000000000000015e187Initial program 54.8%
Applied rewrites60.5%
Applied rewrites70.0%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
Applied rewrites93.8%
if 9.20000000000000015e187 < t Initial program 52.7%
lift-pow.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
div-invN/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6456.7
Applied rewrites56.7%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
un-div-invN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
times-fracN/A
lift-*.f64N/A
associate-*l/N/A
lift-/.f64N/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
lower-/.f6488.5
Applied rewrites88.5%
Final simplification87.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.9e-46)
(/ 2.0 (/ (* t_m (* (* t_2 (tan k)) (fma 2.0 (* t_m t_m) (* k k)))) l))
(if (<= t_m 9.2e+187)
(/
2.0
(*
(* t_m (* t_m t_2))
(/ (* t_m (* (tan k) (fma k (/ k (* t_m t_m)) 2.0))) l)))
(/
2.0
(*
(* (tan k) (* t_m (* (/ (* t_m (sin k)) l) (/ t_m l))))
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) / l;
double tmp;
if (t_m <= 2.9e-46) {
tmp = 2.0 / ((t_m * ((t_2 * tan(k)) * fma(2.0, (t_m * t_m), (k * k)))) / l);
} else if (t_m <= 9.2e+187) {
tmp = 2.0 / ((t_m * (t_m * t_2)) * ((t_m * (tan(k) * fma(k, (k / (t_m * t_m)), 2.0))) / l));
} else {
tmp = 2.0 / ((tan(k) * (t_m * (((t_m * sin(k)) / l) * (t_m / l)))) * ((pow((k / t_m), 2.0) + 1.0) + 1.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) / l) tmp = 0.0 if (t_m <= 2.9e-46) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(t_2 * tan(k)) * fma(2.0, Float64(t_m * t_m), Float64(k * k)))) / l)); elseif (t_m <= 9.2e+187) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(t_m * t_2)) * Float64(Float64(t_m * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))) / l))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_m * Float64(Float64(Float64(t_m * sin(k)) / l) * Float64(t_m / l)))) * Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.9e-46], N[(2.0 / N[(N[(t$95$m * N[(N[(t$95$2 * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.2e+187], N[(2.0 / N[(N[(t$95$m * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-46}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \left(\left(t\_2 \cdot \tan k\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 9.2 \cdot 10^{+187}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(t\_m \cdot t\_2\right)\right) \cdot \frac{t\_m \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m \cdot \sin k}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right) \cdot \left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.90000000000000005e-46Initial program 54.4%
Applied rewrites45.6%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites81.4%
Applied rewrites87.3%
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
Applied rewrites85.1%
if 2.90000000000000005e-46 < t < 9.20000000000000015e187Initial program 54.8%
Applied rewrites60.5%
Applied rewrites70.0%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
Applied rewrites93.8%
if 9.20000000000000015e187 < t Initial program 52.7%
lift-pow.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
div-invN/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6456.7
Applied rewrites56.7%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
un-div-invN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
times-fracN/A
lift-*.f64N/A
associate-*l/N/A
lift-/.f64N/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
lower-/.f6488.5
Applied rewrites88.5%
Final simplification87.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (sin k) l))
(t_3 (* t_m (* (tan k) (fma k (/ k (* t_m t_m)) 2.0)))))
(*
t_s
(if (<= t_m 2.9e-46)
(/ 2.0 (/ (* t_m (* (* t_2 (tan k)) (fma 2.0 (* t_m t_m) (* k k)))) l))
(if (<= t_m 1e+147)
(/ 2.0 (* (* t_m (* t_m t_2)) (/ t_3 l)))
(/ 2.0 (* t_3 (/ (* (* t_m (sin k)) (/ t_m l)) l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) / l;
double t_3 = t_m * (tan(k) * fma(k, (k / (t_m * t_m)), 2.0));
double tmp;
if (t_m <= 2.9e-46) {
tmp = 2.0 / ((t_m * ((t_2 * tan(k)) * fma(2.0, (t_m * t_m), (k * k)))) / l);
} else if (t_m <= 1e+147) {
tmp = 2.0 / ((t_m * (t_m * t_2)) * (t_3 / l));
} else {
tmp = 2.0 / (t_3 * (((t_m * sin(k)) * (t_m / l)) / l));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) / l) t_3 = Float64(t_m * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))) tmp = 0.0 if (t_m <= 2.9e-46) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(t_2 * tan(k)) * fma(2.0, Float64(t_m * t_m), Float64(k * k)))) / l)); elseif (t_m <= 1e+147) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(t_m * t_2)) * Float64(t_3 / l))); else tmp = Float64(2.0 / Float64(t_3 * Float64(Float64(Float64(t_m * sin(k)) * Float64(t_m / l)) / l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.9e-46], N[(2.0 / N[(N[(t$95$m * N[(N[(t$95$2 * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1e+147], N[(2.0 / N[(N[(t$95$m * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(t$95$3 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$3 * N[(N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t_3 := t\_m \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-46}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \left(\left(t\_2 \cdot \tan k\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 10^{+147}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(t\_m \cdot t\_2\right)\right) \cdot \frac{t\_3}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \frac{\left(t\_m \cdot \sin k\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 2.90000000000000005e-46Initial program 54.4%
Applied rewrites45.6%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites81.4%
Applied rewrites87.3%
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
Applied rewrites85.1%
if 2.90000000000000005e-46 < t < 9.9999999999999998e146Initial program 57.0%
Applied rewrites61.7%
Applied rewrites66.9%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
Applied rewrites92.3%
if 9.9999999999999998e146 < t Initial program 50.9%
Applied rewrites48.2%
Applied rewrites69.6%
lift-sin.f64N/A
lift-*.f64N/A
times-fracN/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6489.5
Applied rewrites89.5%
Final simplification86.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 (/ (sin k) l)))
(*
t_s
(if (<= t_m 2.9e-46)
(/ 2.0 (/ (* t_m (* (* t_2 (tan k)) (fma 2.0 (* t_m t_m) (* k k)))) l))
(if (<= t_m 1.2e+219)
(/
2.0
(*
(* t_m (* t_m t_2))
(/ (* t_m (* (tan k) (fma k (/ k (* t_m t_m)) 2.0))) l)))
(* (/ l (* t_m k)) (/ (/ l 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) {
double t_2 = sin(k) / l;
double tmp;
if (t_m <= 2.9e-46) {
tmp = 2.0 / ((t_m * ((t_2 * tan(k)) * fma(2.0, (t_m * t_m), (k * k)))) / l);
} else if (t_m <= 1.2e+219) {
tmp = 2.0 / ((t_m * (t_m * t_2)) * ((t_m * (tan(k) * fma(k, (k / (t_m * t_m)), 2.0))) / l));
} else {
tmp = (l / (t_m * k)) * ((l / t_m) / (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(sin(k) / l) tmp = 0.0 if (t_m <= 2.9e-46) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(t_2 * tan(k)) * fma(2.0, Float64(t_m * t_m), Float64(k * k)))) / l)); elseif (t_m <= 1.2e+219) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(t_m * t_2)) * Float64(Float64(t_m * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))) / l))); else tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(Float64(l / t_m) / 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[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.9e-46], N[(2.0 / N[(N[(t$95$m * N[(N[(t$95$2 * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.2e+219], N[(2.0 / N[(N[(t$95$m * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-46}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \left(\left(t\_2 \cdot \tan k\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 1.2 \cdot 10^{+219}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(t\_m \cdot t\_2\right)\right) \cdot \frac{t\_m \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\frac{\ell}{t\_m}}{t\_m \cdot k}\\
\end{array}
\end{array}
\end{array}
if t < 2.90000000000000005e-46Initial program 54.4%
Applied rewrites45.6%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites81.4%
Applied rewrites87.3%
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
Applied rewrites85.1%
if 2.90000000000000005e-46 < t < 1.2e219Initial program 51.8%
Applied rewrites57.2%
Applied rewrites66.2%
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
Applied rewrites90.7%
if 1.2e219 < t Initial 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-*.f6445.5
Applied rewrites45.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lift-*.f64N/A
associate-/l*N/A
lift-*.f64N/A
lift-*.f64N/A
unswap-sqrN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6491.3
Applied rewrites91.3%
Final simplification86.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.85e-46)
(/
2.0
(/ (* t_m (* (* (/ (sin k) l) (tan k)) (fma 2.0 (* t_m t_m) (* k k)))) l))
(if (<= t_m 3e+165)
(*
(/ 2.0 (* t_m (* t_m (/ (* t_m (sin k)) l))))
(/ l (* (tan k) (fma k (/ k (* t_m t_m)) 2.0))))
(/ (/ l t_m) (* k (* t_m (/ (* t_m k) l))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.85e-46) {
tmp = 2.0 / ((t_m * (((sin(k) / l) * tan(k)) * fma(2.0, (t_m * t_m), (k * k)))) / l);
} else if (t_m <= 3e+165) {
tmp = (2.0 / (t_m * (t_m * ((t_m * sin(k)) / l)))) * (l / (tan(k) * fma(k, (k / (t_m * t_m)), 2.0)));
} else {
tmp = (l / t_m) / (k * (t_m * ((t_m * k) / l)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.85e-46) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(Float64(sin(k) / l) * tan(k)) * fma(2.0, Float64(t_m * t_m), Float64(k * k)))) / l)); elseif (t_m <= 3e+165) tmp = Float64(Float64(2.0 / Float64(t_m * Float64(t_m * Float64(Float64(t_m * sin(k)) / l)))) * Float64(l / Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)))); else tmp = Float64(Float64(l / t_m) / Float64(k * Float64(t_m * Float64(Float64(t_m * k) / l)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.85e-46], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3e+165], N[(N[(2.0 / N[(t$95$m * N[(t$95$m * N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] / N[(k * N[(t$95$m * N[(N[(t$95$m * k), $MachinePrecision] / l), $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 2.85 \cdot 10^{-46}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \left(\left(\frac{\sin k}{\ell} \cdot \tan k\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 3 \cdot 10^{+165}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(t\_m \cdot \frac{t\_m \cdot \sin k}{\ell}\right)} \cdot \frac{\ell}{\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot \frac{t\_m \cdot k}{\ell}\right)}\\
\end{array}
\end{array}
if t < 2.8500000000000001e-46Initial program 54.4%
Applied rewrites45.6%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites81.4%
Applied rewrites87.3%
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
Applied rewrites85.1%
if 2.8500000000000001e-46 < t < 2.9999999999999999e165Initial program 55.3%
pow-to-expN/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6430.6
Applied rewrites30.6%
Applied rewrites91.1%
if 2.9999999999999999e165 < t Initial program 52.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-*.f6441.9
Applied rewrites41.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6446.5
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6446.5
Applied rewrites46.5%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6472.2
Applied rewrites72.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-*.f64N/A
frac-timesN/A
lift-/.f64N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
div-invN/A
lift-/.f64N/A
clear-numN/A
lower-*.f64N/A
lift-*.f64N/A
Applied rewrites84.7%
Final simplification86.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 3300.0)
(* (/ l (* t_m k)) (/ (/ l t_m) (* t_m k)))
(if (<= k 6.5e+154)
(/ (* 2.0 l) (* (* t_m (* t_m (/ (* t_m (sin k)) l))) (* 2.0 (tan 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 <= 3300.0) {
tmp = (l / (t_m * k)) * ((l / t_m) / (t_m * k));
} else if (k <= 6.5e+154) {
tmp = (2.0 * l) / ((t_m * (t_m * ((t_m * sin(k)) / l))) * (2.0 * tan(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 <= 3300.0d0) then
tmp = (l / (t_m * k)) * ((l / t_m) / (t_m * k))
else if (k <= 6.5d+154) then
tmp = (2.0d0 * l) / ((t_m * (t_m * ((t_m * sin(k)) / l))) * (2.0d0 * tan(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 <= 3300.0) {
tmp = (l / (t_m * k)) * ((l / t_m) / (t_m * k));
} else if (k <= 6.5e+154) {
tmp = (2.0 * l) / ((t_m * (t_m * ((t_m * Math.sin(k)) / l))) * (2.0 * Math.tan(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 <= 3300.0: tmp = (l / (t_m * k)) * ((l / t_m) / (t_m * k)) elif k <= 6.5e+154: tmp = (2.0 * l) / ((t_m * (t_m * ((t_m * math.sin(k)) / l))) * (2.0 * math.tan(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 <= 3300.0) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(Float64(l / t_m) / Float64(t_m * k))); elseif (k <= 6.5e+154) tmp = Float64(Float64(2.0 * l) / Float64(Float64(t_m * Float64(t_m * Float64(Float64(t_m * sin(k)) / l))) * Float64(2.0 * tan(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 <= 3300.0) tmp = (l / (t_m * k)) * ((l / t_m) / (t_m * k)); elseif (k <= 6.5e+154) tmp = (2.0 * l) / ((t_m * (t_m * ((t_m * sin(k)) / l))) * (2.0 * tan(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, 3300.0], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.5e+154], N[(N[(2.0 * l), $MachinePrecision] / N[(N[(t$95$m * N[(t$95$m * N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[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 3300:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\frac{\ell}{t\_m}}{t\_m \cdot k}\\
\mathbf{elif}\;k \leq 6.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{2 \cdot \ell}{\left(t\_m \cdot \left(t\_m \cdot \frac{t\_m \cdot \sin k}{\ell}\right)\right) \cdot \left(2 \cdot \tan 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 < 3300Initial program 58.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-*.f6455.7
Applied rewrites55.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lift-*.f64N/A
associate-/l*N/A
lift-*.f64N/A
lift-*.f64N/A
unswap-sqrN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6481.0
Applied rewrites81.0%
if 3300 < k < 6.5000000000000005e154Initial program 47.2%
pow-to-expN/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6411.6
Applied rewrites11.6%
Applied rewrites62.4%
Taylor expanded in k around 0
Applied rewrites66.7%
if 6.5000000000000005e154 < k Initial program 34.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-*.f6434.4
Applied rewrites34.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6435.6
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6443.7
Applied rewrites43.7%
Final simplification75.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 2e-24)
(* (/ l (* t_m k)) (/ (/ l t_m) (* t_m k)))
(if (<= k 2.05e+145)
(/ 2.0 (* (sin k) (* 2.0 (* (tan k) (* (* t_m t_m) (/ t_m (* l l)))))))
(/
2.0
(/
(*
(* k k)
(fma
k
(*
k
(*
(* t_m (* k k))
(fma
2.0
(* (/ (* t_m t_m) l) 0.08611111111111111)
(/ 0.16666666666666666 l))))
(* 2.0 (/ (* t_m (* t_m t_m)) l))))
l))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2e-24) {
tmp = (l / (t_m * k)) * ((l / t_m) / (t_m * k));
} else if (k <= 2.05e+145) {
tmp = 2.0 / (sin(k) * (2.0 * (tan(k) * ((t_m * t_m) * (t_m / (l * l))))));
} else {
tmp = 2.0 / (((k * k) * fma(k, (k * ((t_m * (k * k)) * fma(2.0, (((t_m * t_m) / l) * 0.08611111111111111), (0.16666666666666666 / l)))), (2.0 * ((t_m * (t_m * t_m)) / l)))) / l);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2e-24) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(Float64(l / t_m) / Float64(t_m * k))); elseif (k <= 2.05e+145) tmp = Float64(2.0 / Float64(sin(k) * Float64(2.0 * Float64(tan(k) * Float64(Float64(t_m * t_m) * Float64(t_m / Float64(l * l))))))); else tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * fma(k, Float64(k * Float64(Float64(t_m * Float64(k * k)) * fma(2.0, Float64(Float64(Float64(t_m * t_m) / l) * 0.08611111111111111), Float64(0.16666666666666666 / l)))), Float64(2.0 * Float64(Float64(t_m * Float64(t_m * t_m)) / l)))) / l)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2e-24], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.05e+145], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(2.0 * N[(N[Tan[k], $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(k * N[(k * N[(N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * 0.08611111111111111), $MachinePrecision] + N[(0.16666666666666666 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $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 \cdot 10^{-24}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\frac{\ell}{t\_m}}{t\_m \cdot k}\\
\mathbf{elif}\;k \leq 2.05 \cdot 10^{+145}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(2 \cdot \left(\tan k \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{t\_m}{\ell \cdot \ell}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \mathsf{fma}\left(k, k \cdot \left(\left(t\_m \cdot \left(k \cdot k\right)\right) \cdot \mathsf{fma}\left(2, \frac{t\_m \cdot t\_m}{\ell} \cdot 0.08611111111111111, \frac{0.16666666666666666}{\ell}\right)\right), 2 \cdot \frac{t\_m \cdot \left(t\_m \cdot t\_m\right)}{\ell}\right)}{\ell}}\\
\end{array}
\end{array}
if k < 1.99999999999999985e-24Initial program 58.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-*.f6455.5
Applied rewrites55.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lift-*.f64N/A
associate-/l*N/A
lift-*.f64N/A
lift-*.f64N/A
unswap-sqrN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6482.0
Applied rewrites82.0%
if 1.99999999999999985e-24 < k < 2.0500000000000001e145Initial program 49.3%
Applied rewrites54.3%
Taylor expanded in k around 0
Applied rewrites69.6%
if 2.0500000000000001e145 < k Initial program 34.0%
Applied rewrites20.7%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites49.2%
Taylor expanded in k around 0
Applied rewrites18.4%
Taylor expanded in k around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites42.9%
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 (<= k 1.9e-26)
(* (/ l (* t_m k)) (/ (/ l t_m) (* t_m k)))
(*
l
(/
2.0
(* t_m (* (* (/ (sin k) l) (tan k)) (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.9e-26) {
tmp = (l / (t_m * k)) * ((l / t_m) / (t_m * k));
} else {
tmp = l * (2.0 / (t_m * (((sin(k) / l) * tan(k)) * 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.9e-26) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(Float64(l / t_m) / Float64(t_m * k))); else tmp = Float64(l * Float64(2.0 / Float64(t_m * Float64(Float64(Float64(sin(k) / l) * tan(k)) * 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.9e-26], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 / N[(t$95$m * N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $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.9 \cdot 10^{-26}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\frac{\ell}{t\_m}}{t\_m \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{2}{t\_m \cdot \left(\left(\frac{\sin k}{\ell} \cdot \tan k\right) \cdot \mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 1.90000000000000007e-26Initial program 58.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.8
Applied rewrites55.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lift-*.f64N/A
associate-/l*N/A
lift-*.f64N/A
lift-*.f64N/A
unswap-sqrN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6481.9
Applied rewrites81.9%
if 1.90000000000000007e-26 < k Initial program 42.2%
Applied rewrites43.4%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites76.6%
Applied rewrites83.3%
Applied rewrites77.0%
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 (<= t_m 8e-72)
(/
2.0
(/
(*
t_m
(*
(* k k)
(fma 2.0 t_2 (* (* k k) (fma t_2 0.3333333333333333 (/ 1.0 l))))))
l))
(* (/ l (* t_m k)) (/ (/ l 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) {
double t_2 = (t_m * t_m) / l;
double tmp;
if (t_m <= 8e-72) {
tmp = 2.0 / ((t_m * ((k * k) * fma(2.0, t_2, ((k * k) * fma(t_2, 0.3333333333333333, (1.0 / l)))))) / l);
} else {
tmp = (l / (t_m * k)) * ((l / t_m) / (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 (t_m <= 8e-72) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(k * k) * fma(2.0, t_2, Float64(Float64(k * k) * fma(t_2, 0.3333333333333333, Float64(1.0 / l)))))) / l)); else tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(Float64(l / t_m) / 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[t$95$m, 8e-72], N[(2.0 / N[(N[(t$95$m * N[(N[(k * k), $MachinePrecision] * N[(2.0 * t$95$2 + N[(N[(k * k), $MachinePrecision] * N[(t$95$2 * 0.3333333333333333 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * k), $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}\;t\_m \leq 8 \cdot 10^{-72}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \left(\left(k \cdot k\right) \cdot \mathsf{fma}\left(2, t\_2, \left(k \cdot k\right) \cdot \mathsf{fma}\left(t\_2, 0.3333333333333333, \frac{1}{\ell}\right)\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\frac{\ell}{t\_m}}{t\_m \cdot k}\\
\end{array}
\end{array}
\end{array}
if t < 7.9999999999999997e-72Initial program 54.4%
Applied rewrites45.6%
Taylor expanded in t around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-*.f64N/A
lower-cos.f64N/A
lower-/.f64N/A
Applied rewrites81.2%
Taylor expanded in k around 0
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
Applied rewrites69.0%
if 7.9999999999999997e-72 < t Initial program 54.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-*.f6443.9
Applied rewrites43.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lift-*.f64N/A
associate-/l*N/A
lift-*.f64N/A
lift-*.f64N/A
unswap-sqrN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6476.2
Applied rewrites76.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 5.8e-72)
(* l (/ l (* t_m (* t_m (* t_m (* k k))))))
(if (<= t_m 3.2e+116)
(* (/ l (* t_m k)) (/ l (* k (* t_m t_m))))
(* 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) {
double tmp;
if (t_m <= 5.8e-72) {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
} else if (t_m <= 3.2e+116) {
tmp = (l / (t_m * k)) * (l / (k * (t_m * t_m)));
} else {
tmp = l * (l / ((t_m * k) * (t_m * (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 (t_m <= 5.8d-72) then
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
else if (t_m <= 3.2d+116) then
tmp = (l / (t_m * k)) * (l / (k * (t_m * t_m)))
else
tmp = l * (l / ((t_m * k) * (t_m * (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 (t_m <= 5.8e-72) {
tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
} else if (t_m <= 3.2e+116) {
tmp = (l / (t_m * k)) * (l / (k * (t_m * t_m)));
} else {
tmp = l * (l / ((t_m * k) * (t_m * (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 t_m <= 5.8e-72: tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))) elif t_m <= 3.2e+116: tmp = (l / (t_m * k)) * (l / (k * (t_m * t_m))) else: tmp = l * (l / ((t_m * k) * (t_m * (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 (t_m <= 5.8e-72) tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))); elseif (t_m <= 3.2e+116) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(k * Float64(t_m * t_m)))); else tmp = Float64(l * Float64(l / Float64(Float64(t_m * k) * Float64(t_m * 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 (t_m <= 5.8e-72) tmp = l * (l / (t_m * (t_m * (t_m * (k * k))))); elseif (t_m <= 3.2e+116) tmp = (l / (t_m * k)) * (l / (k * (t_m * t_m))); else tmp = l * (l / ((t_m * k) * (t_m * (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[t$95$m, 5.8e-72], 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, 3.2e+116], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.8 \cdot 10^{-72}:\\
\;\;\;\;\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 3.2 \cdot 10^{+116}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{k \cdot \left(t\_m \cdot t\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 5.79999999999999995e-72Initial program 54.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-*.f6456.3
Applied rewrites56.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6460.8
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6466.1
Applied rewrites66.1%
if 5.79999999999999995e-72 < t < 3.2e116Initial program 62.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.4
Applied rewrites50.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6453.4
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6453.4
Applied rewrites53.4%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6461.3
Applied rewrites61.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
lift-/.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6471.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6471.6
Applied rewrites71.6%
if 3.2e116 < t Initial program 46.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-*.f6438.2
Applied rewrites38.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6441.8
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6446.6
Applied rewrites46.6%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6472.6
Applied rewrites72.6%
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 2.1e-24)
(* (/ l (* t_m k)) (/ (/ l t_m) (* 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.1e-24) {
tmp = (l / (t_m * k)) * ((l / t_m) / (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.1d-24) then
tmp = (l / (t_m * k)) * ((l / t_m) / (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.1e-24) {
tmp = (l / (t_m * k)) * ((l / t_m) / (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.1e-24: tmp = (l / (t_m * k)) * ((l / t_m) / (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.1e-24) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(Float64(l / t_m) / Float64(t_m * k))); else tmp = Float64(Float64(Float64(l * l) / Float64(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.1e-24) tmp = (l / (t_m * k)) * ((l / t_m) / (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.1e-24], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] / N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.1 \cdot 10^{-24}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\frac{\ell}{t\_m}}{t\_m \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell \cdot \ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
if k < 2.0999999999999999e-24Initial program 58.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-*.f6455.5
Applied rewrites55.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lift-*.f64N/A
associate-/l*N/A
lift-*.f64N/A
lift-*.f64N/A
unswap-sqrN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6482.0
Applied rewrites82.0%
if 2.0999999999999999e-24 < k Initial program 42.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-*.f6444.6
Applied rewrites44.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6444.5
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6444.5
Applied rewrites44.5%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.5
Applied rewrites43.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-*.f64N/A
frac-timesN/A
lift-/.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites50.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 5e-136)
(/ l (* t_m (* k (* t_m (/ (* t_m k) l)))))
(* (/ 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 <= 5e-136) {
tmp = l / (t_m * (k * (t_m * ((t_m * k) / l))));
} 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 <= 5d-136) then
tmp = l / (t_m * (k * (t_m * ((t_m * k) / l))))
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 <= 5e-136) {
tmp = l / (t_m * (k * (t_m * ((t_m * k) / l))));
} 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 <= 5e-136: tmp = l / (t_m * (k * (t_m * ((t_m * k) / l)))) 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 <= 5e-136) tmp = Float64(l / Float64(t_m * Float64(k * Float64(t_m * Float64(Float64(t_m * k) / l))))); else tmp = Float64(Float64(l / t_m) * Float64(Float64(l / 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 <= 5e-136) tmp = l / (t_m * (k * (t_m * ((t_m * k) / l)))); 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, 5e-136], N[(l / N[(t$95$m * N[(k * N[(t$95$m * N[(N[(t$95$m * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(k * k), $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 \cdot 10^{-136}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \frac{t\_m \cdot k}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 5.0000000000000002e-136Initial program 56.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.7
Applied rewrites51.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6457.1
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6474.4
Applied rewrites74.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-*.f64N/A
frac-timesN/A
clear-numN/A
frac-timesN/A
metadata-evalN/A
div-invN/A
/-rgt-identityN/A
lower-/.f64N/A
lower-*.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites79.5%
if 5.0000000000000002e-136 < k Initial program 50.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-*.f6453.7
Applied rewrites53.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lift-*.f64N/A
associate-/l*N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6461.0
Applied rewrites61.0%
Final simplification72.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 2e-24)
(/ l (* t_m (* k (* t_m (/ (* t_m k) l)))))
(/ (/ (* 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 <= 2e-24) {
tmp = l / (t_m * (k * (t_m * ((t_m * k) / l))));
} 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 <= 2d-24) then
tmp = l / (t_m * (k * (t_m * ((t_m * k) / l))))
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 <= 2e-24) {
tmp = l / (t_m * (k * (t_m * ((t_m * k) / l))));
} 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 <= 2e-24: tmp = l / (t_m * (k * (t_m * ((t_m * k) / l)))) 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 <= 2e-24) tmp = Float64(l / Float64(t_m * Float64(k * Float64(t_m * Float64(Float64(t_m * k) / l))))); else tmp = Float64(Float64(Float64(l * l) / Float64(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 <= 2e-24) tmp = l / (t_m * (k * (t_m * ((t_m * k) / l)))); 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, 2e-24], N[(l / N[(t$95$m * N[(k * N[(t$95$m * N[(N[(t$95$m * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] / N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-24}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \frac{t\_m \cdot k}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell \cdot \ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}}{t\_m}\\
\end{array}
\end{array}
if k < 1.99999999999999985e-24Initial program 58.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-*.f6455.5
Applied rewrites55.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6461.2
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6463.9
Applied rewrites63.9%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6475.8
Applied rewrites75.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-*.f64N/A
frac-timesN/A
clear-numN/A
frac-timesN/A
metadata-evalN/A
div-invN/A
/-rgt-identityN/A
lower-/.f64N/A
lower-*.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites80.6%
if 1.99999999999999985e-24 < k Initial program 42.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-*.f6444.6
Applied rewrites44.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6444.5
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6444.5
Applied rewrites44.5%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.5
Applied rewrites43.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-*.f64N/A
frac-timesN/A
lift-/.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites50.5%
Final simplification72.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 1.5e-24)
(/ l (* t_m (* k (* t_m (/ (* t_m k) 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 (k <= 1.5e-24) {
tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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 (k <= 1.5d-24) then
tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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 (k <= 1.5e-24) {
tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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 k <= 1.5e-24: tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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 (k <= 1.5e-24) tmp = Float64(l / Float64(t_m * Float64(k * Float64(t_m * Float64(Float64(t_m * k) / l))))); else tmp = Float64(Float64(Float64(l * l) / 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.5e-24) tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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[k, 1.5e-24], N[(l / N[(t$95$m * N[(k * N[(t$95$m * N[(N[(t$95$m * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] / t$95$m), $MachinePrecision] / N[(t$95$m * N[(t$95$m * N[(k * k), $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.5 \cdot 10^{-24}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \frac{t\_m \cdot k}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell \cdot \ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 1.49999999999999998e-24Initial program 58.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-*.f6455.5
Applied rewrites55.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6461.2
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6463.9
Applied rewrites63.9%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6475.8
Applied rewrites75.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-*.f64N/A
frac-timesN/A
clear-numN/A
frac-timesN/A
metadata-evalN/A
div-invN/A
/-rgt-identityN/A
lower-/.f64N/A
lower-*.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites80.6%
if 1.49999999999999998e-24 < k Initial program 42.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-*.f6444.6
Applied rewrites44.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.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-*.f6450.4
Applied rewrites50.4%
Final simplification72.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 2e+97)
(/ l (* t_m (* k (* t_m (/ (* t_m k) 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 (k <= 2e+97) {
tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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 (k <= 2d+97) then
tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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 (k <= 2e+97) {
tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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 k <= 2e+97: tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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 (k <= 2e+97) tmp = Float64(l / Float64(t_m * Float64(k * Float64(t_m * Float64(Float64(t_m * k) / l))))); 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 <= 2e+97) tmp = l / (t_m * (k * (t_m * ((t_m * k) / 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[k, 2e+97], N[(l / N[(t$95$m * N[(k * N[(t$95$m * N[(N[(t$95$m * k), $MachinePrecision] / l), $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 2 \cdot 10^{+97}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \frac{t\_m \cdot k}{\ell}\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 < 2.0000000000000001e97Initial program 56.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-*.f6454.6
Applied rewrites54.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6459.3
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6461.6
Applied rewrites61.6%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6471.7
Applied rewrites71.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-*.f64N/A
frac-timesN/A
clear-numN/A
frac-timesN/A
metadata-evalN/A
div-invN/A
/-rgt-identityN/A
lower-/.f64N/A
lower-*.f64N/A
div-invN/A
lift-/.f64N/A
Applied rewrites76.3%
if 2.0000000000000001e97 < k Initial program 40.1%
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-*.f6440.4
Applied rewrites40.4%
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-*.f6448.6
Applied rewrites48.6%
Final simplification72.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 4.2e-156)
(* 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 <= 4.2e-156) {
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 <= 4.2d-156) 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 <= 4.2e-156) {
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 <= 4.2e-156: 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 <= 4.2e-156) 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 <= 4.2e-156) 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, 4.2e-156], 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 4.2 \cdot 10^{-156}:\\
\;\;\;\;\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 < 4.20000000000000025e-156Initial program 56.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-*.f6450.4
Applied rewrites50.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6454.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
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6473.0
Applied rewrites73.0%
if 4.20000000000000025e-156 < k Initial 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-*.f6455.4
Applied rewrites55.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6462.9
Applied rewrites62.9%
Final simplification68.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 (<= k 1.5e-24)
(* 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.5e-24) {
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.5d-24) 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.5e-24) {
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.5e-24: 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.5e-24) 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.5e-24) 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.5e-24], 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.5 \cdot 10^{-24}:\\
\;\;\;\;\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.49999999999999998e-24Initial program 58.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-*.f6455.5
Applied rewrites55.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6461.2
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6463.9
Applied rewrites63.9%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6475.8
Applied rewrites75.8%
if 1.49999999999999998e-24 < k Initial program 42.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-*.f6444.6
Applied rewrites44.6%
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-*.f6449.0
Applied rewrites49.0%
Final simplification68.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 1e-132)
(* 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-132) {
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-132) 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-132) {
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-132: 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-132) tmp = Float64(l * Float64(l / Float64(Float64(t_m * 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-132) 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-132], 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[(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^{-132}:\\
\;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot k\right) \cdot \left(t\_m \cdot \left(t\_m \cdot k\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 < 9.9999999999999999e-133Initial program 56.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-*.f6451.7
Applied rewrites51.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6457.0
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6460.2
Applied rewrites60.2%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6474.1
Applied rewrites74.1%
if 9.9999999999999999e-133 < k Initial program 50.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-*.f6453.8
Applied rewrites53.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6455.9
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6455.9
Applied rewrites55.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6458.3
Applied rewrites58.3%
Final simplification68.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 (* (* 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 54.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-*.f6452.5
Applied rewrites52.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6456.6
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.6
Applied rewrites58.6%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6466.9
Applied rewrites66.9%
Final simplification66.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 (* 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(Float64(t_m * 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[(N[(t$95$m * t$95$m), $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)
\\
t\_s \cdot \left(\ell \cdot \frac{\ell}{\left(t\_m \cdot t\_m\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\right)
\end{array}
Initial program 54.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-*.f6452.5
Applied rewrites52.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6456.6
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6458.6
Applied rewrites58.6%
Final simplification58.6%
herbie shell --seed 2024214
(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))))