
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1e-82)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(if (<= t_m 7.5e+140)
(/
(/ 2.0 t_m)
(*
(fma
(* (* (* (sin k) t_m) t_m) 2.0)
(pow l -2.0)
(* (/ k l) (* (/ (sin k) l) k)))
(tan k)))
(*
(/ (pow t_m -1.0) (* (+ (pow (/ k t_m) 2.0) 2.0) (sin k)))
(/ 2.0 (* (pow (/ t_m l) 2.0) (tan 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 <= 1e-82) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 7.5e+140) {
tmp = (2.0 / t_m) / (fma((((sin(k) * t_m) * t_m) * 2.0), pow(l, -2.0), ((k / l) * ((sin(k) / l) * k))) * tan(k));
} else {
tmp = (pow(t_m, -1.0) / ((pow((k / t_m), 2.0) + 2.0) * sin(k))) * (2.0 / (pow((t_m / l), 2.0) * tan(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 <= 1e-82) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); elseif (t_m <= 7.5e+140) tmp = Float64(Float64(2.0 / t_m) / Float64(fma(Float64(Float64(Float64(sin(k) * t_m) * t_m) * 2.0), (l ^ -2.0), Float64(Float64(k / l) * Float64(Float64(sin(k) / l) * k))) * tan(k))); else tmp = Float64(Float64((t_m ^ -1.0) / Float64(Float64((Float64(k / t_m) ^ 2.0) + 2.0) * sin(k))) * Float64(2.0 / Float64((Float64(t_m / l) ^ 2.0) * tan(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, 1e-82], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.5e+140], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision] + N[(N[(k / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[t$95$m, -1.0], $MachinePrecision] / N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Power[N[(t$95$m / l), $MachinePrecision], 2.0], $MachinePrecision] * N[Tan[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 10^{-82}:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{elif}\;t\_m \leq 7.5 \cdot 10^{+140}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\mathsf{fma}\left(\left(\left(\sin k \cdot t\_m\right) \cdot t\_m\right) \cdot 2, {\ell}^{-2}, \frac{k}{\ell} \cdot \left(\frac{\sin k}{\ell} \cdot k\right)\right) \cdot \tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{{t\_m}^{-1}}{\left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right) \cdot \sin k} \cdot \frac{2}{{\left(\frac{t\_m}{\ell}\right)}^{2} \cdot \tan k}\\
\end{array}
\end{array}
if t < 1e-82Initial program 45.8%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites70.3%
Applied rewrites70.3%
Applied rewrites74.2%
if 1e-82 < t < 7.4999999999999997e140Initial program 75.1%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6454.5
Applied rewrites54.5%
Applied rewrites83.6%
Taylor expanded in t around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites89.5%
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lower-/.f64N/A
lift-pow.f64N/A
unpow-1N/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites95.1%
if 7.4999999999999997e140 < t Initial program 60.7%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6444.9
Applied rewrites44.9%
Applied rewrites91.6%
Final simplification80.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1e-82)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(if (<= t_m 3.2e+140)
(/
(/ 2.0 t_m)
(*
(fma
(* (* (* (sin k) t_m) t_m) 2.0)
(pow l -2.0)
(* (/ k l) (* (/ (sin k) l) k)))
(tan k)))
(*
(/ (pow (/ t_m l) -2.0) (* (+ (pow (/ k t_m) 2.0) 2.0) (sin k)))
(/ (/ 2.0 (tan k)) t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-82) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 3.2e+140) {
tmp = (2.0 / t_m) / (fma((((sin(k) * t_m) * t_m) * 2.0), pow(l, -2.0), ((k / l) * ((sin(k) / l) * k))) * tan(k));
} else {
tmp = (pow((t_m / l), -2.0) / ((pow((k / t_m), 2.0) + 2.0) * sin(k))) * ((2.0 / tan(k)) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1e-82) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); elseif (t_m <= 3.2e+140) tmp = Float64(Float64(2.0 / t_m) / Float64(fma(Float64(Float64(Float64(sin(k) * t_m) * t_m) * 2.0), (l ^ -2.0), Float64(Float64(k / l) * Float64(Float64(sin(k) / l) * k))) * tan(k))); else tmp = Float64(Float64((Float64(t_m / l) ^ -2.0) / Float64(Float64((Float64(k / t_m) ^ 2.0) + 2.0) * sin(k))) * Float64(Float64(2.0 / tan(k)) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-82], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.2e+140], N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision] + N[(N[(k / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(t$95$m / l), $MachinePrecision], -2.0], $MachinePrecision] / N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-82}:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{elif}\;t\_m \leq 3.2 \cdot 10^{+140}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\mathsf{fma}\left(\left(\left(\sin k \cdot t\_m\right) \cdot t\_m\right) \cdot 2, {\ell}^{-2}, \frac{k}{\ell} \cdot \left(\frac{\sin k}{\ell} \cdot k\right)\right) \cdot \tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{t\_m}{\ell}\right)}^{-2}}{\left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right) \cdot \sin k} \cdot \frac{\frac{2}{\tan k}}{t\_m}\\
\end{array}
\end{array}
if t < 1e-82Initial program 45.8%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites70.3%
Applied rewrites70.3%
Applied rewrites74.2%
if 1e-82 < t < 3.20000000000000011e140Initial program 75.1%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6454.5
Applied rewrites54.5%
Applied rewrites83.6%
Taylor expanded in t around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites89.5%
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lower-/.f64N/A
lift-pow.f64N/A
unpow-1N/A
un-div-invN/A
lower-/.f64N/A
Applied rewrites95.1%
if 3.20000000000000011e140 < t Initial program 60.7%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6444.9
Applied rewrites44.9%
Applied rewrites91.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
div-invN/A
lower-*.f64N/A
lift-pow.f64N/A
unpow-1N/A
un-div-invN/A
lower-/.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites91.5%
Final simplification80.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8.5e-82)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(if (<= t_m 6.8e+139)
(/
2.0
(*
(*
(fma
(* (* (* (sin k) t_m) t_m) 2.0)
(pow l -2.0)
(* (/ k l) (* (/ (sin k) l) k)))
t_m)
(tan k)))
(*
(/ (pow (/ t_m l) -2.0) (* (+ (pow (/ k t_m) 2.0) 2.0) (sin k)))
(/ (/ 2.0 (tan k)) t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.5e-82) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 6.8e+139) {
tmp = 2.0 / ((fma((((sin(k) * t_m) * t_m) * 2.0), pow(l, -2.0), ((k / l) * ((sin(k) / l) * k))) * t_m) * tan(k));
} else {
tmp = (pow((t_m / l), -2.0) / ((pow((k / t_m), 2.0) + 2.0) * sin(k))) * ((2.0 / tan(k)) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8.5e-82) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); elseif (t_m <= 6.8e+139) tmp = Float64(2.0 / Float64(Float64(fma(Float64(Float64(Float64(sin(k) * t_m) * t_m) * 2.0), (l ^ -2.0), Float64(Float64(k / l) * Float64(Float64(sin(k) / l) * k))) * t_m) * tan(k))); else tmp = Float64(Float64((Float64(t_m / l) ^ -2.0) / Float64(Float64((Float64(k / t_m) ^ 2.0) + 2.0) * sin(k))) * Float64(Float64(2.0 / tan(k)) / t_m)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.5e-82], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.8e+139], N[(2.0 / N[(N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision] + N[(N[(k / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(t$95$m / l), $MachinePrecision], -2.0], $MachinePrecision] / N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.5 \cdot 10^{-82}:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{elif}\;t\_m \leq 6.8 \cdot 10^{+139}:\\
\;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\left(\left(\sin k \cdot t\_m\right) \cdot t\_m\right) \cdot 2, {\ell}^{-2}, \frac{k}{\ell} \cdot \left(\frac{\sin k}{\ell} \cdot k\right)\right) \cdot t\_m\right) \cdot \tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{t\_m}{\ell}\right)}^{-2}}{\left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right) \cdot \sin k} \cdot \frac{\frac{2}{\tan k}}{t\_m}\\
\end{array}
\end{array}
if t < 8.4999999999999997e-82Initial program 45.8%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites70.3%
Applied rewrites70.3%
Applied rewrites74.2%
if 8.4999999999999997e-82 < t < 6.8000000000000005e139Initial program 75.1%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6454.5
Applied rewrites54.5%
Applied rewrites83.6%
Taylor expanded in t around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites89.5%
Applied rewrites95.1%
if 6.8000000000000005e139 < t Initial program 60.7%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6444.9
Applied rewrites44.9%
Applied rewrites91.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
div-invN/A
lower-*.f64N/A
lift-pow.f64N/A
unpow-1N/A
un-div-invN/A
lower-/.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites91.5%
Final simplification80.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 440.0)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(*
(/ (pow (/ t_m l) -2.0) (* (+ (pow (/ k t_m) 2.0) 2.0) (sin k)))
(/ (/ 2.0 (tan k)) t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 440.0) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else {
tmp = (pow((t_m / l), -2.0) / ((pow((k / t_m), 2.0) + 2.0) * sin(k))) * ((2.0 / tan(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 (t_m <= 440.0d0) then
tmp = 2.0d0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))))
else
tmp = (((t_m / l) ** (-2.0d0)) / ((((k / t_m) ** 2.0d0) + 2.0d0) * sin(k))) * ((2.0d0 / tan(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 (t_m <= 440.0) {
tmp = 2.0 / ((Math.tan(k) / l) * (Math.sin(k) / ((l / k) / (k * t_m))));
} else {
tmp = (Math.pow((t_m / l), -2.0) / ((Math.pow((k / t_m), 2.0) + 2.0) * Math.sin(k))) * ((2.0 / Math.tan(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 t_m <= 440.0: tmp = 2.0 / ((math.tan(k) / l) * (math.sin(k) / ((l / k) / (k * t_m)))) else: tmp = (math.pow((t_m / l), -2.0) / ((math.pow((k / t_m), 2.0) + 2.0) * math.sin(k))) * ((2.0 / math.tan(k)) / t_m) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 440.0) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); else tmp = Float64(Float64((Float64(t_m / l) ^ -2.0) / Float64(Float64((Float64(k / t_m) ^ 2.0) + 2.0) * sin(k))) * Float64(Float64(2.0 / tan(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 (t_m <= 440.0) tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m)))); else tmp = (((t_m / l) ^ -2.0) / ((((k / t_m) ^ 2.0) + 2.0) * sin(k))) * ((2.0 / tan(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[t$95$m, 440.0], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(t$95$m / l), $MachinePrecision], -2.0], $MachinePrecision] / N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 440:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{t\_m}{\ell}\right)}^{-2}}{\left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right) \cdot \sin k} \cdot \frac{\frac{2}{\tan k}}{t\_m}\\
\end{array}
\end{array}
if t < 440Initial program 47.1%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites70.1%
Applied rewrites70.1%
Applied rewrites74.8%
if 440 < t Initial program 69.3%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6451.9
Applied rewrites51.9%
Applied rewrites90.0%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
div-invN/A
lower-*.f64N/A
lift-pow.f64N/A
unpow-1N/A
un-div-invN/A
lower-/.f64N/A
lift-*.f64N/A
lift-pow.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
Applied rewrites90.0%
Final simplification78.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 440.0)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(/
2.0
(*
(*
(* (+ (pow (/ k t_m) 2.0) 2.0) (sin k))
(* (pow (/ t_m l) 2.0) (tan k)))
t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 440.0) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else {
tmp = 2.0 / ((((pow((k / t_m), 2.0) + 2.0) * sin(k)) * (pow((t_m / l), 2.0) * tan(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 (t_m <= 440.0d0) then
tmp = 2.0d0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))))
else
tmp = 2.0d0 / ((((((k / t_m) ** 2.0d0) + 2.0d0) * sin(k)) * (((t_m / l) ** 2.0d0) * tan(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 (t_m <= 440.0) {
tmp = 2.0 / ((Math.tan(k) / l) * (Math.sin(k) / ((l / k) / (k * t_m))));
} else {
tmp = 2.0 / ((((Math.pow((k / t_m), 2.0) + 2.0) * Math.sin(k)) * (Math.pow((t_m / l), 2.0) * Math.tan(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 t_m <= 440.0: tmp = 2.0 / ((math.tan(k) / l) * (math.sin(k) / ((l / k) / (k * t_m)))) else: tmp = 2.0 / ((((math.pow((k / t_m), 2.0) + 2.0) * math.sin(k)) * (math.pow((t_m / l), 2.0) * math.tan(k))) * t_m) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 440.0) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 2.0) * sin(k)) * Float64((Float64(t_m / l) ^ 2.0) * tan(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 (t_m <= 440.0) tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m)))); else tmp = 2.0 / ((((((k / t_m) ^ 2.0) + 2.0) * sin(k)) * (((t_m / l) ^ 2.0) * tan(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[t$95$m, 440.0], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(t$95$m / l), $MachinePrecision], 2.0], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 440:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right) \cdot \sin k\right) \cdot \left({\left(\frac{t\_m}{\ell}\right)}^{2} \cdot \tan k\right)\right) \cdot t\_m}\\
\end{array}
\end{array}
if t < 440Initial program 47.1%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites70.1%
Applied rewrites70.1%
Applied rewrites74.8%
if 440 < t Initial program 69.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 rewrites64.8%
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
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lift-+.f64N/A
metadata-evalN/A
associate-+l+N/A
Applied rewrites86.0%
Final simplification77.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 440.0)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(if (<= t_m 1.34e+154)
(/
2.0
(*
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)
(* (* (/ (* (* t_m t_m) (sin k)) l) (/ t_m l)) (tan k))))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 440.0) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 1.34e+154) {
tmp = 2.0 / (((pow((k / t_m), 2.0) + 1.0) + 1.0) * (((((t_m * t_m) * sin(k)) / l) * (t_m / l)) * tan(k)));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 440.0d0) then
tmp = 2.0d0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))))
else if (t_m <= 1.34d+154) then
tmp = 2.0d0 / (((((k / t_m) ** 2.0d0) + 1.0d0) + 1.0d0) * (((((t_m * t_m) * sin(k)) / l) * (t_m / l)) * tan(k)))
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 440.0) {
tmp = 2.0 / ((Math.tan(k) / l) * (Math.sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 1.34e+154) {
tmp = 2.0 / (((Math.pow((k / t_m), 2.0) + 1.0) + 1.0) * (((((t_m * t_m) * Math.sin(k)) / l) * (t_m / l)) * Math.tan(k)));
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 440.0: tmp = 2.0 / ((math.tan(k) / l) * (math.sin(k) / ((l / k) / (k * t_m)))) elif t_m <= 1.34e+154: tmp = 2.0 / (((math.pow((k / t_m), 2.0) + 1.0) + 1.0) * (((((t_m * t_m) * math.sin(k)) / l) * (t_m / l)) * math.tan(k))) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 440.0) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); elseif (t_m <= 1.34e+154) tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0) * Float64(Float64(Float64(Float64(Float64(t_m * t_m) * sin(k)) / l) * Float64(t_m / l)) * tan(k)))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 440.0) tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m)))); elseif (t_m <= 1.34e+154) tmp = 2.0 / (((((k / t_m) ^ 2.0) + 1.0) + 1.0) * (((((t_m * t_m) * sin(k)) / l) * (t_m / l)) * tan(k))); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 440.0], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.34e+154], N[(2.0 / N[(N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 440:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{elif}\;t\_m \leq 1.34 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right) \cdot \left(\left(\frac{\left(t\_m \cdot t\_m\right) \cdot \sin k}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \tan k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 440Initial program 47.1%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites70.1%
Applied rewrites70.1%
Applied rewrites74.8%
if 440 < t < 1.34000000000000001e154Initial program 78.5%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6494.3
Applied rewrites94.3%
if 1.34000000000000001e154 < t Initial program 59.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites60.5%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6445.1
Applied rewrites45.1%
Applied rewrites88.6%
Final simplification79.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.05e-38)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(if (<= t_m 1.5e+112)
(/
2.0
(/
(*
(* (+ (pow (/ k t_m) 2.0) 2.0) (tan k))
(* (* (* t_m t_m) (/ t_m l)) (sin k)))
l))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 2.05e-38) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 1.5e+112) {
tmp = 2.0 / ((((pow((k / t_m), 2.0) + 2.0) * tan(k)) * (((t_m * t_m) * (t_m / l)) * sin(k))) / l);
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.05d-38) then
tmp = 2.0d0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))))
else if (t_m <= 1.5d+112) then
tmp = 2.0d0 / ((((((k / t_m) ** 2.0d0) + 2.0d0) * tan(k)) * (((t_m * t_m) * (t_m / l)) * sin(k))) / l)
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.05e-38) {
tmp = 2.0 / ((Math.tan(k) / l) * (Math.sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 1.5e+112) {
tmp = 2.0 / ((((Math.pow((k / t_m), 2.0) + 2.0) * Math.tan(k)) * (((t_m * t_m) * (t_m / l)) * Math.sin(k))) / l);
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.05e-38: tmp = 2.0 / ((math.tan(k) / l) * (math.sin(k) / ((l / k) / (k * t_m)))) elif t_m <= 1.5e+112: tmp = 2.0 / ((((math.pow((k / t_m), 2.0) + 2.0) * math.tan(k)) * (((t_m * t_m) * (t_m / l)) * math.sin(k))) / l) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 2.05e-38) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); elseif (t_m <= 1.5e+112) tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 2.0) * tan(k)) * Float64(Float64(Float64(t_m * t_m) * Float64(t_m / l)) * sin(k))) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.05e-38) tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m)))); elseif (t_m <= 1.5e+112) tmp = 2.0 / ((((((k / t_m) ^ 2.0) + 2.0) * tan(k)) * (((t_m * t_m) * (t_m / l)) * sin(k))) / l); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.05e-38], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.5e+112], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 2.05 \cdot 10^{-38}:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{elif}\;t\_m \leq 1.5 \cdot 10^{+112}:\\
\;\;\;\;\frac{2}{\frac{\left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right) \cdot \tan k\right) \cdot \left(\left(\left(t\_m \cdot t\_m\right) \cdot \frac{t\_m}{\ell}\right) \cdot \sin k\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 2.0499999999999999e-38Initial program 46.2%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites69.8%
Applied rewrites69.8%
Applied rewrites74.6%
if 2.0499999999999999e-38 < t < 1.4999999999999999e112Initial program 83.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites90.2%
lift-/.f64N/A
lift-pow.f64N/A
unpow3N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6490.2
Applied rewrites90.2%
if 1.4999999999999999e112 < t Initial program 60.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites61.5%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6449.8
Applied rewrites49.8%
Applied rewrites89.2%
Final simplification79.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.4e-53)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(if (<= t_m 7e+153)
(*
(/
(/ 2.0 t_m)
(*
(/ (* t_m t_m) l)
(* (* (tan k) (sin k)) (+ (pow (/ k t_m) 2.0) 2.0))))
l)
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 4.4e-53) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 7e+153) {
tmp = ((2.0 / t_m) / (((t_m * t_m) / l) * ((tan(k) * sin(k)) * (pow((k / t_m), 2.0) + 2.0)))) * l;
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.4d-53) then
tmp = 2.0d0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))))
else if (t_m <= 7d+153) then
tmp = ((2.0d0 / t_m) / (((t_m * t_m) / l) * ((tan(k) * sin(k)) * (((k / t_m) ** 2.0d0) + 2.0d0)))) * l
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.4e-53) {
tmp = 2.0 / ((Math.tan(k) / l) * (Math.sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 7e+153) {
tmp = ((2.0 / t_m) / (((t_m * t_m) / l) * ((Math.tan(k) * Math.sin(k)) * (Math.pow((k / t_m), 2.0) + 2.0)))) * l;
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.4e-53: tmp = 2.0 / ((math.tan(k) / l) * (math.sin(k) / ((l / k) / (k * t_m)))) elif t_m <= 7e+153: tmp = ((2.0 / t_m) / (((t_m * t_m) / l) * ((math.tan(k) * math.sin(k)) * (math.pow((k / t_m), 2.0) + 2.0)))) * l else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 4.4e-53) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); elseif (t_m <= 7e+153) tmp = Float64(Float64(Float64(2.0 / t_m) / Float64(Float64(Float64(t_m * t_m) / l) * Float64(Float64(tan(k) * sin(k)) * Float64((Float64(k / t_m) ^ 2.0) + 2.0)))) * l); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.4e-53) tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m)))); elseif (t_m <= 7e+153) tmp = ((2.0 / t_m) / (((t_m * t_m) / l) * ((tan(k) * sin(k)) * (((k / t_m) ^ 2.0) + 2.0)))) * l; else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.4e-53], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7e+153], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 4.4 \cdot 10^{-53}:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{elif}\;t\_m \leq 7 \cdot 10^{+153}:\\
\;\;\;\;\frac{\frac{2}{t\_m}}{\frac{t\_m \cdot t\_m}{\ell} \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right)\right)} \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 4.40000000000000037e-53Initial program 45.6%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites70.2%
Applied rewrites70.2%
Applied rewrites74.6%
if 4.40000000000000037e-53 < t < 6.9999999999999998e153Initial program 78.4%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6456.9
Applied rewrites56.9%
Applied rewrites82.7%
if 6.9999999999999998e153 < t Initial program 59.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites60.5%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6445.1
Applied rewrites45.1%
Applied rewrites88.6%
Final simplification77.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 30000000.0)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(if (<= t_m 5.5e+139)
(*
(/ (pow t_m -1.0) (/ (* (fma 2.0 (* t_m t_m) (* k k)) (sin k)) (* l l)))
(/ 2.0 (tan k)))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 30000000.0) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else if (t_m <= 5.5e+139) {
tmp = (pow(t_m, -1.0) / ((fma(2.0, (t_m * t_m), (k * k)) * sin(k)) / (l * l))) * (2.0 / tan(k));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 30000000.0) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); elseif (t_m <= 5.5e+139) tmp = Float64(Float64((t_m ^ -1.0) / Float64(Float64(fma(2.0, Float64(t_m * t_m), Float64(k * k)) * sin(k)) / Float64(l * l))) * Float64(2.0 / tan(k))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * 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_] := N[(t$95$s * If[LessEqual[t$95$m, 30000000.0], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+139], N[(N[(N[Power[t$95$m, -1.0], $MachinePrecision] / N[(N[(N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 30000000:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+139}:\\
\;\;\;\;\frac{{t\_m}^{-1}}{\frac{\mathsf{fma}\left(2, t\_m \cdot t\_m, k \cdot k\right) \cdot \sin k}{\ell \cdot \ell}} \cdot \frac{2}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 3e7Initial program 47.2%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites70.2%
Applied rewrites70.2%
Applied rewrites74.8%
if 3e7 < t < 5.4999999999999996e139Initial program 79.3%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6456.8
Applied rewrites56.8%
Applied rewrites87.9%
Taylor expanded in t around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites93.9%
Taylor expanded in l around 0
Applied rewrites90.8%
if 5.4999999999999996e139 < t Initial program 60.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites61.6%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6446.6
Applied rewrites46.6%
Applied rewrites88.9%
Final simplification78.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 5e+46)
(/ 2.0 (* (/ (pow (sin k) 2.0) (cos k)) (* (/ (* k t_m) l) (/ k l))))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 5e+46) {
tmp = 2.0 / ((pow(sin(k), 2.0) / cos(k)) * (((k * t_m) / l) * (k / l)));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5d+46) then
tmp = 2.0d0 / (((sin(k) ** 2.0d0) / cos(k)) * (((k * t_m) / l) * (k / l)))
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5e+46) {
tmp = 2.0 / ((Math.pow(Math.sin(k), 2.0) / Math.cos(k)) * (((k * t_m) / l) * (k / l)));
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5e+46: tmp = 2.0 / ((math.pow(math.sin(k), 2.0) / math.cos(k)) * (((k * t_m) / l) * (k / l))) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 5e+46) tmp = Float64(2.0 / Float64(Float64((sin(k) ^ 2.0) / cos(k)) * Float64(Float64(Float64(k * t_m) / l) * Float64(k / l)))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5e+46) tmp = 2.0 / (((sin(k) ^ 2.0) / cos(k)) * (((k * t_m) / l) * (k / l))); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5e+46], N[(2.0 / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(k * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 5 \cdot 10^{+46}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\cos k} \cdot \left(\frac{k \cdot t\_m}{\ell} \cdot \frac{k}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 5.0000000000000002e46Initial program 49.6%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites69.2%
Applied rewrites75.4%
if 5.0000000000000002e46 < t Initial program 66.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites66.8%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6457.1
Applied rewrites57.1%
Applied rewrites89.3%
Final simplification78.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8e+20)
(/ 2.0 (* (/ (tan k) l) (/ (sin k) (/ (/ l k) (* k t_m)))))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 8e+20) {
tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 8d+20) then
tmp = 2.0d0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m))))
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8e+20) {
tmp = 2.0 / ((Math.tan(k) / l) * (Math.sin(k) / ((l / k) / (k * t_m))));
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 8e+20: tmp = 2.0 / ((math.tan(k) / l) * (math.sin(k) / ((l / k) / (k * t_m)))) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 8e+20) tmp = Float64(2.0 / Float64(Float64(tan(k) / l) * Float64(sin(k) / Float64(Float64(l / k) / Float64(k * t_m))))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 8e+20) tmp = 2.0 / ((tan(k) / l) * (sin(k) / ((l / k) / (k * t_m)))); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8e+20], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[(l / k), $MachinePrecision] / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 8 \cdot 10^{+20}:\\
\;\;\;\;\frac{2}{\frac{\tan k}{\ell} \cdot \frac{\sin k}{\frac{\frac{\ell}{k}}{k \cdot t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 8e20Initial program 47.8%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites69.0%
Applied rewrites69.0%
Applied rewrites74.0%
if 8e20 < t Initial program 70.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites70.5%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6458.9
Applied rewrites58.9%
Applied rewrites89.0%
Final simplification77.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.6e+20)
(/ 2.0 (* (* (* (/ (sin k) l) k) (* k t_m)) (/ (tan k) l)))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 7.6e+20) {
tmp = 2.0 / ((((sin(k) / l) * k) * (k * t_m)) * (tan(k) / l));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 7.6d+20) then
tmp = 2.0d0 / ((((sin(k) / l) * k) * (k * t_m)) * (tan(k) / l))
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.6e+20) {
tmp = 2.0 / ((((Math.sin(k) / l) * k) * (k * t_m)) * (Math.tan(k) / l));
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 7.6e+20: tmp = 2.0 / ((((math.sin(k) / l) * k) * (k * t_m)) * (math.tan(k) / l)) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 7.6e+20) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(sin(k) / l) * k) * Float64(k * t_m)) * Float64(tan(k) / l))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 7.6e+20) tmp = 2.0 / ((((sin(k) / l) * k) * (k * t_m)) * (tan(k) / l)); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.6e+20], N[(2.0 / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * N[(k * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 7.6 \cdot 10^{+20}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \left(k \cdot t\_m\right)\right) \cdot \frac{\tan k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 7.6e20Initial program 47.8%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites69.0%
Applied rewrites69.0%
Applied rewrites74.0%
if 7.6e20 < t Initial program 70.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites70.5%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6458.9
Applied rewrites58.9%
Applied rewrites89.0%
Final simplification77.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.6e+20)
(/ 2.0 (* (* (* (* (sin k) k) (/ k l)) t_m) (/ (tan k) l)))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 7.6e+20) {
tmp = 2.0 / ((((sin(k) * k) * (k / l)) * t_m) * (tan(k) / l));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 7.6d+20) then
tmp = 2.0d0 / ((((sin(k) * k) * (k / l)) * t_m) * (tan(k) / l))
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.6e+20) {
tmp = 2.0 / ((((Math.sin(k) * k) * (k / l)) * t_m) * (Math.tan(k) / l));
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 7.6e+20: tmp = 2.0 / ((((math.sin(k) * k) * (k / l)) * t_m) * (math.tan(k) / l)) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 7.6e+20) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(sin(k) * k) * Float64(k / l)) * t_m) * Float64(tan(k) / l))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 7.6e+20) tmp = 2.0 / ((((sin(k) * k) * (k / l)) * t_m) * (tan(k) / l)); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.6e+20], N[(2.0 / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 7.6 \cdot 10^{+20}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\sin k \cdot k\right) \cdot \frac{k}{\ell}\right) \cdot t\_m\right) \cdot \frac{\tan k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 7.6e20Initial program 47.8%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites69.0%
Applied rewrites69.0%
Applied rewrites72.6%
if 7.6e20 < t Initial program 70.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites70.5%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6458.9
Applied rewrites58.9%
Applied rewrites89.0%
Final simplification76.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.1e+20)
(* (* (/ l (sin k)) (/ l (* (* k k) t_m))) (/ 2.0 (tan k)))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 2.1e+20) {
tmp = ((l / sin(k)) * (l / ((k * k) * t_m))) * (2.0 / tan(k));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.1d+20) then
tmp = ((l / sin(k)) * (l / ((k * k) * t_m))) * (2.0d0 / tan(k))
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.1e+20) {
tmp = ((l / Math.sin(k)) * (l / ((k * k) * t_m))) * (2.0 / Math.tan(k));
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.1e+20: tmp = ((l / math.sin(k)) * (l / ((k * k) * t_m))) * (2.0 / math.tan(k)) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 2.1e+20) tmp = Float64(Float64(Float64(l / sin(k)) * Float64(l / Float64(Float64(k * k) * t_m))) * Float64(2.0 / tan(k))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.1e+20) tmp = ((l / sin(k)) * (l / ((k * k) * t_m))) * (2.0 / tan(k)); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.1e+20], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 2.1 \cdot 10^{+20}:\\
\;\;\;\;\left(\frac{\ell}{\sin k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot t\_m}\right) \cdot \frac{2}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 2.1e20Initial program 48.1%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6410.2
Applied rewrites10.2%
Applied rewrites73.2%
Taylor expanded in t around 0
unpow2N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6469.4
Applied rewrites69.4%
if 2.1e20 < t Initial program 68.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites69.4%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6458.0
Applied rewrites58.0%
Applied rewrites87.6%
Final simplification73.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 2.1e+20)
(* (* (/ l (* k k)) (/ l (* (sin k) t_m))) (/ 2.0 (tan k)))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 2.1e+20) {
tmp = ((l / (k * k)) * (l / (sin(k) * t_m))) * (2.0 / tan(k));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.1d+20) then
tmp = ((l / (k * k)) * (l / (sin(k) * t_m))) * (2.0d0 / tan(k))
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.1e+20) {
tmp = ((l / (k * k)) * (l / (Math.sin(k) * t_m))) * (2.0 / Math.tan(k));
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.1e+20: tmp = ((l / (k * k)) * (l / (math.sin(k) * t_m))) * (2.0 / math.tan(k)) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 2.1e+20) tmp = Float64(Float64(Float64(l / Float64(k * k)) * Float64(l / Float64(sin(k) * t_m))) * Float64(2.0 / tan(k))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.1e+20) tmp = ((l / (k * k)) * (l / (sin(k) * t_m))) * (2.0 / tan(k)); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.1e+20], N[(N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 2.1 \cdot 10^{+20}:\\
\;\;\;\;\left(\frac{\ell}{k \cdot k} \cdot \frac{\ell}{\sin k \cdot t\_m}\right) \cdot \frac{2}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 2.1e20Initial program 48.1%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6410.2
Applied rewrites10.2%
Applied rewrites73.2%
Taylor expanded in t around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
*-commutativeN/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
Applied rewrites83.8%
Taylor expanded in t around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6468.1
Applied rewrites68.1%
if 2.1e20 < t Initial program 68.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites69.4%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6458.0
Applied rewrites58.0%
Applied rewrites87.6%
Final simplification72.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.65e-38)
(/ 2.0 (* (/ (pow k 4.0) l) (/ t_m l)))
(/ 2.0 (/ (* (* (pow (* k t_m) 2.0) 2.0) (/ 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 (t_m <= 1.65e-38) {
tmp = 2.0 / ((pow(k, 4.0) / l) * (t_m / l));
} else {
tmp = 2.0 / (((pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.65d-38) then
tmp = 2.0d0 / (((k ** 4.0d0) / l) * (t_m / l))
else
tmp = 2.0d0 / (((((k * t_m) ** 2.0d0) * 2.0d0) * (t_m / l)) / l)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.65e-38) {
tmp = 2.0 / ((Math.pow(k, 4.0) / l) * (t_m / l));
} else {
tmp = 2.0 / (((Math.pow((k * t_m), 2.0) * 2.0) * (t_m / l)) / l);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.65e-38: tmp = 2.0 / ((math.pow(k, 4.0) / l) * (t_m / l)) else: tmp = 2.0 / (((math.pow((k * t_m), 2.0) * 2.0) * (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 (t_m <= 1.65e-38) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / l) * Float64(t_m / l))); else tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) * Float64(t_m / l)) / l)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.65e-38) tmp = 2.0 / (((k ^ 4.0) / l) * (t_m / l)); else tmp = 2.0 / (((((k * t_m) ^ 2.0) * 2.0) * (t_m / l)) / l); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.65e-38], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 1.65 \cdot 10^{-38}:\\
\;\;\;\;\frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{t\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left({\left(k \cdot t\_m\right)}^{2} \cdot 2\right) \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 1.6500000000000001e-38Initial program 46.2%
Taylor expanded in t around 0
associate-*r*N/A
times-fracN/A
*-commutativeN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
*-commutativeN/A
unpow2N/A
associate-/r*N/A
lower-/.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites69.8%
Taylor expanded in k around 0
Applied rewrites58.5%
if 1.6500000000000001e-38 < t Initial program 70.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites73.0%
Taylor expanded in k around 0
associate-*r/N/A
unpow2N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f6457.3
Applied rewrites57.3%
Applied rewrites82.7%
Final simplification65.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.2e-94)
(/
2.0
(*
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))
t_m))
(/ 1.0 (* (pow (* (/ t_m l) k) 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 <= 7.2e-94) {
tmp = 2.0 / ((fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)) * t_m);
} else {
tmp = 1.0 / (pow(((t_m / l) * k), 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 <= 7.2e-94) tmp = Float64(2.0 / Float64(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)) * t_m)); else tmp = Float64(1.0 / Float64((Float64(Float64(t_m / l) * k) ^ 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, 7.2e-94], N[(2.0 / N[(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] * t$95$m), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.2 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{\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) \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{{\left(\frac{t\_m}{\ell} \cdot k\right)}^{2} \cdot t\_m}\\
\end{array}
\end{array}
if t < 7.2e-94Initial program 45.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 rewrites54.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites64.5%
if 7.2e-94 < t Initial program 67.8%
lift-/.f64N/A
lift-pow.f64N/A
pow-to-expN/A
lift-*.f64N/A
pow2N/A
pow-to-expN/A
div-expN/A
lower-exp.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f6449.2
Applied rewrites49.2%
Taylor expanded in k around 0
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
exp-diffN/A
*-commutativeN/A
exp-to-powN/A
*-commutativeN/A
exp-to-powN/A
lower-/.f64N/A
lower-pow.f64N/A
unpow2N/A
lower-*.f6456.5
Applied rewrites56.5%
Applied rewrites81.6%
Final simplification70.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8e-94)
(/
2.0
(*
(*
(fma
(/ (fma 0.3333333333333333 (* t_m t_m) 1.0) l)
(/ (* k k) l)
(* (/ 2.0 l) (/ (* t_m t_m) l)))
(* k k))
t_m))
(/ 2.0 (* (/ k (/ l t_m)) (/ (* k 2.0) (/ 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) {
double tmp;
if (t_m <= 8e-94) {
tmp = 2.0 / ((fma((fma(0.3333333333333333, (t_m * t_m), 1.0) / l), ((k * k) / l), ((2.0 / l) * ((t_m * t_m) / l))) * (k * k)) * t_m);
} else {
tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * 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 <= 8e-94) tmp = Float64(2.0 / Float64(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)) * t_m)); else tmp = Float64(2.0 / Float64(Float64(k / Float64(l / t_m)) * Float64(Float64(k * 2.0) / Float64(l / Float64(t_m * 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, 8e-94], N[(2.0 / N[(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] * t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(k * 2.0), $MachinePrecision] / N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{\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) \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{k}{\frac{\ell}{t\_m}} \cdot \frac{k \cdot 2}{\frac{\ell}{t\_m \cdot t\_m}}}\\
\end{array}
\end{array}
if t < 7.9999999999999996e-94Initial program 45.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 rewrites54.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites64.5%
if 7.9999999999999996e-94 < t Initial program 67.8%
Taylor expanded in k around 0
associate-/l*N/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.f6458.0
Applied rewrites58.0%
Applied rewrites71.7%
Final simplification67.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 1.9e-18)
(/ 2.0 (* (/ k (/ l t_m)) (/ (* k 2.0) (/ l (* t_m t_m)))))
(/ 2.0 (* (* (* (* (/ (* k k) l) t_m) 2.0) (/ 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) {
double tmp;
if (k <= 1.9e-18) {
tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m))));
} else {
tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * 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.9d-18) then
tmp = 2.0d0 / ((k / (l / t_m)) * ((k * 2.0d0) / (l / (t_m * t_m))))
else
tmp = 2.0d0 / ((((((k * k) / l) * t_m) * 2.0d0) * (t_m / l)) * 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.9e-18) {
tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m))));
} else {
tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * 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.9e-18: tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m)))) else: tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * 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.9e-18) tmp = Float64(2.0 / Float64(Float64(k / Float64(l / t_m)) * Float64(Float64(k * 2.0) / Float64(l / Float64(t_m * t_m))))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(k * k) / l) * t_m) * 2.0) * Float64(t_m / l)) * 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.9e-18) tmp = 2.0 / ((k / (l / t_m)) * ((k * 2.0) / (l / (t_m * t_m)))); else tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * 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.9e-18], N[(2.0 / N[(N[(k / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(k * 2.0), $MachinePrecision] / N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.9 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\frac{k}{\frac{\ell}{t\_m}} \cdot \frac{k \cdot 2}{\frac{\ell}{t\_m \cdot t\_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\frac{k \cdot k}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot \frac{t\_m}{\ell}\right) \cdot t\_m}\\
\end{array}
\end{array}
if k < 1.8999999999999999e-18Initial program 54.3%
Taylor expanded in k around 0
associate-/l*N/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.f6453.1
Applied rewrites53.1%
Applied rewrites64.3%
if 1.8999999999999999e-18 < k Initial program 50.2%
Taylor expanded in k around 0
associate-/l*N/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.f6448.7
Applied rewrites48.7%
Applied rewrites47.9%
Applied rewrites54.2%
Applied rewrites64.2%
Final simplification64.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 1e+132)
(/ 2.0 (* (* (* (* (/ (* k k) l) t_m) 2.0) (/ t_m l)) t_m))
(/ 2.0 (* (* (* (* k k) 2.0) (* (/ t_m l) 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) {
double tmp;
if ((l * l) <= 1e+132) {
tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * t_m);
} else {
tmp = 2.0 / ((((k * k) * 2.0) * ((t_m / l) * t_m)) * (t_m / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 1d+132) then
tmp = 2.0d0 / ((((((k * k) / l) * t_m) * 2.0d0) * (t_m / l)) * t_m)
else
tmp = 2.0d0 / ((((k * k) * 2.0d0) * ((t_m / l) * t_m)) * (t_m / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e+132) {
tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * t_m);
} else {
tmp = 2.0 / ((((k * k) * 2.0) * ((t_m / l) * t_m)) * (t_m / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 1e+132: tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * t_m) else: tmp = 2.0 / ((((k * k) * 2.0) * ((t_m / l) * t_m)) * (t_m / 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 (Float64(l * l) <= 1e+132) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(k * k) / l) * t_m) * 2.0) * Float64(t_m / l)) * t_m)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * 2.0) * Float64(Float64(t_m / l) * t_m)) * Float64(t_m / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 1e+132) tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * t_m); else tmp = 2.0 / ((((k * k) * 2.0) * ((t_m / l) * t_m)) * (t_m / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e+132], N[(2.0 / N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $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}\;\ell \cdot \ell \leq 10^{+132}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\frac{k \cdot k}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot \frac{t\_m}{\ell}\right) \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(k \cdot k\right) \cdot 2\right) \cdot \left(\frac{t\_m}{\ell} \cdot t\_m\right)\right) \cdot \frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if (*.f64 l l) < 9.99999999999999991e131Initial program 62.0%
Taylor expanded in k around 0
associate-/l*N/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.f6457.5
Applied rewrites57.5%
Applied rewrites55.4%
Applied rewrites61.4%
Applied rewrites70.1%
if 9.99999999999999991e131 < (*.f64 l l) Initial program 38.0%
Taylor expanded in k around 0
associate-/l*N/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.f6442.1
Applied rewrites42.1%
Applied rewrites41.3%
Applied rewrites50.7%
Applied rewrites50.9%
Final simplification63.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 (<= (* l l) 4e+171)
(/ 2.0 (* (* (* (* (/ (* k k) l) t_m) 2.0) (/ t_m l)) t_m))
(/ 2.0 (* (* (* (/ t_m l) t_m) (/ t_m l)) (* (* k k) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 4e+171) {
tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * t_m);
} else {
tmp = 2.0 / ((((t_m / l) * t_m) * (t_m / l)) * ((k * k) * 2.0));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 4d+171) then
tmp = 2.0d0 / ((((((k * k) / l) * t_m) * 2.0d0) * (t_m / l)) * t_m)
else
tmp = 2.0d0 / ((((t_m / l) * t_m) * (t_m / l)) * ((k * k) * 2.0d0))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 4e+171) {
tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * t_m);
} else {
tmp = 2.0 / ((((t_m / l) * t_m) * (t_m / l)) * ((k * k) * 2.0));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 4e+171: tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * t_m) else: tmp = 2.0 / ((((t_m / l) * t_m) * (t_m / l)) * ((k * k) * 2.0)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 4e+171) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(k * k) / l) * t_m) * 2.0) * Float64(t_m / l)) * t_m)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * t_m) * Float64(t_m / l)) * Float64(Float64(k * k) * 2.0))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 4e+171) tmp = 2.0 / ((((((k * k) / l) * t_m) * 2.0) * (t_m / l)) * t_m); else tmp = 2.0 / ((((t_m / l) * t_m) * (t_m / l)) * ((k * k) * 2.0)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 4e+171], N[(2.0 / N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 4 \cdot 10^{+171}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\frac{k \cdot k}{\ell} \cdot t\_m\right) \cdot 2\right) \cdot \frac{t\_m}{\ell}\right) \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot t\_m\right) \cdot \frac{t\_m}{\ell}\right) \cdot \left(\left(k \cdot k\right) \cdot 2\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 3.99999999999999982e171Initial program 60.7%
Taylor expanded in k around 0
associate-/l*N/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.f6456.4
Applied rewrites56.4%
Applied rewrites54.4%
Applied rewrites60.1%
Applied rewrites68.5%
if 3.99999999999999982e171 < (*.f64 l l) Initial program 38.6%
Taylor expanded in k around 0
associate-/l*N/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.f6443.0
Applied rewrites43.0%
Applied rewrites42.2%
Applied rewrites52.3%
Final simplification63.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (* k k) 2.0)))
(*
t_s
(if (<= k 1.12e-10)
(/ 2.0 (* (* (* (/ t_m l) t_m) (/ t_m l)) t_2))
(/ 2.0 (* (* t_2 (* (/ t_m (* l 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) {
double t_2 = (k * k) * 2.0;
double tmp;
if (k <= 1.12e-10) {
tmp = 2.0 / ((((t_m / l) * t_m) * (t_m / l)) * t_2);
} else {
tmp = 2.0 / ((t_2 * ((t_m / (l * l)) * t_m)) * 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) :: t_2
real(8) :: tmp
t_2 = (k * k) * 2.0d0
if (k <= 1.12d-10) then
tmp = 2.0d0 / ((((t_m / l) * t_m) * (t_m / l)) * t_2)
else
tmp = 2.0d0 / ((t_2 * ((t_m / (l * l)) * t_m)) * 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 t_2 = (k * k) * 2.0;
double tmp;
if (k <= 1.12e-10) {
tmp = 2.0 / ((((t_m / l) * t_m) * (t_m / l)) * t_2);
} else {
tmp = 2.0 / ((t_2 * ((t_m / (l * l)) * t_m)) * 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): t_2 = (k * k) * 2.0 tmp = 0 if k <= 1.12e-10: tmp = 2.0 / ((((t_m / l) * t_m) * (t_m / l)) * t_2) else: tmp = 2.0 / ((t_2 * ((t_m / (l * l)) * t_m)) * t_m) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64(k * k) * 2.0) tmp = 0.0 if (k <= 1.12e-10) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * t_m) * Float64(t_m / l)) * t_2)); else tmp = Float64(2.0 / Float64(Float64(t_2 * Float64(Float64(t_m / Float64(l * l)) * t_m)) * 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) t_2 = (k * k) * 2.0; tmp = 0.0; if (k <= 1.12e-10) tmp = 2.0 / ((((t_m / l) * t_m) * (t_m / l)) * t_2); else tmp = 2.0 / ((t_2 * ((t_m / (l * l)) * t_m)) * 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_] := Block[{t$95$2 = N[(N[(k * k), $MachinePrecision] * 2.0), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.12e-10], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$2 * N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \left(k \cdot k\right) \cdot 2\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.12 \cdot 10^{-10}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{t\_m}{\ell} \cdot t\_m\right) \cdot \frac{t\_m}{\ell}\right) \cdot t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(t\_2 \cdot \left(\frac{t\_m}{\ell \cdot \ell} \cdot t\_m\right)\right) \cdot t\_m}\\
\end{array}
\end{array}
\end{array}
if k < 1.12e-10Initial program 54.1%
Taylor expanded in k around 0
associate-/l*N/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.f6452.8
Applied rewrites52.8%
Applied rewrites50.9%
Applied rewrites58.9%
if 1.12e-10 < k Initial program 51.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 rewrites58.4%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6464.0
Applied rewrites64.0%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6459.8
Applied rewrites59.8%
Final simplification59.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 (/ 2.0 (* (* (* (* k k) 2.0) (* (/ t_m (* l 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 * (2.0 / ((((k * k) * 2.0) * ((t_m / (l * 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 * (2.0d0 / ((((k * k) * 2.0d0) * ((t_m / (l * 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 * (2.0 / ((((k * k) * 2.0) * ((t_m / (l * 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 * (2.0 / ((((k * k) * 2.0) * ((t_m / (l * 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(2.0 / Float64(Float64(Float64(Float64(k * k) * 2.0) * Float64(Float64(t_m / Float64(l * l)) * 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 * (2.0 / ((((k * k) * 2.0) * ((t_m / (l * 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[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(\left(\left(k \cdot k\right) \cdot 2\right) \cdot \left(\frac{t\_m}{\ell \cdot \ell} \cdot t\_m\right)\right) \cdot t\_m}
\end{array}
Initial program 53.2%
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 rewrites57.6%
lift-/.f64N/A
lift-/.f64N/A
associate-/l/N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6458.9
Applied rewrites58.9%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.7
Applied rewrites56.7%
Final simplification56.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* (/ t_m (* l l)) (* t_m t_m)) (* (* k k) 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((t_m / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0)));
}
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 / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0d0)))
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 / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0)));
}
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 / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0)))
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(Float64(Float64(t_m / Float64(l * l)) * Float64(t_m * t_m)) * Float64(Float64(k * k) * 2.0)))) 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 / (l * l)) * (t_m * t_m)) * ((k * k) * 2.0))); 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[(N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(\frac{t\_m}{\ell \cdot \ell} \cdot \left(t\_m \cdot t\_m\right)\right) \cdot \left(\left(k \cdot k\right) \cdot 2\right)}
\end{array}
Initial program 53.2%
Taylor expanded in k around 0
associate-/l*N/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.9
Applied rewrites51.9%
Applied rewrites50.2%
Final simplification50.2%
herbie shell --seed 2024276
(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))))