
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 17.0)
(/
2.0
(*
(* (* (/ (pow (sin k) 2.0) l) k) (fma (/ (/ (pow t_m 3.0) k) k) 2.0 t_m))
(/ k (* (cos k) l))))
(/
2.0
(*
(+ (pow (/ k t_m) 2.0) 2.0)
(* (tan k) (* (* (sin k) t_m) (pow (/ t_m l) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 17.0) {
tmp = 2.0 / ((((pow(sin(k), 2.0) / l) * k) * fma(((pow(t_m, 3.0) / k) / k), 2.0, t_m)) * (k / (cos(k) * l)));
} else {
tmp = 2.0 / ((pow((k / t_m), 2.0) + 2.0) * (tan(k) * ((sin(k) * t_m) * pow((t_m / l), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 17.0) tmp = Float64(2.0 / Float64(Float64(Float64(Float64((sin(k) ^ 2.0) / l) * k) * fma(Float64(Float64((t_m ^ 3.0) / k) / k), 2.0, t_m)) * Float64(k / Float64(cos(k) * l)))); else tmp = Float64(2.0 / Float64(Float64((Float64(k / t_m) ^ 2.0) + 2.0) * Float64(tan(k) * Float64(Float64(sin(k) * t_m) * (Float64(t_m / l) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 17.0], N[(2.0 / N[(N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision] * 2.0 + t$95$m), $MachinePrecision]), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] * N[Power[N[(t$95$m / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 17:\\
\;\;\;\;\frac{2}{\left(\left(\frac{{\sin k}^{2}}{\ell} \cdot k\right) \cdot \mathsf{fma}\left(\frac{\frac{{t\_m}^{3}}{k}}{k}, 2, t\_m\right)\right) \cdot \frac{k}{\cos k \cdot \ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right) \cdot \left(\tan k \cdot \left(\left(\sin k \cdot t\_m\right) \cdot {\left(\frac{t\_m}{\ell}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
if t < 17Initial program 46.0%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites71.1%
Applied rewrites80.0%
Applied rewrites82.8%
if 17 < t Initial program 74.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites70.7%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6479.6
Applied rewrites79.6%
Applied rewrites90.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 3.65e-9)
(/ 2.0 (* (pow (* (* (pow t_m 0.75) (/ (pow t_m 0.75) l)) k) 2.0) 2.0))
(/
2.0
(*
(*
(* (- (/ 0.5 l) (/ (* 0.5 (cos (+ k k))) l)) k)
(fma (/ (/ (pow t_m 3.0) k) k) 2.0 t_m))
(/ k (* (cos 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 (k <= 3.65e-9) {
tmp = 2.0 / (pow(((pow(t_m, 0.75) * (pow(t_m, 0.75) / l)) * k), 2.0) * 2.0);
} else {
tmp = 2.0 / (((((0.5 / l) - ((0.5 * cos((k + k))) / l)) * k) * fma(((pow(t_m, 3.0) / k) / k), 2.0, t_m)) * (k / (cos(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 (k <= 3.65e-9) tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 0.75) * Float64((t_m ^ 0.75) / l)) * k) ^ 2.0) * 2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(0.5 / l) - Float64(Float64(0.5 * cos(Float64(k + k))) / l)) * k) * fma(Float64(Float64((t_m ^ 3.0) / k) / k), 2.0, t_m)) * Float64(k / Float64(cos(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[k, 3.65e-9], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[(N[Power[t$95$m, 0.75], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(0.5 / l), $MachinePrecision] - N[(N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / k), $MachinePrecision] / k), $MachinePrecision] * 2.0 + t$95$m), $MachinePrecision]), $MachinePrecision] * N[(k / N[(N[Cos[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}\;k \leq 3.65 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{{\left(\left({t\_m}^{0.75} \cdot \frac{{t\_m}^{0.75}}{\ell}\right) \cdot k\right)}^{2} \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\frac{0.5}{\ell} - \frac{0.5 \cdot \cos \left(k + k\right)}{\ell}\right) \cdot k\right) \cdot \mathsf{fma}\left(\frac{\frac{{t\_m}^{3}}{k}}{k}, 2, t\_m\right)\right) \cdot \frac{k}{\cos k \cdot \ell}}\\
\end{array}
\end{array}
if k < 3.65000000000000001e-9Initial program 55.7%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6454.6
Applied rewrites54.6%
Applied rewrites32.3%
Applied rewrites33.8%
if 3.65000000000000001e-9 < k Initial program 42.6%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites70.0%
Applied rewrites87.8%
Applied rewrites96.1%
Applied rewrites95.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.95e-11)
(/ 2.0 (* (pow (* (* (pow t_m 0.75) (/ (pow t_m 0.75) l)) k) 2.0) 2.0))
(* (/ l k) (pow (/ (* (* k (tan k)) (* (sin k) t_m)) (* l 2.0)) -1.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.95e-11) {
tmp = 2.0 / (pow(((pow(t_m, 0.75) * (pow(t_m, 0.75) / l)) * k), 2.0) * 2.0);
} else {
tmp = (l / k) * pow((((k * tan(k)) * (sin(k) * t_m)) / (l * 2.0)), -1.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.95d-11) then
tmp = 2.0d0 / (((((t_m ** 0.75d0) * ((t_m ** 0.75d0) / l)) * k) ** 2.0d0) * 2.0d0)
else
tmp = (l / k) * ((((k * tan(k)) * (sin(k) * t_m)) / (l * 2.0d0)) ** (-1.0d0))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.95e-11) {
tmp = 2.0 / (Math.pow(((Math.pow(t_m, 0.75) * (Math.pow(t_m, 0.75) / l)) * k), 2.0) * 2.0);
} else {
tmp = (l / k) * Math.pow((((k * Math.tan(k)) * (Math.sin(k) * t_m)) / (l * 2.0)), -1.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.95e-11: tmp = 2.0 / (math.pow(((math.pow(t_m, 0.75) * (math.pow(t_m, 0.75) / l)) * k), 2.0) * 2.0) else: tmp = (l / k) * math.pow((((k * math.tan(k)) * (math.sin(k) * t_m)) / (l * 2.0)), -1.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.95e-11) tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 0.75) * Float64((t_m ^ 0.75) / l)) * k) ^ 2.0) * 2.0)); else tmp = Float64(Float64(l / k) * (Float64(Float64(Float64(k * tan(k)) * Float64(sin(k) * t_m)) / Float64(l * 2.0)) ^ -1.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.95e-11) tmp = 2.0 / (((((t_m ^ 0.75) * ((t_m ^ 0.75) / l)) * k) ^ 2.0) * 2.0); else tmp = (l / k) * ((((k * tan(k)) * (sin(k) * t_m)) / (l * 2.0)) ^ -1.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.95e-11], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[(N[Power[t$95$m, 0.75], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[Power[N[(N[(N[(k * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] / N[(l * 2.0), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.95 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{{\left(\left({t\_m}^{0.75} \cdot \frac{{t\_m}^{0.75}}{\ell}\right) \cdot k\right)}^{2} \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot {\left(\frac{\left(k \cdot \tan k\right) \cdot \left(\sin k \cdot t\_m\right)}{\ell \cdot 2}\right)}^{-1}\\
\end{array}
\end{array}
if k < 1.95000000000000005e-11Initial program 56.3%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6454.7
Applied rewrites54.7%
Applied rewrites32.7%
Applied rewrites34.2%
if 1.95000000000000005e-11 < k Initial program 41.4%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites70.9%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
unpow2N/A
lower-*.f6458.0
Applied rewrites58.0%
Applied rewrites59.1%
Applied rewrites91.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.95e-11)
(/ 2.0 (* (pow (* (* (pow t_m 0.75) (/ (pow t_m 0.75) l)) k) 2.0) 2.0))
(* (/ (* l 2.0) k) (/ l (* (* k (tan k)) (* (sin k) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.95e-11) {
tmp = 2.0 / (pow(((pow(t_m, 0.75) * (pow(t_m, 0.75) / l)) * k), 2.0) * 2.0);
} else {
tmp = ((l * 2.0) / k) * (l / ((k * tan(k)) * (sin(k) * t_m)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.95d-11) then
tmp = 2.0d0 / (((((t_m ** 0.75d0) * ((t_m ** 0.75d0) / l)) * k) ** 2.0d0) * 2.0d0)
else
tmp = ((l * 2.0d0) / k) * (l / ((k * tan(k)) * (sin(k) * t_m)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.95e-11) {
tmp = 2.0 / (Math.pow(((Math.pow(t_m, 0.75) * (Math.pow(t_m, 0.75) / l)) * k), 2.0) * 2.0);
} else {
tmp = ((l * 2.0) / k) * (l / ((k * Math.tan(k)) * (Math.sin(k) * t_m)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.95e-11: tmp = 2.0 / (math.pow(((math.pow(t_m, 0.75) * (math.pow(t_m, 0.75) / l)) * k), 2.0) * 2.0) else: tmp = ((l * 2.0) / k) * (l / ((k * math.tan(k)) * (math.sin(k) * t_m))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.95e-11) tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 0.75) * Float64((t_m ^ 0.75) / l)) * k) ^ 2.0) * 2.0)); else tmp = Float64(Float64(Float64(l * 2.0) / k) * Float64(l / Float64(Float64(k * tan(k)) * Float64(sin(k) * t_m)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.95e-11) tmp = 2.0 / (((((t_m ^ 0.75) * ((t_m ^ 0.75) / l)) * k) ^ 2.0) * 2.0); else tmp = ((l * 2.0) / k) * (l / ((k * tan(k)) * (sin(k) * t_m))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.95e-11], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[(N[Power[t$95$m, 0.75], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * 2.0), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(N[(k * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$m), $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.95 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{{\left(\left({t\_m}^{0.75} \cdot \frac{{t\_m}^{0.75}}{\ell}\right) \cdot k\right)}^{2} \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot 2}{k} \cdot \frac{\ell}{\left(k \cdot \tan k\right) \cdot \left(\sin k \cdot t\_m\right)}\\
\end{array}
\end{array}
if k < 1.95000000000000005e-11Initial program 56.3%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6454.7
Applied rewrites54.7%
Applied rewrites32.7%
Applied rewrites34.2%
if 1.95000000000000005e-11 < k Initial program 41.4%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites70.9%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
unpow2N/A
lower-*.f6458.0
Applied rewrites58.0%
Applied rewrites59.1%
Applied rewrites91.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 4e-115)
(/ 2.0 (* (pow (/ (* (pow t_m 1.5) k) l) 2.0) 2.0))
(if (<= k 4.5e-6)
(/
2.0
(*
t_m
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))))
(if (<= k 4.5e+155)
(* (* l 2.0) (/ l (* (* (* t_m (tan k)) (sin k)) (* k k))))
(/ (* (* l l) 2.0) (* (* (* k (tan k)) (* (sin k) t_m)) k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4e-115) {
tmp = 2.0 / (pow(((pow(t_m, 1.5) * k) / l), 2.0) * 2.0);
} else if (k <= 4.5e-6) {
tmp = 2.0 / (t_m * (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)));
} else if (k <= 4.5e+155) {
tmp = (l * 2.0) * (l / (((t_m * tan(k)) * sin(k)) * (k * k)));
} else {
tmp = ((l * l) * 2.0) / (((k * tan(k)) * (sin(k) * t_m)) * k);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4e-115) tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) * k) / l) ^ 2.0) * 2.0)); elseif (k <= 4.5e-6) tmp = Float64(2.0 / Float64(t_m * Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l))) * Float64(k * k)))); elseif (k <= 4.5e+155) tmp = Float64(Float64(l * 2.0) * Float64(l / Float64(Float64(Float64(t_m * tan(k)) * sin(k)) * Float64(k * k)))); else tmp = Float64(Float64(Float64(l * l) * 2.0) / Float64(Float64(Float64(k * tan(k)) * Float64(sin(k) * 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_] := N[(t$95$s * If[LessEqual[k, 4e-115], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.5e-6], N[(2.0 / N[(t$95$m * N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.5e+155], N[(N[(l * 2.0), $MachinePrecision] * N[(l / N[(N[(N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(N[(k * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{-115}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot k}{\ell}\right)}^{2} \cdot 2}\\
\mathbf{elif}\;k \leq 4.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{elif}\;k \leq 4.5 \cdot 10^{+155}:\\
\;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\ell}{\left(\left(t\_m \cdot \tan k\right) \cdot \sin k\right) \cdot \left(k \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot 2}{\left(\left(k \cdot \tan k\right) \cdot \left(\sin k \cdot t\_m\right)\right) \cdot k}\\
\end{array}
\end{array}
if k < 4.0000000000000002e-115Initial program 56.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6451.8
Applied rewrites51.8%
Applied rewrites31.0%
Applied rewrites32.1%
if 4.0000000000000002e-115 < k < 4.50000000000000011e-6Initial program 50.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites68.3%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.2%
if 4.50000000000000011e-6 < k < 4.49999999999999973e155Initial program 48.7%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites73.5%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
unpow2N/A
lower-*.f6463.0
Applied rewrites63.0%
Applied rewrites65.0%
Applied rewrites80.6%
if 4.49999999999999973e155 < k Initial program 36.7%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites64.8%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
unpow2N/A
lower-*.f6447.9
Applied rewrites47.9%
Applied rewrites47.9%
Applied rewrites57.9%
Final simplification47.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4e-115)
(/ 2.0 (* (pow (/ (* (pow t_m 1.5) k) l) 2.0) 2.0))
(if (<= k 4.5e-6)
(/
2.0
(*
t_m
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))))
(* (/ (* l 2.0) k) (/ l (* (* k (tan k)) (* (sin 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 <= 4e-115) {
tmp = 2.0 / (pow(((pow(t_m, 1.5) * k) / l), 2.0) * 2.0);
} else if (k <= 4.5e-6) {
tmp = 2.0 / (t_m * (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)));
} else {
tmp = ((l * 2.0) / k) * (l / ((k * tan(k)) * (sin(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 <= 4e-115) tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) * k) / l) ^ 2.0) * 2.0)); elseif (k <= 4.5e-6) tmp = Float64(2.0 / Float64(t_m * Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l))) * Float64(k * k)))); else tmp = Float64(Float64(Float64(l * 2.0) / k) * Float64(l / Float64(Float64(k * tan(k)) * Float64(sin(k) * t_m)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4e-115], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.5e-6], N[(2.0 / N[(t$95$m * N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * 2.0), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(N[(k * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * t$95$m), $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 \cdot 10^{-115}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot k}{\ell}\right)}^{2} \cdot 2}\\
\mathbf{elif}\;k \leq 4.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot 2}{k} \cdot \frac{\ell}{\left(k \cdot \tan k\right) \cdot \left(\sin k \cdot t\_m\right)}\\
\end{array}
\end{array}
if k < 4.0000000000000002e-115Initial program 56.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6451.8
Applied rewrites51.8%
Applied rewrites31.0%
Applied rewrites32.1%
if 4.0000000000000002e-115 < k < 4.50000000000000011e-6Initial program 50.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites68.3%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.2%
if 4.50000000000000011e-6 < k Initial program 43.2%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites69.6%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
unpow2N/A
lower-*.f6456.2
Applied rewrites56.2%
Applied rewrites57.2%
Applied rewrites91.5%
Final simplification52.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 4e-115)
(/ 2.0 (* (pow (/ (* (pow t_m 1.5) k) l) 2.0) 2.0))
(if (<= k 4.5e-6)
(/
2.0
(*
t_m
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))))
(* (* l 2.0) (/ l (* (* (* t_m (tan k)) (sin k)) (* k k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4e-115) {
tmp = 2.0 / (pow(((pow(t_m, 1.5) * k) / l), 2.0) * 2.0);
} else if (k <= 4.5e-6) {
tmp = 2.0 / (t_m * (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)));
} else {
tmp = (l * 2.0) * (l / (((t_m * tan(k)) * sin(k)) * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4e-115) tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) * k) / l) ^ 2.0) * 2.0)); elseif (k <= 4.5e-6) tmp = Float64(2.0 / Float64(t_m * Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l))) * Float64(k * k)))); else tmp = Float64(Float64(l * 2.0) * Float64(l / Float64(Float64(Float64(t_m * tan(k)) * sin(k)) * 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, 4e-115], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.5e-6], N[(2.0 / N[(t$95$m * N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * 2.0), $MachinePrecision] * N[(l / N[(N[(N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * 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 4 \cdot 10^{-115}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot k}{\ell}\right)}^{2} \cdot 2}\\
\mathbf{elif}\;k \leq 4.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\ell}{\left(\left(t\_m \cdot \tan k\right) \cdot \sin k\right) \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 4.0000000000000002e-115Initial program 56.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6451.8
Applied rewrites51.8%
Applied rewrites31.0%
Applied rewrites32.1%
if 4.0000000000000002e-115 < k < 4.50000000000000011e-6Initial program 50.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites68.3%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites91.2%
if 4.50000000000000011e-6 < k Initial program 43.2%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites69.6%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
unpow2N/A
lower-*.f6456.2
Applied rewrites56.2%
Applied rewrites57.2%
Applied rewrites69.8%
Final simplification46.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 (<= t_m 1.02e-54)
(/
2.0
(*
t_m
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))))
(if (<= t_m 1050.0)
(/ 2.0 (* (* (pow t_m 3.0) (pow (/ k l) 2.0)) 2.0))
(* l (/ l (* (pow (* k t_m) 2.0) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.02e-54) {
tmp = 2.0 / (t_m * (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)));
} else if (t_m <= 1050.0) {
tmp = 2.0 / ((pow(t_m, 3.0) * pow((k / l), 2.0)) * 2.0);
} else {
tmp = l * (l / (pow((k * t_m), 2.0) * t_m));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.02e-54) tmp = Float64(2.0 / Float64(t_m * Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l))) * Float64(k * k)))); elseif (t_m <= 1050.0) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * (Float64(k / l) ^ 2.0)) * 2.0)); else tmp = Float64(l * Float64(l / Float64((Float64(k * t_m) ^ 2.0) * t_m))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.02e-54], N[(2.0 / N[(t$95$m * N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1050.0], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1050:\\
\;\;\;\;\frac{2}{\left({t\_m}^{3} \cdot {\left(\frac{k}{\ell}\right)}^{2}\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\
\end{array}
\end{array}
if t < 1.01999999999999999e-54Initial program 42.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites51.8%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.3%
if 1.01999999999999999e-54 < t < 1050Initial program 91.8%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6464.1
Applied rewrites64.1%
Applied rewrites69.7%
Applied rewrites73.4%
if 1050 < t Initial program 74.0%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites56.1%
Taylor expanded in k around 0
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6461.7
Applied rewrites61.7%
Applied rewrites84.7%
Final simplification66.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5e-33)
(/
2.0
(*
t_m
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))))
(/ 2.0 (* (pow (/ (* (pow t_m 1.5) k) l) 2.0) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5e-33) {
tmp = 2.0 / (t_m * (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)));
} else {
tmp = 2.0 / (pow(((pow(t_m, 1.5) * k) / l), 2.0) * 2.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5e-33) tmp = Float64(2.0 / Float64(t_m * Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l))) * Float64(k * k)))); else tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) * k) / l) ^ 2.0) * 2.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5e-33], N[(2.0 / N[(t$95$m * N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5 \cdot 10^{-33}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot k}{\ell}\right)}^{2} \cdot 2}\\
\end{array}
\end{array}
if t < 5.00000000000000028e-33Initial program 44.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites53.3%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.6%
if 5.00000000000000028e-33 < t Initial program 76.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6461.1
Applied rewrites61.1%
Applied rewrites79.7%
Applied rewrites82.6%
Final simplification66.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.02e-54)
(/
2.0
(*
t_m
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))))
(/ 2.0 (* (pow (* (/ (pow t_m 1.5) l) k) 2.0) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.02e-54) {
tmp = 2.0 / (t_m * (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)));
} else {
tmp = 2.0 / (pow(((pow(t_m, 1.5) / l) * k), 2.0) * 2.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.02e-54) tmp = Float64(2.0 / Float64(t_m * Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l))) * Float64(k * k)))); else tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) / l) * k) ^ 2.0) * 2.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.02e-54], N[(2.0 / N[(t$95$m * N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot k\right)}^{2} \cdot 2}\\
\end{array}
\end{array}
if t < 1.01999999999999999e-54Initial program 42.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites51.8%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.3%
if 1.01999999999999999e-54 < t Initial program 78.0%
Taylor expanded in k around 0
*-commutativeN/A
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-pow.f6461.6
Applied rewrites61.6%
Applied rewrites78.6%
Final simplification65.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.7e+14)
(/
2.0
(*
t_m
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))))
(/
2.0
(*
t_m
(*
(* (/ t_m l) (/ t_m l))
(*
(* (fma (+ (pow (* t_m t_m) -1.0) 0.3333333333333333) (* k k) 2.0) k)
k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.7e+14) {
tmp = 2.0 / (t_m * (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)));
} else {
tmp = 2.0 / (t_m * (((t_m / l) * (t_m / l)) * ((fma((pow((t_m * t_m), -1.0) + 0.3333333333333333), (k * k), 2.0) * k) * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.7e+14) tmp = Float64(2.0 / Float64(t_m * Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l))) * Float64(k * k)))); else tmp = Float64(2.0 / Float64(t_m * Float64(Float64(Float64(t_m / l) * Float64(t_m / l)) * Float64(Float64(fma(Float64((Float64(t_m * t_m) ^ -1.0) + 0.3333333333333333), Float64(k * k), 2.0) * 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[t$95$m, 2.7e+14], N[(2.0 / N[(t$95$m * N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[Power[N[(t$95$m * t$95$m), $MachinePrecision], -1.0], $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(k * k), $MachinePrecision] + 2.0), $MachinePrecision] * k), $MachinePrecision] * 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}\;t\_m \leq 2.7 \cdot 10^{+14}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\left(\frac{t\_m}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \left(\left(\mathsf{fma}\left({\left(t\_m \cdot t\_m\right)}^{-1} + 0.3333333333333333, k \cdot k, 2\right) \cdot k\right) \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 2.7e14Initial program 47.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites55.3%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.8%
if 2.7e14 < t Initial program 71.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites69.1%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6479.1
Applied rewrites79.1%
Taylor expanded in k around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6473.5
Applied rewrites73.5%
Final simplification63.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 1.5e-148)
(/ 2.0 (* t_m (* (/ 2.0 l) (/ (* (* (* k k) t_m) t_m) l))))
(/
2.0
(*
t_m
(*
(* (/ t_m l) (/ t_m l))
(*
(* (fma (+ (pow (* t_m t_m) -1.0) 0.3333333333333333) (* k k) 2.0) k)
k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.5e-148) {
tmp = 2.0 / (t_m * ((2.0 / l) * ((((k * k) * t_m) * t_m) / l)));
} else {
tmp = 2.0 / (t_m * (((t_m / l) * (t_m / l)) * ((fma((pow((t_m * t_m), -1.0) + 0.3333333333333333), (k * k), 2.0) * k) * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.5e-148) tmp = Float64(2.0 / Float64(t_m * Float64(Float64(2.0 / l) * Float64(Float64(Float64(Float64(k * k) * t_m) * t_m) / l)))); else tmp = Float64(2.0 / Float64(t_m * Float64(Float64(Float64(t_m / l) * Float64(t_m / l)) * Float64(Float64(fma(Float64((Float64(t_m * t_m) ^ -1.0) + 0.3333333333333333), Float64(k * k), 2.0) * 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[t$95$m, 1.5e-148], N[(2.0 / N[(t$95$m * N[(N[(2.0 / l), $MachinePrecision] * N[(N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[Power[N[(t$95$m * t$95$m), $MachinePrecision], -1.0], $MachinePrecision] + 0.3333333333333333), $MachinePrecision] * N[(k * k), $MachinePrecision] + 2.0), $MachinePrecision] * k), $MachinePrecision] * 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}\;t\_m \leq 1.5 \cdot 10^{-148}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\frac{2}{\ell} \cdot \frac{\left(\left(k \cdot k\right) \cdot t\_m\right) \cdot t\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\left(\frac{t\_m}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \left(\left(\mathsf{fma}\left({\left(t\_m \cdot t\_m\right)}^{-1} + 0.3333333333333333, k \cdot k, 2\right) \cdot k\right) \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 1.49999999999999999e-148Initial program 42.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites51.5%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6460.2
Applied rewrites60.2%
if 1.49999999999999999e-148 < t Initial program 71.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites70.4%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6476.0
Applied rewrites76.0%
Taylor expanded in k around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6465.2
Applied rewrites65.2%
Final simplification61.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 (<= t_m 1.02e-54)
(/
2.0
(*
t_m
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))))
(if (<= t_m 1050.0)
(/ (/ (pow (/ l k) 2.0) (* t_m t_m)) t_m)
(* l (/ l (* (pow (* k t_m) 2.0) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.02e-54) {
tmp = 2.0 / (t_m * (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)));
} else if (t_m <= 1050.0) {
tmp = (pow((l / k), 2.0) / (t_m * t_m)) / t_m;
} else {
tmp = l * (l / (pow((k * t_m), 2.0) * t_m));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.02e-54) tmp = Float64(2.0 / Float64(t_m * Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l))) * Float64(k * k)))); elseif (t_m <= 1050.0) tmp = Float64(Float64((Float64(l / k) ^ 2.0) / Float64(t_m * t_m)) / t_m); else tmp = Float64(l * Float64(l / Float64((Float64(k * t_m) ^ 2.0) * t_m))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.02e-54], N[(2.0 / N[(t$95$m * N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1050.0], N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], N[(l * N[(l / N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-54}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1050:\\
\;\;\;\;\frac{\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t\_m \cdot t\_m}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\
\end{array}
\end{array}
if t < 1.01999999999999999e-54Initial program 42.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites51.8%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.3%
if 1.01999999999999999e-54 < t < 1050Initial program 91.8%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites91.4%
Taylor expanded in k around 0
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6464.1
Applied rewrites64.1%
Applied rewrites73.6%
if 1050 < t Initial program 74.0%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites56.1%
Taylor expanded in k around 0
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6461.7
Applied rewrites61.7%
Applied rewrites84.7%
Final simplification66.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 3.2e+19)
(/ 2.0 (* t_m (* (* (/ 2.0 l) (/ (* t_m t_m) l)) (* k k))))
(* (* 2.0 (* l l)) (/ (pow (* (* k k) t_m) -1.0) (* 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 <= 3.2e+19) {
tmp = 2.0 / (t_m * (((2.0 / l) * ((t_m * t_m) / l)) * (k * k)));
} else {
tmp = (2.0 * (l * l)) * (pow(((k * k) * t_m), -1.0) / (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 <= 3.2d+19) then
tmp = 2.0d0 / (t_m * (((2.0d0 / l) * ((t_m * t_m) / l)) * (k * k)))
else
tmp = (2.0d0 * (l * l)) * ((((k * k) * t_m) ** (-1.0d0)) / (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 <= 3.2e+19) {
tmp = 2.0 / (t_m * (((2.0 / l) * ((t_m * t_m) / l)) * (k * k)));
} else {
tmp = (2.0 * (l * l)) * (Math.pow(((k * k) * t_m), -1.0) / (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 <= 3.2e+19: tmp = 2.0 / (t_m * (((2.0 / l) * ((t_m * t_m) / l)) * (k * k))) else: tmp = (2.0 * (l * l)) * (math.pow(((k * k) * t_m), -1.0) / (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 <= 3.2e+19) tmp = Float64(2.0 / Float64(t_m * Float64(Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l)) * Float64(k * k)))); else tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64((Float64(Float64(k * k) * t_m) ^ -1.0) / 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 <= 3.2e+19) tmp = 2.0 / (t_m * (((2.0 / l) * ((t_m * t_m) / l)) * (k * k))); else tmp = (2.0 * (l * l)) * ((((k * k) * t_m) ^ -1.0) / (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, 3.2e+19], N[(2.0 / N[(t$95$m * N[(N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision], -1.0], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.2 \cdot 10^{+19}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\left(\frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{{\left(\left(k \cdot k\right) \cdot t\_m\right)}^{-1}}{k \cdot k}\\
\end{array}
\end{array}
if k < 3.2e19Initial program 55.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites59.9%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6470.4
Applied rewrites70.4%
Taylor expanded in k around 0
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
associate-*l/N/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6460.7
Applied rewrites60.7%
if 3.2e19 < k Initial program 42.5%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites69.7%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
unpow2N/A
lower-*.f6458.1
Applied rewrites58.1%
Taylor expanded in k around 0
Applied rewrites42.2%
Final simplification56.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.8e+19)
(* (/ (/ l (* k k)) t_m) (/ l (* t_m t_m)))
(* (* 2.0 (* l l)) (/ (pow (* (* k k) t_m) -1.0) (* k k))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.8e+19) {
tmp = ((l / (k * k)) / t_m) * (l / (t_m * t_m));
} else {
tmp = (2.0 * (l * l)) * (pow(((k * k) * t_m), -1.0) / (k * k));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.8d+19) then
tmp = ((l / (k * k)) / t_m) * (l / (t_m * t_m))
else
tmp = (2.0d0 * (l * l)) * ((((k * k) * t_m) ** (-1.0d0)) / (k * k))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.8e+19) {
tmp = ((l / (k * k)) / t_m) * (l / (t_m * t_m));
} else {
tmp = (2.0 * (l * l)) * (Math.pow(((k * k) * t_m), -1.0) / (k * k));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2.8e+19: tmp = ((l / (k * k)) / t_m) * (l / (t_m * t_m)) else: tmp = (2.0 * (l * l)) * (math.pow(((k * k) * t_m), -1.0) / (k * k)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.8e+19) tmp = Float64(Float64(Float64(l / Float64(k * k)) / t_m) * Float64(l / Float64(t_m * t_m))); else tmp = Float64(Float64(2.0 * Float64(l * l)) * Float64((Float64(Float64(k * k) * t_m) ^ -1.0) / Float64(k * k))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2.8e+19) tmp = ((l / (k * k)) / t_m) * (l / (t_m * t_m)); else tmp = (2.0 * (l * l)) * ((((k * k) * t_m) ^ -1.0) / (k * k)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.8e+19], N[(N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision], -1.0], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{+19}:\\
\;\;\;\;\frac{\frac{\ell}{k \cdot k}}{t\_m} \cdot \frac{\ell}{t\_m \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \frac{{\left(\left(k \cdot k\right) \cdot t\_m\right)}^{-1}}{k \cdot k}\\
\end{array}
\end{array}
if k < 2.8e19Initial program 55.3%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites67.2%
Taylor expanded in k around 0
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6456.6
Applied rewrites56.6%
Applied rewrites59.6%
if 2.8e19 < k Initial program 42.5%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites69.7%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
unpow2N/A
lower-*.f6458.1
Applied rewrites58.1%
Taylor expanded in k around 0
Applied rewrites42.2%
Final simplification55.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.1e-11)
(/
2.0
(*
t_m
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))))
(* l (/ l (* (pow (* k t_m) 2.0) t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.1e-11) {
tmp = 2.0 / (t_m * (fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)));
} else {
tmp = l * (l / (pow((k * t_m), 2.0) * t_m));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.1e-11) tmp = Float64(2.0 / Float64(t_m * Float64(fma(Float64(fma(0.3333333333333333, Float64(t_m * t_m), 1.0) / l), Float64(Float64(k * k) / l), Float64(Float64(2.0 / l) * Float64(Float64(t_m * t_m) / l))) * Float64(k * k)))); else tmp = Float64(l * Float64(l / Float64((Float64(k * t_m) ^ 2.0) * t_m))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.1e-11], N[(2.0 / N[(t$95$m * N[(N[(N[(N[(0.3333333333333333 * N[(t$95$m * t$95$m), $MachinePrecision] + 1.0), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] + N[(N[(2.0 / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-11}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(\frac{\mathsf{fma}\left(0.3333333333333333, t\_m \cdot t\_m, 1\right)}{\ell}, \frac{k \cdot k}{\ell}, \frac{2}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right) \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\
\end{array}
\end{array}
if t < 3.10000000000000028e-11Initial program 45.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites53.8%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.5%
if 3.10000000000000028e-11 < t Initial program 75.4%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites59.5%
Taylor expanded in k around 0
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6463.0
Applied rewrites63.0%
Applied rewrites83.3%
Final simplification65.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 (/ 2.0 (* t_m (* (/ 2.0 l) (/ (* (* (* k k) t_m) t_m) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (t_m * ((2.0 / l) * ((((k * k) * t_m) * t_m) / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / (t_m * ((2.0d0 / l) * ((((k * k) * t_m) * t_m) / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (t_m * ((2.0 / l) * ((((k * k) * t_m) * t_m) / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (t_m * ((2.0 / l) * ((((k * k) * t_m) * t_m) / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(t_m * Float64(Float64(2.0 / l) * Float64(Float64(Float64(Float64(k * k) * t_m) * t_m) / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / (t_m * ((2.0 / l) * ((((k * k) * t_m) * t_m) / l)))); 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[(2.0 / N[(t$95$m * N[(N[(2.0 / l), $MachinePrecision] * N[(N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $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 \frac{2}{t\_m \cdot \left(\frac{2}{\ell} \cdot \frac{\left(\left(k \cdot k\right) \cdot t\_m\right) \cdot t\_m}{\ell}\right)}
\end{array}
Initial program 52.3%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites58.0%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6461.1
Applied rewrites61.1%
Final simplification61.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 (* k k)) (* t_m t_m)) (/ l t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (((l / (k * k)) / (t_m * t_m)) * (l / t_m));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (((l / (k * k)) / (t_m * t_m)) * (l / t_m))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (((l / (k * k)) / (t_m * t_m)) * (l / t_m));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (((l / (k * k)) / (t_m * t_m)) * (l / t_m))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(Float64(l / Float64(k * k)) / Float64(t_m * t_m)) * Float64(l / t_m))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (((l / (k * k)) / (t_m * t_m)) * (l / t_m)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\frac{\frac{\ell}{k \cdot k}}{t\_m \cdot t\_m} \cdot \frac{\ell}{t\_m}\right)
\end{array}
Initial program 52.3%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites67.8%
Taylor expanded in k around 0
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6452.5
Applied rewrites52.5%
Applied rewrites55.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 (* (/ (/ l (* k k)) t_m) (/ l (* t_m t_m)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (((l / (k * k)) / t_m) * (l / (t_m * t_m)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (((l / (k * k)) / t_m) * (l / (t_m * t_m)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (((l / (k * k)) / t_m) * (l / (t_m * t_m)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (((l / (k * k)) / t_m) * (l / (t_m * t_m)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(Float64(l / Float64(k * k)) / t_m) * Float64(l / Float64(t_m * t_m)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (((l / (k * k)) / t_m) * (l / (t_m * t_m))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\frac{\frac{\ell}{k \cdot k}}{t\_m} \cdot \frac{\ell}{t\_m \cdot t\_m}\right)
\end{array}
Initial program 52.3%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites67.8%
Taylor expanded in k around 0
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6452.5
Applied rewrites52.5%
Applied rewrites55.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 (* k k)) (/ (/ l t_m) (* t_m t_m)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l / (k * k)) * ((l / t_m) / (t_m * t_m)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l / (k * k)) * ((l / t_m) / (t_m * t_m)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l / (k * k)) * ((l / t_m) / (t_m * t_m)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l / (k * k)) * ((l / t_m) / (t_m * t_m)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l / Float64(k * k)) * Float64(Float64(l / t_m) / Float64(t_m * t_m)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l / (k * k)) * ((l / t_m) / (t_m * t_m))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\frac{\ell}{k \cdot k} \cdot \frac{\frac{\ell}{t\_m}}{t\_m \cdot t\_m}\right)
\end{array}
Initial program 52.3%
Taylor expanded in k around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites67.8%
Taylor expanded in k around 0
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6452.5
Applied rewrites52.5%
Applied rewrites53.7%
herbie shell --seed 2024296
(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))))