
(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 16 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 5.2e+25)
(/
2.0
(fma
(/ (* (* (/ (* (sin k) k) l) (tan k)) t_m) l)
k
(* (* (/ (pow t_m 3.0) l) (/ (pow (sin k) 2.0) l)) (/ 2.0 (cos k)))))
(if (<= t_m 7.2e+106)
(/
2.0
(*
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)
(/ (* (* (/ (sin k) l) (pow t_m 3.0)) (tan k)) l)))
(/ (/ l (pow (* k t_m) 2.0)) (/ 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 (t_m <= 5.2e+25) {
tmp = 2.0 / fma((((((sin(k) * k) / l) * tan(k)) * t_m) / l), k, (((pow(t_m, 3.0) / l) * (pow(sin(k), 2.0) / l)) * (2.0 / cos(k))));
} else if (t_m <= 7.2e+106) {
tmp = 2.0 / (((pow((k / t_m), 2.0) + 1.0) + 1.0) * ((((sin(k) / l) * pow(t_m, 3.0)) * tan(k)) / l));
} else {
tmp = (l / pow((k * t_m), 2.0)) / (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 (t_m <= 5.2e+25) tmp = Float64(2.0 / fma(Float64(Float64(Float64(Float64(Float64(sin(k) * k) / l) * tan(k)) * t_m) / l), k, Float64(Float64(Float64((t_m ^ 3.0) / l) * Float64((sin(k) ^ 2.0) / l)) * Float64(2.0 / cos(k))))); elseif (t_m <= 7.2e+106) tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0) * Float64(Float64(Float64(Float64(sin(k) / l) * (t_m ^ 3.0)) * tan(k)) / l))); else tmp = Float64(Float64(l / (Float64(k * t_m) ^ 2.0)) / Float64(t_m / 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, 5.2e+25], N[(2.0 / N[(N[(N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] * k + N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e+106], 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[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m / 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.2 \cdot 10^{+25}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{\left(\frac{\sin k \cdot k}{\ell} \cdot \tan k\right) \cdot t\_m}{\ell}, k, \left(\frac{{t\_m}^{3}}{\ell} \cdot \frac{{\sin k}^{2}}{\ell}\right) \cdot \frac{2}{\cos k}\right)}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{2}{\left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right) \cdot \frac{\left(\frac{\sin k}{\ell} \cdot {t\_m}^{3}\right) \cdot \tan k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{{\left(k \cdot t\_m\right)}^{2}}}{\frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 5.1999999999999997e25Initial program 42.2%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
*-commutativeN/A
associate-*l/N/A
lift-/.f64N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6446.1
Applied rewrites46.1%
Taylor expanded in t around inf
Applied rewrites72.6%
Applied rewrites81.0%
Applied rewrites83.1%
if 5.1999999999999997e25 < t < 7.2000000000000002e106Initial program 73.0%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
*-commutativeN/A
associate-*l/N/A
lift-/.f64N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6495.9
Applied rewrites95.9%
if 7.2000000000000002e106 < t Initial program 58.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6458.6
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6458.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.6
lift-*.f64N/A
Applied rewrites58.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6452.6
Applied rewrites52.6%
Applied rewrites52.6%
Applied rewrites60.4%
Applied rewrites82.6%
Final simplification84.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.5e-13)
(/ 2.0 (* (* (/ t_m l) k) (* (/ (* (sin k) k) l) (tan k))))
(if (<= t_m 7.2e+106)
(/
2.0
(*
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)
(/ (* (* (/ (sin k) l) (pow t_m 3.0)) (tan k)) l)))
(/ (/ l (pow (* k t_m) 2.0)) (/ 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 (t_m <= 5.5e-13) {
tmp = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)));
} else if (t_m <= 7.2e+106) {
tmp = 2.0 / (((pow((k / t_m), 2.0) + 1.0) + 1.0) * ((((sin(k) / l) * pow(t_m, 3.0)) * tan(k)) / l));
} else {
tmp = (l / pow((k * t_m), 2.0)) / (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 (t_m <= 5.5d-13) then
tmp = 2.0d0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)))
else if (t_m <= 7.2d+106) then
tmp = 2.0d0 / (((((k / t_m) ** 2.0d0) + 1.0d0) + 1.0d0) * ((((sin(k) / l) * (t_m ** 3.0d0)) * tan(k)) / l))
else
tmp = (l / ((k * t_m) ** 2.0d0)) / (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 (t_m <= 5.5e-13) {
tmp = 2.0 / (((t_m / l) * k) * (((Math.sin(k) * k) / l) * Math.tan(k)));
} else if (t_m <= 7.2e+106) {
tmp = 2.0 / (((Math.pow((k / t_m), 2.0) + 1.0) + 1.0) * ((((Math.sin(k) / l) * Math.pow(t_m, 3.0)) * Math.tan(k)) / l));
} else {
tmp = (l / Math.pow((k * t_m), 2.0)) / (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 t_m <= 5.5e-13: tmp = 2.0 / (((t_m / l) * k) * (((math.sin(k) * k) / l) * math.tan(k))) elif t_m <= 7.2e+106: tmp = 2.0 / (((math.pow((k / t_m), 2.0) + 1.0) + 1.0) * ((((math.sin(k) / l) * math.pow(t_m, 3.0)) * math.tan(k)) / l)) else: tmp = (l / math.pow((k * t_m), 2.0)) / (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 (t_m <= 5.5e-13) tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * k) * Float64(Float64(Float64(sin(k) * k) / l) * tan(k)))); elseif (t_m <= 7.2e+106) tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0) * Float64(Float64(Float64(Float64(sin(k) / l) * (t_m ^ 3.0)) * tan(k)) / l))); else tmp = Float64(Float64(l / (Float64(k * t_m) ^ 2.0)) / 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 (t_m <= 5.5e-13) tmp = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k))); elseif (t_m <= 7.2e+106) tmp = 2.0 / (((((k / t_m) ^ 2.0) + 1.0) + 1.0) * ((((sin(k) / l) * (t_m ^ 3.0)) * tan(k)) / l)); else tmp = (l / ((k * t_m) ^ 2.0)) / (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[t$95$m, 5.5e-13], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e+106], 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[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m / 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.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot k\right) \cdot \left(\frac{\sin k \cdot k}{\ell} \cdot \tan k\right)}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{2}{\left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right) \cdot \frac{\left(\frac{\sin k}{\ell} \cdot {t\_m}^{3}\right) \cdot \tan k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{{\left(k \cdot t\_m\right)}^{2}}}{\frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 5.49999999999999979e-13Initial program 42.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%
Taylor expanded in t around 0
associate-/l*N/A
times-fracN/A
associate-*r*N/A
*-rgt-identityN/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.7%
Applied rewrites64.0%
Applied rewrites78.1%
if 5.49999999999999979e-13 < t < 7.2000000000000002e106Initial program 71.3%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
*-commutativeN/A
associate-*l/N/A
lift-/.f64N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6492.7
Applied rewrites92.7%
if 7.2000000000000002e106 < t Initial program 58.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6458.6
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6458.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.6
lift-*.f64N/A
Applied rewrites58.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6452.6
Applied rewrites52.6%
Applied rewrites52.6%
Applied rewrites60.4%
Applied rewrites82.6%
Final simplification80.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.6e-13)
(/ 2.0 (* (* (/ t_m l) k) (* (/ (* (sin k) k) l) (tan k))))
(if (<= t_m 6.2e+127)
(/
2.0
(*
(* (* (+ (pow (/ k t_m) 2.0) 2.0) (tan k)) (* (/ (sin k) l) t_m))
(/ (* t_m t_m) l)))
(* (/ l t_m) (/ l (pow (* k t_m) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.6e-13) {
tmp = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)));
} else if (t_m <= 6.2e+127) {
tmp = 2.0 / ((((pow((k / t_m), 2.0) + 2.0) * tan(k)) * ((sin(k) / l) * t_m)) * ((t_m * t_m) / l));
} else {
tmp = (l / t_m) * (l / pow((k * t_m), 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 (t_m <= 2.6d-13) then
tmp = 2.0d0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)))
else if (t_m <= 6.2d+127) then
tmp = 2.0d0 / ((((((k / t_m) ** 2.0d0) + 2.0d0) * tan(k)) * ((sin(k) / l) * t_m)) * ((t_m * t_m) / l))
else
tmp = (l / t_m) * (l / ((k * t_m) ** 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 (t_m <= 2.6e-13) {
tmp = 2.0 / (((t_m / l) * k) * (((Math.sin(k) * k) / l) * Math.tan(k)));
} else if (t_m <= 6.2e+127) {
tmp = 2.0 / ((((Math.pow((k / t_m), 2.0) + 2.0) * Math.tan(k)) * ((Math.sin(k) / l) * t_m)) * ((t_m * t_m) / l));
} else {
tmp = (l / t_m) * (l / Math.pow((k * t_m), 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 t_m <= 2.6e-13: tmp = 2.0 / (((t_m / l) * k) * (((math.sin(k) * k) / l) * math.tan(k))) elif t_m <= 6.2e+127: tmp = 2.0 / ((((math.pow((k / t_m), 2.0) + 2.0) * math.tan(k)) * ((math.sin(k) / l) * t_m)) * ((t_m * t_m) / l)) else: tmp = (l / t_m) * (l / math.pow((k * t_m), 2.0)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.6e-13) tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * k) * Float64(Float64(Float64(sin(k) * k) / l) * tan(k)))); elseif (t_m <= 6.2e+127) tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 2.0) * tan(k)) * Float64(Float64(sin(k) / l) * t_m)) * Float64(Float64(t_m * t_m) / l))); else tmp = Float64(Float64(l / t_m) * Float64(l / (Float64(k * t_m) ^ 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 (t_m <= 2.6e-13) tmp = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k))); elseif (t_m <= 6.2e+127) tmp = 2.0 / ((((((k / t_m) ^ 2.0) + 2.0) * tan(k)) * ((sin(k) / l) * t_m)) * ((t_m * t_m) / l)); else tmp = (l / t_m) * (l / ((k * t_m) ^ 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[t$95$m, 2.6e-13], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.2e+127], 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[Sin[k], $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(l / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.6 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot k\right) \cdot \left(\frac{\sin k \cdot k}{\ell} \cdot \tan k\right)}\\
\mathbf{elif}\;t\_m \leq 6.2 \cdot 10^{+127}:\\
\;\;\;\;\frac{2}{\left(\left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 2\right) \cdot \tan k\right) \cdot \left(\frac{\sin k}{\ell} \cdot t\_m\right)\right) \cdot \frac{t\_m \cdot t\_m}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{{\left(k \cdot t\_m\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.6e-13Initial program 42.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%
Taylor expanded in t around 0
associate-/l*N/A
times-fracN/A
associate-*r*N/A
*-rgt-identityN/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.7%
Applied rewrites64.0%
Applied rewrites78.1%
if 2.6e-13 < t < 6.2000000000000005e127Initial program 65.1%
lift-/.f64N/A
lift-pow.f64N/A
unpow3N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6482.2
Applied rewrites82.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites88.2%
if 6.2000000000000005e127 < t Initial program 61.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6461.7
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6461.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6461.7
lift-*.f64N/A
Applied rewrites61.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.7
Applied rewrites54.7%
Applied rewrites54.7%
Applied rewrites61.3%
Applied rewrites86.6%
Final simplification80.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ 2.0 (* (* (/ t_m l) k) (* (/ (* (sin k) k) l) (tan k))))))
(*
t_s
(if (<= t_m 1.8e-11)
t_2
(if (<= t_m 5.8e+60)
(/ 2.0 (* 2.0 (/ (* (* (/ (sin k) l) (pow t_m 3.0)) (tan k)) l)))
(if (<= t_m 1.3e+82) t_2 (/ (/ l (pow (* k t_m) 2.0)) (/ 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 t_2 = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)));
double tmp;
if (t_m <= 1.8e-11) {
tmp = t_2;
} else if (t_m <= 5.8e+60) {
tmp = 2.0 / (2.0 * ((((sin(k) / l) * pow(t_m, 3.0)) * tan(k)) / l));
} else if (t_m <= 1.3e+82) {
tmp = t_2;
} else {
tmp = (l / pow((k * t_m), 2.0)) / (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) :: t_2
real(8) :: tmp
t_2 = 2.0d0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)))
if (t_m <= 1.8d-11) then
tmp = t_2
else if (t_m <= 5.8d+60) then
tmp = 2.0d0 / (2.0d0 * ((((sin(k) / l) * (t_m ** 3.0d0)) * tan(k)) / l))
else if (t_m <= 1.3d+82) then
tmp = t_2
else
tmp = (l / ((k * t_m) ** 2.0d0)) / (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 t_2 = 2.0 / (((t_m / l) * k) * (((Math.sin(k) * k) / l) * Math.tan(k)));
double tmp;
if (t_m <= 1.8e-11) {
tmp = t_2;
} else if (t_m <= 5.8e+60) {
tmp = 2.0 / (2.0 * ((((Math.sin(k) / l) * Math.pow(t_m, 3.0)) * Math.tan(k)) / l));
} else if (t_m <= 1.3e+82) {
tmp = t_2;
} else {
tmp = (l / Math.pow((k * t_m), 2.0)) / (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): t_2 = 2.0 / (((t_m / l) * k) * (((math.sin(k) * k) / l) * math.tan(k))) tmp = 0 if t_m <= 1.8e-11: tmp = t_2 elif t_m <= 5.8e+60: tmp = 2.0 / (2.0 * ((((math.sin(k) / l) * math.pow(t_m, 3.0)) * math.tan(k)) / l)) elif t_m <= 1.3e+82: tmp = t_2 else: tmp = (l / math.pow((k * t_m), 2.0)) / (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) t_2 = Float64(2.0 / Float64(Float64(Float64(t_m / l) * k) * Float64(Float64(Float64(sin(k) * k) / l) * tan(k)))) tmp = 0.0 if (t_m <= 1.8e-11) tmp = t_2; elseif (t_m <= 5.8e+60) tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(Float64(Float64(sin(k) / l) * (t_m ^ 3.0)) * tan(k)) / l))); elseif (t_m <= 1.3e+82) tmp = t_2; else tmp = Float64(Float64(l / (Float64(k * t_m) ^ 2.0)) / 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) t_2 = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k))); tmp = 0.0; if (t_m <= 1.8e-11) tmp = t_2; elseif (t_m <= 5.8e+60) tmp = 2.0 / (2.0 * ((((sin(k) / l) * (t_m ^ 3.0)) * tan(k)) / l)); elseif (t_m <= 1.3e+82) tmp = t_2; else tmp = (l / ((k * t_m) ^ 2.0)) / (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_] := Block[{t$95$2 = N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.8e-11], t$95$2, If[LessEqual[t$95$m, 5.8e+60], N[(2.0 / N[(2.0 * N[(N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.3e+82], t$95$2, N[(N[(l / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{2}{\left(\frac{t\_m}{\ell} \cdot k\right) \cdot \left(\frac{\sin k \cdot k}{\ell} \cdot \tan k\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.8 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 5.8 \cdot 10^{+60}:\\
\;\;\;\;\frac{2}{2 \cdot \frac{\left(\frac{\sin k}{\ell} \cdot {t\_m}^{3}\right) \cdot \tan k}{\ell}}\\
\mathbf{elif}\;t\_m \leq 1.3 \cdot 10^{+82}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{{\left(k \cdot t\_m\right)}^{2}}}{\frac{t\_m}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 1.79999999999999992e-11 or 5.79999999999999999e60 < t < 1.2999999999999999e82Initial program 42.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.5
Applied rewrites10.5%
Taylor expanded in t around 0
associate-/l*N/A
times-fracN/A
associate-*r*N/A
*-rgt-identityN/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.0%
Applied rewrites63.3%
Applied rewrites78.7%
if 1.79999999999999992e-11 < t < 5.79999999999999999e60Initial program 78.7%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
*-commutativeN/A
associate-*l/N/A
lift-/.f64N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6494.4
Applied rewrites94.4%
Taylor expanded in t around inf
Applied rewrites94.4%
if 1.2999999999999999e82 < t Initial program 60.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6460.0
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6460.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.0
lift-*.f64N/A
Applied rewrites59.8%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.3
Applied rewrites54.3%
Applied rewrites54.3%
Applied rewrites61.5%
Applied rewrites83.9%
Final simplification80.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ 2.0 (* (* (/ t_m l) k) (* (/ (* (sin k) k) l) (tan k))))))
(*
t_s
(if (<= t_m 4.5e-12)
t_2
(if (<= t_m 5.8e+60)
(* (/ (pow t_m -3.0) (/ k l)) (/ l k))
(if (<= t_m 1.3e+82) t_2 (/ (/ l (pow (* k t_m) 2.0)) (/ 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 t_2 = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)));
double tmp;
if (t_m <= 4.5e-12) {
tmp = t_2;
} else if (t_m <= 5.8e+60) {
tmp = (pow(t_m, -3.0) / (k / l)) * (l / k);
} else if (t_m <= 1.3e+82) {
tmp = t_2;
} else {
tmp = (l / pow((k * t_m), 2.0)) / (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) :: t_2
real(8) :: tmp
t_2 = 2.0d0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)))
if (t_m <= 4.5d-12) then
tmp = t_2
else if (t_m <= 5.8d+60) then
tmp = ((t_m ** (-3.0d0)) / (k / l)) * (l / k)
else if (t_m <= 1.3d+82) then
tmp = t_2
else
tmp = (l / ((k * t_m) ** 2.0d0)) / (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 t_2 = 2.0 / (((t_m / l) * k) * (((Math.sin(k) * k) / l) * Math.tan(k)));
double tmp;
if (t_m <= 4.5e-12) {
tmp = t_2;
} else if (t_m <= 5.8e+60) {
tmp = (Math.pow(t_m, -3.0) / (k / l)) * (l / k);
} else if (t_m <= 1.3e+82) {
tmp = t_2;
} else {
tmp = (l / Math.pow((k * t_m), 2.0)) / (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): t_2 = 2.0 / (((t_m / l) * k) * (((math.sin(k) * k) / l) * math.tan(k))) tmp = 0 if t_m <= 4.5e-12: tmp = t_2 elif t_m <= 5.8e+60: tmp = (math.pow(t_m, -3.0) / (k / l)) * (l / k) elif t_m <= 1.3e+82: tmp = t_2 else: tmp = (l / math.pow((k * t_m), 2.0)) / (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) t_2 = Float64(2.0 / Float64(Float64(Float64(t_m / l) * k) * Float64(Float64(Float64(sin(k) * k) / l) * tan(k)))) tmp = 0.0 if (t_m <= 4.5e-12) tmp = t_2; elseif (t_m <= 5.8e+60) tmp = Float64(Float64((t_m ^ -3.0) / Float64(k / l)) * Float64(l / k)); elseif (t_m <= 1.3e+82) tmp = t_2; else tmp = Float64(Float64(l / (Float64(k * t_m) ^ 2.0)) / 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) t_2 = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k))); tmp = 0.0; if (t_m <= 4.5e-12) tmp = t_2; elseif (t_m <= 5.8e+60) tmp = ((t_m ^ -3.0) / (k / l)) * (l / k); elseif (t_m <= 1.3e+82) tmp = t_2; else tmp = (l / ((k * t_m) ^ 2.0)) / (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_] := Block[{t$95$2 = N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.5e-12], t$95$2, If[LessEqual[t$95$m, 5.8e+60], N[(N[(N[Power[t$95$m, -3.0], $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.3e+82], t$95$2, N[(N[(l / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{2}{\left(\frac{t\_m}{\ell} \cdot k\right) \cdot \left(\frac{\sin k \cdot k}{\ell} \cdot \tan k\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.5 \cdot 10^{-12}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 5.8 \cdot 10^{+60}:\\
\;\;\;\;\frac{{t\_m}^{-3}}{\frac{k}{\ell}} \cdot \frac{\ell}{k}\\
\mathbf{elif}\;t\_m \leq 1.3 \cdot 10^{+82}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{{\left(k \cdot t\_m\right)}^{2}}}{\frac{t\_m}{\ell}}\\
\end{array}
\end{array}
\end{array}
if t < 4.49999999999999981e-12 or 5.79999999999999999e60 < t < 1.2999999999999999e82Initial program 42.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.5
Applied rewrites10.5%
Taylor expanded in t around 0
associate-/l*N/A
times-fracN/A
associate-*r*N/A
*-rgt-identityN/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.0%
Applied rewrites63.3%
Applied rewrites78.7%
if 4.49999999999999981e-12 < t < 5.79999999999999999e60Initial program 78.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6478.7
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6478.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6478.7
lift-*.f64N/A
Applied rewrites89.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6456.8
Applied rewrites56.8%
Applied rewrites56.8%
Applied rewrites88.9%
if 1.2999999999999999e82 < t Initial program 60.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6460.0
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6460.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.0
lift-*.f64N/A
Applied rewrites59.8%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6454.3
Applied rewrites54.3%
Applied rewrites54.3%
Applied rewrites61.5%
Applied rewrites83.9%
Final simplification80.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.2e-12)
(/ 2.0 (* (* (/ t_m l) k) (* (/ (* (sin k) k) l) (tan k))))
(/ 2.0 (* (* (* (* (* (/ t_m l) t_m) (tan k)) (sin k)) (/ t_m l)) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e-12) {
tmp = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)));
} else {
tmp = 2.0 / ((((((t_m / l) * t_m) * tan(k)) * sin(k)) * (t_m / l)) * 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 (t_m <= 5.2d-12) then
tmp = 2.0d0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k)))
else
tmp = 2.0d0 / ((((((t_m / l) * t_m) * tan(k)) * sin(k)) * (t_m / l)) * 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 (t_m <= 5.2e-12) {
tmp = 2.0 / (((t_m / l) * k) * (((Math.sin(k) * k) / l) * Math.tan(k)));
} else {
tmp = 2.0 / ((((((t_m / l) * t_m) * Math.tan(k)) * Math.sin(k)) * (t_m / l)) * 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 t_m <= 5.2e-12: tmp = 2.0 / (((t_m / l) * k) * (((math.sin(k) * k) / l) * math.tan(k))) else: tmp = 2.0 / ((((((t_m / l) * t_m) * math.tan(k)) * math.sin(k)) * (t_m / l)) * 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.2e-12) tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * k) * Float64(Float64(Float64(sin(k) * k) / l) * tan(k)))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m / l) * t_m) * tan(k)) * sin(k)) * Float64(t_m / l)) * 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 (t_m <= 5.2e-12) tmp = 2.0 / (((t_m / l) * k) * (((sin(k) * k) / l) * tan(k))); else tmp = 2.0 / ((((((t_m / l) * t_m) * tan(k)) * sin(k)) * (t_m / l)) * 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[t$95$m, 5.2e-12], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot k\right) \cdot \left(\frac{\sin k \cdot k}{\ell} \cdot \tan k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\left(\frac{t\_m}{\ell} \cdot t\_m\right) \cdot \tan k\right) \cdot \sin k\right) \cdot \frac{t\_m}{\ell}\right) \cdot 2}\\
\end{array}
\end{array}
if t < 5.19999999999999965e-12Initial program 42.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%
Taylor expanded in t around 0
associate-/l*N/A
times-fracN/A
associate-*r*N/A
*-rgt-identityN/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites65.7%
Applied rewrites64.0%
Applied rewrites78.1%
if 5.19999999999999965e-12 < t Initial program 63.1%
Taylor expanded in t around inf
Applied rewrites61.9%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
unpow3N/A
lift-*.f64N/A
lift-*.f64N/A
frac-timesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
Applied rewrites62.8%
lift-*.f64N/A
lift-*.f64N/A
lift-tan.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-tan.f6481.5
Applied rewrites81.5%
Final simplification79.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8.5e-36)
(/ 2.0 (* (* (/ t_m (* l l)) k) (* (* (sin k) (tan k)) k)))
(if (<= t_m 7.2e+106)
(* (/ (pow t_m -3.0) (/ k l)) (/ l k))
(/ (/ l (pow (* k t_m) 2.0)) (/ 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 (t_m <= 8.5e-36) {
tmp = 2.0 / (((t_m / (l * l)) * k) * ((sin(k) * tan(k)) * k));
} else if (t_m <= 7.2e+106) {
tmp = (pow(t_m, -3.0) / (k / l)) * (l / k);
} else {
tmp = (l / pow((k * t_m), 2.0)) / (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 (t_m <= 8.5d-36) then
tmp = 2.0d0 / (((t_m / (l * l)) * k) * ((sin(k) * tan(k)) * k))
else if (t_m <= 7.2d+106) then
tmp = ((t_m ** (-3.0d0)) / (k / l)) * (l / k)
else
tmp = (l / ((k * t_m) ** 2.0d0)) / (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 (t_m <= 8.5e-36) {
tmp = 2.0 / (((t_m / (l * l)) * k) * ((Math.sin(k) * Math.tan(k)) * k));
} else if (t_m <= 7.2e+106) {
tmp = (Math.pow(t_m, -3.0) / (k / l)) * (l / k);
} else {
tmp = (l / Math.pow((k * t_m), 2.0)) / (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 t_m <= 8.5e-36: tmp = 2.0 / (((t_m / (l * l)) * k) * ((math.sin(k) * math.tan(k)) * k)) elif t_m <= 7.2e+106: tmp = (math.pow(t_m, -3.0) / (k / l)) * (l / k) else: tmp = (l / math.pow((k * t_m), 2.0)) / (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 (t_m <= 8.5e-36) tmp = Float64(2.0 / Float64(Float64(Float64(t_m / Float64(l * l)) * k) * Float64(Float64(sin(k) * tan(k)) * k))); elseif (t_m <= 7.2e+106) tmp = Float64(Float64((t_m ^ -3.0) / Float64(k / l)) * Float64(l / k)); else tmp = Float64(Float64(l / (Float64(k * t_m) ^ 2.0)) / 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 (t_m <= 8.5e-36) tmp = 2.0 / (((t_m / (l * l)) * k) * ((sin(k) * tan(k)) * k)); elseif (t_m <= 7.2e+106) tmp = ((t_m ^ -3.0) / (k / l)) * (l / k); else tmp = (l / ((k * t_m) ^ 2.0)) / (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[t$95$m, 8.5e-36], N[(2.0 / N[(N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e+106], N[(N[(N[Power[t$95$m, -3.0], $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m / 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.5 \cdot 10^{-36}:\\
\;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell \cdot \ell} \cdot k\right) \cdot \left(\left(\sin k \cdot \tan k\right) \cdot k\right)}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{{t\_m}^{-3}}{\frac{k}{\ell}} \cdot \frac{\ell}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{{\left(k \cdot t\_m\right)}^{2}}}{\frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 8.5000000000000007e-36Initial program 42.2%
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.0
Applied rewrites10.0%
Taylor expanded in t around 0
associate-/l*N/A
times-fracN/A
associate-*r*N/A
*-rgt-identityN/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites66.4%
Applied rewrites68.8%
if 8.5000000000000007e-36 < t < 7.2000000000000002e106Initial program 66.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6466.4
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6466.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6466.4
lift-*.f64N/A
Applied rewrites72.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6451.7
Applied rewrites51.7%
Applied rewrites51.6%
Applied rewrites73.0%
if 7.2000000000000002e106 < t Initial program 58.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6458.6
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6458.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.6
lift-*.f64N/A
Applied rewrites58.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6452.6
Applied rewrites52.6%
Applied rewrites52.6%
Applied rewrites60.4%
Applied rewrites82.6%
Final simplification72.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 2.3e-26)
(/ (* (* l l) 2.0) (* (* (* (sin k) k) k) (* (tan k) t_m)))
(if (<= t_m 7.2e+106)
(* (/ (pow t_m -3.0) (/ k l)) (/ l k))
(/ (/ l (pow (* k t_m) 2.0)) (/ 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 (t_m <= 2.3e-26) {
tmp = ((l * l) * 2.0) / (((sin(k) * k) * k) * (tan(k) * t_m));
} else if (t_m <= 7.2e+106) {
tmp = (pow(t_m, -3.0) / (k / l)) * (l / k);
} else {
tmp = (l / pow((k * t_m), 2.0)) / (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 (t_m <= 2.3d-26) then
tmp = ((l * l) * 2.0d0) / (((sin(k) * k) * k) * (tan(k) * t_m))
else if (t_m <= 7.2d+106) then
tmp = ((t_m ** (-3.0d0)) / (k / l)) * (l / k)
else
tmp = (l / ((k * t_m) ** 2.0d0)) / (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 (t_m <= 2.3e-26) {
tmp = ((l * l) * 2.0) / (((Math.sin(k) * k) * k) * (Math.tan(k) * t_m));
} else if (t_m <= 7.2e+106) {
tmp = (Math.pow(t_m, -3.0) / (k / l)) * (l / k);
} else {
tmp = (l / Math.pow((k * t_m), 2.0)) / (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 t_m <= 2.3e-26: tmp = ((l * l) * 2.0) / (((math.sin(k) * k) * k) * (math.tan(k) * t_m)) elif t_m <= 7.2e+106: tmp = (math.pow(t_m, -3.0) / (k / l)) * (l / k) else: tmp = (l / math.pow((k * t_m), 2.0)) / (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 (t_m <= 2.3e-26) tmp = Float64(Float64(Float64(l * l) * 2.0) / Float64(Float64(Float64(sin(k) * k) * k) * Float64(tan(k) * t_m))); elseif (t_m <= 7.2e+106) tmp = Float64(Float64((t_m ^ -3.0) / Float64(k / l)) * Float64(l / k)); else tmp = Float64(Float64(l / (Float64(k * t_m) ^ 2.0)) / 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 (t_m <= 2.3e-26) tmp = ((l * l) * 2.0) / (((sin(k) * k) * k) * (tan(k) * t_m)); elseif (t_m <= 7.2e+106) tmp = ((t_m ^ -3.0) / (k / l)) * (l / k); else tmp = (l / ((k * t_m) ^ 2.0)) / (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[t$95$m, 2.3e-26], N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e+106], N[(N[(N[Power[t$95$m, -3.0], $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m / 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.3 \cdot 10^{-26}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot 2}{\left(\left(\sin k \cdot k\right) \cdot k\right) \cdot \left(\tan k \cdot t\_m\right)}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{{t\_m}^{-3}}{\frac{k}{\ell}} \cdot \frac{\ell}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{{\left(k \cdot t\_m\right)}^{2}}}{\frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 2.30000000000000009e-26Initial program 42.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6442.0
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6442.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.0
lift-*.f64N/A
Applied rewrites43.5%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.1
Applied rewrites50.1%
Applied rewrites50.1%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6464.7
Applied rewrites64.7%
Applied rewrites64.7%
if 2.30000000000000009e-26 < t < 7.2000000000000002e106Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6468.6
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6468.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6468.6
lift-*.f64N/A
Applied rewrites74.8%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6453.1
Applied rewrites53.1%
Applied rewrites53.1%
Applied rewrites75.1%
if 7.2000000000000002e106 < t Initial program 58.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6458.6
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6458.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6458.6
lift-*.f64N/A
Applied rewrites58.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6452.6
Applied rewrites52.6%
Applied rewrites52.6%
Applied rewrites60.4%
Applied rewrites82.6%
Final simplification69.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.7e+55)
(/ (* (/ (/ (/ l k) k) t_m) (/ l t_m)) t_m)
(/ (/ l (pow (* k t_m) 2.0)) (/ 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 (t_m <= 1.7e+55) {
tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m;
} else {
tmp = (l / pow((k * t_m), 2.0)) / (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 (t_m <= 1.7d+55) then
tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m
else
tmp = (l / ((k * t_m) ** 2.0d0)) / (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 (t_m <= 1.7e+55) {
tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m;
} else {
tmp = (l / Math.pow((k * t_m), 2.0)) / (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 t_m <= 1.7e+55: tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m else: tmp = (l / math.pow((k * t_m), 2.0)) / (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 (t_m <= 1.7e+55) tmp = Float64(Float64(Float64(Float64(Float64(l / k) / k) / t_m) * Float64(l / t_m)) / t_m); else tmp = Float64(Float64(l / (Float64(k * t_m) ^ 2.0)) / 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 (t_m <= 1.7e+55) tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m; else tmp = (l / ((k * t_m) ^ 2.0)) / (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[t$95$m, 1.7e+55], N[(N[(N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], N[(N[(l / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m / 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.7 \cdot 10^{+55}:\\
\;\;\;\;\frac{\frac{\frac{\frac{\ell}{k}}{k}}{t\_m} \cdot \frac{\ell}{t\_m}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{{\left(k \cdot t\_m\right)}^{2}}}{\frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 1.6999999999999999e55Initial program 44.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6444.6
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6444.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.6
lift-*.f64N/A
Applied rewrites46.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.4
Applied rewrites50.4%
Applied rewrites50.4%
Applied rewrites55.1%
Applied rewrites67.7%
if 1.6999999999999999e55 < t Initial program 60.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6460.1
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6460.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.1
lift-*.f64N/A
Applied rewrites61.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6452.4
Applied rewrites52.4%
Applied rewrites52.4%
Applied rewrites59.8%
Applied rewrites78.8%
Final simplification70.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.7e+55)
(/ (* (/ (/ (/ l k) k) t_m) (/ l t_m)) t_m)
(* (/ l t_m) (/ l (pow (* k t_m) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.7e+55) {
tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m;
} else {
tmp = (l / t_m) * (l / pow((k * t_m), 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 (t_m <= 1.7d+55) then
tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m
else
tmp = (l / t_m) * (l / ((k * t_m) ** 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 (t_m <= 1.7e+55) {
tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m;
} else {
tmp = (l / t_m) * (l / Math.pow((k * t_m), 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 t_m <= 1.7e+55: tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m else: tmp = (l / t_m) * (l / math.pow((k * t_m), 2.0)) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.7e+55) tmp = Float64(Float64(Float64(Float64(Float64(l / k) / k) / t_m) * Float64(l / t_m)) / t_m); else tmp = Float64(Float64(l / t_m) * Float64(l / (Float64(k * t_m) ^ 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 (t_m <= 1.7e+55) tmp = ((((l / k) / k) / t_m) * (l / t_m)) / t_m; else tmp = (l / t_m) * (l / ((k * t_m) ^ 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[t$95$m, 1.7e+55], N[(N[(N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(l / N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.7 \cdot 10^{+55}:\\
\;\;\;\;\frac{\frac{\frac{\frac{\ell}{k}}{k}}{t\_m} \cdot \frac{\ell}{t\_m}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{{\left(k \cdot t\_m\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.6999999999999999e55Initial program 44.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6444.6
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6444.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6444.6
lift-*.f64N/A
Applied rewrites46.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.4
Applied rewrites50.4%
Applied rewrites50.4%
Applied rewrites55.1%
Applied rewrites67.7%
if 1.6999999999999999e55 < t Initial program 60.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6460.1
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6460.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6460.1
lift-*.f64N/A
Applied rewrites61.4%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6452.4
Applied rewrites52.4%
Applied rewrites52.4%
Applied rewrites59.8%
Applied rewrites78.8%
Final simplification70.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3.5e-151)
(/ (* (/ l k) l) (* (* (* t_m t_m) k) t_m))
(/ 2.0 (* (* (/ (* (* (* k k) t_m) t_m) l) (/ t_m l)) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.5e-151) {
tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m);
} else {
tmp = 2.0 / ((((((k * k) * t_m) * t_m) / l) * (t_m / l)) * 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 (k <= 3.5d-151) then
tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m)
else
tmp = 2.0d0 / ((((((k * k) * t_m) * t_m) / l) * (t_m / l)) * 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 (k <= 3.5e-151) {
tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m);
} else {
tmp = 2.0 / ((((((k * k) * t_m) * t_m) / l) * (t_m / l)) * 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 k <= 3.5e-151: tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m) else: tmp = 2.0 / ((((((k * k) * t_m) * t_m) / l) * (t_m / l)) * 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.5e-151) tmp = Float64(Float64(Float64(l / k) * l) / Float64(Float64(Float64(t_m * t_m) * k) * t_m)); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(k * k) * t_m) * t_m) / l) * Float64(t_m / l)) * 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 (k <= 3.5e-151) tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m); else tmp = 2.0 / ((((((k * k) * t_m) * t_m) / l) * (t_m / l)) * 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[k, 3.5e-151], N[(N[(N[(l / k), $MachinePrecision] * l), $MachinePrecision] / N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.5 \cdot 10^{-151}:\\
\;\;\;\;\frac{\frac{\ell}{k} \cdot \ell}{\left(\left(t\_m \cdot t\_m\right) \cdot k\right) \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{\left(\left(k \cdot k\right) \cdot t\_m\right) \cdot t\_m}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot 2}\\
\end{array}
\end{array}
if k < 3.49999999999999995e-151Initial program 46.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6446.7
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6446.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6446.7
lift-*.f64N/A
Applied rewrites49.5%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6448.6
Applied rewrites48.6%
Applied rewrites58.7%
Applied rewrites63.8%
if 3.49999999999999995e-151 < k Initial program 50.3%
Taylor expanded in t around inf
Applied rewrites53.0%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-pow.f64N/A
unpow3N/A
lift-*.f64N/A
lift-*.f64N/A
frac-timesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
Applied rewrites56.6%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6465.6
Applied rewrites65.6%
Final simplification64.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 (/ (* (/ (/ (/ l k) k) t_m) (/ l t_m)) t_m)))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (((((l / k) / k) / t_m) * (l / t_m)) / t_m);
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (((((l / k) / k) / t_m) * (l / t_m)) / t_m)
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (((((l / k) / k) / t_m) * (l / t_m)) / t_m);
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (((((l / k) / k) / t_m) * (l / t_m)) / t_m)
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(Float64(Float64(Float64(l / k) / k) / t_m) * Float64(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 * (((((l / k) / k) / t_m) * (l / t_m)) / t_m); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{\frac{\frac{\frac{\ell}{k}}{k}}{t\_m} \cdot \frac{\ell}{t\_m}}{t\_m}
\end{array}
Initial program 48.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6448.4
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6448.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6448.4
lift-*.f64N/A
Applied rewrites50.1%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.9
Applied rewrites50.9%
Applied rewrites50.9%
Applied rewrites56.2%
Applied rewrites67.1%
Final simplification67.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3.5e-151)
(/ (* (/ l k) l) (* (* (* t_m t_m) k) t_m))
(/ (* (/ l t_m) l) (* (* (* k k) t_m) t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.5e-151) {
tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m);
} else {
tmp = ((l / t_m) * l) / (((k * k) * 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) :: tmp
if (k <= 3.5d-151) then
tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m)
else
tmp = ((l / t_m) * l) / (((k * k) * 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 tmp;
if (k <= 3.5e-151) {
tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m);
} else {
tmp = ((l / t_m) * l) / (((k * k) * 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): tmp = 0 if k <= 3.5e-151: tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m) else: tmp = ((l / t_m) * l) / (((k * k) * 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 (k <= 3.5e-151) tmp = Float64(Float64(Float64(l / k) * l) / Float64(Float64(Float64(t_m * t_m) * k) * t_m)); else tmp = Float64(Float64(Float64(l / t_m) * l) / Float64(Float64(Float64(k * k) * 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) tmp = 0.0; if (k <= 3.5e-151) tmp = ((l / k) * l) / (((t_m * t_m) * k) * t_m); else tmp = ((l / t_m) * l) / (((k * k) * 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_] := N[(t$95$s * If[LessEqual[k, 3.5e-151], N[(N[(N[(l / k), $MachinePrecision] * l), $MachinePrecision] / N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / t$95$m), $MachinePrecision] * l), $MachinePrecision] / N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $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 3.5 \cdot 10^{-151}:\\
\;\;\;\;\frac{\frac{\ell}{k} \cdot \ell}{\left(\left(t\_m \cdot t\_m\right) \cdot k\right) \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m} \cdot \ell}{\left(\left(k \cdot k\right) \cdot t\_m\right) \cdot t\_m}\\
\end{array}
\end{array}
if k < 3.49999999999999995e-151Initial program 46.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6446.7
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6446.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6446.7
lift-*.f64N/A
Applied rewrites49.5%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6448.6
Applied rewrites48.6%
Applied rewrites58.7%
Applied rewrites63.8%
if 3.49999999999999995e-151 < k Initial program 50.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6450.3
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6450.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6450.3
lift-*.f64N/A
Applied rewrites50.7%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6453.4
Applied rewrites53.4%
Applied rewrites53.4%
Applied rewrites60.7%
Applied rewrites65.3%
Final simplification64.5%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (* (/ l k) l) (* (* t_m t_m) (* k t_m)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (((l / k) * l) / ((t_m * t_m) * (k * t_m)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (((l / k) * l) / ((t_m * t_m) * (k * t_m)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (((l / k) * l) / ((t_m * t_m) * (k * t_m)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (((l / k) * l) / ((t_m * t_m) * (k * t_m)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(Float64(l / k) * l) / Float64(Float64(t_m * t_m) * Float64(k * t_m)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (((l / k) * l) / ((t_m * t_m) * (k * t_m))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(N[(l / k), $MachinePrecision] * l), $MachinePrecision] / N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{\frac{\ell}{k} \cdot \ell}{\left(t\_m \cdot t\_m\right) \cdot \left(k \cdot t\_m\right)}
\end{array}
Initial program 48.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6448.4
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6448.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6448.4
lift-*.f64N/A
Applied rewrites50.1%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.9
Applied rewrites50.9%
Applied rewrites55.5%
Applied rewrites60.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (* (/ l k) l) (* (* (* t_m t_m) k) t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (((l / k) * l) / (((t_m * t_m) * k) * t_m));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (((l / k) * l) / (((t_m * t_m) * k) * t_m))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (((l / k) * l) / (((t_m * t_m) * k) * t_m));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (((l / k) * l) / (((t_m * t_m) * k) * t_m))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(Float64(l / k) * l) / Float64(Float64(Float64(t_m * t_m) * k) * t_m))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (((l / k) * l) / (((t_m * t_m) * k) * t_m)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(N[(l / k), $MachinePrecision] * l), $MachinePrecision] / N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * k), $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{\frac{\ell}{k} \cdot \ell}{\left(\left(t\_m \cdot t\_m\right) \cdot k\right) \cdot t\_m}
\end{array}
Initial program 48.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6448.4
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6448.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6448.4
lift-*.f64N/A
Applied rewrites50.1%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.9
Applied rewrites50.9%
Applied rewrites55.5%
Applied rewrites60.1%
Final simplification60.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (* l l) (* (* (* k k) t_m) (* t_m t_m)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) / (((k * k) * t_m) * (t_m * t_m)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) / (((k * k) * t_m) * (t_m * t_m)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) / (((k * k) * t_m) * (t_m * t_m)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) / (((k * k) * t_m) * (t_m * t_m)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) / Float64(Float64(Float64(k * k) * t_m) * Float64(t_m * t_m)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) / (((k * k) * t_m) * (t_m * t_m))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] / N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{\ell \cdot \ell}{\left(\left(k \cdot k\right) \cdot t\_m\right) \cdot \left(t\_m \cdot t\_m\right)}
\end{array}
Initial program 48.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-/.f6448.4
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
metadata-evalN/A
lower-+.f6448.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6448.4
lift-*.f64N/A
Applied rewrites50.1%
Taylor expanded in k around 0
unpow2N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6450.9
Applied rewrites50.9%
Applied rewrites50.9%
Applied rewrites56.2%
Applied rewrites53.4%
herbie shell --seed 2024272
(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))))