
(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 19 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 (pow (sin k) 2.0))
(t_3 (/ t_m (cos k)))
(t_4 (/ t_m (pow (cbrt l) 2.0))))
(*
t_s
(if (<= t_m 5.9e-235)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt t_3)) 2.0))
(if (<= t_m 2.05e-178)
(/ 2.0 (* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ t_2 (cos k))))
(if (<= t_m 3.7e-147)
(pow
(* (* (/ (sqrt 2.0) (sin k)) (/ l k)) (sqrt (/ (cos k) t_m)))
2.0)
(if (<= t_m 3.3e-114)
(/
2.0
(pow
(* (pow (cbrt k) 2.0) (cbrt (/ (* t_3 t_2) (pow l 2.0))))
3.0))
(if (<= t_m 3.8e-94)
(/
2.0
(pow
(*
t_4
(*
k
(+
(cbrt (/ t_2 (* (cos k) (* k (pow t_m 2.0)))))
(*
0.6666666666666666
(cbrt
(* (pow t_m 4.0) (/ t_2 (* (cos k) (pow k 7.0)))))))))
3.0))
(/
2.0
(pow
(*
t_4
(*
(cbrt (sin k))
(cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) (tan k)))))
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(sin(k), 2.0);
double t_3 = t_m / cos(k);
double t_4 = t_m / pow(cbrt(l), 2.0);
double tmp;
if (t_m <= 5.9e-235) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt(t_3)), 2.0);
} else if (t_m <= 2.05e-178) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (t_2 / cos(k)));
} else if (t_m <= 3.7e-147) {
tmp = pow((((sqrt(2.0) / sin(k)) * (l / k)) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 3.3e-114) {
tmp = 2.0 / pow((pow(cbrt(k), 2.0) * cbrt(((t_3 * t_2) / pow(l, 2.0)))), 3.0);
} else if (t_m <= 3.8e-94) {
tmp = 2.0 / pow((t_4 * (k * (cbrt((t_2 / (cos(k) * (k * pow(t_m, 2.0))))) + (0.6666666666666666 * cbrt((pow(t_m, 4.0) * (t_2 / (cos(k) * pow(k, 7.0))))))))), 3.0);
} else {
tmp = 2.0 / pow((t_4 * (cbrt(sin(k)) * cbrt(((2.0 + pow((k / t_m), 2.0)) * tan(k))))), 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(Math.sin(k), 2.0);
double t_3 = t_m / Math.cos(k);
double t_4 = t_m / Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (t_m <= 5.9e-235) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt(t_3)), 2.0);
} else if (t_m <= 2.05e-178) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (t_2 / Math.cos(k)));
} else if (t_m <= 3.7e-147) {
tmp = Math.pow((((Math.sqrt(2.0) / Math.sin(k)) * (l / k)) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 3.3e-114) {
tmp = 2.0 / Math.pow((Math.pow(Math.cbrt(k), 2.0) * Math.cbrt(((t_3 * t_2) / Math.pow(l, 2.0)))), 3.0);
} else if (t_m <= 3.8e-94) {
tmp = 2.0 / Math.pow((t_4 * (k * (Math.cbrt((t_2 / (Math.cos(k) * (k * Math.pow(t_m, 2.0))))) + (0.6666666666666666 * Math.cbrt((Math.pow(t_m, 4.0) * (t_2 / (Math.cos(k) * Math.pow(k, 7.0))))))))), 3.0);
} else {
tmp = 2.0 / Math.pow((t_4 * (Math.cbrt(Math.sin(k)) * Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * Math.tan(k))))), 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 = sin(k) ^ 2.0 t_3 = Float64(t_m / cos(k)) t_4 = Float64(t_m / (cbrt(l) ^ 2.0)) tmp = 0.0 if (t_m <= 5.9e-235) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(t_3)) ^ 2.0)); elseif (t_m <= 2.05e-178) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64(t_2 / cos(k)))); elseif (t_m <= 3.7e-147) tmp = Float64(Float64(Float64(sqrt(2.0) / sin(k)) * Float64(l / k)) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 3.3e-114) tmp = Float64(2.0 / (Float64((cbrt(k) ^ 2.0) * cbrt(Float64(Float64(t_3 * t_2) / (l ^ 2.0)))) ^ 3.0)); elseif (t_m <= 3.8e-94) tmp = Float64(2.0 / (Float64(t_4 * Float64(k * Float64(cbrt(Float64(t_2 / Float64(cos(k) * Float64(k * (t_m ^ 2.0))))) + Float64(0.6666666666666666 * cbrt(Float64((t_m ^ 4.0) * Float64(t_2 / Float64(cos(k) * (k ^ 7.0))))))))) ^ 3.0)); else tmp = Float64(2.0 / (Float64(t_4 * Float64(cbrt(sin(k)) * cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * tan(k))))) ^ 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[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.9e-235], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.05e-178], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.7e-147], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 3.3e-114], N[(2.0 / N[Power[N[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[(t$95$3 * t$95$2), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.8e-94], N[(2.0 / N[Power[N[(t$95$4 * N[(k * N[(N[Power[N[(t$95$2 / N[(N[Cos[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.6666666666666666 * N[Power[N[(N[Power[t$95$m, 4.0], $MachinePrecision] * N[(t$95$2 / N[(N[Cos[k], $MachinePrecision] * N[Power[k, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$4 * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $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 := {\sin k}^{2}\\
t_3 := \frac{t\_m}{\cos k}\\
t_4 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.9 \cdot 10^{-235}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{t\_3}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.05 \cdot 10^{-178}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{t\_2}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 3.7 \cdot 10^{-147}:\\
\;\;\;\;{\left(\left(\frac{\sqrt{2}}{\sin k} \cdot \frac{\ell}{k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 3.3 \cdot 10^{-114}:\\
\;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{\frac{t\_3 \cdot t\_2}{{\ell}^{2}}}\right)}^{3}}\\
\mathbf{elif}\;t\_m \leq 3.8 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{{\left(t\_4 \cdot \left(k \cdot \left(\sqrt[3]{\frac{t\_2}{\cos k \cdot \left(k \cdot {t\_m}^{2}\right)}} + 0.6666666666666666 \cdot \sqrt[3]{{t\_m}^{4} \cdot \frac{t\_2}{\cos k \cdot {k}^{7}}}\right)\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_4 \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \tan k}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 5.9000000000000003e-235Initial program 43.7%
Simplified43.9%
Applied egg-rr4.9%
Taylor expanded in t around 0 27.9%
if 5.9000000000000003e-235 < t < 2.05e-178Initial program 36.8%
Simplified36.8%
Taylor expanded in t around 0 84.7%
associate-*r*84.7%
times-frac84.6%
Simplified84.6%
if 2.05e-178 < t < 3.7000000000000002e-147Initial program 50.6%
Simplified50.6%
add-sqr-sqrt50.6%
pow250.6%
Applied egg-rr67.3%
Taylor expanded in t around 0 99.6%
*-commutative99.6%
*-commutative99.6%
times-frac99.7%
Simplified99.7%
if 3.7000000000000002e-147 < t < 3.30000000000000035e-114Initial program 28.6%
Simplified28.6%
associate-*l*28.6%
associate-/r*28.6%
associate-+r+28.6%
metadata-eval28.6%
associate-*l*28.6%
add-cube-cbrt28.6%
pow328.6%
Applied egg-rr32.0%
Taylor expanded in t around 0 72.0%
associate-/l*71.5%
*-commutative71.5%
Simplified71.5%
cbrt-prod71.3%
unpow271.3%
cbrt-prod83.7%
pow283.7%
times-frac83.8%
Applied egg-rr83.8%
associate-*r/83.8%
Simplified83.8%
if 3.30000000000000035e-114 < t < 3.79999999999999999e-94Initial program 0.0%
Simplified0.0%
associate-*l*0.0%
associate-/r*0.0%
associate-+r+0.0%
metadata-eval0.0%
associate-*l*0.0%
add-cube-cbrt0.0%
pow30.0%
Applied egg-rr2.8%
Taylor expanded in k around inf 98.2%
associate-*r*98.2%
associate-/l*98.2%
*-commutative98.2%
Simplified98.2%
if 3.79999999999999999e-94 < t Initial program 73.0%
Simplified73.0%
associate-*l*70.1%
associate-/r*74.6%
associate-+r+74.6%
metadata-eval74.6%
associate-*l*74.6%
add-cube-cbrt74.5%
pow374.5%
Applied egg-rr87.7%
metadata-eval87.7%
associate-+r+87.7%
associate-*l*87.6%
cbrt-prod97.4%
associate-+r+97.4%
metadata-eval97.4%
Applied egg-rr97.4%
*-commutative97.4%
Simplified97.4%
Final simplification57.0%
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
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
(+ 1.0 (+ t_2 1.0))))))
(*
t_s
(if (<= t_3 -2e-215)
(*
(/ (* l (* 2.0 (pow t_m -3.0))) (* (sin k) (tan k)))
(/ l (+ 2.0 t_2)))
(if (<= t_3 2e+75)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 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 = 2.0 / ((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)));
double tmp;
if (t_3 <= -2e-215) {
tmp = ((l * (2.0 * pow(t_m, -3.0))) / (sin(k) * tan(k))) * (l / (2.0 + t_2));
} else if (t_3 <= 2e+75) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(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) :: t_3
real(8) :: tmp
t_2 = (k / t_m) ** 2.0d0
t_3 = 2.0d0 / ((tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l)))) * (1.0d0 + (t_2 + 1.0d0)))
if (t_3 <= (-2d-215)) then
tmp = ((l * (2.0d0 * (t_m ** (-3.0d0)))) / (sin(k) * tan(k))) * (l / (2.0d0 + t_2))
else if (t_3 <= 2d+75) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
else
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(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 t_3 = 2.0 / ((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-215) {
tmp = ((l * (2.0 * Math.pow(t_m, -3.0))) / (Math.sin(k) * Math.tan(k))) * (l / (2.0 + t_2));
} else if (t_3 <= 2e+75) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 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 = 2.0 / ((math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0))) tmp = 0 if t_3 <= -2e-215: tmp = ((l * (2.0 * math.pow(t_m, -3.0))) / (math.sin(k) * math.tan(k))) * (l / (2.0 + t_2)) elif t_3 <= 2e+75: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 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(2.0 / 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-215) tmp = Float64(Float64(Float64(l * Float64(2.0 * (t_m ^ -3.0))) / Float64(sin(k) * tan(k))) * Float64(l / Float64(2.0 + t_2))); elseif (t_3 <= 2e+75) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64(Float64(k * 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 = 2.0 / ((tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0))); tmp = 0.0; if (t_3 <= -2e-215) tmp = ((l * (2.0 * (t_m ^ -3.0))) / (sin(k) * tan(k))) * (l / (2.0 + t_2)); elseif (t_3 <= 2e+75) tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 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[(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[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, -2e-215], N[(N[(N[(l * N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+75], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $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 := \frac{2}{\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^{-215}:\\
\;\;\;\;\frac{\ell \cdot \left(2 \cdot {t\_m}^{-3}\right)}{\sin k \cdot \tan k} \cdot \frac{\ell}{2 + t\_2}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+75}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos 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)))) < -2.00000000000000008e-215Initial program 86.9%
Simplified87.0%
div-inv87.0%
associate-*r*87.0%
associate-*l*89.6%
Applied egg-rr89.6%
*-commutative89.6%
associate-/r*89.6%
associate-*r/89.5%
*-rgt-identity89.5%
Simplified89.5%
associate-*r/89.6%
div-inv89.6%
pow-flip89.7%
metadata-eval89.7%
*-commutative89.7%
Applied egg-rr89.7%
if -2.00000000000000008e-215 < (/.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.99999999999999985e75Initial program 77.7%
Simplified77.7%
Applied egg-rr26.8%
Taylor expanded in k around 0 40.5%
if 1.99999999999999985e75 < (/.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 24.6%
Simplified24.6%
Applied egg-rr41.2%
Taylor expanded in t around 0 52.0%
Final simplification52.0%
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 (sqrt (/ t_m (cos k)))))
(*
t_s
(if (<= t_m 1.75e-236)
(/ 2.0 (pow (* (/ (* k (sin k)) l) t_2) 2.0))
(if (<= t_m 1.95e-178)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 2.25e-98)
(/ 2.0 (pow (* t_2 (* k (/ (sin k) l))) 2.0))
(/
2.0
(pow
(*
(/ t_m (pow (cbrt l) 2.0))
(* (cbrt (sin k)) (cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) (tan k)))))
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 = sqrt((t_m / cos(k)));
double tmp;
if (t_m <= 1.75e-236) {
tmp = 2.0 / pow((((k * sin(k)) / l) * t_2), 2.0);
} else if (t_m <= 1.95e-178) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 2.25e-98) {
tmp = 2.0 / pow((t_2 * (k * (sin(k) / l))), 2.0);
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt(((2.0 + pow((k / t_m), 2.0)) * tan(k))))), 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.sqrt((t_m / Math.cos(k)));
double tmp;
if (t_m <= 1.75e-236) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * t_2), 2.0);
} else if (t_m <= 1.95e-178) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else if (t_m <= 2.25e-98) {
tmp = 2.0 / Math.pow((t_2 * (k * (Math.sin(k) / l))), 2.0);
} else {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * Math.tan(k))))), 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 = sqrt(Float64(t_m / cos(k))) tmp = 0.0 if (t_m <= 1.75e-236) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * t_2) ^ 2.0)); elseif (t_m <= 1.95e-178) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); elseif (t_m <= 2.25e-98) tmp = Float64(2.0 / (Float64(t_2 * Float64(k * Float64(sin(k) / l))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * tan(k))))) ^ 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[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.75e-236], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.95e-178], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.25e-98], N[(2.0 / N[Power[N[(t$95$2 * N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $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 := \sqrt{\frac{t\_m}{\cos k}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.75 \cdot 10^{-236}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot t\_2\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.95 \cdot 10^{-178}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 2.25 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \tan k}\right)\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 1.74999999999999997e-236Initial program 43.7%
Simplified43.9%
Applied egg-rr4.9%
Taylor expanded in t around 0 27.9%
if 1.74999999999999997e-236 < t < 1.95000000000000013e-178Initial program 36.8%
Simplified36.8%
Taylor expanded in t around 0 84.7%
associate-*r*84.7%
times-frac84.6%
Simplified84.6%
if 1.95000000000000013e-178 < t < 2.24999999999999998e-98Initial program 36.0%
Simplified36.0%
Applied egg-rr64.5%
Taylor expanded in t around 0 71.1%
associate-/l*71.0%
Simplified71.0%
if 2.24999999999999998e-98 < t Initial program 72.1%
Simplified72.1%
associate-*l*69.2%
associate-/r*73.6%
associate-+r+73.6%
metadata-eval73.6%
associate-*l*73.6%
add-cube-cbrt73.6%
pow373.6%
Applied egg-rr86.6%
metadata-eval86.6%
associate-+r+86.6%
associate-*l*86.5%
cbrt-prod96.1%
associate-+r+96.1%
metadata-eval96.1%
Applied egg-rr96.1%
*-commutative96.1%
Simplified96.1%
Final simplification55.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 (sqrt (/ t_m (cos k)))) (t_3 (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(*
t_s
(if (<= t_m 3.6e-237)
(/ 2.0 (pow (* (/ (* k (sin k)) l) t_2) 2.0))
(if (<= t_m 3.2e-180)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 8.5e-99)
(/ 2.0 (pow (* t_2 (* k (/ (sin k) l))) 2.0))
(if (<= t_m 2.1e+73)
(*
(/ (* l (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k))))) t_3)
(/ l t_3))
(/
2.0
(*
(pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
(* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.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 = sqrt((t_m / cos(k)));
double t_3 = hypot(1.0, hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 3.6e-237) {
tmp = 2.0 / pow((((k * sin(k)) / l) * t_2), 2.0);
} else if (t_m <= 3.2e-180) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 8.5e-99) {
tmp = 2.0 / pow((t_2 * (k * (sin(k) / l))), 2.0);
} else if (t_m <= 2.1e+73) {
tmp = ((l * (2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k))))) / t_3) * (l / t_3);
} else {
tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.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.sqrt((t_m / Math.cos(k)));
double t_3 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double tmp;
if (t_m <= 3.6e-237) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * t_2), 2.0);
} else if (t_m <= 3.2e-180) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else if (t_m <= 8.5e-99) {
tmp = 2.0 / Math.pow((t_2 * (k * (Math.sin(k) / l))), 2.0);
} else if (t_m <= 2.1e+73) {
tmp = ((l * (2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k))))) / t_3) * (l / t_3);
} else {
tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.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 = sqrt(Float64(t_m / cos(k))) t_3 = hypot(1.0, hypot(1.0, Float64(k / t_m))) tmp = 0.0 if (t_m <= 3.6e-237) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * t_2) ^ 2.0)); elseif (t_m <= 3.2e-180) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); elseif (t_m <= 8.5e-99) tmp = Float64(2.0 / (Float64(t_2 * Float64(k * Float64(sin(k) / l))) ^ 2.0)); elseif (t_m <= 2.1e+73) tmp = Float64(Float64(Float64(l * Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k))))) / t_3) * Float64(l / t_3)); else tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.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[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.6e-237], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.2e-180], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8.5e-99], N[(2.0 / N[Power[N[(t$95$2 * N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+73], N[(N[(N[(l * N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision] * N[(l / t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[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], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt{\frac{t\_m}{\cos k}}\\
t_3 := \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 3.6 \cdot 10^{-237}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot t\_2\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 3.2 \cdot 10^{-180}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 8.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+73}:\\
\;\;\;\;\frac{\ell \cdot \frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{t\_3} \cdot \frac{\ell}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 3.59999999999999997e-237Initial program 43.7%
Simplified43.9%
Applied egg-rr4.9%
Taylor expanded in t around 0 27.9%
if 3.59999999999999997e-237 < t < 3.20000000000000015e-180Initial program 36.8%
Simplified36.8%
Taylor expanded in t around 0 84.7%
associate-*r*84.7%
times-frac84.6%
Simplified84.6%
if 3.20000000000000015e-180 < t < 8.5000000000000004e-99Initial program 36.0%
Simplified36.0%
Applied egg-rr64.5%
Taylor expanded in t around 0 71.1%
associate-/l*71.0%
Simplified71.0%
if 8.5000000000000004e-99 < t < 2.1000000000000001e73Initial program 91.6%
Simplified91.7%
associate-*r*91.7%
add-sqr-sqrt91.6%
times-frac94.3%
metadata-eval94.3%
associate-+r+94.3%
add-sqr-sqrt94.3%
hypot-1-def94.3%
unpow294.3%
hypot-1-def94.3%
metadata-eval94.3%
Applied egg-rr99.8%
if 2.1000000000000001e73 < t Initial program 55.7%
Simplified55.7%
add-cube-cbrt55.7%
pow355.7%
*-commutative55.7%
cbrt-prod55.7%
cbrt-div55.7%
rem-cbrt-cube63.0%
cbrt-prod91.7%
pow291.7%
Applied egg-rr91.7%
*-commutative91.7%
Simplified91.7%
Final simplification55.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (sin k) (tan k))) (t_3 (/ t_m (pow (cbrt l) 2.0))))
(*
t_s
(if (<= k 4.8e-58)
(/ 2.0 (pow (* t_3 (* (cbrt (sin k)) (* (cbrt k) (cbrt 2.0)))) 3.0))
(if (<= k 6200.0)
(/
2.0
(pow
(/
(* (pow t_m 1.5) (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (sqrt t_2)))
l)
2.0))
(if (<= k 6e+138)
(/
2.0
(*
(/ (* t_m (pow k 2.0)) (pow l 2.0))
(/ (pow (sin k) 2.0) (cos k))))
(/
2.0
(pow (* t_3 (cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) t_2))) 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 = sin(k) * tan(k);
double t_3 = t_m / pow(cbrt(l), 2.0);
double tmp;
if (k <= 4.8e-58) {
tmp = 2.0 / pow((t_3 * (cbrt(sin(k)) * (cbrt(k) * cbrt(2.0)))), 3.0);
} else if (k <= 6200.0) {
tmp = 2.0 / pow(((pow(t_m, 1.5) * (hypot(1.0, hypot(1.0, (k / t_m))) * sqrt(t_2))) / l), 2.0);
} else if (k <= 6e+138) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else {
tmp = 2.0 / pow((t_3 * cbrt(((2.0 + pow((k / t_m), 2.0)) * t_2))), 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.sin(k) * Math.tan(k);
double t_3 = t_m / Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (k <= 4.8e-58) {
tmp = 2.0 / Math.pow((t_3 * (Math.cbrt(Math.sin(k)) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
} else if (k <= 6200.0) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * Math.sqrt(t_2))) / l), 2.0);
} else if (k <= 6e+138) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else {
tmp = 2.0 / Math.pow((t_3 * Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * t_2))), 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(sin(k) * tan(k)) t_3 = Float64(t_m / (cbrt(l) ^ 2.0)) tmp = 0.0 if (k <= 4.8e-58) tmp = Float64(2.0 / (Float64(t_3 * Float64(cbrt(sin(k)) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); elseif (k <= 6200.0) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * sqrt(t_2))) / l) ^ 2.0)); elseif (k <= 6e+138) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); else tmp = Float64(2.0 / (Float64(t_3 * cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * t_2))) ^ 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[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 4.8e-58], N[(2.0 / N[Power[N[(t$95$3 * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6200.0], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6e+138], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$3 * N[Power[N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * t$95$2), $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 := \sin k \cdot \tan k\\
t_3 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.8 \cdot 10^{-58}:\\
\;\;\;\;\frac{2}{{\left(t\_3 \cdot \left(\sqrt[3]{\sin k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 6200:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \sqrt{t\_2}\right)}{\ell}\right)}^{2}}\\
\mathbf{elif}\;k \leq 6 \cdot 10^{+138}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_3 \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot t\_2}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if k < 4.8000000000000001e-58Initial program 54.1%
Simplified54.1%
associate-*l*50.8%
associate-/r*58.1%
associate-+r+58.1%
metadata-eval58.1%
associate-*l*58.1%
add-cube-cbrt58.1%
pow358.1%
Applied egg-rr76.9%
metadata-eval76.9%
associate-+r+76.9%
associate-*l*76.9%
cbrt-prod87.3%
associate-+r+87.3%
metadata-eval87.3%
Applied egg-rr87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in k around 0 75.0%
if 4.8000000000000001e-58 < k < 6200Initial program 58.6%
Simplified60.1%
Applied egg-rr58.1%
associate-*l/58.1%
*-commutative58.1%
*-commutative58.1%
Applied egg-rr58.1%
if 6200 < k < 6.0000000000000002e138Initial program 40.2%
Simplified40.3%
Taylor expanded in t around 0 84.9%
associate-*r*85.0%
times-frac85.1%
Simplified85.1%
if 6.0000000000000002e138 < k Initial program 44.7%
Simplified44.7%
associate-*l*44.7%
associate-/r*45.4%
associate-+r+45.4%
metadata-eval45.4%
associate-*l*45.4%
add-cube-cbrt45.4%
pow345.4%
Applied egg-rr71.7%
Final simplification74.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 (<= k 4.5e-58)
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt (sin k)) (* (cbrt k) (cbrt 2.0))))
3.0))
(if (<= k 6200.0)
(/
2.0
(pow
(/
(*
(pow t_m 1.5)
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (sqrt (* (sin k) (tan k)))))
l)
2.0))
(/
2.0
(*
(/ (* t_m (pow k 2.0)) (pow l 2.0))
(/ (pow (sin k) 2.0) (cos 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 <= 4.5e-58) {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * (cbrt(k) * cbrt(2.0)))), 3.0);
} else if (k <= 6200.0) {
tmp = 2.0 / pow(((pow(t_m, 1.5) * (hypot(1.0, hypot(1.0, (k / t_m))) * sqrt((sin(k) * tan(k))))) / l), 2.0);
} else {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(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 <= 4.5e-58) {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
} else if (k <= 6200.0) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * Math.sqrt((Math.sin(k) * Math.tan(k))))) / l), 2.0);
} else {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(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 <= 4.5e-58) tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); elseif (k <= 6200.0) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * sqrt(Float64(sin(k) * tan(k))))) / l) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(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, 4.5e-58], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6200.0], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 6200:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\end{array}
\end{array}
if k < 4.5000000000000003e-58Initial program 54.1%
Simplified54.1%
associate-*l*50.8%
associate-/r*58.1%
associate-+r+58.1%
metadata-eval58.1%
associate-*l*58.1%
add-cube-cbrt58.1%
pow358.1%
Applied egg-rr76.9%
metadata-eval76.9%
associate-+r+76.9%
associate-*l*76.9%
cbrt-prod87.3%
associate-+r+87.3%
metadata-eval87.3%
Applied egg-rr87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in k around 0 75.0%
if 4.5000000000000003e-58 < k < 6200Initial program 58.6%
Simplified60.1%
Applied egg-rr58.1%
associate-*l/58.1%
*-commutative58.1%
*-commutative58.1%
Applied egg-rr58.1%
if 6200 < k Initial program 42.9%
Simplified42.9%
Taylor expanded in t around 0 69.7%
associate-*r*69.7%
times-frac69.8%
Simplified69.8%
Final simplification72.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 4.5e-58)
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt (sin k)) (* (cbrt k) (cbrt 2.0))))
3.0))
(if (<= k 2100.0)
(/
2.0
(pow
(*
(/ (pow t_m 1.5) l)
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (sqrt (* (sin k) (tan k)))))
2.0))
(/
2.0
(*
(/ (* t_m (pow k 2.0)) (pow l 2.0))
(/ (pow (sin k) 2.0) (cos 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 <= 4.5e-58) {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * (cbrt(k) * cbrt(2.0)))), 3.0);
} else if (k <= 2100.0) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (hypot(1.0, hypot(1.0, (k / t_m))) * sqrt((sin(k) * tan(k))))), 2.0);
} else {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(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 <= 4.5e-58) {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
} else if (k <= 2100.0) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * Math.sqrt((Math.sin(k) * Math.tan(k))))), 2.0);
} else {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(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 <= 4.5e-58) tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); elseif (k <= 2100.0) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * sqrt(Float64(sin(k) * tan(k))))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(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, 4.5e-58], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2100.0], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 2100:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\end{array}
\end{array}
if k < 4.5000000000000003e-58Initial program 54.1%
Simplified54.1%
associate-*l*50.8%
associate-/r*58.1%
associate-+r+58.1%
metadata-eval58.1%
associate-*l*58.1%
add-cube-cbrt58.1%
pow358.1%
Applied egg-rr76.9%
metadata-eval76.9%
associate-+r+76.9%
associate-*l*76.9%
cbrt-prod87.3%
associate-+r+87.3%
metadata-eval87.3%
Applied egg-rr87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in k around 0 75.0%
if 4.5000000000000003e-58 < k < 2100Initial program 58.6%
Simplified60.1%
Applied egg-rr58.1%
if 2100 < k Initial program 42.9%
Simplified42.9%
Taylor expanded in t around 0 69.7%
associate-*r*69.7%
times-frac69.8%
Simplified69.8%
Final simplification72.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.8e+14)
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt (sin k)) (* (cbrt k) (cbrt 2.0))))
3.0))
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos 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 <= 2.8e+14) {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * (cbrt(k) * cbrt(2.0)))), 3.0);
} else {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(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 <= 2.8e+14) {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * (Math.cbrt(k) * Math.cbrt(2.0)))), 3.0);
} else {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(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 <= 2.8e+14) tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * Float64(cbrt(k) * cbrt(2.0)))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(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, 2.8e+14], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{+14}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\end{array}
\end{array}
if k < 2.8e14Initial program 54.5%
Simplified54.7%
associate-*l*52.1%
associate-/r*59.7%
associate-+r+59.7%
metadata-eval59.7%
associate-*l*59.7%
add-cube-cbrt59.6%
pow359.7%
Applied egg-rr77.6%
metadata-eval77.6%
associate-+r+77.6%
associate-*l*77.6%
cbrt-prod86.9%
associate-+r+86.9%
metadata-eval86.9%
Applied egg-rr86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in k around 0 76.0%
if 2.8e14 < k Initial program 42.9%
Simplified42.9%
Taylor expanded in t around 0 69.7%
associate-*r*69.7%
times-frac69.8%
Simplified69.8%
Final simplification74.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 4e+14)
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt (sin k)) (cbrt (* 2.0 k))))
3.0))
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos 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 <= 4e+14) {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(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 <= 4e+14) {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * Math.cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(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 <= 4e+14) tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * cbrt(Float64(2.0 * k)))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(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, 4e+14], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{+14}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\end{array}
\end{array}
if k < 4e14Initial program 54.5%
Simplified54.7%
associate-*l*52.1%
associate-/r*59.7%
associate-+r+59.7%
metadata-eval59.7%
associate-*l*59.7%
add-cube-cbrt59.6%
pow359.7%
Applied egg-rr77.6%
metadata-eval77.6%
associate-+r+77.6%
associate-*l*77.6%
cbrt-prod86.9%
associate-+r+86.9%
metadata-eval86.9%
Applied egg-rr86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in k around 0 76.0%
*-commutative76.0%
Simplified76.0%
if 4e14 < k Initial program 42.9%
Simplified42.9%
Taylor expanded in t around 0 69.7%
associate-*r*69.7%
times-frac69.8%
Simplified69.8%
Final simplification74.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 6.4e-99)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.5e+70)
(*
l
(/
(/ (/ (* (pow t_m -3.0) (* 2.0 l)) (tan k)) (sin k))
(+ 2.0 (pow (/ k t_m) 2.0))))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 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.4e-99) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.5e+70) {
tmp = l * ((((pow(t_m, -3.0) * (2.0 * l)) / tan(k)) / sin(k)) / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 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 <= 6.4d-99) then
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
else if (t_m <= 1.5d+70) then
tmp = l * (((((t_m ** (-3.0d0)) * (2.0d0 * l)) / tan(k)) / sin(k)) / (2.0d0 + ((k / t_m) ** 2.0d0)))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 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 <= 6.4e-99) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.5e+70) {
tmp = l * ((((Math.pow(t_m, -3.0) * (2.0 * l)) / Math.tan(k)) / Math.sin(k)) / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 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.4e-99: tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0) elif t_m <= 1.5e+70: tmp = l * ((((math.pow(t_m, -3.0) * (2.0 * l)) / math.tan(k)) / math.sin(k)) / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 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.4e-99) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.5e+70) tmp = Float64(l * Float64(Float64(Float64(Float64((t_m ^ -3.0) * Float64(2.0 * l)) / tan(k)) / sin(k)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 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.4e-99) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0); elseif (t_m <= 1.5e+70) tmp = l * (((((t_m ^ -3.0) * (2.0 * l)) / tan(k)) / sin(k)) / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 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.4e-99], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.5e+70], N[(l * N[(N[(N[(N[(N[Power[t$95$m, -3.0], $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $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.4 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.5 \cdot 10^{+70}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{{t\_m}^{-3} \cdot \left(2 \cdot \ell\right)}{\tan k}}{\sin k}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 6.4000000000000001e-99Initial program 42.4%
Simplified42.5%
Applied egg-rr15.9%
Taylor expanded in t around 0 35.6%
if 6.4000000000000001e-99 < t < 1.49999999999999988e70Initial program 93.9%
Simplified94.0%
div-inv94.0%
associate-*r*94.0%
associate-*l*96.8%
Applied egg-rr96.8%
*-commutative96.8%
associate-/r*96.8%
associate-*r/96.7%
*-rgt-identity96.7%
Simplified96.7%
associate-*r/93.9%
associate-/r*93.9%
div-inv93.9%
pow-flip93.9%
metadata-eval93.9%
Applied egg-rr93.9%
associate-/l*96.7%
associate-*r*96.8%
associate-*r/96.7%
*-commutative96.7%
associate-/l/96.7%
associate-/l*96.7%
associate-/r*96.6%
associate-*r*96.6%
Simplified96.6%
if 1.49999999999999988e70 < t Initial program 56.5%
Simplified56.5%
Applied egg-rr58.2%
Taylor expanded in k around 0 71.7%
Final simplification50.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.2e-98)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-98) {
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) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.2d-98) then
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.2e-98) {
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) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.2e-98: 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) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.2e-98) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.2e-98) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.2e-98], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $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[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $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 2.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.19999999999999996e-98Initial program 42.4%
Simplified42.5%
Applied egg-rr15.9%
Taylor expanded in t around 0 35.6%
if 2.19999999999999996e-98 < t Initial program 72.1%
Simplified72.1%
Applied egg-rr65.4%
Taylor expanded in k around 0 75.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.85e-98)
(/ 2.0 (pow (* (sqrt (/ t_m (cos k))) (* k (/ (sin k) l))) 2.0))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.85e-98) {
tmp = 2.0 / pow((sqrt((t_m / cos(k))) * (k * (sin(k) / l))), 2.0);
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.85d-98) then
tmp = 2.0d0 / ((sqrt((t_m / cos(k))) * (k * (sin(k) / l))) ** 2.0d0)
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.85e-98) {
tmp = 2.0 / Math.pow((Math.sqrt((t_m / Math.cos(k))) * (k * (Math.sin(k) / l))), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.85e-98: tmp = 2.0 / math.pow((math.sqrt((t_m / math.cos(k))) * (k * (math.sin(k) / l))), 2.0) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.85e-98) tmp = Float64(2.0 / (Float64(sqrt(Float64(t_m / cos(k))) * Float64(k * Float64(sin(k) / l))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.85e-98) tmp = 2.0 / ((sqrt((t_m / cos(k))) * (k * (sin(k) / l))) ^ 2.0); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.85e-98], N[(2.0 / N[Power[N[(N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $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 1.85 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{\frac{t\_m}{\cos k}} \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.85e-98Initial program 42.4%
Simplified42.5%
Applied egg-rr15.9%
Taylor expanded in t around 0 35.6%
associate-/l*35.6%
Simplified35.6%
if 1.85e-98 < t Initial program 72.1%
Simplified72.1%
Applied egg-rr65.4%
Taylor expanded in k around 0 75.0%
Final simplification47.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.8e-130)
(/ 2.0 (log1p (expm1 (* (pow k 4.0) (* t_m (pow l -2.0))))))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 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 <= 4.8e-130) {
tmp = 2.0 / log1p(expm1((pow(k, 4.0) * (t_m * pow(l, -2.0)))));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 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 <= 4.8e-130) {
tmp = 2.0 / Math.log1p(Math.expm1((Math.pow(k, 4.0) * (t_m * Math.pow(l, -2.0)))));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 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 <= 4.8e-130: tmp = 2.0 / math.log1p(math.expm1((math.pow(k, 4.0) * (t_m * math.pow(l, -2.0))))) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 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 <= 4.8e-130) tmp = Float64(2.0 / log1p(expm1(Float64((k ^ 4.0) * Float64(t_m * (l ^ -2.0)))))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 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, 4.8e-130], N[(2.0 / N[Log[1 + N[(Exp[N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $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 4.8 \cdot 10^{-130}:\\
\;\;\;\;\frac{2}{\mathsf{log1p}\left(\mathsf{expm1}\left({k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 4.79999999999999993e-130Initial program 42.0%
Simplified42.1%
Taylor expanded in t around 0 61.9%
associate-*r*61.9%
times-frac63.0%
Simplified63.0%
Taylor expanded in k around 0 49.6%
associate-/l*51.0%
Simplified51.0%
log1p-expm1-u53.2%
div-inv53.2%
pow-flip53.2%
metadata-eval53.2%
Applied egg-rr53.2%
if 4.79999999999999993e-130 < t Initial program 71.9%
Simplified71.9%
Applied egg-rr65.5%
Taylor expanded in k around 0 74.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-130)
(/ 2.0 (* (pow k 4.0) (* t_m (pow l -2.0))))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 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-130) {
tmp = 2.0 / (pow(k, 4.0) * (t_m * pow(l, -2.0)));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 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 <= 6.8d-130) then
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m * (l ** (-2.0d0))))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 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 <= 6.8e-130) {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m * Math.pow(l, -2.0)));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 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-130: tmp = 2.0 / (math.pow(k, 4.0) * (t_m * math.pow(l, -2.0))) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 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-130) tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m * (l ^ -2.0)))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 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-130) tmp = 2.0 / ((k ^ 4.0) * (t_m * (l ^ -2.0))); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 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-130], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $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^{-130}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 6.8000000000000001e-130Initial program 42.0%
Simplified42.1%
Taylor expanded in t around 0 61.9%
associate-*r*61.9%
times-frac63.0%
Simplified63.0%
Taylor expanded in k around 0 49.6%
associate-/l*51.0%
Simplified51.0%
pow151.0%
div-inv51.0%
pow-flip51.0%
metadata-eval51.0%
Applied egg-rr51.0%
unpow151.0%
Simplified51.0%
if 6.8000000000000001e-130 < t Initial program 71.9%
Simplified71.9%
Applied egg-rr65.5%
Taylor expanded in k around 0 74.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.28e+76)
(/ 2.0 (* (/ (* t_m (/ (pow t_m 2.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 <= 1.28e+76) {
tmp = 2.0 / (((t_m * (pow(t_m, 2.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 <= 1.28d+76) then
tmp = 2.0d0 / (((t_m * ((t_m ** 2.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 <= 1.28e+76) {
tmp = 2.0 / (((t_m * (Math.pow(t_m, 2.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 <= 1.28e+76: tmp = 2.0 / (((t_m * (math.pow(t_m, 2.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 <= 1.28e+76) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64((t_m ^ 2.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 <= 1.28e+76) tmp = 2.0 / (((t_m * ((t_m ^ 2.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, 1.28e+76], N[(2.0 / N[(N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / 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 1.28 \cdot 10^{+76}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 1.27999999999999994e76Initial program 54.6%
Simplified59.6%
Taylor expanded in k around 0 58.5%
cube-mult58.5%
*-un-lft-identity58.5%
times-frac61.0%
pow261.0%
Applied egg-rr61.0%
if 1.27999999999999994e76 < k Initial program 41.1%
Simplified41.1%
Taylor expanded in t around 0 67.7%
associate-*r*67.7%
times-frac67.7%
Simplified67.7%
Taylor expanded in k around 0 49.2%
associate-/l*48.9%
Simplified48.9%
Taylor expanded in k around 0 49.2%
Final simplification58.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 (<= k 1e+77)
(/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (/ (pow t_m 3.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 <= 1e+77) {
tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 3.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 <= 1d+77) then
tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 3.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 <= 1e+77) {
tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 3.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 <= 1e+77: tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 3.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 <= 1e+77) tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 3.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 <= 1e+77) tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 3.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, 1e+77], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $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^{+77}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 9.99999999999999983e76Initial program 54.6%
Simplified59.6%
Taylor expanded in k around 0 58.5%
if 9.99999999999999983e76 < k Initial program 41.1%
Simplified41.1%
Taylor expanded in t around 0 67.7%
associate-*r*67.7%
times-frac67.7%
Simplified67.7%
Taylor expanded in k around 0 49.2%
associate-/l*48.9%
Simplified48.9%
Taylor expanded in k around 0 49.2%
Final simplification56.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 1.02e+67)
(* l (/ (/ 2.0 (/ (pow t_m 3.0) l)) (* 2.0 (pow k 2.0))))
(/ 2.0 (* (pow k 4.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.02e+67) {
tmp = l * ((2.0 / (pow(t_m, 3.0) / l)) / (2.0 * pow(k, 2.0)));
} else {
tmp = 2.0 / (pow(k, 4.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.02d+67) then
tmp = l * ((2.0d0 / ((t_m ** 3.0d0) / l)) / (2.0d0 * (k ** 2.0d0)))
else
tmp = 2.0d0 / ((k ** 4.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.02e+67) {
tmp = l * ((2.0 / (Math.pow(t_m, 3.0) / l)) / (2.0 * Math.pow(k, 2.0)));
} else {
tmp = 2.0 / (Math.pow(k, 4.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.02e+67: tmp = l * ((2.0 / (math.pow(t_m, 3.0) / l)) / (2.0 * math.pow(k, 2.0))) else: tmp = 2.0 / (math.pow(k, 4.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.02e+67) tmp = Float64(l * Float64(Float64(2.0 / Float64((t_m ^ 3.0) / l)) / Float64(2.0 * (k ^ 2.0)))); else tmp = Float64(2.0 / Float64((k ^ 4.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.02e+67) tmp = l * ((2.0 / ((t_m ^ 3.0) / l)) / (2.0 * (k ^ 2.0))); else tmp = 2.0 / ((k ^ 4.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.02e+67], N[(l * N[(N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m * N[Power[l, -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 1.02 \cdot 10^{+67}:\\
\;\;\;\;\ell \cdot \frac{\frac{2}{\frac{{t\_m}^{3}}{\ell}}}{2 \cdot {k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\right)}\\
\end{array}
\end{array}
if k < 1.02000000000000002e67Initial program 54.7%
Simplified59.7%
Taylor expanded in k around 0 58.6%
div-inv58.6%
metadata-eval58.6%
pow-prod-up30.9%
associate-*r*30.9%
associate-*l/30.5%
associate-*r*30.5%
pow-prod-up58.6%
metadata-eval58.6%
div-inv58.6%
Applied egg-rr58.6%
associate-/r/58.6%
Applied egg-rr58.6%
*-commutative58.6%
associate-/r*58.6%
Simplified58.6%
if 1.02000000000000002e67 < k Initial program 41.4%
Simplified41.4%
Taylor expanded in t around 0 68.7%
associate-*r*68.7%
times-frac68.8%
Simplified68.8%
Taylor expanded in k around 0 49.3%
associate-/l*49.0%
Simplified49.0%
pow149.0%
div-inv49.0%
pow-flip49.0%
metadata-eval49.0%
Applied egg-rr49.0%
unpow149.0%
Simplified49.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 (/ 2.0 (* (pow k 4.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) {
return t_s * (2.0 / (pow(k, 4.0) * (t_m * 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 / ((k ** 4.0d0) * (t_m * (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 / (Math.pow(k, 4.0) * (t_m * 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 / (math.pow(k, 4.0) * (t_m * 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((k ^ 4.0) * Float64(t_m * (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 / ((k ^ 4.0) * (t_m * (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[Power[k, 4.0], $MachinePrecision] * N[(t$95$m * N[Power[l, -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 \frac{2}{{k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\right)}
\end{array}
Initial program 51.6%
Simplified51.7%
Taylor expanded in t around 0 62.1%
associate-*r*62.1%
times-frac63.3%
Simplified63.3%
Taylor expanded in k around 0 49.9%
associate-/l*51.6%
Simplified51.6%
pow151.6%
div-inv51.6%
pow-flip51.6%
metadata-eval51.6%
Applied egg-rr51.6%
unpow151.6%
Simplified51.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 (* 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 51.6%
Simplified51.7%
Taylor expanded in t around 0 62.1%
associate-*r*62.1%
times-frac63.3%
Simplified63.3%
Taylor expanded in k around 0 49.9%
associate-/l*51.6%
Simplified51.6%
Taylor expanded in k around 0 49.9%
Final simplification49.9%
herbie shell --seed 2024083
(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))))