
(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 14 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 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.4e-13)
(* 2.0 (* (/ (pow (/ l k) 2.0) t_m) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(pow
(*
(* (* t_m (pow (cbrt l) -2.0)) (cbrt (sin k)))
(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 tmp;
if (t_m <= 5.4e-13) {
tmp = 2.0 * ((pow((l / k), 2.0) / t_m) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / pow((((t_m * pow(cbrt(l), -2.0)) * cbrt(sin(k))) * 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 tmp;
if (t_m <= 5.4e-13) {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / Math.pow((((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt(Math.sin(k))) * 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) tmp = 0.0 if (t_m <= 5.4e-13) tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(sin(k))) * 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_] := N[(t$95$s * If[LessEqual[t$95$m, 5.4e-13], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $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)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.4 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}\right)}^{3}}\\
\end{array}
\end{array}
if t < 5.40000000000000021e-13Initial program 57.7%
associate-*l*57.7%
*-commutative57.7%
*-commutative57.7%
associate-/r*66.8%
distribute-rgt-in66.8%
unpow266.8%
times-frac50.0%
sqr-neg50.0%
times-frac66.8%
unpow266.8%
distribute-rgt-in66.8%
+-commutative66.8%
Simplified66.8%
add-cube-cbrt66.8%
*-un-lft-identity66.8%
times-frac66.7%
pow266.7%
cbrt-div66.7%
rem-cbrt-cube66.7%
cbrt-div66.6%
rem-cbrt-cube74.0%
Applied egg-rr74.0%
add-cube-cbrt74.0%
pow374.0%
frac-times70.2%
unpow270.2%
*-un-lft-identity70.2%
cbrt-div70.1%
add-cbrt-cube74.4%
Applied egg-rr74.4%
Taylor expanded in t around 0 63.9%
times-frac63.4%
unpow263.4%
unpow263.4%
times-frac77.0%
unpow277.0%
associate-*r/77.0%
times-frac79.3%
Simplified79.3%
if 5.40000000000000021e-13 < t Initial program 78.0%
associate-*l*78.0%
*-commutative78.0%
*-commutative78.0%
associate-/r*79.6%
distribute-rgt-in79.6%
unpow279.6%
times-frac66.9%
sqr-neg66.9%
times-frac79.6%
unpow279.6%
distribute-rgt-in79.6%
+-commutative79.6%
Simplified79.6%
add-cube-cbrt79.6%
*-un-lft-identity79.6%
times-frac79.5%
pow279.5%
cbrt-div79.5%
rem-cbrt-cube79.5%
cbrt-div79.5%
rem-cbrt-cube93.0%
Applied egg-rr93.0%
add-cube-cbrt92.9%
pow392.9%
cbrt-prod92.9%
frac-times88.8%
unpow288.8%
*-un-lft-identity88.8%
cbrt-div88.9%
add-cbrt-cube95.5%
Applied egg-rr95.5%
expm1-log1p-u62.1%
expm1-udef56.2%
associate-/l/56.2%
pow256.2%
Applied egg-rr56.2%
expm1-def62.1%
expm1-log1p95.5%
Simplified95.5%
add-cube-cbrt95.5%
pow395.5%
Applied egg-rr97.9%
Final simplification84.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 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 (+ t_2 1.0)))))
(*
t_s
(if (<= t_3 2e+190)
(/
2.0
(*
(* (tan k) (+ 2.0 t_2))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ t_m l)))))
(if (<= t_3 INFINITY)
(pow (/ (pow (cbrt (/ l k)) 2.0) t_m) 3.0)
(*
2.0
(* (/ (pow (/ l k) 2.0) t_m) (/ (cos k) (pow (sin 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 + (t_2 + 1.0));
double tmp;
if (t_3 <= 2e+190) {
tmp = 2.0 / ((tan(k) * (2.0 + t_2)) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = pow((pow(cbrt((l / k)), 2.0) / t_m), 3.0);
} else {
tmp = 2.0 * ((pow((l / k), 2.0) / t_m) * (cos(k) / pow(sin(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 + (t_2 + 1.0));
double tmp;
if (t_3 <= 2e+190) {
tmp = 2.0 / ((Math.tan(k) * (2.0 + t_2)) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.pow((Math.pow(Math.cbrt((l / k)), 2.0) / t_m), 3.0);
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(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(t_2 + 1.0))) tmp = 0.0 if (t_3 <= 2e+190) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + t_2)) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); elseif (t_3 <= Inf) tmp = Float64((cbrt(Float64(l / k)) ^ 2.0) / t_m) ^ 3.0; else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 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[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[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 2e+190], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Power[N[(N[Power[N[Power[N[(l / k), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.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_3 := \left(\tan k \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(t_2 + 1\right)\right)\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_3 \leq 2 \cdot 10^{+190}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + t_2\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t_m}^{2}}{\ell} \cdot \frac{t_m}{\ell}\right)\right)}\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\frac{\ell}{k}}\right)}^{2}}{t_m}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < 2.0000000000000001e190Initial program 89.5%
associate-*l*89.5%
*-commutative89.5%
*-commutative89.5%
associate-/r*92.1%
distribute-rgt-in92.1%
unpow292.1%
times-frac70.8%
sqr-neg70.8%
times-frac92.1%
unpow292.1%
distribute-rgt-in92.1%
+-commutative92.1%
Simplified92.1%
associate-/r*89.5%
unpow389.5%
times-frac96.3%
pow296.3%
Applied egg-rr96.3%
if 2.0000000000000001e190 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < +inf.0Initial program 80.7%
Simplified60.5%
Taylor expanded in k around 0 62.3%
pow262.3%
*-un-lft-identity62.3%
associate-/r*60.2%
pow260.2%
Applied egg-rr60.2%
add-sqr-sqrt60.2%
sqrt-div60.2%
unpow260.2%
sqrt-prod34.0%
add-sqr-sqrt60.2%
unpow260.2%
sqrt-prod35.4%
add-sqr-sqrt58.4%
sqrt-div58.4%
unpow258.4%
sqrt-prod32.4%
add-sqr-sqrt60.7%
unpow260.7%
sqrt-prod47.3%
add-sqr-sqrt86.1%
Applied egg-rr86.1%
add-cube-cbrt86.0%
pow286.0%
cbrt-div85.9%
cbrt-prod85.9%
pow285.9%
unpow385.9%
add-cbrt-cube86.0%
cbrt-div86.0%
cbrt-prod92.1%
pow292.1%
unpow392.1%
add-cbrt-cube97.2%
Applied egg-rr97.2%
pow-plus97.2%
metadata-eval97.2%
Simplified97.2%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) Initial program 0.0%
associate-*l*0.0%
*-commutative0.0%
*-commutative0.0%
associate-/r*16.4%
distribute-rgt-in16.4%
unpow216.4%
times-frac10.6%
sqr-neg10.6%
times-frac16.4%
unpow216.4%
distribute-rgt-in16.4%
+-commutative16.4%
Simplified16.4%
add-cube-cbrt16.4%
*-un-lft-identity16.4%
times-frac16.4%
pow216.4%
cbrt-div16.4%
rem-cbrt-cube16.4%
cbrt-div16.4%
rem-cbrt-cube40.2%
Applied egg-rr40.2%
add-cube-cbrt40.0%
pow340.0%
frac-times30.2%
unpow230.2%
*-un-lft-identity30.2%
cbrt-div30.2%
add-cbrt-cube41.3%
Applied egg-rr41.3%
Taylor expanded in t around 0 40.7%
times-frac39.4%
unpow239.4%
unpow239.4%
times-frac73.5%
unpow273.5%
associate-*r/73.4%
times-frac76.8%
Simplified76.8%
Final simplification91.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 6.5e-13)
(* 2.0 (* (/ (pow (/ l k) 2.0) t_m) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (* (cbrt (sin k)) (/ (/ t_m (cbrt l)) (cbrt l))) 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 <= 6.5e-13) {
tmp = 2.0 * ((pow((l / k), 2.0) / t_m) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((cbrt(sin(k)) * ((t_m / cbrt(l)) / cbrt(l))), 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 <= 6.5e-13) {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((Math.cbrt(Math.sin(k)) * ((t_m / Math.cbrt(l)) / Math.cbrt(l))), 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 <= 6.5e-13) tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(cbrt(sin(k)) * Float64(Float64(t_m / cbrt(l)) / cbrt(l))) ^ 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, 6.5e-13], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $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 6.5 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{\frac{t_m}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 6.49999999999999957e-13Initial program 57.7%
associate-*l*57.7%
*-commutative57.7%
*-commutative57.7%
associate-/r*66.8%
distribute-rgt-in66.8%
unpow266.8%
times-frac50.0%
sqr-neg50.0%
times-frac66.8%
unpow266.8%
distribute-rgt-in66.8%
+-commutative66.8%
Simplified66.8%
add-cube-cbrt66.8%
*-un-lft-identity66.8%
times-frac66.7%
pow266.7%
cbrt-div66.7%
rem-cbrt-cube66.7%
cbrt-div66.6%
rem-cbrt-cube74.0%
Applied egg-rr74.0%
add-cube-cbrt74.0%
pow374.0%
frac-times70.2%
unpow270.2%
*-un-lft-identity70.2%
cbrt-div70.1%
add-cbrt-cube74.4%
Applied egg-rr74.4%
Taylor expanded in t around 0 63.9%
times-frac63.4%
unpow263.4%
unpow263.4%
times-frac77.0%
unpow277.0%
associate-*r/77.0%
times-frac79.3%
Simplified79.3%
if 6.49999999999999957e-13 < t Initial program 78.0%
associate-*l*78.0%
*-commutative78.0%
*-commutative78.0%
associate-/r*79.6%
distribute-rgt-in79.6%
unpow279.6%
times-frac66.9%
sqr-neg66.9%
times-frac79.6%
unpow279.6%
distribute-rgt-in79.6%
+-commutative79.6%
Simplified79.6%
add-cube-cbrt79.6%
*-un-lft-identity79.6%
times-frac79.5%
pow279.5%
cbrt-div79.5%
rem-cbrt-cube79.5%
cbrt-div79.5%
rem-cbrt-cube93.0%
Applied egg-rr93.0%
add-cube-cbrt92.9%
pow392.9%
cbrt-prod92.9%
frac-times88.8%
unpow288.8%
*-un-lft-identity88.8%
cbrt-div88.9%
add-cbrt-cube95.5%
Applied egg-rr95.5%
Final simplification83.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.6e-13)
(* 2.0 (* (/ (pow (/ l k) 2.0) t_m) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 2.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 <= 7.6e-13) {
tmp = 2.0 * ((pow((l / k), 2.0) / t_m) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (2.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 <= 7.6e-13) {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.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 <= 7.6e-13) tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.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, 7.6e-13], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $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 7.6 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\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 < 7.5999999999999999e-13Initial program 57.7%
associate-*l*57.7%
*-commutative57.7%
*-commutative57.7%
associate-/r*66.8%
distribute-rgt-in66.8%
unpow266.8%
times-frac50.0%
sqr-neg50.0%
times-frac66.8%
unpow266.8%
distribute-rgt-in66.8%
+-commutative66.8%
Simplified66.8%
add-cube-cbrt66.8%
*-un-lft-identity66.8%
times-frac66.7%
pow266.7%
cbrt-div66.7%
rem-cbrt-cube66.7%
cbrt-div66.6%
rem-cbrt-cube74.0%
Applied egg-rr74.0%
add-cube-cbrt74.0%
pow374.0%
frac-times70.2%
unpow270.2%
*-un-lft-identity70.2%
cbrt-div70.1%
add-cbrt-cube74.4%
Applied egg-rr74.4%
Taylor expanded in t around 0 63.9%
times-frac63.4%
unpow263.4%
unpow263.4%
times-frac77.0%
unpow277.0%
associate-*r/77.0%
times-frac79.3%
Simplified79.3%
if 7.5999999999999999e-13 < t Initial program 78.0%
associate-*l*78.0%
*-commutative78.0%
*-commutative78.0%
associate-/r*79.6%
distribute-rgt-in79.6%
unpow279.6%
times-frac66.9%
sqr-neg66.9%
times-frac79.6%
unpow279.6%
distribute-rgt-in79.6%
+-commutative79.6%
Simplified79.6%
add-cube-cbrt79.6%
*-un-lft-identity79.6%
times-frac79.5%
pow279.5%
cbrt-div79.5%
rem-cbrt-cube79.5%
cbrt-div79.5%
rem-cbrt-cube93.0%
Applied egg-rr93.0%
add-cube-cbrt92.9%
pow392.9%
cbrt-prod92.9%
frac-times88.8%
unpow288.8%
*-un-lft-identity88.8%
cbrt-div88.9%
add-cbrt-cube95.5%
Applied egg-rr95.5%
expm1-log1p-u62.1%
expm1-udef56.2%
associate-/l/56.2%
pow256.2%
Applied egg-rr56.2%
expm1-def62.1%
expm1-log1p95.5%
Simplified95.5%
Final simplification83.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 5.4e-13)
(* 2.0 (* (/ (pow (/ l k) 2.0) t_m) (/ (cos k) (pow (sin k) 2.0))))
(if (<= t_m 5.7e+102)
(/ (* (* l (/ 2.0 (* (tan k) (pow t_m 3.0)))) (/ l (sin k))) t_2)
(/
2.0
(*
(* (tan k) 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 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 5.4e-13) {
tmp = 2.0 * ((pow((l / k), 2.0) / t_m) * (cos(k) / pow(sin(k), 2.0)));
} else if (t_m <= 5.7e+102) {
tmp = ((l * (2.0 / (tan(k) * pow(t_m, 3.0)))) * (l / sin(k))) / t_2;
} else {
tmp = 2.0 / ((tan(k) * 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 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 5.4e-13) {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 5.7e+102) {
tmp = ((l * (2.0 / (Math.tan(k) * Math.pow(t_m, 3.0)))) * (l / Math.sin(k))) / t_2;
} else {
tmp = 2.0 / ((Math.tan(k) * 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(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 5.4e-13) tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 2.0)))); elseif (t_m <= 5.7e+102) tmp = Float64(Float64(Float64(l * Float64(2.0 / Float64(tan(k) * (t_m ^ 3.0)))) * Float64(l / sin(k))) / t_2); else tmp = Float64(2.0 / Float64(Float64(tan(k) * 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[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.4e-13], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.7e+102], N[(N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * t$95$2), $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 := 2 + {\left(\frac{k}{t_m}\right)}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.4 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t_m \leq 5.7 \cdot 10^{+102}:\\
\;\;\;\;\frac{\left(\ell \cdot \frac{2}{\tan k \cdot {t_m}^{3}}\right) \cdot \frac{\ell}{\sin k}}{t_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot t_2\right) \cdot \left(\sin k \cdot {\left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}\right)}\\
\end{array}
\end{array}
\end{array}
if t < 5.40000000000000021e-13Initial program 57.7%
associate-*l*57.7%
*-commutative57.7%
*-commutative57.7%
associate-/r*66.8%
distribute-rgt-in66.8%
unpow266.8%
times-frac50.0%
sqr-neg50.0%
times-frac66.8%
unpow266.8%
distribute-rgt-in66.8%
+-commutative66.8%
Simplified66.8%
add-cube-cbrt66.8%
*-un-lft-identity66.8%
times-frac66.7%
pow266.7%
cbrt-div66.7%
rem-cbrt-cube66.7%
cbrt-div66.6%
rem-cbrt-cube74.0%
Applied egg-rr74.0%
add-cube-cbrt74.0%
pow374.0%
frac-times70.2%
unpow270.2%
*-un-lft-identity70.2%
cbrt-div70.1%
add-cbrt-cube74.4%
Applied egg-rr74.4%
Taylor expanded in t around 0 63.9%
times-frac63.4%
unpow263.4%
unpow263.4%
times-frac77.0%
unpow277.0%
associate-*r/77.0%
times-frac79.3%
Simplified79.3%
if 5.40000000000000021e-13 < t < 5.6999999999999999e102Initial program 92.2%
Simplified95.8%
associate-*r*95.9%
*-un-lft-identity95.9%
times-frac95.9%
Applied egg-rr95.9%
/-rgt-identity95.9%
associate-*r/95.9%
associate-*l/95.9%
associate-*r*96.0%
*-commutative96.0%
Simplified96.0%
div-inv96.0%
*-commutative96.0%
times-frac99.8%
*-commutative99.8%
Applied egg-rr99.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
if 5.6999999999999999e102 < t Initial program 70.2%
associate-*l*70.2%
*-commutative70.2%
*-commutative70.2%
associate-/r*72.8%
distribute-rgt-in72.8%
unpow272.8%
times-frac53.2%
sqr-neg53.2%
times-frac72.8%
unpow272.8%
distribute-rgt-in72.8%
+-commutative72.8%
Simplified72.8%
add-cube-cbrt72.8%
*-un-lft-identity72.8%
times-frac72.8%
pow272.8%
cbrt-div72.8%
rem-cbrt-cube72.8%
cbrt-div72.8%
rem-cbrt-cube93.5%
Applied egg-rr93.5%
add-cube-cbrt93.4%
pow393.4%
cbrt-prod93.5%
frac-times87.2%
unpow287.2%
*-un-lft-identity87.2%
cbrt-div87.3%
add-cbrt-cube95.5%
Applied egg-rr95.5%
expm1-log1p-u59.5%
expm1-udef56.8%
associate-/l/56.8%
pow256.8%
Applied egg-rr56.8%
expm1-def59.5%
expm1-log1p95.5%
Simplified95.5%
expm1-log1p-u69.2%
expm1-udef65.3%
Applied egg-rr65.3%
expm1-def67.2%
expm1-log1p93.6%
Simplified93.6%
Final simplification83.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.5e-13)
(* 2.0 (* (/ (pow (/ l k) 2.0) t_m) (/ (cos k) (pow (sin k) 2.0))))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(/ (pow (* (cbrt (sin k)) (/ t_m (cbrt l))) 3.0) l))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.5e-13) {
tmp = 2.0 * ((pow((l / k), 2.0) / t_m) * (cos(k) / pow(sin(k), 2.0)));
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * (pow((cbrt(sin(k)) * (t_m / cbrt(l))), 3.0) / l));
}
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 <= 7.5e-13) {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.cbrt(l))), 3.0) / l));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 7.5e-13) tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64((Float64(cbrt(sin(k)) * Float64(t_m / cbrt(l))) ^ 3.0) / l))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-13], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 7.5 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{{\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 7.5000000000000004e-13Initial program 57.7%
associate-*l*57.7%
*-commutative57.7%
*-commutative57.7%
associate-/r*66.8%
distribute-rgt-in66.8%
unpow266.8%
times-frac50.0%
sqr-neg50.0%
times-frac66.8%
unpow266.8%
distribute-rgt-in66.8%
+-commutative66.8%
Simplified66.8%
add-cube-cbrt66.8%
*-un-lft-identity66.8%
times-frac66.7%
pow266.7%
cbrt-div66.7%
rem-cbrt-cube66.7%
cbrt-div66.6%
rem-cbrt-cube74.0%
Applied egg-rr74.0%
add-cube-cbrt74.0%
pow374.0%
frac-times70.2%
unpow270.2%
*-un-lft-identity70.2%
cbrt-div70.1%
add-cbrt-cube74.4%
Applied egg-rr74.4%
Taylor expanded in t around 0 63.9%
times-frac63.4%
unpow263.4%
unpow263.4%
times-frac77.0%
unpow277.0%
associate-*r/77.0%
times-frac79.3%
Simplified79.3%
if 7.5000000000000004e-13 < t Initial program 78.0%
associate-*l*78.0%
*-commutative78.0%
*-commutative78.0%
associate-/r*79.6%
distribute-rgt-in79.6%
unpow279.6%
times-frac66.9%
sqr-neg66.9%
times-frac79.6%
unpow279.6%
distribute-rgt-in79.6%
+-commutative79.6%
Simplified79.6%
add-cube-cbrt79.6%
*-un-lft-identity79.6%
times-frac79.5%
pow279.5%
cbrt-div79.5%
rem-cbrt-cube79.5%
cbrt-div79.5%
rem-cbrt-cube93.0%
Applied egg-rr93.0%
add-cube-cbrt92.9%
pow392.9%
frac-times88.9%
unpow288.9%
*-un-lft-identity88.9%
cbrt-div88.8%
add-cbrt-cube92.9%
Applied egg-rr92.9%
rem-cube-cbrt92.8%
cbrt-prod92.9%
rem-cbrt-cube95.5%
associate-*l/95.5%
cube-div95.5%
rem-cube-cbrt95.6%
Applied egg-rr95.6%
Final simplification83.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 5.3e-14)
(pow (/ (pow (cbrt (/ l k)) 2.0) t_m) 3.0)
(* 2.0 (* (/ (pow (/ l k) 2.0) t_m) (/ (cos k) (pow (sin k) 2.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 5.3e-14) {
tmp = pow((pow(cbrt((l / k)), 2.0) / t_m), 3.0);
} else {
tmp = 2.0 * ((pow((l / k), 2.0) / t_m) * (cos(k) / pow(sin(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 tmp;
if (k <= 5.3e-14) {
tmp = Math.pow((Math.pow(Math.cbrt((l / k)), 2.0) / t_m), 3.0);
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 5.3e-14) tmp = Float64((cbrt(Float64(l / k)) ^ 2.0) / t_m) ^ 3.0; else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 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[k, 5.3e-14], N[Power[N[(N[Power[N[Power[N[(l / k), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.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.3 \cdot 10^{-14}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\frac{\ell}{k}}\right)}^{2}}{t_m}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 5.3000000000000001e-14Initial program 66.6%
Simplified56.5%
Taylor expanded in k around 0 58.0%
pow258.0%
*-un-lft-identity58.0%
associate-/r*57.5%
pow257.5%
Applied egg-rr57.5%
add-sqr-sqrt57.5%
sqrt-div57.5%
unpow257.5%
sqrt-prod30.8%
add-sqr-sqrt38.4%
unpow238.4%
sqrt-prod13.9%
add-sqr-sqrt42.6%
sqrt-div42.6%
unpow242.6%
sqrt-prod22.8%
add-sqr-sqrt38.8%
unpow238.8%
sqrt-prod27.9%
add-sqr-sqrt72.4%
Applied egg-rr72.4%
add-cube-cbrt72.3%
pow272.3%
cbrt-div72.3%
cbrt-prod72.3%
pow272.3%
unpow372.2%
add-cbrt-cube72.3%
cbrt-div72.3%
cbrt-prod76.8%
pow276.8%
unpow376.8%
add-cbrt-cube82.3%
Applied egg-rr82.3%
pow-plus82.3%
metadata-eval82.3%
Simplified82.3%
if 5.3000000000000001e-14 < k Initial program 53.2%
associate-*l*53.2%
*-commutative53.2%
*-commutative53.2%
associate-/r*56.6%
distribute-rgt-in56.6%
unpow256.6%
times-frac38.8%
sqr-neg38.8%
times-frac56.6%
unpow256.6%
distribute-rgt-in56.6%
+-commutative56.6%
Simplified56.6%
add-cube-cbrt56.6%
*-un-lft-identity56.6%
times-frac56.6%
pow256.6%
cbrt-div56.6%
rem-cbrt-cube56.5%
cbrt-div56.5%
rem-cbrt-cube64.5%
Applied egg-rr64.5%
add-cube-cbrt64.4%
pow364.4%
frac-times64.3%
unpow264.3%
*-un-lft-identity64.3%
cbrt-div64.3%
add-cbrt-cube64.5%
Applied egg-rr64.5%
Taylor expanded in t around 0 73.9%
times-frac72.5%
unpow272.5%
unpow272.5%
times-frac87.1%
unpow287.1%
associate-*r/87.1%
times-frac87.2%
Simplified87.2%
Final simplification83.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.35e-11)
(pow (/ (pow (cbrt (/ l k)) 2.0) t_m) 3.0)
(*
2.0
(*
(pow (/ l k) 2.0)
(/ (cos k) (* t_m (- 0.5 (* 0.5 (cos (* 2.0 k)))))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.35e-11) {
tmp = pow((pow(cbrt((l / k)), 2.0) / t_m), 3.0);
} else {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t_m * (0.5 - (0.5 * cos((2.0 * k)))))));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.35e-11) {
tmp = Math.pow((Math.pow(Math.cbrt((l / k)), 2.0) / t_m), 3.0);
} else {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t_m * (0.5 - (0.5 * Math.cos((2.0 * k)))))));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.35e-11) tmp = Float64((cbrt(Float64(l / k)) ^ 2.0) / t_m) ^ 3.0; else tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t_m * Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * k)))))))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.35e-11], N[Power[N[(N[Power[N[Power[N[(l / k), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.35 \cdot 10^{-11}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\frac{\ell}{k}}\right)}^{2}}{t_m}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t_m \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)}\right)\\
\end{array}
\end{array}
if k < 1.35000000000000002e-11Initial program 66.6%
Simplified56.5%
Taylor expanded in k around 0 58.0%
pow258.0%
*-un-lft-identity58.0%
associate-/r*57.5%
pow257.5%
Applied egg-rr57.5%
add-sqr-sqrt57.5%
sqrt-div57.5%
unpow257.5%
sqrt-prod30.8%
add-sqr-sqrt38.4%
unpow238.4%
sqrt-prod13.9%
add-sqr-sqrt42.6%
sqrt-div42.6%
unpow242.6%
sqrt-prod22.8%
add-sqr-sqrt38.8%
unpow238.8%
sqrt-prod27.9%
add-sqr-sqrt72.4%
Applied egg-rr72.4%
add-cube-cbrt72.3%
pow272.3%
cbrt-div72.3%
cbrt-prod72.3%
pow272.3%
unpow372.2%
add-cbrt-cube72.3%
cbrt-div72.3%
cbrt-prod76.8%
pow276.8%
unpow376.8%
add-cbrt-cube82.3%
Applied egg-rr82.3%
pow-plus82.3%
metadata-eval82.3%
Simplified82.3%
if 1.35000000000000002e-11 < k Initial program 53.2%
Simplified53.2%
Taylor expanded in t around 0 73.9%
unpow273.9%
sin-mult73.8%
Applied egg-rr73.8%
div-sub73.8%
+-inverses73.8%
cos-073.8%
metadata-eval73.8%
count-273.8%
*-commutative73.8%
Simplified73.8%
times-frac72.4%
pow272.4%
unpow272.4%
frac-times86.9%
pow286.9%
div-inv86.9%
*-commutative86.9%
metadata-eval86.9%
Applied egg-rr86.9%
Final simplification83.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3.2e-22)
(pow (/ (/ l k) (pow t_m 1.5)) 2.0)
(pow (/ (cbrt (pow (/ l k) 2.0)) t_m) 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 <= 3.2e-22) {
tmp = pow(((l / k) / pow(t_m, 1.5)), 2.0);
} else {
tmp = pow((cbrt(pow((l / k), 2.0)) / t_m), 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 <= 3.2e-22) {
tmp = Math.pow(((l / k) / Math.pow(t_m, 1.5)), 2.0);
} else {
tmp = Math.pow((Math.cbrt(Math.pow((l / k), 2.0)) / t_m), 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 <= 3.2e-22) tmp = Float64(Float64(l / k) / (t_m ^ 1.5)) ^ 2.0; else tmp = Float64(cbrt((Float64(l / k) ^ 2.0)) / t_m) ^ 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, 3.2e-22], N[Power[N[(N[(l / k), $MachinePrecision] / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(N[Power[N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.2 \cdot 10^{-22}:\\
\;\;\;\;{\left(\frac{\frac{\ell}{k}}{{t_m}^{1.5}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{{\left(\frac{\ell}{k}\right)}^{2}}}{t_m}\right)}^{3}\\
\end{array}
\end{array}
if k < 3.19999999999999987e-22Initial program 66.4%
Simplified56.1%
Taylor expanded in k around 0 57.3%
pow257.3%
*-un-lft-identity57.3%
associate-/r*56.8%
pow256.8%
Applied egg-rr56.8%
add-sqr-sqrt38.0%
pow238.0%
sqrt-div29.6%
sqrt-div30.2%
unpow230.2%
sqrt-prod17.8%
add-sqr-sqrt33.0%
unpow233.0%
sqrt-prod14.2%
add-sqr-sqrt40.5%
sqrt-pow143.4%
metadata-eval43.4%
Applied egg-rr43.4%
if 3.19999999999999987e-22 < k Initial program 54.5%
Simplified54.5%
Taylor expanded in k around 0 55.9%
pow255.9%
*-un-lft-identity55.9%
associate-/r*57.4%
pow257.4%
Applied egg-rr57.4%
add-cube-cbrt57.4%
pow357.4%
cbrt-div57.4%
add-sqr-sqrt57.4%
pow257.4%
sqrt-div57.4%
unpow257.4%
sqrt-prod37.9%
add-sqr-sqrt60.6%
unpow260.6%
sqrt-prod60.6%
add-sqr-sqrt60.6%
rem-cbrt-cube64.1%
Applied egg-rr64.1%
Final simplification48.7%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.8e-12)
(pow (/ (cbrt (pow (/ l k) 2.0)) t_m) 3.0)
(pow (/ (pow (cbrt (/ l k)) 2.0) t_m) 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 <= 5.8e-12) {
tmp = pow((cbrt(pow((l / k), 2.0)) / t_m), 3.0);
} else {
tmp = pow((pow(cbrt((l / k)), 2.0) / t_m), 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 <= 5.8e-12) {
tmp = Math.pow((Math.cbrt(Math.pow((l / k), 2.0)) / t_m), 3.0);
} else {
tmp = Math.pow((Math.pow(Math.cbrt((l / k)), 2.0) / t_m), 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 <= 5.8e-12) tmp = Float64(cbrt((Float64(l / k) ^ 2.0)) / t_m) ^ 3.0; else tmp = Float64((cbrt(Float64(l / k)) ^ 2.0) / t_m) ^ 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, 5.8e-12], N[Power[N[(N[Power[N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision], N[Power[N[(N[Power[N[Power[N[(l / k), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $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.8 \cdot 10^{-12}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{{\left(\frac{\ell}{k}\right)}^{2}}}{t_m}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\frac{\ell}{k}}\right)}^{2}}{t_m}\right)}^{3}\\
\end{array}
\end{array}
if t < 5.8000000000000003e-12Initial program 57.9%
Simplified53.6%
Taylor expanded in k around 0 55.8%
pow255.8%
*-un-lft-identity55.8%
associate-/r*56.4%
pow256.4%
Applied egg-rr56.4%
add-cube-cbrt56.4%
pow356.4%
cbrt-div56.4%
add-sqr-sqrt56.3%
pow256.3%
sqrt-div56.3%
unpow256.3%
sqrt-prod31.6%
add-sqr-sqrt62.5%
unpow262.5%
sqrt-prod33.5%
add-sqr-sqrt67.3%
rem-cbrt-cube71.4%
Applied egg-rr71.4%
if 5.8000000000000003e-12 < t Initial program 77.7%
Simplified61.2%
Taylor expanded in k around 0 59.8%
pow259.8%
*-un-lft-identity59.8%
associate-/r*58.3%
pow258.3%
Applied egg-rr58.3%
add-sqr-sqrt58.3%
sqrt-div58.3%
unpow258.3%
sqrt-prod37.8%
add-sqr-sqrt58.2%
unpow258.2%
sqrt-prod34.0%
add-sqr-sqrt56.2%
sqrt-div56.2%
unpow256.2%
sqrt-prod36.0%
add-sqr-sqrt58.0%
unpow258.0%
sqrt-prod39.9%
add-sqr-sqrt73.5%
Applied egg-rr73.5%
add-cube-cbrt73.4%
pow273.4%
cbrt-div73.4%
cbrt-prod73.4%
pow273.4%
unpow373.3%
add-cbrt-cube73.4%
cbrt-div73.3%
cbrt-prod79.0%
pow279.0%
unpow379.0%
add-cbrt-cube88.5%
Applied egg-rr88.5%
pow-plus88.5%
metadata-eval88.5%
Simplified88.5%
Final simplification76.1%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 9.2e-14)
(pow (/ (/ l k) (pow t_m 1.5)) 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 <= 9.2e-14) {
tmp = pow(((l / k) / pow(t_m, 1.5)), 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 <= 9.2d-14) then
tmp = ((l / k) / (t_m ** 1.5d0)) ** 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 <= 9.2e-14) {
tmp = Math.pow(((l / k) / Math.pow(t_m, 1.5)), 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 <= 9.2e-14: tmp = math.pow(((l / k) / math.pow(t_m, 1.5)), 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 <= 9.2e-14) tmp = Float64(Float64(l / k) / (t_m ^ 1.5)) ^ 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 <= 9.2e-14) tmp = ((l / k) / (t_m ^ 1.5)) ^ 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, 9.2e-14], N[Power[N[(N[(l / k), $MachinePrecision] / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $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 9.2 \cdot 10^{-14}:\\
\;\;\;\;{\left(\frac{\frac{\ell}{k}}{{t_m}^{1.5}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 9.19999999999999993e-14Initial program 66.6%
Simplified56.5%
Taylor expanded in k around 0 58.0%
pow258.0%
*-un-lft-identity58.0%
associate-/r*57.5%
pow257.5%
Applied egg-rr57.5%
add-sqr-sqrt38.2%
pow238.2%
sqrt-div29.0%
sqrt-div29.5%
unpow229.5%
sqrt-prod17.4%
add-sqr-sqrt32.3%
unpow232.3%
sqrt-prod14.0%
add-sqr-sqrt39.7%
sqrt-pow142.5%
metadata-eval42.5%
Applied egg-rr42.5%
if 9.19999999999999993e-14 < k Initial program 53.2%
Simplified53.2%
Taylor expanded in t around 0 73.9%
Taylor expanded in k around 0 58.8%
Final simplification46.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.15e-13)
(pow (/ (/ l k) (pow t_m 1.5)) 2.0)
(/ 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) {
double tmp;
if (k <= 1.15e-13) {
tmp = pow(((l / k) / pow(t_m, 1.5)), 2.0);
} else {
tmp = 2.0 / ((t_m * pow(k, 4.0)) / 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.15d-13) then
tmp = ((l / k) / (t_m ** 1.5d0)) ** 2.0d0
else
tmp = 2.0d0 / ((t_m * (k ** 4.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 (k <= 1.15e-13) {
tmp = Math.pow(((l / k) / Math.pow(t_m, 1.5)), 2.0);
} else {
tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / 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.15e-13: tmp = math.pow(((l / k) / math.pow(t_m, 1.5)), 2.0) else: tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / 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.15e-13) tmp = Float64(Float64(l / k) / (t_m ^ 1.5)) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.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 (k <= 1.15e-13) tmp = ((l / k) / (t_m ^ 1.5)) ^ 2.0; else tmp = 2.0 / ((t_m * (k ^ 4.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[k, 1.15e-13], N[Power[N[(N[(l / k), $MachinePrecision] / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;k \leq 1.15 \cdot 10^{-13}:\\
\;\;\;\;{\left(\frac{\frac{\ell}{k}}{{t_m}^{1.5}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{4}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if k < 1.1499999999999999e-13Initial program 66.6%
Simplified56.5%
Taylor expanded in k around 0 58.0%
pow258.0%
*-un-lft-identity58.0%
associate-/r*57.5%
pow257.5%
Applied egg-rr57.5%
add-sqr-sqrt38.2%
pow238.2%
sqrt-div29.0%
sqrt-div29.5%
unpow229.5%
sqrt-prod17.4%
add-sqr-sqrt32.3%
unpow232.3%
sqrt-prod14.0%
add-sqr-sqrt39.7%
sqrt-pow142.5%
metadata-eval42.5%
Applied egg-rr42.5%
if 1.1499999999999999e-13 < k Initial program 53.2%
associate-*l*53.2%
*-commutative53.2%
*-commutative53.2%
associate-/r*56.6%
distribute-rgt-in56.6%
unpow256.6%
times-frac38.8%
sqr-neg38.8%
times-frac56.6%
unpow256.6%
distribute-rgt-in56.6%
+-commutative56.6%
Simplified56.6%
add-cube-cbrt56.6%
*-un-lft-identity56.6%
times-frac56.6%
pow256.6%
cbrt-div56.6%
rem-cbrt-cube56.5%
cbrt-div56.5%
rem-cbrt-cube64.5%
Applied egg-rr64.5%
add-cube-cbrt64.4%
pow364.4%
cbrt-prod64.5%
frac-times64.3%
unpow264.3%
*-un-lft-identity64.3%
cbrt-div64.3%
add-cbrt-cube64.5%
Applied egg-rr64.5%
Taylor expanded in t around 0 72.7%
times-frac71.4%
Simplified71.4%
Taylor expanded in k around 0 58.8%
Final simplification46.4%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (pow (/ (/ l k) (pow t_m 1.5)) 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 * pow(((l / k) / pow(t_m, 1.5)), 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 * (((l / k) / (t_m ** 1.5d0)) ** 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 * Math.pow(((l / k) / Math.pow(t_m, 1.5)), 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 * math.pow(((l / k) / math.pow(t_m, 1.5)), 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(Float64(l / k) / (t_m ^ 1.5)) ^ 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 * (((l / k) / (t_m ^ 1.5)) ^ 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[Power[N[(N[(l / k), $MachinePrecision] / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot {\left(\frac{\frac{\ell}{k}}{{t_m}^{1.5}}\right)}^{2}
\end{array}
Initial program 63.3%
Simplified55.7%
Taylor expanded in k around 0 56.9%
pow256.9%
*-un-lft-identity56.9%
associate-/r*56.9%
pow256.9%
Applied egg-rr56.9%
add-sqr-sqrt41.4%
pow241.4%
sqrt-div30.1%
sqrt-div30.1%
unpow230.1%
sqrt-prod18.0%
add-sqr-sqrt32.6%
unpow232.6%
sqrt-prod18.5%
add-sqr-sqrt38.0%
sqrt-pow140.1%
metadata-eval40.1%
Applied egg-rr40.1%
Final simplification40.1%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (* (/ l k) (/ l k)) (pow t_m 3.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 * (((l / k) * (l / k)) / pow(t_m, 3.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 * (((l / k) * (l / k)) / (t_m ** 3.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 * (((l / k) * (l / k)) / Math.pow(t_m, 3.0));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (((l / k) * (l / k)) / math.pow(t_m, 3.0))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(Float64(l / k) * Float64(l / k)) / (t_m ^ 3.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 * (((l / k) * (l / k)) / (t_m ^ 3.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[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{{t_m}^{3}}
\end{array}
Initial program 63.3%
Simplified55.7%
Taylor expanded in k around 0 56.9%
pow256.9%
*-un-lft-identity56.9%
associate-/r*56.9%
pow256.9%
Applied egg-rr56.9%
add-sqr-sqrt56.9%
sqrt-div56.9%
unpow256.9%
sqrt-prod31.2%
add-sqr-sqrt42.0%
unpow242.0%
sqrt-prod23.4%
add-sqr-sqrt45.2%
sqrt-div45.2%
unpow245.2%
sqrt-prod25.6%
add-sqr-sqrt43.6%
unpow243.6%
sqrt-prod35.3%
add-sqr-sqrt69.0%
Applied egg-rr69.0%
Final simplification69.0%
herbie shell --seed 2023339
(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))))