
(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
(let* ((t_2 (/ (sin k) l)) (t_3 (* t_m (/ (tan k) l))))
(*
t_s
(if (<= t_m 1e-142)
(/ 2.0 (* t_3 (* k (* k t_2))))
(if (<= t_m 1e+102)
(/ 2.0 (* t_3 (* t_2 (fma k k (* 2.0 (* t_m t_m))))))
(/
2.0
(*
(* (tan k) (* (/ t_m l) (* t_m (/ (* t_m (sin k)) l))))
(+ 1.0 (+ 1.0 (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 t_2 = sin(k) / l;
double t_3 = t_m * (tan(k) / l);
double tmp;
if (t_m <= 1e-142) {
tmp = 2.0 / (t_3 * (k * (k * t_2)));
} else if (t_m <= 1e+102) {
tmp = 2.0 / (t_3 * (t_2 * fma(k, k, (2.0 * (t_m * t_m)))));
} else {
tmp = 2.0 / ((tan(k) * ((t_m / l) * (t_m * ((t_m * sin(k)) / l)))) * (1.0 + (1.0 + 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) t_2 = Float64(sin(k) / l) t_3 = Float64(t_m * Float64(tan(k) / l)) tmp = 0.0 if (t_m <= 1e-142) tmp = Float64(2.0 / Float64(t_3 * Float64(k * Float64(k * t_2)))); elseif (t_m <= 1e+102) tmp = Float64(2.0 / Float64(t_3 * Float64(t_2 * fma(k, k, Float64(2.0 * Float64(t_m * t_m)))))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(t_m / l) * Float64(t_m * Float64(Float64(t_m * sin(k)) / l)))) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1e-142], N[(2.0 / N[(t$95$3 * N[(k * N[(k * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1e+102], N[(2.0 / N[(t$95$3 * N[(t$95$2 * N[(k * k + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t_3 := t\_m \cdot \frac{\tan k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-142}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \left(k \cdot \left(k \cdot t\_2\right)\right)}\\
\mathbf{elif}\;t\_m \leq 10^{+102}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \left(t\_2 \cdot \mathsf{fma}\left(k, k, 2 \cdot \left(t\_m \cdot t\_m\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{t\_m}{\ell} \cdot \left(t\_m \cdot \frac{t\_m \cdot \sin k}{\ell}\right)\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1e-142Initial program 48.2%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites71.2%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6481.4
Applied rewrites81.4%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites83.8%
Taylor expanded in k around inf
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6476.0
Applied rewrites76.0%
if 1e-142 < t < 9.99999999999999977e101Initial program 66.8%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites73.0%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6481.3
Applied rewrites81.3%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites89.5%
if 9.99999999999999977e101 < t Initial program 60.0%
lift-pow.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6488.6
Applied rewrites88.6%
lift-sin.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6492.8
Applied rewrites92.8%
Final simplification81.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 (<=
(*
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))
INFINITY)
(* (/ l (* t_m k)) (/ l (* t_m (* t_m k))))
(* (/ l t_m) (/ l (* t_m (* t_m (* k k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (((1.0 + (1.0 + pow((k / t_m), 2.0))) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))))) <= ((double) INFINITY)) {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
} else {
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
}
return t_s * tmp;
}
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 (((1.0 + (1.0 + Math.pow((k / t_m), 2.0))) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))))) <= Double.POSITIVE_INFINITY) {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
} else {
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if ((1.0 + (1.0 + math.pow((k / t_m), 2.0))) * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) <= math.inf: tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k))) else: tmp = (l / t_m) * (l / (t_m * (t_m * (k * k)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) <= Inf) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(t_m * Float64(t_m * k)))); else tmp = Float64(Float64(l / t_m) * Float64(l / Float64(t_m * Float64(t_m * Float64(k * k))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (((1.0 + (1.0 + ((k / t_m) ^ 2.0))) * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))) <= Inf) tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k))); else tmp = (l / t_m) * (l / (t_m * (t_m * (k * k)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if (*.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))) < +inf.0Initial program 80.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6471.5
Applied rewrites71.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6473.0
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6480.6
Applied rewrites80.6%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6480.6
Applied rewrites80.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6487.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6487.7
Applied rewrites87.7%
if +inf.0 < (*.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 0.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6416.6
Applied rewrites16.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6442.8
Applied rewrites42.8%
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 (<=
(*
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))
INFINITY)
(* (/ l (* t_m k)) (/ l (* k (* t_m t_m))))
(* (/ l t_m) (/ l (* t_m (* t_m (* k k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (((1.0 + (1.0 + pow((k / t_m), 2.0))) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))))) <= ((double) INFINITY)) {
tmp = (l / (t_m * k)) * (l / (k * (t_m * t_m)));
} else {
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
}
return t_s * tmp;
}
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 (((1.0 + (1.0 + Math.pow((k / t_m), 2.0))) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))))) <= Double.POSITIVE_INFINITY) {
tmp = (l / (t_m * k)) * (l / (k * (t_m * t_m)));
} else {
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if ((1.0 + (1.0 + math.pow((k / t_m), 2.0))) * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) <= math.inf: tmp = (l / (t_m * k)) * (l / (k * (t_m * t_m))) else: tmp = (l / t_m) * (l / (t_m * (t_m * (k * k)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) <= Inf) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(k * Float64(t_m * t_m)))); else tmp = Float64(Float64(l / t_m) * Float64(l / Float64(t_m * Float64(t_m * Float64(k * k))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (((1.0 + (1.0 + ((k / t_m) ^ 2.0))) * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))) <= Inf) tmp = (l / (t_m * k)) * (l / (k * (t_m * t_m))); else tmp = (l / t_m) * (l / (t_m * (t_m * (k * k)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{k \cdot \left(t\_m \cdot t\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if (*.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))) < +inf.0Initial program 80.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6471.5
Applied rewrites71.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6473.0
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6480.6
Applied rewrites80.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6484.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6484.4
Applied rewrites84.4%
if +inf.0 < (*.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 0.0%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6416.6
Applied rewrites16.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6442.8
Applied rewrites42.8%
Final simplification70.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (sin k) l)) (t_3 (* t_m (/ (tan k) l))))
(*
t_s
(if (<= t_m 1e-142)
(/ 2.0 (* t_3 (* k (* k t_2))))
(if (<= t_m 1.05e+103)
(/ 2.0 (* t_3 (* t_2 (fma k k (* 2.0 (* t_m t_m))))))
(/
2.0
(*
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))
(* (tan k) (* t_m (* (/ t_m l) (/ (* t_m (sin k)) l)))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) / l;
double t_3 = t_m * (tan(k) / l);
double tmp;
if (t_m <= 1e-142) {
tmp = 2.0 / (t_3 * (k * (k * t_2)));
} else if (t_m <= 1.05e+103) {
tmp = 2.0 / (t_3 * (t_2 * fma(k, k, (2.0 * (t_m * t_m)))));
} else {
tmp = 2.0 / ((1.0 + (1.0 + pow((k / t_m), 2.0))) * (tan(k) * (t_m * ((t_m / l) * ((t_m * sin(k)) / l)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) / l) t_3 = Float64(t_m * Float64(tan(k) / l)) tmp = 0.0 if (t_m <= 1e-142) tmp = Float64(2.0 / Float64(t_3 * Float64(k * Float64(k * t_2)))); elseif (t_m <= 1.05e+103) tmp = Float64(2.0 / Float64(t_3 * Float64(t_2 * fma(k, k, Float64(2.0 * Float64(t_m * t_m)))))); else tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))) * Float64(tan(k) * Float64(t_m * Float64(Float64(t_m / l) * Float64(Float64(t_m * sin(k)) / l)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1e-142], N[(2.0 / N[(t$95$3 * N[(k * N[(k * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+103], N[(2.0 / N[(t$95$3 * N[(t$95$2 * N[(k * k + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t_3 := t\_m \cdot \frac{\tan k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-142}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \left(k \cdot \left(k \cdot t\_2\right)\right)}\\
\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+103}:\\
\;\;\;\;\frac{2}{t\_3 \cdot \left(t\_2 \cdot \mathsf{fma}\left(k, k, 2 \cdot \left(t\_m \cdot t\_m\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot \sin k}{\ell}\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1e-142Initial program 48.2%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites71.2%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6481.4
Applied rewrites81.4%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites83.8%
Taylor expanded in k around inf
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6476.0
Applied rewrites76.0%
if 1e-142 < t < 1.0500000000000001e103Initial program 66.8%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites73.0%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6481.3
Applied rewrites81.3%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites89.5%
if 1.0500000000000001e103 < t Initial program 60.0%
lift-pow.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-pow.f64N/A
cube-multN/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6488.6
Applied rewrites88.6%
lift-/.f64N/A
lift-sin.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6490.9
Applied rewrites90.9%
Final simplification81.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 1.26e-142)
(/ 2.0 (* (* t_m (/ (tan k) l)) (* k (* k (/ (sin k) l)))))
(/
2.0
(*
(/ (* t_m (* t_m (sin k))) l)
(* (/ t_m l) (* (tan k) (fma k (/ k (* t_m 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.26e-142) {
tmp = 2.0 / ((t_m * (tan(k) / l)) * (k * (k * (sin(k) / l))));
} else {
tmp = 2.0 / (((t_m * (t_m * sin(k))) / l) * ((t_m / l) * (tan(k) * fma(k, (k / (t_m * 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.26e-142) tmp = Float64(2.0 / Float64(Float64(t_m * Float64(tan(k) / l)) * Float64(k * Float64(k * Float64(sin(k) / l))))); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64(t_m * sin(k))) / l) * Float64(Float64(t_m / l) * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.26e-142], N[(2.0 / N[(N[(t$95$m * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.26 \cdot 10^{-142}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\tan k}{\ell}\right) \cdot \left(k \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \left(t\_m \cdot \sin k\right)}{\ell} \cdot \left(\frac{t\_m}{\ell} \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)\right)}\\
\end{array}
\end{array}
if t < 1.26000000000000007e-142Initial program 48.2%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites71.2%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6481.4
Applied rewrites81.4%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites83.8%
Taylor expanded in k around inf
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6476.0
Applied rewrites76.0%
if 1.26000000000000007e-142 < t Initial program 63.5%
Applied rewrites64.3%
Applied rewrites90.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 2.75e-104)
(* (/ l (* t_m k)) (/ l (* t_m (* t_m k))))
(if (<= k 9e+152)
(*
l
(/
(* l (/ 2.0 (* t_m (tan k))))
(* (sin k) (fma t_m (* t_m 2.0) (* k k)))))
(/ 2.0 (* (* t_m (/ (tan k) l)) (* k (* k (/ (sin k) l)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.75e-104) {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
} else if (k <= 9e+152) {
tmp = l * ((l * (2.0 / (t_m * tan(k)))) / (sin(k) * fma(t_m, (t_m * 2.0), (k * k))));
} else {
tmp = 2.0 / ((t_m * (tan(k) / l)) * (k * (k * (sin(k) / l))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.75e-104) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(t_m * Float64(t_m * k)))); elseif (k <= 9e+152) tmp = Float64(l * Float64(Float64(l * Float64(2.0 / Float64(t_m * tan(k)))) / Float64(sin(k) * fma(t_m, Float64(t_m * 2.0), Float64(k * k))))); else tmp = Float64(2.0 / Float64(Float64(t_m * Float64(tan(k) / l)) * Float64(k * Float64(k * Float64(sin(k) / l))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.75e-104], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9e+152], N[(l * N[(N[(l * N[(2.0 / N[(t$95$m * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(t$95$m * N[(t$95$m * 2.0), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.75 \cdot 10^{-104}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\mathbf{elif}\;k \leq 9 \cdot 10^{+152}:\\
\;\;\;\;\ell \cdot \frac{\ell \cdot \frac{2}{t\_m \cdot \tan k}}{\sin k \cdot \mathsf{fma}\left(t\_m, t\_m \cdot 2, k \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\tan k}{\ell}\right) \cdot \left(k \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}\\
\end{array}
\end{array}
if k < 2.7499999999999999e-104Initial program 56.6%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.4
Applied rewrites53.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6457.4
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6467.8
Applied rewrites67.8%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6468.5
Applied rewrites68.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6477.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6477.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6477.0
Applied rewrites77.0%
if 2.7499999999999999e-104 < k < 9.0000000000000002e152Initial program 48.4%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites85.8%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6488.9
Applied rewrites88.9%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites96.4%
lift-tan.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
Applied rewrites96.7%
if 9.0000000000000002e152 < k Initial program 50.2%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites65.6%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6465.6
Applied rewrites65.6%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites65.9%
Taylor expanded in k around inf
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6481.4
Applied rewrites81.4%
Final simplification82.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (sin k) l)))
(*
t_s
(if (<= k 2e-140)
(* (/ l (* t_m k)) (/ l (* t_m (* t_m k))))
(if (<= k 1320000000.0)
(/ 2.0 (* (* t_2 (fma k k (* 2.0 (* t_m t_m)))) (* t_m (/ k l))))
(/ 2.0 (* (* t_m (/ (tan k) l)) (* k (* k t_2)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sin(k) / l;
double tmp;
if (k <= 2e-140) {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
} else if (k <= 1320000000.0) {
tmp = 2.0 / ((t_2 * fma(k, k, (2.0 * (t_m * t_m)))) * (t_m * (k / l)));
} else {
tmp = 2.0 / ((t_m * (tan(k) / l)) * (k * (k * t_2)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sin(k) / l) tmp = 0.0 if (k <= 2e-140) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(t_m * Float64(t_m * k)))); elseif (k <= 1320000000.0) tmp = Float64(2.0 / Float64(Float64(t_2 * fma(k, k, Float64(2.0 * Float64(t_m * t_m)))) * Float64(t_m * Float64(k / l)))); else tmp = Float64(2.0 / Float64(Float64(t_m * Float64(tan(k) / l)) * Float64(k * Float64(k * t_2)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2e-140], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1320000000.0], N[(2.0 / N[(N[(t$95$2 * N[(k * k + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sin k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-140}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\mathbf{elif}\;k \leq 1320000000:\\
\;\;\;\;\frac{2}{\left(t\_2 \cdot \mathsf{fma}\left(k, k, 2 \cdot \left(t\_m \cdot t\_m\right)\right)\right) \cdot \left(t\_m \cdot \frac{k}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\tan k}{\ell}\right) \cdot \left(k \cdot \left(k \cdot t\_2\right)\right)}\\
\end{array}
\end{array}
\end{array}
if k < 2e-140Initial program 56.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.9
Applied rewrites52.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6456.4
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6466.8
Applied rewrites66.8%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.7
Applied rewrites75.7%
if 2e-140 < k < 1.32e9Initial program 44.3%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites71.8%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6479.5
Applied rewrites79.5%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites94.4%
Taylor expanded in k around 0
lower-/.f6494.4
Applied rewrites94.4%
if 1.32e9 < k Initial program 51.8%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites79.4%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6479.4
Applied rewrites79.4%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites80.8%
Taylor expanded in k around inf
associate-/l*N/A
unpow2N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-sin.f6484.2
Applied rewrites84.2%
Final simplification80.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2e-140)
(* (/ l (* t_m k)) (/ l (* t_m (* t_m k))))
(if (<= k 1320000000.0)
(/
2.0
(* (* (/ (sin k) l) (fma k k (* 2.0 (* t_m t_m)))) (* t_m (/ k l))))
(/ 2.0 (* (* (tan k) (/ (sin k) (* l l))) (* t_m (* k k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2e-140) {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
} else if (k <= 1320000000.0) {
tmp = 2.0 / (((sin(k) / l) * fma(k, k, (2.0 * (t_m * t_m)))) * (t_m * (k / l)));
} else {
tmp = 2.0 / ((tan(k) * (sin(k) / (l * l))) * (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2e-140) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(t_m * Float64(t_m * k)))); elseif (k <= 1320000000.0) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) / l) * fma(k, k, Float64(2.0 * Float64(t_m * t_m)))) * Float64(t_m * Float64(k / l)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) / Float64(l * l))) * Float64(t_m * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2e-140], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1320000000.0], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(k * k + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-140}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\mathbf{elif}\;k \leq 1320000000:\\
\;\;\;\;\frac{2}{\left(\frac{\sin k}{\ell} \cdot \mathsf{fma}\left(k, k, 2 \cdot \left(t\_m \cdot t\_m\right)\right)\right) \cdot \left(t\_m \cdot \frac{k}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \frac{\sin k}{\ell \cdot \ell}\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 2e-140Initial program 56.9%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.9
Applied rewrites52.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6456.4
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6466.8
Applied rewrites66.8%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.7
Applied rewrites75.7%
if 2e-140 < k < 1.32e9Initial program 44.3%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites71.8%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6479.5
Applied rewrites79.5%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites94.4%
Taylor expanded in k around 0
lower-/.f6494.4
Applied rewrites94.4%
if 1.32e9 < k Initial program 51.8%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites79.4%
lift-sin.f64N/A
lift-pow.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
Applied rewrites76.8%
Taylor expanded in t around 0
lower-*.f64N/A
unpow2N/A
lower-*.f6472.9
Applied rewrites72.9%
Final simplification77.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 5e+76)
(/ 2.0 (* (* (/ (sin k) l) (fma k k (* 2.0 (* t_m t_m)))) (* t_m (/ k l))))
(* l (/ (/ l (* t_m k)) (* t_m (* t_m k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 5e+76) {
tmp = 2.0 / (((sin(k) / l) * fma(k, k, (2.0 * (t_m * t_m)))) * (t_m * (k / l)));
} else {
tmp = l * ((l / (t_m * k)) / (t_m * (t_m * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 5e+76) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) / l) * fma(k, k, Float64(2.0 * Float64(t_m * t_m)))) * Float64(t_m * Float64(k / l)))); else tmp = Float64(l * Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * Float64(t_m * k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 5e+76], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(k * k + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(t$95$m * 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 5 \cdot 10^{+76}:\\
\;\;\;\;\frac{2}{\left(\frac{\sin k}{\ell} \cdot \mathsf{fma}\left(k, k, 2 \cdot \left(t\_m \cdot t\_m\right)\right)\right) \cdot \left(t\_m \cdot \frac{k}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 4.99999999999999991e76Initial program 59.7%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites76.9%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6494.0
Applied rewrites94.0%
lift-sin.f64N/A
lift-cos.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-sin.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites97.6%
Taylor expanded in k around 0
lower-/.f6489.2
Applied rewrites89.2%
if 4.99999999999999991e76 < (*.f64 l l) Initial program 47.3%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6453.6
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6461.1
Applied rewrites61.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
Final simplification78.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 (<= (* l l) 5e+76)
(/ 2.0 (* t_m (* (fma k k (* 2.0 (* t_m t_m))) (* (/ (sin k) l) (/ k l)))))
(* l (/ (/ l (* t_m k)) (* t_m (* t_m k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 5e+76) {
tmp = 2.0 / (t_m * (fma(k, k, (2.0 * (t_m * t_m))) * ((sin(k) / l) * (k / l))));
} else {
tmp = l * ((l / (t_m * k)) / (t_m * (t_m * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 5e+76) tmp = Float64(2.0 / Float64(t_m * Float64(fma(k, k, Float64(2.0 * Float64(t_m * t_m))) * Float64(Float64(sin(k) / l) * Float64(k / l))))); else tmp = Float64(l * Float64(Float64(l / Float64(t_m * k)) / Float64(t_m * Float64(t_m * k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 5e+76], N[(2.0 / N[(t$95$m * N[(N[(k * k + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(t$95$m * 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 5 \cdot 10^{+76}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(k, k, 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot \left(\frac{\sin k}{\ell} \cdot \frac{k}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{t\_m \cdot k}}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 4.99999999999999991e76Initial program 59.7%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites76.9%
lift-sin.f64N/A
unpow2N/A
lift-cos.f64N/A
lift-*.f64N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6494.0
Applied rewrites94.0%
Taylor expanded in k around 0
lower-/.f6486.3
Applied rewrites86.3%
if 4.99999999999999991e76 < (*.f64 l l) Initial program 47.3%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.6
Applied rewrites51.6%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6453.6
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6461.1
Applied rewrites61.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
Final simplification77.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 9e-113)
(/
2.0
(* t_m (* (fma k k (* 2.0 (* t_m t_m))) (/ (* k k) (* l (* l (cos k)))))))
(* (/ l (* t_m k)) (/ l (* t_m (* t_m k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9e-113) {
tmp = 2.0 / (t_m * (fma(k, k, (2.0 * (t_m * t_m))) * ((k * k) / (l * (l * cos(k))))));
} else {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 9e-113) tmp = Float64(2.0 / Float64(t_m * Float64(fma(k, k, Float64(2.0 * Float64(t_m * t_m))) * Float64(Float64(k * k) / Float64(l * Float64(l * cos(k))))))); else tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(t_m * Float64(t_m * k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9e-113], N[(2.0 / N[(t$95$m * N[(N[(k * k + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * 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 9 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(k, k, 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot \frac{k \cdot k}{\ell \cdot \left(\ell \cdot \cos k\right)}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\end{array}
\end{array}
if t < 9.0000000000000002e-113Initial program 48.6%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites71.5%
Taylor expanded in k around 0
unpow2N/A
lower-*.f6465.5
Applied rewrites65.5%
if 9.0000000000000002e-113 < t Initial program 63.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.8
Applied rewrites55.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6458.4
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6463.2
Applied rewrites63.2%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6464.3
Applied rewrites64.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.5
Applied rewrites75.5%
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 9e-54)
(* (/ l (* t_m k)) (/ l (* t_m (* t_m k))))
(/
2.0
(*
t_m
(*
(fma k k (* 2.0 (* t_m t_m)))
(*
(* k k)
(fma (/ (* k k) l) (/ 0.16666666666666666 l) (/ 1.0 (* l l))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 9e-54) {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
} else {
tmp = 2.0 / (t_m * (fma(k, k, (2.0 * (t_m * t_m))) * ((k * k) * fma(((k * k) / l), (0.16666666666666666 / l), (1.0 / (l * l))))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 9e-54) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(t_m * Float64(t_m * k)))); else tmp = Float64(2.0 / Float64(t_m * Float64(fma(k, k, Float64(2.0 * Float64(t_m * t_m))) * Float64(Float64(k * k) * fma(Float64(Float64(k * k) / l), Float64(0.16666666666666666 / l), Float64(1.0 / Float64(l * l))))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 9e-54], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[(k * k + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * N[(0.16666666666666666 / l), $MachinePrecision] + N[(1.0 / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 9 \cdot 10^{-54}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(k, k, 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot \left(\left(k \cdot k\right) \cdot \mathsf{fma}\left(\frac{k \cdot k}{\ell}, \frac{0.16666666666666666}{\ell}, \frac{1}{\ell \cdot \ell}\right)\right)\right)}\\
\end{array}
\end{array}
if k < 8.9999999999999997e-54Initial program 54.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.5
Applied rewrites53.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6457.2
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6466.9
Applied rewrites66.9%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6467.5
Applied rewrites67.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6476.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6476.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6476.5
Applied rewrites76.5%
if 8.9999999999999997e-54 < k Initial program 51.7%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites79.9%
Taylor expanded in k around 0
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
associate-*l/N/A
associate-*r/N/A
*-commutativeN/A
associate-*l/N/A
associate-*r/N/A
metadata-evalN/A
associate-*r/N/A
lower-fma.f64N/A
Applied rewrites64.9%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f6464.0
Applied rewrites64.0%
Final simplification72.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8.8e-113)
(/ 2.0 (* t_m (* (fma k k (* 2.0 (* t_m t_m))) (/ (* k k) (* l l)))))
(* (/ l (* t_m k)) (/ l (* t_m (* t_m k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.8e-113) {
tmp = 2.0 / (t_m * (fma(k, k, (2.0 * (t_m * t_m))) * ((k * k) / (l * l))));
} else {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8.8e-113) tmp = Float64(2.0 / Float64(t_m * Float64(fma(k, k, Float64(2.0 * Float64(t_m * t_m))) * Float64(Float64(k * k) / Float64(l * l))))); else tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(t_m * Float64(t_m * k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.8e-113], N[(2.0 / N[(t$95$m * N[(N[(k * k + N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * 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 8.8 \cdot 10^{-113}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left(\mathsf{fma}\left(k, k, 2 \cdot \left(t\_m \cdot t\_m\right)\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\end{array}
\end{array}
if t < 8.80000000000000016e-113Initial program 48.6%
Taylor expanded in t around 0
lower-*.f64N/A
associate-/l*N/A
associate-*r*N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
Applied rewrites71.5%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
if 8.80000000000000016e-113 < t Initial program 63.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.8
Applied rewrites55.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6458.4
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6463.2
Applied rewrites63.2%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6464.3
Applied rewrites64.3%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6475.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6475.5
Applied rewrites75.5%
Final simplification68.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 190.0)
(* (/ l (* t_m k)) (/ l (* t_m (* t_m k))))
(/ (/ (* l l) t_m) (* t_m (* t_m (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 190.0) {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
} else {
tmp = ((l * l) / t_m) / (t_m * (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 190.0d0) then
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)))
else
tmp = ((l * l) / t_m) / (t_m * (t_m * (k * k)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 190.0) {
tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k)));
} else {
tmp = ((l * l) / t_m) / (t_m * (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 190.0: tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k))) else: tmp = ((l * l) / t_m) / (t_m * (t_m * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 190.0) tmp = Float64(Float64(l / Float64(t_m * k)) * Float64(l / Float64(t_m * Float64(t_m * k)))); else tmp = Float64(Float64(Float64(l * l) / t_m) / Float64(t_m * Float64(t_m * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 190.0) tmp = (l / (t_m * k)) * (l / (t_m * (t_m * k))); else tmp = ((l * l) / t_m) / (t_m * (t_m * (k * k))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 190.0], N[(N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] / t$95$m), $MachinePrecision] / N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 190:\\
\;\;\;\;\frac{\ell}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell \cdot \ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 190Initial program 54.1%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.2
Applied rewrites55.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6459.1
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6468.0
Applied rewrites68.0%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6468.5
Applied rewrites68.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6476.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6476.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6476.8
Applied rewrites76.8%
if 190 < k Initial program 52.5%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6447.5
Applied rewrites47.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6459.7
Applied rewrites59.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 (<= k 8.2e-162)
(* l (/ l (* t_m (* k (* t_m (* t_m k))))))
(* (/ l t_m) (/ l (* t_m (* t_m (* k k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 8.2e-162) {
tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))));
} else {
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 8.2d-162) then
tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))))
else
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 8.2e-162) {
tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))));
} else {
tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 8.2e-162: tmp = l * (l / (t_m * (k * (t_m * (t_m * k))))) else: tmp = (l / t_m) * (l / (t_m * (t_m * (k * k)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 8.2e-162) tmp = Float64(l * Float64(l / Float64(t_m * Float64(k * Float64(t_m * Float64(t_m * k)))))); else tmp = Float64(Float64(l / t_m) * Float64(l / Float64(t_m * Float64(t_m * Float64(k * k))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 8.2e-162) tmp = l * (l / (t_m * (k * (t_m * (t_m * k))))); else tmp = (l / t_m) * (l / (t_m * (t_m * (k * k)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 8.2e-162], N[(l * N[(l / N[(t$95$m * N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 8.2 \cdot 10^{-162}:\\
\;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 8.20000000000000039e-162Initial program 56.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.9
Applied rewrites51.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6455.5
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6466.3
Applied rewrites66.3%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6467.0
Applied rewrites67.0%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6471.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6471.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6471.1
Applied rewrites71.1%
if 8.20000000000000039e-162 < k Initial program 49.8%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6454.4
Applied rewrites54.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6465.1
Applied rewrites65.1%
Final simplification68.4%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* l (/ l (* t_m (* k (* t_m (* t_m k))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (t_m * (k * (t_m * (t_m * k))))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (l / (t_m * (k * (t_m * (t_m * k))))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (t_m * (k * (t_m * (t_m * k))))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (l / (t_m * (k * (t_m * (t_m * k))))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(l / Float64(t_m * Float64(k * Float64(t_m * Float64(t_m * k))))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (l / (t_m * (k * (t_m * (t_m * k)))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(t$95$m * N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\ell \cdot \frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\right)
\end{array}
Initial program 53.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.0
Applied rewrites53.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6455.9
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6463.5
Applied rewrites63.5%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6463.9
Applied rewrites63.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.7
Applied rewrites67.7%
Final simplification67.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 (* l (/ l (* (* t_m 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) {
return t_s * (l * (l / ((t_m * k) * (k * (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 / ((t_m * k) * (k * (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 / ((t_m * k) * (k * (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 / ((t_m * k) * (k * (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(l * Float64(l / Float64(Float64(t_m * k) * Float64(k * 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 / ((t_m * k) * (k * (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[(l * N[(l / N[(N[(t$95$m * k), $MachinePrecision] * N[(k * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\ell \cdot \frac{\ell}{\left(t\_m \cdot k\right) \cdot \left(k \cdot \left(t\_m \cdot t\_m\right)\right)}\right)
\end{array}
Initial program 53.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.0
Applied rewrites53.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6455.9
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6463.5
Applied rewrites63.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6464.3
Applied rewrites64.3%
Final simplification64.3%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* l (/ l (* k (* t_m (* t_m (* t_m k))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (k * (t_m * (t_m * (t_m * k))))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (l * (l / (k * (t_m * (t_m * (t_m * k))))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (l * (l / (k * (t_m * (t_m * (t_m * k))))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (l / (k * (t_m * (t_m * (t_m * k))))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(l / Float64(k * Float64(t_m * Float64(t_m * Float64(t_m * k))))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (l * (l / (k * (t_m * (t_m * (t_m * k)))))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(k * N[(t$95$m * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\ell \cdot \frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\right)
\end{array}
Initial program 53.7%
Taylor expanded in k around 0
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cube-multN/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.0
Applied rewrites53.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6455.9
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6463.5
Applied rewrites63.5%
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6463.9
Applied rewrites63.9%
Final simplification63.9%
herbie shell --seed 2024219
(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))))