
(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 18 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 1.15e-146)
(* (/ (cos k) (* (* (* (pow (sin k) 2.0) t_m) k) k)) (* (* l l) 2.0))
(/
2.0
(*
(*
(* (tan k) (fma (/ k (* t_m t_m)) k 2.0))
(* (* (/ t_m l) t_m) (sin k)))
(/ 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.15e-146) {
tmp = (cos(k) / (((pow(sin(k), 2.0) * t_m) * k) * k)) * ((l * l) * 2.0);
} else {
tmp = 2.0 / (((tan(k) * fma((k / (t_m * t_m)), k, 2.0)) * (((t_m / l) * t_m) * sin(k))) * (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.15e-146) tmp = Float64(Float64(cos(k) / Float64(Float64(Float64((sin(k) ^ 2.0) * t_m) * k) * k)) * Float64(Float64(l * l) * 2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * fma(Float64(k / Float64(t_m * t_m)), k, 2.0)) * Float64(Float64(Float64(t_m / l) * t_m) * sin(k))) * 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, 1.15e-146], N[(N[(N[Cos[k], $MachinePrecision] / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * k + 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $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}\;t\_m \leq 1.15 \cdot 10^{-146}:\\
\;\;\;\;\frac{\cos k}{\left(\left({\sin k}^{2} \cdot t\_m\right) \cdot k\right) \cdot k} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, k, 2\right)\right) \cdot \left(\left(\frac{t\_m}{\ell} \cdot t\_m\right) \cdot \sin k\right)\right) \cdot \frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 1.15e-146Initial program 52.6%
Taylor expanded in t around 0
associate-/l*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
lower-cos.f64N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f6462.9
Applied rewrites62.9%
if 1.15e-146 < t Initial program 70.8%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval88.6
Applied rewrites88.6%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval88.5
Applied rewrites88.5%
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
associate-*r*N/A
pow2N/A
lift-pow.f64N/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
unpow-prod-downN/A
pow2N/A
sqr-powN/A
pow2N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
metadata-evalN/A
lift-*.f64N/A
div-invN/A
Applied rewrites88.6%
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 rewrites90.7%
Final simplification72.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 (<=
(/
2.0
(*
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)
(* (* (/ (pow t_m 3.0) (* l l)) (sin k)) (tan k))))
1e+126)
(* (/ (/ l (* t_m t_m)) k) (/ l (* k t_m)))
(* (/ (/ l (* (* k k) t_m)) t_m) (/ l t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((2.0 / (((pow((k / t_m), 2.0) + 1.0) + 1.0) * (((pow(t_m, 3.0) / (l * l)) * sin(k)) * tan(k)))) <= 1e+126) {
tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m));
} else {
tmp = ((l / ((k * k) * t_m)) / 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 ((2.0d0 / (((((k / t_m) ** 2.0d0) + 1.0d0) + 1.0d0) * ((((t_m ** 3.0d0) / (l * l)) * sin(k)) * tan(k)))) <= 1d+126) then
tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m))
else
tmp = ((l / ((k * k) * t_m)) / 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 ((2.0 / (((Math.pow((k / t_m), 2.0) + 1.0) + 1.0) * (((Math.pow(t_m, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)))) <= 1e+126) {
tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m));
} else {
tmp = ((l / ((k * k) * t_m)) / 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 (2.0 / (((math.pow((k / t_m), 2.0) + 1.0) + 1.0) * (((math.pow(t_m, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)))) <= 1e+126: tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m)) else: tmp = ((l / ((k * k) * t_m)) / 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 (Float64(2.0 / Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0) * Float64(Float64(Float64((t_m ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)))) <= 1e+126) tmp = Float64(Float64(Float64(l / Float64(t_m * t_m)) / k) * Float64(l / Float64(k * t_m))); else tmp = Float64(Float64(Float64(l / Float64(Float64(k * k) * t_m)) / t_m) * Float64(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 ((2.0 / (((((k / t_m) ^ 2.0) + 1.0) + 1.0) * ((((t_m ^ 3.0) / (l * l)) * sin(k)) * tan(k)))) <= 1e+126) tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m)); else tmp = ((l / ((k * k) * t_m)) / 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[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[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+126], N[(N[(N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right) \cdot \left(\left(\frac{{t\_m}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right)} \leq 10^{+126}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m \cdot t\_m}}{k} \cdot \frac{\ell}{k \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{\left(k \cdot k\right) \cdot t\_m}}{t\_m} \cdot \frac{\ell}{t\_m}\\
\end{array}
\end{array}
if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 9.99999999999999925e125Initial program 83.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.3
Applied rewrites64.3%
Applied rewrites83.8%
if 9.99999999999999925e125 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) Initial program 23.1%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6439.4
Applied rewrites39.4%
Applied rewrites55.1%
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 (<=
(/
2.0
(*
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)
(* (* (/ (pow t_m 3.0) (* l l)) (sin k)) (tan k))))
1e+126)
(* (/ (/ l (* t_m t_m)) k) (/ l (* k t_m)))
(* (/ l (* (* (* k k) t_m) t_m)) (/ l t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((2.0 / (((pow((k / t_m), 2.0) + 1.0) + 1.0) * (((pow(t_m, 3.0) / (l * l)) * sin(k)) * tan(k)))) <= 1e+126) {
tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m));
} else {
tmp = (l / (((k * k) * t_m) * 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 ((2.0d0 / (((((k / t_m) ** 2.0d0) + 1.0d0) + 1.0d0) * ((((t_m ** 3.0d0) / (l * l)) * sin(k)) * tan(k)))) <= 1d+126) then
tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m))
else
tmp = (l / (((k * k) * t_m) * 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 ((2.0 / (((Math.pow((k / t_m), 2.0) + 1.0) + 1.0) * (((Math.pow(t_m, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)))) <= 1e+126) {
tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m));
} else {
tmp = (l / (((k * k) * t_m) * 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 (2.0 / (((math.pow((k / t_m), 2.0) + 1.0) + 1.0) * (((math.pow(t_m, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)))) <= 1e+126: tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m)) else: tmp = (l / (((k * k) * t_m) * 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 (Float64(2.0 / Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0) * Float64(Float64(Float64((t_m ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)))) <= 1e+126) tmp = Float64(Float64(Float64(l / Float64(t_m * t_m)) / k) * Float64(l / Float64(k * t_m))); else tmp = Float64(Float64(l / Float64(Float64(Float64(k * k) * t_m) * t_m)) * Float64(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 ((2.0 / (((((k / t_m) ^ 2.0) + 1.0) + 1.0) * ((((t_m ^ 3.0) / (l * l)) * sin(k)) * tan(k)))) <= 1e+126) tmp = ((l / (t_m * t_m)) / k) * (l / (k * t_m)); else tmp = (l / (((k * k) * t_m) * 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[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[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+126], N[(N[(N[(l / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right) \cdot \left(\left(\frac{{t\_m}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right)} \leq 10^{+126}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m \cdot t\_m}}{k} \cdot \frac{\ell}{k \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{\left(\left(k \cdot k\right) \cdot t\_m\right) \cdot t\_m} \cdot \frac{\ell}{t\_m}\\
\end{array}
\end{array}
if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 9.99999999999999925e125Initial program 83.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.3
Applied rewrites64.3%
Applied rewrites83.8%
if 9.99999999999999925e125 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) Initial program 23.1%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6439.4
Applied rewrites39.4%
Applied rewrites54.2%
Final simplification71.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 (<=
(/
2.0
(*
(+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)
(* (* (/ (pow t_m 3.0) (* l l)) (sin k)) (tan k))))
1e+126)
(* (/ l (* (* t_m t_m) k)) (/ l (* k t_m)))
(* (/ l (* (* (* k k) t_m) t_m)) (/ l t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((2.0 / (((pow((k / t_m), 2.0) + 1.0) + 1.0) * (((pow(t_m, 3.0) / (l * l)) * sin(k)) * tan(k)))) <= 1e+126) {
tmp = (l / ((t_m * t_m) * k)) * (l / (k * t_m));
} else {
tmp = (l / (((k * k) * t_m) * 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 ((2.0d0 / (((((k / t_m) ** 2.0d0) + 1.0d0) + 1.0d0) * ((((t_m ** 3.0d0) / (l * l)) * sin(k)) * tan(k)))) <= 1d+126) then
tmp = (l / ((t_m * t_m) * k)) * (l / (k * t_m))
else
tmp = (l / (((k * k) * t_m) * 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 ((2.0 / (((Math.pow((k / t_m), 2.0) + 1.0) + 1.0) * (((Math.pow(t_m, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)))) <= 1e+126) {
tmp = (l / ((t_m * t_m) * k)) * (l / (k * t_m));
} else {
tmp = (l / (((k * k) * t_m) * 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 (2.0 / (((math.pow((k / t_m), 2.0) + 1.0) + 1.0) * (((math.pow(t_m, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)))) <= 1e+126: tmp = (l / ((t_m * t_m) * k)) * (l / (k * t_m)) else: tmp = (l / (((k * k) * t_m) * 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 (Float64(2.0 / Float64(Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0) * Float64(Float64(Float64((t_m ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)))) <= 1e+126) tmp = Float64(Float64(l / Float64(Float64(t_m * t_m) * k)) * Float64(l / Float64(k * t_m))); else tmp = Float64(Float64(l / Float64(Float64(Float64(k * k) * t_m) * t_m)) * Float64(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 ((2.0 / (((((k / t_m) ^ 2.0) + 1.0) + 1.0) * ((((t_m ^ 3.0) / (l * l)) * sin(k)) * tan(k)))) <= 1e+126) tmp = (l / ((t_m * t_m) * k)) * (l / (k * t_m)); else tmp = (l / (((k * k) * t_m) * 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[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[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+126], N[(N[(l / N[(N[(t$95$m * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right) \cdot \left(\left(\frac{{t\_m}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right)} \leq 10^{+126}:\\
\;\;\;\;\frac{\ell}{\left(t\_m \cdot t\_m\right) \cdot k} \cdot \frac{\ell}{k \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{\left(\left(k \cdot k\right) \cdot t\_m\right) \cdot t\_m} \cdot \frac{\ell}{t\_m}\\
\end{array}
\end{array}
if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 9.99999999999999925e125Initial program 83.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.3
Applied rewrites64.3%
Applied rewrites83.8%
if 9.99999999999999925e125 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) Initial program 23.1%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6439.4
Applied rewrites39.4%
Applied rewrites54.2%
Final simplification71.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 3e-91)
(/
2.0
(/
(*
(* k k)
(fma
(* (/ (* t_m t_m) l) t_m)
2.0
(* (* (/ k l) k) (* (fma (* t_m t_m) 0.3333333333333333 1.0) t_m))))
l))
(if (<= t_m 2.3e+145)
(*
(/ l (* (tan k) (fma (/ k (* t_m t_m)) k 2.0)))
(/ 2.0 (* (* (/ (sin k) l) t_m) (* t_m t_m))))
(/
2.0
(*
(fma (/ k t_m) (/ k t_m) 2.0)
(* (* (* (* (/ t_m l) t_m) (/ t_m l)) (sin k)) (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 <= 3e-91) {
tmp = 2.0 / (((k * k) * fma((((t_m * t_m) / l) * t_m), 2.0, (((k / l) * k) * (fma((t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l);
} else if (t_m <= 2.3e+145) {
tmp = (l / (tan(k) * fma((k / (t_m * t_m)), k, 2.0))) * (2.0 / (((sin(k) / l) * t_m) * (t_m * t_m)));
} else {
tmp = 2.0 / (fma((k / t_m), (k / t_m), 2.0) * (((((t_m / l) * t_m) * (t_m / l)) * sin(k)) * 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 <= 3e-91) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * fma(Float64(Float64(Float64(t_m * t_m) / l) * t_m), 2.0, Float64(Float64(Float64(k / l) * k) * Float64(fma(Float64(t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l)); elseif (t_m <= 2.3e+145) tmp = Float64(Float64(l / Float64(tan(k) * fma(Float64(k / Float64(t_m * t_m)), k, 2.0))) * Float64(2.0 / Float64(Float64(Float64(sin(k) / l) * t_m) * Float64(t_m * t_m)))); else tmp = Float64(2.0 / Float64(fma(Float64(k / t_m), Float64(k / t_m), 2.0) * Float64(Float64(Float64(Float64(Float64(t_m / l) * t_m) * Float64(t_m / l)) * sin(k)) * 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, 3e-91], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0 + N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333 + 1.0), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.3e+145], N[(N[(l / N[(N[Tan[k], $MachinePrecision] * N[(N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * k + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $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 3 \cdot 10^{-91}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \mathsf{fma}\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_m, 2, \left(\frac{k}{\ell} \cdot k\right) \cdot \left(\mathsf{fma}\left(t\_m \cdot t\_m, 0.3333333333333333, 1\right) \cdot t\_m\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 2.3 \cdot 10^{+145}:\\
\;\;\;\;\frac{\ell}{\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, k, 2\right)} \cdot \frac{2}{\left(\frac{\sin k}{\ell} \cdot t\_m\right) \cdot \left(t\_m \cdot t\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right) \cdot \left(\left(\left(\left(\frac{t\_m}{\ell} \cdot t\_m\right) \cdot \frac{t\_m}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right)}\\
\end{array}
\end{array}
if t < 3.0000000000000002e-91Initial program 52.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites51.8%
Taylor expanded in t around inf
Applied rewrites64.1%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites62.9%
if 3.0000000000000002e-91 < t < 2.3e145Initial program 70.3%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval87.4
Applied rewrites87.4%
Applied rewrites92.7%
Taylor expanded in t around 0
associate-/l*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6494.7
Applied rewrites94.7%
if 2.3e145 < t Initial program 80.2%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval92.6
Applied rewrites92.6%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval92.6
Applied rewrites92.6%
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
associate-*r*N/A
pow2N/A
lift-pow.f64N/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
unpow-prod-downN/A
pow2N/A
sqr-powN/A
pow2N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
metadata-evalN/A
lift-*.f64N/A
div-invN/A
Applied rewrites92.6%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
pow2N/A
metadata-evalN/A
lift-fma.f6492.6
Applied rewrites92.6%
Final simplification73.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 3e-91)
(/
2.0
(/
(*
(* k k)
(fma
(* (/ (* t_m t_m) l) t_m)
2.0
(* (* (/ k l) k) (* (fma (* t_m t_m) 0.3333333333333333 1.0) t_m))))
l))
(if (<= t_m 4.3e+158)
(*
(/ l (* (tan k) (fma (/ k (* t_m t_m)) k 2.0)))
(/ 2.0 (* (* (/ (sin k) l) t_m) (* t_m t_m))))
(* (/ 1.0 (* k t_m)) (* (pow (/ (* k t_m) l) -1.0) (/ 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 (t_m <= 3e-91) {
tmp = 2.0 / (((k * k) * fma((((t_m * t_m) / l) * t_m), 2.0, (((k / l) * k) * (fma((t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l);
} else if (t_m <= 4.3e+158) {
tmp = (l / (tan(k) * fma((k / (t_m * t_m)), k, 2.0))) * (2.0 / (((sin(k) / l) * t_m) * (t_m * t_m)));
} else {
tmp = (1.0 / (k * t_m)) * (pow(((k * t_m) / l), -1.0) * (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 (t_m <= 3e-91) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * fma(Float64(Float64(Float64(t_m * t_m) / l) * t_m), 2.0, Float64(Float64(Float64(k / l) * k) * Float64(fma(Float64(t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l)); elseif (t_m <= 4.3e+158) tmp = Float64(Float64(l / Float64(tan(k) * fma(Float64(k / Float64(t_m * t_m)), k, 2.0))) * Float64(2.0 / Float64(Float64(Float64(sin(k) / l) * t_m) * Float64(t_m * t_m)))); else tmp = Float64(Float64(1.0 / Float64(k * t_m)) * Float64((Float64(Float64(k * t_m) / l) ^ -1.0) * Float64(l / 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, 3e-91], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0 + N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333 + 1.0), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.3e+158], N[(N[(l / N[(N[Tan[k], $MachinePrecision] * N[(N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * k + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(k * t$95$m), $MachinePrecision] / l), $MachinePrecision], -1.0], $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3 \cdot 10^{-91}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \mathsf{fma}\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_m, 2, \left(\frac{k}{\ell} \cdot k\right) \cdot \left(\mathsf{fma}\left(t\_m \cdot t\_m, 0.3333333333333333, 1\right) \cdot t\_m\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{+158}:\\
\;\;\;\;\frac{\ell}{\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, k, 2\right)} \cdot \frac{2}{\left(\frac{\sin k}{\ell} \cdot t\_m\right) \cdot \left(t\_m \cdot t\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{k \cdot t\_m} \cdot \left({\left(\frac{k \cdot t\_m}{\ell}\right)}^{-1} \cdot \frac{\ell}{t\_m}\right)\\
\end{array}
\end{array}
if t < 3.0000000000000002e-91Initial program 52.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites51.8%
Taylor expanded in t around inf
Applied rewrites64.1%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites62.9%
if 3.0000000000000002e-91 < t < 4.3e158Initial program 71.2%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval87.8
Applied rewrites87.8%
Applied rewrites92.9%
Taylor expanded in t around 0
associate-/l*N/A
unpow3N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6494.9
Applied rewrites94.9%
if 4.3e158 < t Initial program 78.5%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6443.5
Applied rewrites43.5%
Applied rewrites78.5%
Applied rewrites99.8%
Final simplification73.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
(if (<= t_m 3.3e-88)
(/
2.0
(/
(*
(* k k)
(fma
(* (/ (* t_m t_m) l) t_m)
2.0
(* (* (/ k l) k) (* (fma (* t_m t_m) 0.3333333333333333 1.0) t_m))))
l))
(if (<= t_m 5.9e+150)
(*
(* (/ 2.0 (* (* (sin k) t_m) t_m)) (/ l t_m))
(/ l (* (tan k) (fma (/ k (* t_m t_m)) k 2.0))))
(* (/ 1.0 (* k t_m)) (* (pow (/ (* k t_m) l) -1.0) (/ 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 (t_m <= 3.3e-88) {
tmp = 2.0 / (((k * k) * fma((((t_m * t_m) / l) * t_m), 2.0, (((k / l) * k) * (fma((t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l);
} else if (t_m <= 5.9e+150) {
tmp = ((2.0 / ((sin(k) * t_m) * t_m)) * (l / t_m)) * (l / (tan(k) * fma((k / (t_m * t_m)), k, 2.0)));
} else {
tmp = (1.0 / (k * t_m)) * (pow(((k * t_m) / l), -1.0) * (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 (t_m <= 3.3e-88) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * fma(Float64(Float64(Float64(t_m * t_m) / l) * t_m), 2.0, Float64(Float64(Float64(k / l) * k) * Float64(fma(Float64(t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l)); elseif (t_m <= 5.9e+150) tmp = Float64(Float64(Float64(2.0 / Float64(Float64(sin(k) * t_m) * t_m)) * Float64(l / t_m)) * Float64(l / Float64(tan(k) * fma(Float64(k / Float64(t_m * t_m)), k, 2.0)))); else tmp = Float64(Float64(1.0 / Float64(k * t_m)) * Float64((Float64(Float64(k * t_m) / l) ^ -1.0) * Float64(l / t_m))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.3e-88], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0 + N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333 + 1.0), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.9e+150], N[(N[(N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Tan[k], $MachinePrecision] * N[(N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * k + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(k * t$95$m), $MachinePrecision] / l), $MachinePrecision], -1.0], $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.3 \cdot 10^{-88}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \mathsf{fma}\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_m, 2, \left(\frac{k}{\ell} \cdot k\right) \cdot \left(\mathsf{fma}\left(t\_m \cdot t\_m, 0.3333333333333333, 1\right) \cdot t\_m\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 5.9 \cdot 10^{+150}:\\
\;\;\;\;\left(\frac{2}{\left(\sin k \cdot t\_m\right) \cdot t\_m} \cdot \frac{\ell}{t\_m}\right) \cdot \frac{\ell}{\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, k, 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{k \cdot t\_m} \cdot \left({\left(\frac{k \cdot t\_m}{\ell}\right)}^{-1} \cdot \frac{\ell}{t\_m}\right)\\
\end{array}
\end{array}
if t < 3.29999999999999994e-88Initial program 52.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites51.8%
Taylor expanded in t around inf
Applied rewrites64.1%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites62.9%
if 3.29999999999999994e-88 < t < 5.90000000000000023e150Initial program 70.3%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval87.4
Applied rewrites87.4%
Applied rewrites92.7%
lift-/.f64N/A
clear-numN/A
inv-powN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
unpow-prod-downN/A
inv-powN/A
lift-/.f64N/A
clear-numN/A
inv-powN/A
clear-numN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6491.4
Applied rewrites91.4%
if 5.90000000000000023e150 < t Initial program 80.2%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6448.0
Applied rewrites48.0%
Applied rewrites80.2%
Applied rewrites99.8%
Final simplification73.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 1e-86)
(/
2.0
(/
(*
(* k k)
(fma
(* (/ (* t_m t_m) l) t_m)
2.0
(* (* (/ k l) k) (* (fma (* t_m t_m) 0.3333333333333333 1.0) t_m))))
l))
(if (<= t_m 1.45e+141)
(*
(* (/ 2.0 (* (* (* (sin k) t_m) t_m) t_m)) l)
(/ l (* (tan k) (fma (/ k (* t_m t_m)) k 2.0))))
(/
2.0
(* 2.0 (* (* (* (* (/ t_m l) t_m) (/ t_m l)) (sin k)) (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-86) {
tmp = 2.0 / (((k * k) * fma((((t_m * t_m) / l) * t_m), 2.0, (((k / l) * k) * (fma((t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l);
} else if (t_m <= 1.45e+141) {
tmp = ((2.0 / (((sin(k) * t_m) * t_m) * t_m)) * l) * (l / (tan(k) * fma((k / (t_m * t_m)), k, 2.0)));
} else {
tmp = 2.0 / (2.0 * (((((t_m / l) * t_m) * (t_m / l)) * sin(k)) * 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-86) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * fma(Float64(Float64(Float64(t_m * t_m) / l) * t_m), 2.0, Float64(Float64(Float64(k / l) * k) * Float64(fma(Float64(t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l)); elseif (t_m <= 1.45e+141) tmp = Float64(Float64(Float64(2.0 / Float64(Float64(Float64(sin(k) * t_m) * t_m) * t_m)) * l) * Float64(l / Float64(tan(k) * fma(Float64(k / Float64(t_m * t_m)), k, 2.0)))); else tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(Float64(Float64(Float64(t_m / l) * t_m) * Float64(t_m / l)) * sin(k)) * 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-86], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0 + N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333 + 1.0), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.45e+141], N[(N[(N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] * N[(l / N[(N[Tan[k], $MachinePrecision] * N[(N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * k + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(2.0 * N[(N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $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^{-86}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \mathsf{fma}\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_m, 2, \left(\frac{k}{\ell} \cdot k\right) \cdot \left(\mathsf{fma}\left(t\_m \cdot t\_m, 0.3333333333333333, 1\right) \cdot t\_m\right)\right)}{\ell}}\\
\mathbf{elif}\;t\_m \leq 1.45 \cdot 10^{+141}:\\
\;\;\;\;\left(\frac{2}{\left(\left(\sin k \cdot t\_m\right) \cdot t\_m\right) \cdot t\_m} \cdot \ell\right) \cdot \frac{\ell}{\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, k, 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\left(\left(\left(\frac{t\_m}{\ell} \cdot t\_m\right) \cdot \frac{t\_m}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right)}\\
\end{array}
\end{array}
if t < 1.00000000000000008e-86Initial program 52.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites51.8%
Taylor expanded in t around inf
Applied rewrites64.1%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites62.9%
if 1.00000000000000008e-86 < t < 1.45000000000000003e141Initial program 70.3%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval87.4
Applied rewrites87.4%
Applied rewrites92.7%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6492.7
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
cube-multN/A
Applied rewrites88.2%
if 1.45000000000000003e141 < t Initial program 80.2%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval92.6
Applied rewrites92.6%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval92.6
Applied rewrites92.6%
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
associate-*r*N/A
pow2N/A
lift-pow.f64N/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
unpow-prod-downN/A
pow2N/A
sqr-powN/A
pow2N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
metadata-evalN/A
lift-*.f64N/A
div-invN/A
Applied rewrites92.6%
Taylor expanded in t around inf
Applied rewrites92.6%
Final simplification71.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 5e-91)
(/
2.0
(/
(*
(* k k)
(fma
(* (/ (* t_m t_m) l) t_m)
2.0
(* (* (/ k l) k) (* (fma (* t_m t_m) 0.3333333333333333 1.0) t_m))))
l))
(/
2.0
(*
(*
(* (tan k) (fma (/ k (* t_m t_m)) k 2.0))
(* (* (/ t_m l) t_m) (sin k)))
(/ 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 <= 5e-91) {
tmp = 2.0 / (((k * k) * fma((((t_m * t_m) / l) * t_m), 2.0, (((k / l) * k) * (fma((t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l);
} else {
tmp = 2.0 / (((tan(k) * fma((k / (t_m * t_m)), k, 2.0)) * (((t_m / l) * t_m) * sin(k))) * (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 <= 5e-91) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * fma(Float64(Float64(Float64(t_m * t_m) / l) * t_m), 2.0, Float64(Float64(Float64(k / l) * k) * Float64(fma(Float64(t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l)); else tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * fma(Float64(k / Float64(t_m * t_m)), k, 2.0)) * Float64(Float64(Float64(t_m / l) * t_m) * sin(k))) * 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, 5e-91], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0 + N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333 + 1.0), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * k + 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $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}\;t\_m \leq 5 \cdot 10^{-91}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \mathsf{fma}\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_m, 2, \left(\frac{k}{\ell} \cdot k\right) \cdot \left(\mathsf{fma}\left(t\_m \cdot t\_m, 0.3333333333333333, 1\right) \cdot t\_m\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, k, 2\right)\right) \cdot \left(\left(\frac{t\_m}{\ell} \cdot t\_m\right) \cdot \sin k\right)\right) \cdot \frac{t\_m}{\ell}}\\
\end{array}
\end{array}
if t < 4.99999999999999997e-91Initial program 52.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites51.8%
Taylor expanded in t around inf
Applied rewrites64.1%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites62.9%
if 4.99999999999999997e-91 < t Initial program 73.3%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval88.9
Applied rewrites88.9%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval88.8
Applied rewrites88.8%
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
associate-*r*N/A
pow2N/A
lift-pow.f64N/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
unpow-prod-downN/A
pow2N/A
sqr-powN/A
pow2N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
metadata-evalN/A
lift-*.f64N/A
div-invN/A
Applied rewrites88.9%
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 rewrites92.2%
Final simplification72.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 2e+102)
(* (/ (/ l (* k t_m)) t_m) (/ (/ l k) t_m))
(/ 2.0 (* 2.0 (* (* (* (* (/ t_m l) t_m) (/ t_m l)) (sin k)) (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 ((l * l) <= 2e+102) {
tmp = ((l / (k * t_m)) / t_m) * ((l / k) / t_m);
} else {
tmp = 2.0 / (2.0 * (((((t_m / l) * t_m) * (t_m / l)) * sin(k)) * tan(k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 2d+102) then
tmp = ((l / (k * t_m)) / t_m) * ((l / k) / t_m)
else
tmp = 2.0d0 / (2.0d0 * (((((t_m / l) * t_m) * (t_m / l)) * sin(k)) * tan(k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 2e+102) {
tmp = ((l / (k * t_m)) / t_m) * ((l / k) / t_m);
} else {
tmp = 2.0 / (2.0 * (((((t_m / l) * t_m) * (t_m / l)) * Math.sin(k)) * Math.tan(k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 2e+102: tmp = ((l / (k * t_m)) / t_m) * ((l / k) / t_m) else: tmp = 2.0 / (2.0 * (((((t_m / l) * t_m) * (t_m / l)) * math.sin(k)) * math.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 (Float64(l * l) <= 2e+102) tmp = Float64(Float64(Float64(l / Float64(k * t_m)) / t_m) * Float64(Float64(l / k) / t_m)); else tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(Float64(Float64(Float64(t_m / l) * t_m) * Float64(t_m / l)) * sin(k)) * tan(k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 2e+102) tmp = ((l / (k * t_m)) / t_m) * ((l / k) / t_m); else tmp = 2.0 / (2.0 * (((((t_m / l) * t_m) * (t_m / l)) * sin(k)) * tan(k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e+102], N[(N[(N[(l / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(2.0 * N[(N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $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}\;\ell \cdot \ell \leq 2 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{\ell}{k \cdot t\_m}}{t\_m} \cdot \frac{\frac{\ell}{k}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\left(\left(\left(\frac{t\_m}{\ell} \cdot t\_m\right) \cdot \frac{t\_m}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 1.99999999999999995e102Initial program 70.5%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.5
Applied rewrites55.5%
Applied rewrites80.3%
if 1.99999999999999995e102 < (*.f64 l l) Initial program 42.4%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
lift-*.f64N/A
times-fracN/A
pow2N/A
lower-pow.f64N/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval35.1
Applied rewrites35.1%
lift-/.f64N/A
lift-pow.f64N/A
sqr-powN/A
associate-/l*N/A
lower-*.f64N/A
lower-pow.f64N/A
metadata-evalN/A
lower-/.f64N/A
lower-pow.f64N/A
metadata-eval35.1
Applied rewrites35.1%
lift-pow.f64N/A
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
associate-*r*N/A
pow2N/A
lift-pow.f64N/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
unpow-prod-downN/A
pow2N/A
sqr-powN/A
pow2N/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
metadata-evalN/A
lift-*.f64N/A
div-invN/A
Applied rewrites66.9%
Taylor expanded in t around inf
Applied rewrites72.1%
Final simplification76.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.05e-50)
(/
2.0
(/
(*
(* k k)
(fma
(* (/ (* t_m t_m) l) t_m)
2.0
(* (* (/ k l) k) (* (fma (* t_m t_m) 0.3333333333333333 1.0) t_m))))
l))
(* (/ 1.0 (* k t_m)) (* (pow (/ (* k t_m) l) -1.0) (/ 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 (t_m <= 1.05e-50) {
tmp = 2.0 / (((k * k) * fma((((t_m * t_m) / l) * t_m), 2.0, (((k / l) * k) * (fma((t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l);
} else {
tmp = (1.0 / (k * t_m)) * (pow(((k * t_m) / l), -1.0) * (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 (t_m <= 1.05e-50) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * fma(Float64(Float64(Float64(t_m * t_m) / l) * t_m), 2.0, Float64(Float64(Float64(k / l) * k) * Float64(fma(Float64(t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l)); else tmp = Float64(Float64(1.0 / Float64(k * t_m)) * Float64((Float64(Float64(k * t_m) / l) ^ -1.0) * Float64(l / t_m))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.05e-50], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0 + N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333 + 1.0), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[(k * t$95$m), $MachinePrecision] / l), $MachinePrecision], -1.0], $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.05 \cdot 10^{-50}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \mathsf{fma}\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_m, 2, \left(\frac{k}{\ell} \cdot k\right) \cdot \left(\mathsf{fma}\left(t\_m \cdot t\_m, 0.3333333333333333, 1\right) \cdot t\_m\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{k \cdot t\_m} \cdot \left({\left(\frac{k \cdot t\_m}{\ell}\right)}^{-1} \cdot \frac{\ell}{t\_m}\right)\\
\end{array}
\end{array}
if t < 1.05e-50Initial program 54.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites54.4%
Taylor expanded in t around inf
Applied rewrites64.3%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites63.8%
if 1.05e-50 < t Initial program 71.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6459.3
Applied rewrites59.3%
Applied rewrites74.6%
Applied rewrites83.1%
Final simplification69.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.05e-50)
(/
2.0
(/
(*
(* k k)
(fma
(* (/ (* t_m t_m) l) t_m)
2.0
(* (* (/ k l) k) (* (fma (* t_m t_m) 0.3333333333333333 1.0) t_m))))
l))
(* (* (/ l (* k t_m)) (/ l t_m)) (/ 1.0 (* k t_m))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.05e-50) {
tmp = 2.0 / (((k * k) * fma((((t_m * t_m) / l) * t_m), 2.0, (((k / l) * k) * (fma((t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l);
} else {
tmp = ((l / (k * t_m)) * (l / t_m)) * (1.0 / (k * t_m));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.05e-50) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * fma(Float64(Float64(Float64(t_m * t_m) / l) * t_m), 2.0, Float64(Float64(Float64(k / l) * k) * Float64(fma(Float64(t_m * t_m), 0.3333333333333333, 1.0) * t_m)))) / l)); else tmp = Float64(Float64(Float64(l / Float64(k * t_m)) * Float64(l / t_m)) * Float64(1.0 / Float64(k * t_m))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.05e-50], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * t$95$m), $MachinePrecision] * 2.0 + N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 0.3333333333333333 + 1.0), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(1.0 / 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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.05 \cdot 10^{-50}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \mathsf{fma}\left(\frac{t\_m \cdot t\_m}{\ell} \cdot t\_m, 2, \left(\frac{k}{\ell} \cdot k\right) \cdot \left(\mathsf{fma}\left(t\_m \cdot t\_m, 0.3333333333333333, 1\right) \cdot t\_m\right)\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k \cdot t\_m} \cdot \frac{\ell}{t\_m}\right) \cdot \frac{1}{k \cdot t\_m}\\
\end{array}
\end{array}
if t < 1.05e-50Initial program 54.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites54.4%
Taylor expanded in t around inf
Applied rewrites64.3%
Taylor expanded in k around 0
*-commutativeN/A
lower-*.f64N/A
Applied rewrites63.8%
if 1.05e-50 < t Initial program 71.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6459.3
Applied rewrites59.3%
Applied rewrites74.6%
Applied rewrites83.0%
Final simplification69.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.6e-153)
(/ (/ (* (/ l (* (* k k) t_m)) l) t_m) t_m)
(if (<= t_m 1.35e-14)
(/
2.0
(*
(* (* (/ k l) k) (* (* t_m t_m) (/ t_m l)))
(fma (/ k t_m) (/ k t_m) 2.0)))
(* (* (/ l (* k t_m)) (/ l t_m)) (/ 1.0 (* k t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.6e-153) {
tmp = (((l / ((k * k) * t_m)) * l) / t_m) / t_m;
} else if (t_m <= 1.35e-14) {
tmp = 2.0 / ((((k / l) * k) * ((t_m * t_m) * (t_m / l))) * fma((k / t_m), (k / t_m), 2.0));
} else {
tmp = ((l / (k * t_m)) * (l / t_m)) * (1.0 / (k * t_m));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.6e-153) tmp = Float64(Float64(Float64(Float64(l / Float64(Float64(k * k) * t_m)) * l) / t_m) / t_m); elseif (t_m <= 1.35e-14) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k / l) * k) * Float64(Float64(t_m * t_m) * Float64(t_m / l))) * fma(Float64(k / t_m), Float64(k / t_m), 2.0))); else tmp = Float64(Float64(Float64(l / Float64(k * t_m)) * Float64(l / t_m)) * Float64(1.0 / Float64(k * t_m))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.6e-153], N[(N[(N[(N[(l / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $MachinePrecision], If[LessEqual[t$95$m, 1.35e-14], N[(2.0 / N[(N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(1.0 / 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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-153}:\\
\;\;\;\;\frac{\frac{\frac{\ell}{\left(k \cdot k\right) \cdot t\_m} \cdot \ell}{t\_m}}{t\_m}\\
\mathbf{elif}\;t\_m \leq 1.35 \cdot 10^{-14}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{k}{\ell} \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{t\_m}{\ell}\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k \cdot t\_m} \cdot \frac{\ell}{t\_m}\right) \cdot \frac{1}{k \cdot t\_m}\\
\end{array}
\end{array}
if t < 1.6e-153Initial program 52.6%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.2
Applied rewrites52.2%
Applied rewrites61.3%
if 1.6e-153 < t < 1.3499999999999999e-14Initial program 67.1%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-/.f64N/A
associate-*l/N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lift-pow.f64N/A
unpow3N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6476.2
Applied rewrites76.2%
Taylor expanded in k around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites83.9%
lift-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
associate-+l+N/A
lift-pow.f64N/A
unpow2N/A
metadata-evalN/A
lower-fma.f6483.9
Applied rewrites83.9%
Taylor expanded in k around 0
*-lft-identityN/A
associate-*l/N/A
unpow2N/A
associate-*r*N/A
associate-*l/N/A
*-lft-identityN/A
lower-*.f64N/A
lower-/.f6483.9
Applied rewrites83.9%
if 1.3499999999999999e-14 < t Initial program 72.1%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.7
Applied rewrites58.7%
Applied rewrites75.3%
Applied rewrites83.0%
Final simplification68.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1e+26)
(* (* (/ l (* k t_m)) (/ l t_m)) (/ 1.0 (* k t_m)))
(/ (/ (* (/ 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) {
double tmp;
if (k <= 1e+26) {
tmp = ((l / (k * t_m)) * (l / t_m)) * (1.0 / (k * t_m));
} else {
tmp = (((l / ((k * k) * t_m)) * 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) :: tmp
if (k <= 1d+26) then
tmp = ((l / (k * t_m)) * (l / t_m)) * (1.0d0 / (k * t_m))
else
tmp = (((l / ((k * k) * t_m)) * 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 tmp;
if (k <= 1e+26) {
tmp = ((l / (k * t_m)) * (l / t_m)) * (1.0 / (k * t_m));
} else {
tmp = (((l / ((k * k) * t_m)) * 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): tmp = 0 if k <= 1e+26: tmp = ((l / (k * t_m)) * (l / t_m)) * (1.0 / (k * t_m)) else: tmp = (((l / ((k * k) * t_m)) * 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 (k <= 1e+26) tmp = Float64(Float64(Float64(l / Float64(k * t_m)) * Float64(l / t_m)) * Float64(1.0 / Float64(k * t_m))); else tmp = Float64(Float64(Float64(Float64(l / Float64(Float64(k * k) * t_m)) * 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) tmp = 0.0; if (k <= 1e+26) tmp = ((l / (k * t_m)) * (l / t_m)) * (1.0 / (k * t_m)); else tmp = (((l / ((k * k) * t_m)) * 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_] := N[(t$95$s * If[LessEqual[k, 1e+26], N[(N[(N[(l / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 10^{+26}:\\
\;\;\;\;\left(\frac{\ell}{k \cdot t\_m} \cdot \frac{\ell}{t\_m}\right) \cdot \frac{1}{k \cdot t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell}{\left(k \cdot k\right) \cdot t\_m} \cdot \ell}{t\_m}}{t\_m}\\
\end{array}
\end{array}
if k < 1.00000000000000005e26Initial program 62.4%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.5
Applied rewrites55.5%
Applied rewrites68.6%
Applied rewrites76.7%
if 1.00000000000000005e26 < k Initial program 43.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6447.7
Applied rewrites47.7%
Applied rewrites54.9%
Final simplification72.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.65e+80)
(/ (/ (* (/ l (* (* k k) t_m)) l) t_m) t_m)
(* (/ 1.0 (* (* (* k t_m) (* k t_m)) (/ t_m l))) l))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.65e+80) {
tmp = (((l / ((k * k) * t_m)) * l) / t_m) / t_m;
} else {
tmp = (1.0 / (((k * t_m) * (k * t_m)) * (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+80) then
tmp = (((l / ((k * k) * t_m)) * l) / t_m) / t_m
else
tmp = (1.0d0 / (((k * t_m) * (k * t_m)) * (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+80) {
tmp = (((l / ((k * k) * t_m)) * l) / t_m) / t_m;
} else {
tmp = (1.0 / (((k * t_m) * (k * t_m)) * (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+80: tmp = (((l / ((k * k) * t_m)) * l) / t_m) / t_m else: tmp = (1.0 / (((k * t_m) * (k * t_m)) * (t_m / l))) * l return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.65e+80) tmp = Float64(Float64(Float64(Float64(l / Float64(Float64(k * k) * t_m)) * l) / t_m) / t_m); else tmp = Float64(Float64(1.0 / Float64(Float64(Float64(k * t_m) * Float64(k * t_m)) * 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+80) tmp = (((l / ((k * k) * t_m)) * l) / t_m) / t_m; else tmp = (1.0 / (((k * t_m) * (k * t_m)) * (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+80], N[(N[(N[(N[(l / N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] / t$95$m), $MachinePrecision] / t$95$m), $MachinePrecision], N[(N[(1.0 / N[(N[(N[(k * t$95$m), $MachinePrecision] * N[(k * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $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^{+80}:\\
\;\;\;\;\frac{\frac{\frac{\ell}{\left(k \cdot k\right) \cdot t\_m} \cdot \ell}{t\_m}}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(\left(k \cdot t\_m\right) \cdot \left(k \cdot t\_m\right)\right) \cdot \frac{t\_m}{\ell}} \cdot \ell\\
\end{array}
\end{array}
if t < 1.64999999999999995e80Initial program 57.1%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.1
Applied rewrites53.1%
Applied rewrites61.5%
if 1.64999999999999995e80 < t Initial program 67.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.9
Applied rewrites58.9%
Applied rewrites86.7%
Applied rewrites86.7%
Applied rewrites91.1%
Final simplification66.5%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (/ l (* (* t_m t_m) k)) (/ l (* 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 / ((t_m * t_m) * k)) * (l / (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 / ((t_m * t_m) * k)) * (l / (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 / ((t_m * t_m) * k)) * (l / (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 / ((t_m * t_m) * k)) * (l / (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(l / Float64(Float64(t_m * t_m) * k)) * Float64(l / 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 / ((t_m * t_m) * k)) * (l / (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[(l / N[(N[(t$95$m * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(l / 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 \left(\frac{\ell}{\left(t\_m \cdot t\_m\right) \cdot k} \cdot \frac{\ell}{k \cdot t\_m}\right)
\end{array}
Initial program 58.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.1
Applied rewrites54.1%
Applied rewrites69.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 (* (/ l (* (* (* k t_m) t_m) (* k t_m))) l)))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l / (((k * t_m) * t_m) * (k * t_m))) * l);
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l / (((k * t_m) * t_m) * (k * t_m))) * l)
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l / (((k * t_m) * t_m) * (k * t_m))) * l);
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l / (((k * t_m) * t_m) * (k * t_m))) * l)
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l / Float64(Float64(Float64(k * t_m) * t_m) * Float64(k * t_m))) * l)) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l / (((k * t_m) * t_m) * (k * t_m))) * l); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l / N[(N[(N[(k * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(k * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\frac{\ell}{\left(\left(k \cdot t\_m\right) \cdot t\_m\right) \cdot \left(k \cdot t\_m\right)} \cdot \ell\right)
\end{array}
Initial program 58.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.1
Applied rewrites54.1%
Applied rewrites67.7%
Applied rewrites68.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 (* (/ l (* (* (* k k) t_m) (* t_m t_m))) l)))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l / (((k * k) * t_m) * (t_m * t_m))) * l);
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l / (((k * k) * t_m) * (t_m * t_m))) * l)
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l / (((k * k) * t_m) * (t_m * t_m))) * l);
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l / (((k * k) * t_m) * (t_m * t_m))) * l)
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l / Float64(Float64(Float64(k * k) * t_m) * Float64(t_m * t_m))) * l)) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l / (((k * k) * t_m) * (t_m * t_m))) * l); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l / N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\frac{\ell}{\left(\left(k \cdot k\right) \cdot t\_m\right) \cdot \left(t\_m \cdot t\_m\right)} \cdot \ell\right)
\end{array}
Initial program 58.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.1
Applied rewrites54.1%
Applied rewrites67.7%
Applied rewrites58.0%
herbie shell --seed 2024235
(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))))