
(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 28 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 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 1.4e-103)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 3.45e+102)
(* t_2 (* (/ 2.0 (* (* (sin k) (pow t_m 3.0)) (tan k))) t_2))
(/
2.0
(pow
(*
(* (cbrt (sin k)) (* t_m (pow (cbrt l) -2.0)))
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
3.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 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.4e-103) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 3.45e+102) {
tmp = t_2 * ((2.0 / ((sin(k) * pow(t_m, 3.0)) * tan(k))) * t_2);
} else {
tmp = 2.0 / pow(((cbrt(sin(k)) * (t_m * pow(cbrt(l), -2.0))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))), 3.0);
}
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 t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.4e-103) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 3.45e+102) {
tmp = t_2 * ((2.0 / ((Math.sin(k) * Math.pow(t_m, 3.0)) * Math.tan(k))) * t_2);
} else {
tmp = 2.0 / Math.pow(((Math.cbrt(Math.sin(k)) * (t_m * Math.pow(Math.cbrt(l), -2.0))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))), 3.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(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 1.4e-103) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 3.45e+102) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(Float64(sin(k) * (t_m ^ 3.0)) * tan(k))) * t_2)); else tmp = Float64(2.0 / (Float64(Float64(cbrt(sin(k)) * Float64(t_m * (cbrt(l) ^ -2.0))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) ^ 3.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[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.4e-103], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.45e+102], N[(t$95$2 * N[(N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 3.45 \cdot 10^{+102}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 1.40000000000000011e-103Initial program 49.7%
Simplified49.7%
Applied egg-rr11.6%
associate-*r*11.6%
Simplified11.6%
Taylor expanded in t around 0 30.2%
associate-/l*30.3%
Simplified30.3%
if 1.40000000000000011e-103 < t < 3.44999999999999983e102Initial program 69.2%
Simplified68.1%
associate-*r*68.6%
add-sqr-sqrt68.5%
times-frac70.6%
Applied egg-rr79.2%
associate-/l*89.5%
*-commutative89.5%
Simplified89.5%
if 3.44999999999999983e102 < t Initial program 53.8%
Simplified53.8%
add-cube-cbrt53.8%
pow353.8%
*-commutative53.8%
cbrt-prod53.8%
cbrt-div53.8%
rem-cbrt-cube68.7%
cbrt-prod90.1%
pow290.1%
Applied egg-rr90.1%
associate-*r/90.1%
Applied egg-rr90.1%
div-inv90.0%
pow-flip90.0%
metadata-eval90.0%
Applied egg-rr90.0%
add-cube-cbrt89.9%
pow389.9%
Applied egg-rr97.7%
Final simplification50.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 (pow (/ k t_m) 2.0))
(t_3
(*
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
(+ 1.0 (+ 1.0 t_2)))))
(*
t_s
(if (<= t_3 1e+292)
(/ 2.0 (/ (* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l))) l))
(if (<= t_3 INFINITY)
(/
2.0
(pow
(* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)))
2.0))
(/
2.0
(pow (* (* (/ k l) (sqrt t_m)) (sqrt (* (sin k) (tan k)))) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double t_3 = (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
double tmp;
if (t_3 <= 1e+292) {
tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))) / l);
} else if (t_3 <= ((double) INFINITY)) {
tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / pow((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))), 2.0);
}
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 t_2 = Math.pow((k / t_m), 2.0);
double t_3 = (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
double tmp;
if (t_3 <= 1e+292) {
tmp = 2.0 / (((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / Math.pow((((k / l) * Math.sqrt(t_m)) * Math.sqrt((Math.sin(k) * Math.tan(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow((k / t_m), 2.0) t_3 = (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)) tmp = 0 if t_3 <= 1e+292: tmp = 2.0 / (((math.tan(k) * (2.0 + t_2)) * (math.sin(k) * (math.pow(t_m, 3.0) / l))) / l) elif t_3 <= math.inf: tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0) else: tmp = 2.0 / math.pow((((k / l) * math.sqrt(t_m)) * math.sqrt((math.sin(k) * math.tan(k)))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(1.0 + t_2))) tmp = 0.0 if (t_3 <= 1e+292) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l)); elseif (t_3 <= Inf) tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64(Float64(k / l) * sqrt(t_m)) * sqrt(Float64(sin(k) * tan(k)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k / t_m) ^ 2.0; t_3 = (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)); tmp = 0.0; if (t_3 <= 1e+292) tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * ((t_m ^ 3.0) / l))) / l); elseif (t_3 <= Inf) tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0); else tmp = 2.0 / ((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(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] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 1e+292], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 10^{+292}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)}{\ell}}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\
\end{array}
\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))) < 1e292Initial program 88.4%
Simplified88.4%
associate-*l*78.6%
associate-/r*80.0%
associate-+r+80.0%
metadata-eval80.0%
associate-*l*80.0%
associate-*l/82.7%
associate-*l*82.7%
Applied egg-rr82.7%
associate-*r*93.8%
Simplified93.8%
if 1e292 < (*.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 63.9%
Simplified63.9%
Applied egg-rr45.5%
associate-*r*45.5%
Simplified45.5%
Taylor expanded in k around 0 63.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%
Simplified0.0%
Applied egg-rr15.5%
associate-*r*15.6%
Simplified15.6%
Taylor expanded in t around 0 32.8%
Final simplification68.5%
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 (pow (/ k t_m) 2.0))
(t_3
(*
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
(+ 1.0 (+ 1.0 t_2)))))
(*
t_s
(if (<= t_3 1e+292)
(/ 2.0 (/ (* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l))) l))
(if (<= t_3 INFINITY)
(/
2.0
(pow
(* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)))
2.0))
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double t_3 = (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
double tmp;
if (t_3 <= 1e+292) {
tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))) / l);
} else if (t_3 <= ((double) INFINITY)) {
tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
}
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 t_2 = Math.pow((k / t_m), 2.0);
double t_3 = (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2));
double tmp;
if (t_3 <= 1e+292) {
tmp = 2.0 / (((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))) / l);
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow((k / t_m), 2.0) t_3 = (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)) tmp = 0 if t_3 <= 1e+292: tmp = 2.0 / (((math.tan(k) * (2.0 + t_2)) * (math.sin(k) * (math.pow(t_m, 3.0) / l))) / l) elif t_3 <= math.inf: tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0) else: tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(1.0 + t_2))) tmp = 0.0 if (t_3 <= 1e+292) tmp = Float64(2.0 / Float64(Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))) / l)); elseif (t_3 <= Inf) tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k / t_m) ^ 2.0; t_3 = (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)); tmp = 0.0; if (t_3 <= 1e+292) tmp = 2.0 / (((tan(k) * (2.0 + t_2)) * (sin(k) * ((t_m ^ 3.0) / l))) / l); elseif (t_3 <= Inf) tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0); else tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(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] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 1e+292], N[(2.0 / N[(N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 10^{+292}:\\
\;\;\;\;\frac{2}{\frac{\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)}{\ell}}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\end{array}
\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))) < 1e292Initial program 88.4%
Simplified88.4%
associate-*l*78.6%
associate-/r*80.0%
associate-+r+80.0%
metadata-eval80.0%
associate-*l*80.0%
associate-*l/82.7%
associate-*l*82.7%
Applied egg-rr82.7%
associate-*r*93.8%
Simplified93.8%
if 1e292 < (*.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 63.9%
Simplified63.9%
Applied egg-rr45.5%
associate-*r*45.5%
Simplified45.5%
Taylor expanded in k around 0 63.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%
Simplified0.0%
Applied egg-rr15.5%
associate-*r*15.6%
Simplified15.6%
Taylor expanded in t around 0 45.8%
associate-/l*45.8%
Simplified45.8%
Final simplification73.1%
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 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<=
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
(+ 1.0 (+ 1.0 t_2))))
2e+304)
(/
(/ 2.0 (* (tan k) (+ 2.0 t_2)))
(* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)))
(/
2.0
(pow (* (* (/ k l) (sqrt t_m)) (sqrt (* (sin k) (tan k)))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)))) <= 2e+304) {
tmp = (2.0 / (tan(k) * (2.0 + t_2))) / (sin(k) * pow((pow(t_m, 1.5) / l), 2.0));
} else {
tmp = 2.0 / pow((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (k / t_m) ** 2.0d0
if ((2.0d0 / ((tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l)))) * (1.0d0 + (1.0d0 + t_2)))) <= 2d+304) then
tmp = (2.0d0 / (tan(k) * (2.0d0 + t_2))) / (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0))
else
tmp = 2.0d0 / ((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)))) <= 2e+304) {
tmp = (2.0 / (Math.tan(k) * (2.0 + t_2))) / (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0));
} else {
tmp = 2.0 / Math.pow((((k / l) * Math.sqrt(t_m)) * Math.sqrt((Math.sin(k) * Math.tan(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow((k / t_m), 2.0) tmp = 0 if (2.0 / ((math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)))) <= 2e+304: tmp = (2.0 / (math.tan(k) * (2.0 + t_2))) / (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) else: tmp = 2.0 / math.pow((((k / l) * math.sqrt(t_m)) * math.sqrt((math.sin(k) * math.tan(k)))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(1.0 + t_2)))) <= 2e+304) tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(2.0 + t_2))) / Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0))); else tmp = Float64(2.0 / (Float64(Float64(Float64(k / l) * sqrt(t_m)) * sqrt(Float64(sin(k) * tan(k)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (k / t_m) ^ 2.0; tmp = 0.0; if ((2.0 / ((tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (1.0 + t_2)))) <= 2e+304) tmp = (2.0 / (tan(k) * (2.0 + t_2))) / (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)); else tmp = 2.0 / ((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(2.0 / N[(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] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+304], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + t\_2\right)\right)} \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(2 + t\_2\right)}}{\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\
\end{array}
\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)))) < 1.9999999999999999e304Initial program 82.6%
Simplified82.6%
add-sqr-sqrt28.6%
pow228.6%
sqrt-div28.5%
sqrt-pow129.3%
metadata-eval29.3%
sqrt-prod13.0%
add-sqr-sqrt31.4%
Applied egg-rr31.4%
div-inv31.4%
*-commutative31.4%
associate-+r+31.4%
metadata-eval31.4%
*-commutative31.4%
Applied egg-rr31.4%
associate-*r/31.4%
metadata-eval31.4%
associate-/r*31.7%
Simplified31.7%
if 1.9999999999999999e304 < (/.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 22.2%
Simplified22.2%
Applied egg-rr35.5%
associate-*r*35.5%
Simplified35.5%
Taylor expanded in t around 0 48.5%
Final simplification39.7%
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 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))))
(*
t_s
(if (<= t_m 1.4e-103)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.55e+92)
(* t_2 (* (/ 2.0 (* (* (sin k) (pow t_m 3.0)) (tan k))) t_2))
(/
2.0
(*
(pow (/ (* t_m (cbrt (sin k))) (pow (cbrt l) 2.0)) 3.0)
(* (tan k) (+ 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 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.4e-103) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.55e+92) {
tmp = t_2 * ((2.0 / ((sin(k) * pow(t_m, 3.0)) * tan(k))) * t_2);
} else {
tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / pow(cbrt(l), 2.0)), 3.0) * (tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))));
}
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 t_2 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 1.4e-103) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.55e+92) {
tmp = t_2 * ((2.0 / ((Math.sin(k) * Math.pow(t_m, 3.0)) * Math.tan(k))) * t_2);
} else {
tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(Math.sin(k))) / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) tmp = 0.0 if (t_m <= 1.4e-103) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.55e+92) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64(Float64(sin(k) * (t_m ^ 3.0)) * tan(k))) * t_2)); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(tan(k) * 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[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.4e-103], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.55e+92], N[(t$95$2 * N[(N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $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{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.55 \cdot 10^{+92}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.40000000000000011e-103Initial program 49.7%
Simplified49.7%
Applied egg-rr11.6%
associate-*r*11.6%
Simplified11.6%
Taylor expanded in t around 0 30.2%
associate-/l*30.3%
Simplified30.3%
if 1.40000000000000011e-103 < t < 1.5500000000000001e92Initial program 67.8%
Simplified66.7%
associate-*r*67.2%
add-sqr-sqrt67.1%
times-frac69.3%
Applied egg-rr78.3%
associate-/l*89.1%
*-commutative89.1%
Simplified89.1%
if 1.5500000000000001e92 < t Initial program 56.3%
Simplified56.3%
add-cube-cbrt56.2%
pow356.2%
*-commutative56.2%
cbrt-prod56.2%
cbrt-div56.2%
rem-cbrt-cube70.3%
cbrt-prod90.5%
pow290.5%
Applied egg-rr90.5%
associate-*r/90.6%
Applied egg-rr90.6%
Final simplification49.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1e-48)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(/
2.0
(*
(pow (/ (* t_m (cbrt (sin k))) (pow (cbrt l) 2.0)) 3.0)
(* (tan k) (+ 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 tmp;
if (t_m <= 1e-48) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else {
tmp = 2.0 / (pow(((t_m * cbrt(sin(k))) / pow(cbrt(l), 2.0)), 3.0) * (tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))));
}
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 (t_m <= 1e-48) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else {
tmp = 2.0 / (Math.pow(((t_m * Math.cbrt(Math.sin(k))) / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1e-48) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m * cbrt(sin(k))) / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(tan(k) * 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_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-48], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $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}\;t\_m \leq 10^{-48}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\
\end{array}
\end{array}
if t < 9.9999999999999997e-49Initial program 49.2%
Simplified49.2%
Applied egg-rr15.5%
associate-*r*15.5%
Simplified15.5%
Taylor expanded in t around 0 33.5%
associate-/l*33.5%
Simplified33.5%
if 9.9999999999999997e-49 < t Initial program 67.1%
Simplified67.1%
add-cube-cbrt66.8%
pow366.8%
*-commutative66.8%
cbrt-prod66.7%
cbrt-div66.6%
rem-cbrt-cube74.7%
cbrt-prod87.5%
pow287.5%
Applied egg-rr87.5%
associate-*r/87.6%
Applied egg-rr87.6%
Final simplification47.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.4e-48)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.4e-48) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0));
}
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 (t_m <= 2.4e-48) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.4e-48) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * (Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.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, 2.4e-48], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.4 \cdot 10^{-48}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 2.4e-48Initial program 49.2%
Simplified49.2%
Applied egg-rr15.5%
associate-*r*15.5%
Simplified15.5%
Taylor expanded in t around 0 33.5%
associate-/l*33.5%
Simplified33.5%
if 2.4e-48 < t Initial program 67.1%
Simplified67.1%
add-cube-cbrt66.8%
pow366.8%
*-commutative66.8%
cbrt-prod66.7%
cbrt-div66.6%
rem-cbrt-cube74.7%
cbrt-prod87.5%
pow287.5%
Applied egg-rr87.5%
Final simplification47.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 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<= t_m 6.2e-48)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 3.7e+99)
(/
2.0
(*
(/ 1.0 l)
(* (* (tan k) (+ 2.0 t_2)) (* (sin k) (/ (pow t_m 3.0) l)))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 t_2)))
(* (sin k) (pow (/ t_m (pow (cbrt l) 2.0)) 3.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 = pow((k / t_m), 2.0);
double tmp;
if (t_m <= 6.2e-48) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 3.7e+99) {
tmp = 2.0 / ((1.0 / l) * ((tan(k) * (2.0 + t_2)) * (sin(k) * (pow(t_m, 3.0) / l))));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + t_2))) * (sin(k) * pow((t_m / pow(cbrt(l), 2.0)), 3.0)));
}
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 t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 6.2e-48) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 3.7e+99) {
tmp = 2.0 / ((1.0 / l) * ((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + t_2))) * (Math.sin(k) * Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.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(k / t_m) ^ 2.0 tmp = 0.0 if (t_m <= 6.2e-48) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 3.7e+99) tmp = Float64(2.0 / Float64(Float64(1.0 / l) * Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64((t_m ^ 3.0) / l))))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + t_2))) * Float64(sin(k) * (Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.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[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 6.2e-48], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.7e+99], N[(2.0 / N[(N[(1.0 / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 3.7 \cdot 10^{+99}:\\
\;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(\left(\tan k \cdot \left(2 + t\_2\right)\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + t\_2\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 6.20000000000000033e-48Initial program 49.0%
Simplified49.0%
Applied egg-rr15.4%
associate-*r*15.4%
Simplified15.4%
Taylor expanded in t around 0 33.3%
associate-/l*33.3%
Simplified33.3%
if 6.20000000000000033e-48 < t < 3.7000000000000001e99Initial program 84.6%
Simplified84.7%
associate-*l*83.2%
associate-/r*83.3%
associate-+r+83.3%
metadata-eval83.3%
associate-*l*83.4%
associate-*l/86.6%
clear-num86.5%
associate-*l*86.6%
Applied egg-rr86.6%
associate-/r/86.6%
associate-*r*88.1%
Simplified88.1%
if 3.7000000000000001e99 < t Initial program 53.8%
Simplified53.8%
add-cube-cbrt53.8%
pow353.8%
cbrt-div53.8%
rem-cbrt-cube66.1%
cbrt-prod79.4%
pow279.5%
Applied egg-rr79.5%
Final simplification46.1%
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 (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
(*
t_s
(if (<= t_m 5.5e-48)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.85e+102)
(/ 2.0 (* (/ 1.0 l) (* t_2 (* (sin k) (/ (pow t_m 3.0) l)))))
(/ 2.0 (* (sin k) (* t_2 (pow (* t_m (pow (cbrt l) -2.0)) 3.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 = tan(k) * (2.0 + pow((k / t_m), 2.0));
double tmp;
if (t_m <= 5.5e-48) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.85e+102) {
tmp = 2.0 / ((1.0 / l) * (t_2 * (sin(k) * (pow(t_m, 3.0) / l))));
} else {
tmp = 2.0 / (sin(k) * (t_2 * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
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 t_2 = Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0));
double tmp;
if (t_m <= 5.5e-48) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.85e+102) {
tmp = 2.0 / ((1.0 / l) * (t_2 * (Math.sin(k) * (Math.pow(t_m, 3.0) / l))));
} else {
tmp = 2.0 / (Math.sin(k) * (t_2 * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.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(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) tmp = 0.0 if (t_m <= 5.5e-48) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.85e+102) tmp = Float64(2.0 / Float64(Float64(1.0 / l) * Float64(t_2 * Float64(sin(k) * Float64((t_m ^ 3.0) / l))))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(t_2 * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 3.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[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.5e-48], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.85e+102], N[(2.0 / N[(N[(1.0 / l), $MachinePrecision] * N[(t$95$2 * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(t$95$2 * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $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 := \tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-48}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.85 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{1}{\ell} \cdot \left(t\_2 \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(t\_2 \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 5.50000000000000047e-48Initial program 49.0%
Simplified49.0%
Applied egg-rr15.4%
associate-*r*15.4%
Simplified15.4%
Taylor expanded in t around 0 33.3%
associate-/l*33.3%
Simplified33.3%
if 5.50000000000000047e-48 < t < 1.85000000000000011e102Initial program 84.6%
Simplified84.7%
associate-*l*83.2%
associate-/r*83.3%
associate-+r+83.3%
metadata-eval83.3%
associate-*l*83.4%
associate-*l/86.6%
clear-num86.5%
associate-*l*86.6%
Applied egg-rr86.6%
associate-/r/86.6%
associate-*r*88.1%
Simplified88.1%
if 1.85000000000000011e102 < t Initial program 53.8%
Simplified53.8%
add-cube-cbrt53.8%
pow353.8%
*-commutative53.8%
cbrt-prod53.8%
cbrt-div53.8%
rem-cbrt-cube68.7%
cbrt-prod90.1%
pow290.1%
Applied egg-rr90.1%
associate-*r/90.1%
Applied egg-rr90.1%
div-inv90.0%
pow-flip90.0%
metadata-eval90.0%
Applied egg-rr90.0%
pow190.0%
associate-*l*90.0%
unpow-prod-down79.4%
pow379.4%
add-cube-cbrt79.4%
associate-+r+79.4%
metadata-eval79.4%
Applied egg-rr79.4%
unpow179.4%
associate-*l*79.4%
Simplified79.4%
Final simplification46.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 5.5e-16)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 2.2e+82)
(*
(/ (* 2.0 l) (* (pow t_m 3.0) (* (sin k) (tan k))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(pow
(* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)))
2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.5e-16) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 2.2e+82) {
tmp = ((2.0 * l) / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l))), 2.0);
}
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 (t_m <= 5.5e-16) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 2.2e+82) {
tmp = ((2.0 * l) / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5.5e-16: tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0) elif t_m <= 2.2e+82: tmp = ((2.0 * l) / (math.pow(t_m, 3.0) * (math.sin(k) * math.tan(k)))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.5e-16) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 2.2e+82) tmp = Float64(Float64(Float64(2.0 * l) / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5.5e-16) tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0); elseif (t_m <= 2.2e+82) tmp = ((2.0 * l) / ((t_m ^ 3.0) * (sin(k) * tan(k)))) * (l / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.5e-16], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.2e+82], N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{+82}:\\
\;\;\;\;\frac{2 \cdot \ell}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 5.49999999999999964e-16Initial program 50.5%
Simplified50.5%
Applied egg-rr18.3%
associate-*r*18.3%
Simplified18.3%
Taylor expanded in t around 0 35.5%
associate-/l*35.5%
Simplified35.5%
if 5.49999999999999964e-16 < t < 2.2000000000000001e82Initial program 89.0%
Simplified89.0%
associate-*r*88.9%
*-un-lft-identity88.9%
times-frac94.4%
associate-*r*94.6%
Applied egg-rr94.6%
/-rgt-identity94.6%
associate-*l/94.5%
associate-*l*94.3%
Simplified94.3%
if 2.2000000000000001e82 < t Initial program 54.5%
Simplified54.5%
Applied egg-rr36.1%
associate-*r*36.1%
Simplified36.1%
Taylor expanded in k around 0 70.3%
Final simplification44.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 3900000000.0)
(/
2.0
(pow (* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l))) 2.0))
(/
2.0
(*
(pow k 2.0)
(* t_m (/ (- 0.5 (/ (cos (* 2.0 k)) 2.0)) (* (cos k) (pow l 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3900000000.0) {
tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / (pow(k, 2.0) * (t_m * ((0.5 - (cos((2.0 * k)) / 2.0)) / (cos(k) * pow(l, 2.0)))));
}
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 (k <= 3900000000.0) {
tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / (Math.pow(k, 2.0) * (t_m * ((0.5 - (Math.cos((2.0 * k)) / 2.0)) / (Math.cos(k) * Math.pow(l, 2.0)))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 3900000000.0: tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0) else: tmp = 2.0 / (math.pow(k, 2.0) * (t_m * ((0.5 - (math.cos((2.0 * k)) / 2.0)) / (math.cos(k) * math.pow(l, 2.0))))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3900000000.0) tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0)); else tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64(t_m * Float64(Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0)) / Float64(cos(k) * (l ^ 2.0)))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 3900000000.0) tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0); else tmp = 2.0 / ((k ^ 2.0) * (t_m * ((0.5 - (cos((2.0 * k)) / 2.0)) / (cos(k) * (l ^ 2.0))))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3900000000.0], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $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 3900000000:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left(t\_m \cdot \frac{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}{\cos k \cdot {\ell}^{2}}\right)}\\
\end{array}
\end{array}
if k < 3.9e9Initial program 57.9%
Simplified57.9%
Applied egg-rr29.1%
associate-*r*29.1%
Simplified29.1%
Taylor expanded in k around 0 32.0%
if 3.9e9 < k Initial program 40.4%
Simplified40.4%
Taylor expanded in t around 0 66.7%
associate-/l*65.2%
associate-/l*65.3%
Simplified65.3%
unpow265.3%
sin-mult65.2%
Applied egg-rr65.2%
div-sub65.2%
+-inverses65.2%
cos-065.2%
metadata-eval65.2%
count-265.2%
Simplified65.2%
Final simplification39.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 (<= k 2.6e-47)
(* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
(if (<= k 8.4e+80)
(* (* l (/ 2.0 (* (* (sin k) (pow t_m 3.0)) (tan k)))) (* l 0.5))
(/ 2.0 (pow (* t_m (cbrt (pow (* k (/ (sqrt 2.0) l)) 2.0))) 3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.6e-47) {
tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
} else if (k <= 8.4e+80) {
tmp = (l * (2.0 / ((sin(k) * pow(t_m, 3.0)) * tan(k)))) * (l * 0.5);
} else {
tmp = 2.0 / pow((t_m * cbrt(pow((k * (sqrt(2.0) / l)), 2.0))), 3.0);
}
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 (k <= 2.6e-47) {
tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
} else if (k <= 8.4e+80) {
tmp = (l * (2.0 / ((Math.sin(k) * Math.pow(t_m, 3.0)) * Math.tan(k)))) * (l * 0.5);
} else {
tmp = 2.0 / Math.pow((t_m * Math.cbrt(Math.pow((k * (Math.sqrt(2.0) / l)), 2.0))), 3.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.6e-47) tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0)); elseif (k <= 8.4e+80) tmp = Float64(Float64(l * Float64(2.0 / Float64(Float64(sin(k) * (t_m ^ 3.0)) * tan(k)))) * Float64(l * 0.5)); else tmp = Float64(2.0 / (Float64(t_m * cbrt((Float64(k * Float64(sqrt(2.0) / l)) ^ 2.0))) ^ 3.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[k, 2.6e-47], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.4e+80], N[(N[(l * N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[Power[N[Power[N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.6 \cdot 10^{-47}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\
\mathbf{elif}\;k \leq 8.4 \cdot 10^{+80}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k}\right) \cdot \left(\ell \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \sqrt[3]{{\left(k \cdot \frac{\sqrt{2}}{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if k < 2.6e-47Initial program 56.0%
Simplified56.0%
Applied egg-rr28.4%
associate-*r*28.4%
Simplified28.4%
Taylor expanded in k around 0 27.5%
*-commutative27.5%
associate-/l*27.5%
Simplified27.5%
div-inv27.5%
pow-flip27.8%
sqrt-pow130.8%
metadata-eval30.8%
associate-*r/30.8%
metadata-eval30.8%
Applied egg-rr30.8%
if 2.6e-47 < k < 8.40000000000000005e80Initial program 60.1%
Simplified60.2%
associate-*r*63.8%
*-un-lft-identity63.8%
times-frac63.8%
associate-*r*63.7%
Applied egg-rr63.7%
Taylor expanded in k around 0 71.2%
*-commutative71.2%
Simplified71.2%
if 8.40000000000000005e80 < k Initial program 40.0%
Simplified39.9%
Applied egg-rr11.9%
associate-*r*12.0%
Simplified12.0%
Taylor expanded in k around 0 24.1%
*-commutative24.1%
associate-/l*24.1%
Simplified24.1%
add-cube-cbrt24.1%
Applied egg-rr56.5%
unpow256.5%
unpow356.5%
cube-div56.5%
rem-cube-cbrt56.5%
associate-/l*56.5%
Simplified56.5%
Final simplification39.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 6.8e-26)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(/
2.0
(pow
(* k (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)))
2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.8e-26) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else {
tmp = 2.0 / pow((k * (hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l))), 2.0);
}
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 (t_m <= 6.8e-26) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else {
tmp = 2.0 / Math.pow((k * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 6.8e-26: tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0) else: tmp = 2.0 / math.pow((k * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (math.pow(t_m, 1.5) / l))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.8e-26) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(k * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 6.8e-26) tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0); else tmp = 2.0 / ((k * (hypot(1.0, hypot(1.0, (k / t_m))) * ((t_m ^ 1.5) / l))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.8e-26], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(k * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.8 \cdot 10^{-26}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 6.80000000000000026e-26Initial program 50.5%
Simplified50.5%
Applied egg-rr18.0%
associate-*r*18.0%
Simplified18.0%
Taylor expanded in t around 0 35.3%
associate-/l*35.4%
Simplified35.4%
if 6.80000000000000026e-26 < t Initial program 64.9%
Simplified64.9%
Applied egg-rr49.2%
associate-*r*49.1%
Simplified49.1%
Taylor expanded in k around 0 70.4%
Final simplification43.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8.2e-25)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.2e-25) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else {
tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 8.2d-25) then
tmp = 2.0d0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ** 2.0d0)
else
tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8.2e-25) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else {
tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 8.2e-25: tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0) else: tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / l)), -2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8.2e-25) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 8.2e-25) tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0); else tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.2e-25], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8.2 \cdot 10^{-25}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\
\end{array}
\end{array}
if t < 8.19999999999999974e-25Initial program 50.5%
Simplified50.5%
Applied egg-rr18.0%
associate-*r*18.0%
Simplified18.0%
Taylor expanded in t around 0 35.3%
associate-/l*35.4%
Simplified35.4%
if 8.19999999999999974e-25 < t Initial program 64.9%
Simplified64.9%
Applied egg-rr49.2%
associate-*r*49.1%
Simplified49.1%
Taylor expanded in k around 0 62.1%
*-commutative62.1%
associate-/l*62.0%
Simplified62.0%
div-inv62.0%
pow-flip63.0%
sqrt-pow172.3%
metadata-eval72.3%
associate-*r/72.4%
metadata-eval72.4%
Applied egg-rr72.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 4.4e-46)
(* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
(if (<= k 9.5e+80)
(/ 2.0 (* (/ (/ (pow t_m 3.0) l) l) (/ (* 2.0 (pow k 2.0)) (cos k))))
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e-46) {
tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
} else if (k <= 9.5e+80) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * ((2.0 * pow(k, 2.0)) / cos(k)));
} else {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.4d-46) then
tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
else if (k <= 9.5d+80) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * ((2.0d0 * (k ** 2.0d0)) / cos(k)))
else
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e-46) {
tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
} else if (k <= 9.5e+80) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * ((2.0 * Math.pow(k, 2.0)) / Math.cos(k)));
} else {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 4.4e-46: tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / l)), -2.0) elif k <= 9.5e+80: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * ((2.0 * math.pow(k, 2.0)) / math.cos(k))) else: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.4e-46) tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0)); elseif (k <= 9.5e+80) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(Float64(2.0 * (k ^ 2.0)) / cos(k)))); else tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 4.4e-46) tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0); elseif (k <= 9.5e+80) tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * ((2.0 * (k ^ 2.0)) / cos(k))); else tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.4e-46], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.5e+80], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 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}\;k \leq 4.4 \cdot 10^{-46}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\
\mathbf{elif}\;k \leq 9.5 \cdot 10^{+80}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\end{array}
\end{array}
if k < 4.4000000000000002e-46Initial program 56.0%
Simplified56.0%
Applied egg-rr28.4%
associate-*r*28.4%
Simplified28.4%
Taylor expanded in k around 0 27.5%
*-commutative27.5%
associate-/l*27.5%
Simplified27.5%
div-inv27.5%
pow-flip27.8%
sqrt-pow130.8%
metadata-eval30.8%
associate-*r/30.8%
metadata-eval30.8%
Applied egg-rr30.8%
if 4.4000000000000002e-46 < k < 9.499999999999999e80Initial program 60.1%
Simplified63.6%
Taylor expanded in t around inf 71.2%
*-commutative71.2%
associate-*l/71.2%
Simplified71.2%
Taylor expanded in k around 0 70.8%
if 9.499999999999999e80 < k Initial program 40.0%
Simplified39.9%
Taylor expanded in t around 0 62.4%
associate-/l*62.5%
associate-/l*62.5%
Simplified62.5%
Taylor expanded in k around 0 55.6%
associate-/l*55.6%
Simplified55.6%
Final simplification39.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 7e-47)
(* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
(if (<= k 3.8e+80)
(* (* l (/ 2.0 (* (* (sin k) (pow t_m 3.0)) (tan k)))) (* l 0.5))
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7e-47) {
tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
} else if (k <= 3.8e+80) {
tmp = (l * (2.0 / ((sin(k) * pow(t_m, 3.0)) * tan(k)))) * (l * 0.5);
} else {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 7d-47) then
tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
else if (k <= 3.8d+80) then
tmp = (l * (2.0d0 / ((sin(k) * (t_m ** 3.0d0)) * tan(k)))) * (l * 0.5d0)
else
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7e-47) {
tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
} else if (k <= 3.8e+80) {
tmp = (l * (2.0 / ((Math.sin(k) * Math.pow(t_m, 3.0)) * Math.tan(k)))) * (l * 0.5);
} else {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 7e-47: tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / l)), -2.0) elif k <= 3.8e+80: tmp = (l * (2.0 / ((math.sin(k) * math.pow(t_m, 3.0)) * math.tan(k)))) * (l * 0.5) else: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 7e-47) tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0)); elseif (k <= 3.8e+80) tmp = Float64(Float64(l * Float64(2.0 / Float64(Float64(sin(k) * (t_m ^ 3.0)) * tan(k)))) * Float64(l * 0.5)); else tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 7e-47) tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0); elseif (k <= 3.8e+80) tmp = (l * (2.0 / ((sin(k) * (t_m ^ 3.0)) * tan(k)))) * (l * 0.5); else tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 7e-47], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.8e+80], N[(N[(l * N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 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}\;k \leq 7 \cdot 10^{-47}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\
\mathbf{elif}\;k \leq 3.8 \cdot 10^{+80}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\left(\sin k \cdot {t\_m}^{3}\right) \cdot \tan k}\right) \cdot \left(\ell \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\end{array}
\end{array}
if k < 6.9999999999999996e-47Initial program 56.0%
Simplified56.0%
Applied egg-rr28.4%
associate-*r*28.4%
Simplified28.4%
Taylor expanded in k around 0 27.5%
*-commutative27.5%
associate-/l*27.5%
Simplified27.5%
div-inv27.5%
pow-flip27.8%
sqrt-pow130.8%
metadata-eval30.8%
associate-*r/30.8%
metadata-eval30.8%
Applied egg-rr30.8%
if 6.9999999999999996e-47 < k < 3.79999999999999997e80Initial program 60.1%
Simplified60.2%
associate-*r*63.8%
*-un-lft-identity63.8%
times-frac63.8%
associate-*r*63.7%
Applied egg-rr63.7%
Taylor expanded in k around 0 71.2%
*-commutative71.2%
Simplified71.2%
if 3.79999999999999997e80 < k Initial program 40.0%
Simplified39.9%
Taylor expanded in t around 0 62.4%
associate-/l*62.5%
associate-/l*62.5%
Simplified62.5%
Taylor expanded in k around 0 55.6%
associate-/l*55.6%
Simplified55.6%
Final simplification39.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 (<= k 1.08e+55)
(* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
(/ 2.0 (* (pow k 2.0) (* (pow k 2.0) (/ t_m (pow l 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.08e+55) {
tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
} else {
tmp = 2.0 / (pow(k, 2.0) * (pow(k, 2.0) * (t_m / pow(l, 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.08d+55) then
tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
else
tmp = 2.0d0 / ((k ** 2.0d0) * ((k ** 2.0d0) * (t_m / (l ** 2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.08e+55) {
tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
} else {
tmp = 2.0 / (Math.pow(k, 2.0) * (Math.pow(k, 2.0) * (t_m / Math.pow(l, 2.0))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.08e+55: tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / l)), -2.0) else: tmp = 2.0 / (math.pow(k, 2.0) * (math.pow(k, 2.0) * (t_m / math.pow(l, 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.08e+55) tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0)); else tmp = Float64(2.0 / Float64((k ^ 2.0) * Float64((k ^ 2.0) * Float64(t_m / (l ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.08e+55) tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0); else tmp = 2.0 / ((k ^ 2.0) * ((k ^ 2.0) * (t_m / (l ^ 2.0)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.08e+55], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 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}\;k \leq 1.08 \cdot 10^{+55}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2} \cdot \left({k}^{2} \cdot \frac{t\_m}{{\ell}^{2}}\right)}\\
\end{array}
\end{array}
if k < 1.08000000000000004e55Initial program 57.5%
Simplified57.5%
Applied egg-rr28.7%
associate-*r*28.7%
Simplified28.7%
Taylor expanded in k around 0 27.4%
*-commutative27.4%
associate-/l*27.4%
Simplified27.4%
div-inv27.4%
pow-flip27.7%
sqrt-pow130.3%
metadata-eval30.3%
associate-*r/30.3%
metadata-eval30.3%
Applied egg-rr30.3%
if 1.08000000000000004e55 < k Initial program 38.3%
Simplified38.3%
Taylor expanded in t around 0 65.6%
associate-/l*65.8%
associate-/l*65.8%
Simplified65.8%
Taylor expanded in k around 0 52.0%
associate-/l*52.0%
Simplified52.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.8e-13)
(* 2.0 (pow (* (pow t_m 1.5) (/ (* k (sqrt 2.0)) l)) -2.0))
(/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.8e-13) {
tmp = 2.0 * pow((pow(t_m, 1.5) * ((k * sqrt(2.0)) / l)), -2.0);
} else {
tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.8d-13) then
tmp = 2.0d0 * (((t_m ** 1.5d0) * ((k * sqrt(2.0d0)) / l)) ** (-2.0d0))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.8e-13) {
tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * ((k * Math.sqrt(2.0)) / l)), -2.0);
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 4.8e-13: tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * ((k * math.sqrt(2.0)) / l)), -2.0) else: tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.8e-13) tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(Float64(k * sqrt(2.0)) / l)) ^ -2.0)); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 4.8e-13) tmp = 2.0 * (((t_m ^ 1.5) * ((k * sqrt(2.0)) / l)) ^ -2.0); else tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.8e-13], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.8 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \frac{k \cdot \sqrt{2}}{\ell}\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if k < 4.7999999999999997e-13Initial program 57.1%
Simplified57.1%
Applied egg-rr29.5%
associate-*r*29.5%
Simplified29.5%
Taylor expanded in k around 0 28.6%
*-commutative28.6%
associate-/l*28.6%
Simplified28.6%
div-inv28.6%
pow-flip28.9%
sqrt-pow131.7%
metadata-eval31.7%
associate-*r/31.7%
metadata-eval31.7%
Applied egg-rr31.7%
if 4.7999999999999997e-13 < k Initial program 44.3%
Simplified44.3%
Taylor expanded in t around 0 66.8%
associate-/l*65.4%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in k around 0 49.0%
associate-/l*46.2%
Simplified46.2%
pow146.2%
div-inv46.2%
pow-flip46.2%
metadata-eval46.2%
Applied egg-rr46.2%
unpow146.2%
associate-*r*49.0%
*-commutative49.0%
Simplified49.0%
Final simplification36.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 4.6e-13)
(* 2.0 (pow (* (pow t_m 1.5) (* k (/ (sqrt 2.0) l))) -2.0))
(/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.6e-13) {
tmp = 2.0 * pow((pow(t_m, 1.5) * (k * (sqrt(2.0) / l))), -2.0);
} else {
tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.6d-13) then
tmp = 2.0d0 * (((t_m ** 1.5d0) * (k * (sqrt(2.0d0) / l))) ** (-2.0d0))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.6e-13) {
tmp = 2.0 * Math.pow((Math.pow(t_m, 1.5) * (k * (Math.sqrt(2.0) / l))), -2.0);
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 4.6e-13: tmp = 2.0 * math.pow((math.pow(t_m, 1.5) * (k * (math.sqrt(2.0) / l))), -2.0) else: tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.6e-13) tmp = Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(k * Float64(sqrt(2.0) / l))) ^ -2.0)); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 4.6e-13) tmp = 2.0 * (((t_m ^ 1.5) * (k * (sqrt(2.0) / l))) ^ -2.0); else tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.6e-13], N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.6 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot {\left({t\_m}^{1.5} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if k < 4.59999999999999958e-13Initial program 57.1%
Simplified57.1%
Applied egg-rr29.5%
associate-*r*29.5%
Simplified29.5%
Taylor expanded in k around 0 28.6%
*-commutative28.6%
associate-/l*28.6%
Simplified28.6%
*-un-lft-identity28.6%
div-inv28.6%
pow-flip28.9%
sqrt-pow131.7%
metadata-eval31.7%
associate-*r/31.7%
metadata-eval31.7%
Applied egg-rr31.7%
*-lft-identity31.7%
*-commutative31.7%
associate-/l*31.7%
Simplified31.7%
if 4.59999999999999958e-13 < k Initial program 44.3%
Simplified44.3%
Taylor expanded in t around 0 66.8%
associate-/l*65.4%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in k around 0 49.0%
associate-/l*46.2%
Simplified46.2%
pow146.2%
div-inv46.2%
pow-flip46.2%
metadata-eval46.2%
Applied egg-rr46.2%
unpow146.2%
associate-*r*49.0%
*-commutative49.0%
Simplified49.0%
Final simplification36.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 4.2e-13)
(/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (pow k 2.0))))
(/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.2e-13) {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * pow(k, 2.0)));
} else {
tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.2d-13) then
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k ** 2.0d0)))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.2e-13) {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * Math.pow(k, 2.0)));
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 4.2e-13: tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * math.pow(k, 2.0))) else: tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.2e-13) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * (k ^ 2.0)))); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 4.2e-13) tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k ^ 2.0))); else tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.2e-13], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.2 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if k < 4.19999999999999977e-13Initial program 57.1%
Simplified54.5%
Taylor expanded in k around 0 52.8%
unpow352.8%
*-un-lft-identity52.8%
times-frac54.3%
pow254.3%
Applied egg-rr54.3%
if 4.19999999999999977e-13 < k Initial program 44.3%
Simplified44.3%
Taylor expanded in t around 0 66.8%
associate-/l*65.4%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in k around 0 49.0%
associate-/l*46.2%
Simplified46.2%
pow146.2%
div-inv46.2%
pow-flip46.2%
metadata-eval46.2%
Applied egg-rr46.2%
unpow146.2%
associate-*r*49.0%
*-commutative49.0%
Simplified49.0%
Final simplification53.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.1e-13)
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* t_m (/ (pow t_m 2.0) l)) l)))
(/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.1e-13) {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((t_m * (pow(t_m, 2.0) / l)) / l));
} else {
tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.1d-13) then
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m * ((t_m ** 2.0d0) / l)) / l))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.1e-13) {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((t_m * (Math.pow(t_m, 2.0) / l)) / l));
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 4.1e-13: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((t_m * (math.pow(t_m, 2.0) / l)) / l)) else: tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.1e-13) tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) / l))); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 4.1e-13) tmp = 2.0 / ((2.0 * (k ^ 2.0)) * ((t_m * ((t_m ^ 2.0) / l)) / l)); else tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.1e-13], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.1 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if k < 4.1000000000000002e-13Initial program 57.1%
Simplified54.5%
Taylor expanded in k around 0 52.8%
cube-mult52.8%
*-un-lft-identity52.8%
times-frac54.3%
pow254.3%
Applied egg-rr54.3%
if 4.1000000000000002e-13 < k Initial program 44.3%
Simplified44.3%
Taylor expanded in t around 0 66.8%
associate-/l*65.4%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in k around 0 49.0%
associate-/l*46.2%
Simplified46.2%
pow146.2%
div-inv46.2%
pow-flip46.2%
metadata-eval46.2%
Applied egg-rr46.2%
unpow146.2%
associate-*r*49.0%
*-commutative49.0%
Simplified49.0%
Final simplification53.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1e+143)
(/ 2.0 (* (* (pow t_m 2.0) (/ t_m l)) (/ (* 2.0 (pow k 2.0)) l)))
(/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e+143) {
tmp = 2.0 / ((pow(t_m, 2.0) * (t_m / l)) * ((2.0 * pow(k, 2.0)) / l));
} else {
tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1d+143) then
tmp = 2.0d0 / (((t_m ** 2.0d0) * (t_m / l)) * ((2.0d0 * (k ** 2.0d0)) / l))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1e+143) {
tmp = 2.0 / ((Math.pow(t_m, 2.0) * (t_m / l)) * ((2.0 * Math.pow(k, 2.0)) / l));
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1e+143: tmp = 2.0 / ((math.pow(t_m, 2.0) * (t_m / l)) * ((2.0 * math.pow(k, 2.0)) / l)) else: tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1e+143) tmp = Float64(2.0 / Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) * Float64(Float64(2.0 * (k ^ 2.0)) / l))); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1e+143) tmp = 2.0 / (((t_m ^ 2.0) * (t_m / l)) * ((2.0 * (k ^ 2.0)) / l)); else tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e+143], N[(2.0 / N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $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 10^{+143}:\\
\;\;\;\;\frac{2}{\left({t\_m}^{2} \cdot \frac{t\_m}{\ell}\right) \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if k < 1e143Initial program 56.5%
Simplified55.1%
Taylor expanded in k around 0 51.2%
associate-*l/51.7%
Applied egg-rr51.7%
associate-/l*52.0%
Simplified52.0%
unpow351.2%
*-un-lft-identity51.2%
times-frac52.6%
pow252.6%
Applied egg-rr52.9%
if 1e143 < k Initial program 34.7%
Simplified34.7%
Taylor expanded in t around 0 58.0%
associate-/l*58.0%
associate-/l*58.0%
Simplified58.0%
Taylor expanded in k around 0 58.0%
associate-/l*58.0%
Simplified58.0%
pow158.0%
div-inv58.0%
pow-flip58.0%
metadata-eval58.0%
Applied egg-rr58.0%
unpow158.0%
associate-*r*58.0%
*-commutative58.0%
Simplified58.0%
Final simplification53.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.4e-13)
(/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (/ (pow k 2.0) l))) l))
(/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e-13) {
tmp = 2.0 / ((pow(t_m, 3.0) * (2.0 * (pow(k, 2.0) / l))) / l);
} else {
tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.4d-13) then
tmp = 2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * ((k ** 2.0d0) / l))) / l)
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e-13) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) * (2.0 * (Math.pow(k, 2.0) / l))) / l);
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 4.4e-13: tmp = 2.0 / ((math.pow(t_m, 3.0) * (2.0 * (math.pow(k, 2.0) / l))) / l) else: tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.4e-13) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * Float64((k ^ 2.0) / l))) / l)); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 4.4e-13) tmp = 2.0 / (((t_m ^ 3.0) * (2.0 * ((k ^ 2.0) / l))) / l); else tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.4e-13], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if k < 4.39999999999999993e-13Initial program 57.1%
Simplified54.5%
Taylor expanded in k around 0 52.8%
associate-*l/53.4%
Applied egg-rr53.4%
associate-/l*53.7%
Simplified53.7%
associate-*l/53.8%
associate-/l*53.8%
Applied egg-rr53.8%
if 4.39999999999999993e-13 < k Initial program 44.3%
Simplified44.3%
Taylor expanded in t around 0 66.8%
associate-/l*65.4%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in k around 0 49.0%
associate-/l*46.2%
Simplified46.2%
pow146.2%
div-inv46.2%
pow-flip46.2%
metadata-eval46.2%
Applied egg-rr46.2%
unpow146.2%
associate-*r*49.0%
*-commutative49.0%
Simplified49.0%
Final simplification52.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 (<= k 4.4e-13)
(/ 2.0 (* (/ (pow t_m 3.0) l) (/ (* 2.0 (pow k 2.0)) l)))
(/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e-13) {
tmp = 2.0 / ((pow(t_m, 3.0) / l) * ((2.0 * pow(k, 2.0)) / l));
} else {
tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.4d-13) then
tmp = 2.0d0 / (((t_m ** 3.0d0) / l) * ((2.0d0 * (k ** 2.0d0)) / l))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e-13) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) / l) * ((2.0 * Math.pow(k, 2.0)) / l));
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 4.4e-13: tmp = 2.0 / ((math.pow(t_m, 3.0) / l) * ((2.0 * math.pow(k, 2.0)) / l)) else: tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.4e-13) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(Float64(2.0 * (k ^ 2.0)) / l))); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 4.4e-13) tmp = 2.0 / (((t_m ^ 3.0) / l) * ((2.0 * (k ^ 2.0)) / l)); else tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.4e-13], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if k < 4.39999999999999993e-13Initial program 57.1%
Simplified54.5%
Taylor expanded in k around 0 52.8%
associate-*l/53.4%
Applied egg-rr53.4%
associate-/l*53.7%
Simplified53.7%
if 4.39999999999999993e-13 < k Initial program 44.3%
Simplified44.3%
Taylor expanded in t around 0 66.8%
associate-/l*65.4%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in k around 0 49.0%
associate-/l*46.2%
Simplified46.2%
pow146.2%
div-inv46.2%
pow-flip46.2%
metadata-eval46.2%
Applied egg-rr46.2%
unpow146.2%
associate-*r*49.0%
*-commutative49.0%
Simplified49.0%
Final simplification52.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 5e-13)
(/ 2.0 (* (/ (/ (pow t_m 3.0) l) l) (* 2.0 (pow k 2.0))))
(/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 5e-13) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * (2.0 * pow(k, 2.0)));
} else {
tmp = 2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 5d-13) then
tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) / l) * (2.0d0 * (k ** 2.0d0)))
else
tmp = 2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 5e-13) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * (2.0 * Math.pow(k, 2.0)));
} else {
tmp = 2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 5e-13: tmp = 2.0 / (((math.pow(t_m, 3.0) / l) / l) * (2.0 * math.pow(k, 2.0))) else: tmp = 2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 5e-13) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(2.0 * (k ^ 2.0)))); else tmp = Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 5e-13) tmp = 2.0 / ((((t_m ^ 3.0) / l) / l) * (2.0 * (k ^ 2.0))); else tmp = 2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 5e-13], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $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 5 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}\\
\end{array}
\end{array}
if k < 4.9999999999999999e-13Initial program 57.1%
Simplified54.5%
Taylor expanded in k around 0 52.8%
if 4.9999999999999999e-13 < k Initial program 44.3%
Simplified44.3%
Taylor expanded in t around 0 66.8%
associate-/l*65.4%
associate-/l*65.5%
Simplified65.5%
Taylor expanded in k around 0 49.0%
associate-/l*46.2%
Simplified46.2%
pow146.2%
div-inv46.2%
pow-flip46.2%
metadata-eval46.2%
Applied egg-rr46.2%
unpow146.2%
associate-*r*49.0%
*-commutative49.0%
Simplified49.0%
Final simplification51.9%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (/ (* t_m (pow k 4.0)) (pow l 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((t_m * pow(k, 4.0)) / pow(l, 2.0)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((t_m * (k ** 4.0d0)) / (l ** 2.0d0)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((t_m * Math.pow(k, 4.0)) / Math.pow(l, 2.0)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((t_m * math.pow(k, 4.0)) / math.pow(l, 2.0)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / (l ^ 2.0)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((t_m * (k ^ 4.0)) / (l ^ 2.0))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\frac{t\_m \cdot {k}^{4}}{{\ell}^{2}}}
\end{array}
Initial program 53.8%
Simplified53.8%
Taylor expanded in t around 0 56.3%
associate-/l*56.7%
associate-/l*57.1%
Simplified57.1%
Taylor expanded in k around 0 47.7%
Final simplification47.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (pow l -2.0) (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (pow(l, -2.0) * (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((l ** (-2.0d0)) * (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (Math.pow(l, -2.0) * (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (math.pow(l, -2.0) * (t_m * math.pow(k, 4.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64((l ^ -2.0) * Float64(t_m * (k ^ 4.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((l ^ -2.0) * (t_m * (k ^ 4.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[l, -2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{{\ell}^{-2} \cdot \left(t\_m \cdot {k}^{4}\right)}
\end{array}
Initial program 53.8%
Simplified53.8%
Taylor expanded in t around 0 56.3%
associate-/l*56.7%
associate-/l*57.1%
Simplified57.1%
Taylor expanded in k around 0 47.7%
associate-/l*47.0%
Simplified47.0%
pow147.0%
div-inv47.0%
pow-flip47.0%
metadata-eval47.0%
Applied egg-rr47.0%
unpow147.0%
associate-*r*47.7%
*-commutative47.7%
Simplified47.7%
Final simplification47.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $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(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\right)
\end{array}
Initial program 53.8%
Simplified53.8%
Taylor expanded in t around 0 56.3%
associate-/l*56.7%
associate-/l*57.1%
Simplified57.1%
Taylor expanded in k around 0 47.7%
associate-/l*47.0%
Simplified47.0%
Taylor expanded in k around 0 47.7%
Final simplification47.7%
herbie shell --seed 2024106
(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))))