
(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
(*
t_s
(if (<= t_m 4.2e-116)
(pow (* (/ (* l (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(/
2.0
(pow
(*
(* (/ t_m (cbrt l)) (cbrt (/ 1.0 l)))
(* (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 <= 4.2e-116) {
tmp = pow((((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else {
tmp = 2.0 / pow((((t_m / cbrt(l)) * cbrt((1.0 / l))) * (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 <= 4.2e-116) {
tmp = Math.pow((((l * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else {
tmp = 2.0 / Math.pow((((t_m / Math.cbrt(l)) * Math.cbrt((1.0 / l))) * (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 <= 4.2e-116) tmp = Float64(Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; else tmp = Float64(2.0 / (Float64(Float64(Float64(t_m / cbrt(l)) * cbrt(Float64(1.0 / l))) * Float64(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, 4.2e-116], N[Power[N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(1.0 / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $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]), $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 4.2 \cdot 10^{-116}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\frac{1}{\ell}}\right) \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.1999999999999998e-116Initial program 53.3%
Simplified50.4%
add-sqr-sqrt28.3%
pow228.3%
Applied egg-rr31.7%
Taylor expanded in t around 0 31.3%
if 4.1999999999999998e-116 < t Initial program 62.1%
Simplified64.1%
unpow264.1%
frac-2neg64.1%
frac-times53.1%
Applied egg-rr53.1%
add-cube-cbrt53.0%
pow353.0%
Applied egg-rr82.5%
associate-*r*82.5%
Simplified82.5%
pow1/361.4%
associate-*l*61.4%
unpow-prod-down36.9%
pow1/350.4%
Applied egg-rr50.4%
unpow1/396.4%
Simplified96.4%
add-cbrt-cube73.8%
unpow373.8%
unpow273.8%
cbrt-unprod64.1%
cbrt-div61.9%
associate-/l/70.5%
div-inv70.5%
cbrt-prod72.5%
cbrt-div73.8%
unpow373.8%
add-cbrt-cube96.5%
Applied egg-rr96.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)))
(*
t_s
(if (<=
(/ 2.0 (* (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))) t_2))
2e+307)
(* (* (/ 2.0 (* (sin k) (pow t_m 3.0))) (/ l (tan k))) (/ l t_2))
(pow
(* (/ (* l (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m)))
2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (pow((k / t_m), 2.0) + 1.0) + 1.0;
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * t_2)) <= 2e+307) {
tmp = ((2.0 / (sin(k) * pow(t_m, 3.0))) * (l / tan(k))) * (l / t_2);
} else {
tmp = pow((((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (((k / t_m) ** 2.0d0) + 1.0d0) + 1.0d0
if ((2.0d0 / ((tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l)))) * t_2)) <= 2d+307) then
tmp = ((2.0d0 / (sin(k) * (t_m ** 3.0d0))) * (l / tan(k))) * (l / t_2)
else
tmp = (((l * sqrt(2.0d0)) / (k * sin(k))) * sqrt((cos(k) / t_m))) ** 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) + 1.0) + 1.0;
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * t_2)) <= 2e+307) {
tmp = ((2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))) * (l / Math.tan(k))) * (l / t_2);
} else {
tmp = Math.pow((((l * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 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) + 1.0) + 1.0 tmp = 0 if (2.0 / ((math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * t_2)) <= 2e+307: tmp = ((2.0 / (math.sin(k) * math.pow(t_m, 3.0))) * (l / math.tan(k))) * (l / t_2) else: tmp = math.pow((((l * math.sqrt(2.0)) / (k * math.sin(k))) * math.sqrt((math.cos(k) / t_m))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0) tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * t_2)) <= 2e+307) tmp = Float64(Float64(Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0))) * Float64(l / tan(k))) * Float64(l / t_2)); else tmp = Float64(Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 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) + 1.0) + 1.0; tmp = 0.0; if ((2.0 / ((tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * t_2)) <= 2e+307) tmp = ((2.0 / (sin(k) * (t_m ^ 3.0))) * (l / tan(k))) * (l / t_2); else tmp = (((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))) ^ 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[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], 2e+307], N[(N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot t\_2} \leq 2 \cdot 10^{+307}:\\
\;\;\;\;\left(\frac{2}{\sin k \cdot {t\_m}^{3}} \cdot \frac{\ell}{\tan k}\right) \cdot \frac{\ell}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 1.99999999999999997e307Initial program 80.6%
Simplified74.5%
associate-*r*77.7%
add-sqr-sqrt77.6%
times-frac77.6%
Applied egg-rr86.2%
frac-times85.7%
associate-*l/85.6%
pow285.6%
Applied egg-rr85.6%
associate-/l*84.6%
times-frac87.1%
*-commutative87.1%
unpow287.1%
hypot-undefine87.1%
hypot-undefine87.1%
rem-square-sqrt87.2%
metadata-eval87.2%
hypot-undefine87.2%
metadata-eval87.2%
unpow287.2%
hypot-undefine87.2%
metadata-eval87.2%
unpow287.2%
Simplified87.2%
if 1.99999999999999997e307 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) Initial program 23.1%
Simplified23.1%
add-sqr-sqrt23.1%
pow223.1%
Applied egg-rr34.9%
Taylor expanded in t around 0 54.1%
Final simplification73.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)))
(*
t_s
(if (<=
(/ 2.0 (* (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))) t_2))
INFINITY)
(* (* (/ 2.0 (* (sin k) (pow t_m 3.0))) (/ l (tan k))) (/ l t_2))
(/
2.0
(pow
(* t_m (* (pow (cbrt l) -2.0) (cbrt (* 2.0 (pow k 2.0)))))
3.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (pow((k / t_m), 2.0) + 1.0) + 1.0;
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * t_2)) <= ((double) INFINITY)) {
tmp = ((2.0 / (sin(k) * pow(t_m, 3.0))) * (l / tan(k))) * (l / t_2);
} else {
tmp = 2.0 / pow((t_m * (pow(cbrt(l), -2.0) * cbrt((2.0 * pow(k, 2.0))))), 3.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (Math.pow((k / t_m), 2.0) + 1.0) + 1.0;
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * t_2)) <= Double.POSITIVE_INFINITY) {
tmp = ((2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))) * (l / Math.tan(k))) * (l / t_2);
} else {
tmp = 2.0 / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((2.0 * Math.pow(k, 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(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0) tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * t_2)) <= Inf) tmp = Float64(Float64(Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0))) * Float64(l / tan(k))) * Float64(l / t_2)); else tmp = Float64(2.0 / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(2.0 * (k ^ 2.0))))) ^ 3.0)); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $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 := \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot t\_2} \leq \infty:\\
\;\;\;\;\left(\frac{2}{\sin k \cdot {t\_m}^{3}} \cdot \frac{\ell}{\tan k}\right) \cdot \frac{\ell}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)\right)}^{3}}\\
\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)))) < +inf.0Initial program 82.1%
Simplified76.9%
associate-*r*80.2%
add-sqr-sqrt80.1%
times-frac80.6%
Applied egg-rr87.9%
frac-times86.9%
associate-*l/86.9%
pow286.9%
Applied egg-rr86.9%
associate-/l*85.9%
times-frac88.0%
*-commutative88.0%
unpow288.0%
hypot-undefine88.0%
hypot-undefine88.0%
rem-square-sqrt88.1%
metadata-eval88.1%
hypot-undefine88.1%
metadata-eval88.1%
unpow288.1%
hypot-undefine88.1%
metadata-eval88.1%
unpow288.1%
Simplified88.1%
if +inf.0 < (/.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 0.0%
Simplified11.0%
Taylor expanded in k around 0 22.6%
add-exp-log13.4%
log-pow11.9%
Applied egg-rr11.9%
pow211.9%
associate-/l/3.9%
*-commutative3.9%
pow-to-exp10.2%
associate-/l/22.6%
add-cube-cbrt22.6%
pow322.6%
Applied egg-rr41.0%
associate-*l*41.1%
Simplified41.1%
Final simplification73.2%
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) 1.0) 1.0)))
(*
t_s
(if (<=
(/ 2.0 (* (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))) t_2))
INFINITY)
(* (* (/ 2.0 (* (sin k) (pow t_m 3.0))) (/ l (tan k))) (/ l t_2))
(/
2.0
(* (pow (pow (* t_m (pow (cbrt l) -2.0)) 2.0) 1.5) (* 2.0 (* k k))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = (pow((k / t_m), 2.0) + 1.0) + 1.0;
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * t_2)) <= ((double) INFINITY)) {
tmp = ((2.0 / (sin(k) * pow(t_m, 3.0))) * (l / tan(k))) * (l / t_2);
} else {
tmp = 2.0 / (pow(pow((t_m * pow(cbrt(l), -2.0)), 2.0), 1.5) * (2.0 * (k * k)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = (Math.pow((k / t_m), 2.0) + 1.0) + 1.0;
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * t_2)) <= Double.POSITIVE_INFINITY) {
tmp = ((2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))) * (l / Math.tan(k))) * (l / t_2);
} else {
tmp = 2.0 / (Math.pow(Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 2.0), 1.5) * (2.0 * (k * k)));
}
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(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0) tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * t_2)) <= Inf) tmp = Float64(Float64(Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0))) * Float64(l / tan(k))) * Float64(l / t_2)); else tmp = Float64(2.0 / Float64(((Float64(t_m * (cbrt(l) ^ -2.0)) ^ 2.0) ^ 1.5) * Float64(2.0 * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 1.5], $MachinePrecision] * N[(2.0 * N[(k * k), $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({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot t\_2} \leq \infty:\\
\;\;\;\;\left(\frac{2}{\sin k \cdot {t\_m}^{3}} \cdot \frac{\ell}{\tan k}\right) \cdot \frac{\ell}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left({\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{2}\right)}^{1.5} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\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)))) < +inf.0Initial program 82.1%
Simplified76.9%
associate-*r*80.2%
add-sqr-sqrt80.1%
times-frac80.6%
Applied egg-rr87.9%
frac-times86.9%
associate-*l/86.9%
pow286.9%
Applied egg-rr86.9%
associate-/l*85.9%
times-frac88.0%
*-commutative88.0%
unpow288.0%
hypot-undefine88.0%
hypot-undefine88.0%
rem-square-sqrt88.1%
metadata-eval88.1%
hypot-undefine88.1%
metadata-eval88.1%
unpow288.1%
hypot-undefine88.1%
metadata-eval88.1%
unpow288.1%
Simplified88.1%
if +inf.0 < (/.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 0.0%
Simplified11.0%
Taylor expanded in k around 0 22.6%
unpow222.6%
Applied egg-rr22.6%
associate-/r*10.2%
unpow310.2%
times-frac27.6%
pow227.6%
Applied egg-rr27.6%
frac-times10.2%
unpow210.2%
unpow310.2%
add-cube-cbrt10.2%
pow310.2%
add-cube-cbrt10.2%
pow310.2%
unpow-prod-down10.2%
unpow210.2%
cube-div34.4%
sqr-pow23.1%
pow-prod-down25.1%
pow225.1%
div-inv25.1%
pow-flip25.1%
metadata-eval25.1%
metadata-eval25.1%
Applied egg-rr25.1%
Final simplification68.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5e-116)
(pow (* (/ (* l (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(/
2.0
(pow
(*
(* (cbrt (sin k)) (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
(/ 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 <= 5e-116) {
tmp = pow((((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else {
tmp = 2.0 / pow(((cbrt(sin(k)) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))) * (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 <= 5e-116) {
tmp = Math.pow((((l * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.cbrt(Math.sin(k)) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))) * (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 <= 5e-116) tmp = Float64(Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; else tmp = Float64(2.0 / (Float64(Float64(cbrt(sin(k)) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) * 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, 5e-116], N[Power[N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $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] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $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 \cdot 10^{-116}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right) \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 5.0000000000000003e-116Initial program 53.3%
Simplified50.4%
add-sqr-sqrt28.3%
pow228.3%
Applied egg-rr31.7%
Taylor expanded in t around 0 31.3%
if 5.0000000000000003e-116 < t Initial program 62.1%
Simplified64.1%
unpow264.1%
frac-2neg64.1%
frac-times53.1%
Applied egg-rr53.1%
add-cube-cbrt53.0%
pow353.0%
Applied egg-rr82.5%
associate-*r*82.5%
Simplified82.5%
pow1/361.4%
associate-*l*61.4%
unpow-prod-down36.9%
pow1/350.4%
Applied egg-rr50.4%
unpow1/396.4%
Simplified96.4%
Final simplification52.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.9e-118)
(pow (* (/ (* l (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 5.1e+29)
(*
(* 2.0 (/ (/ (* l (cos k)) k) (* (pow (sin k) 2.0) (pow t_m 2.0))))
(/ l (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(/
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 <= 6.9e-118) {
tmp = pow((((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 5.1e+29) {
tmp = (2.0 * (((l * cos(k)) / k) / (pow(sin(k), 2.0) * pow(t_m, 2.0)))) * (l / hypot(1.0, hypot(1.0, (k / t_m))));
} 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 <= 6.9e-118) {
tmp = Math.pow((((l * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 5.1e+29) {
tmp = (2.0 * (((l * Math.cos(k)) / k) / (Math.pow(Math.sin(k), 2.0) * Math.pow(t_m, 2.0)))) * (l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m))));
} 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 <= 6.9e-118) tmp = Float64(Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 5.1e+29) tmp = Float64(Float64(2.0 * Float64(Float64(Float64(l * cos(k)) / k) / Float64((sin(k) ^ 2.0) * (t_m ^ 2.0)))) * Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m))))); 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, 6.9e-118], N[Power[N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 5.1e+29], N[(N[(2.0 * N[(N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $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 6.9 \cdot 10^{-118}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+29}:\\
\;\;\;\;\left(2 \cdot \frac{\frac{\ell \cdot \cos k}{k}}{{\sin k}^{2} \cdot {t\_m}^{2}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\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 \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 6.9000000000000002e-118Initial program 53.6%
Simplified50.7%
add-sqr-sqrt28.5%
pow228.5%
Applied egg-rr31.9%
Taylor expanded in t around 0 31.5%
if 6.9000000000000002e-118 < t < 5.1000000000000001e29Initial program 64.1%
Simplified63.8%
associate-*r*64.5%
add-sqr-sqrt64.4%
times-frac64.6%
Applied egg-rr69.1%
Taylor expanded in t around 0 55.2%
associate-/r*59.4%
*-commutative59.4%
Simplified59.4%
if 5.1000000000000001e29 < t Initial program 60.3%
Simplified60.9%
unpow260.9%
frac-2neg60.9%
frac-times46.1%
Applied egg-rr46.1%
add-cube-cbrt46.1%
pow346.1%
Applied egg-rr80.8%
associate-*r*80.8%
Simplified80.8%
pow1/354.5%
associate-*l*54.5%
unpow-prod-down35.3%
pow1/348.4%
Applied egg-rr48.4%
unpow1/397.1%
Simplified97.1%
associate-*r*97.1%
unpow-prod-down94.2%
div-inv94.2%
pow-flip94.1%
metadata-eval94.1%
pow394.2%
add-cube-cbrt94.1%
Applied egg-rr94.1%
Final simplification49.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7e-118)
(pow (* (/ (* l (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 39000.0)
(*
(* 2.0 (/ (/ (* l (cos k)) k) (* (pow (sin k) 2.0) (pow t_m 2.0))))
(/ l (hypot 1.0 (hypot 1.0 (/ k t_m)))))
(if (<= t_m 5.6e+102)
(*
(* (/ 2.0 (* (sin k) (pow t_m 3.0))) (/ l (tan k)))
(/ l (+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)))
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt (sin k)) (cbrt (* 2.0 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 tmp;
if (t_m <= 7e-118) {
tmp = pow((((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 39000.0) {
tmp = (2.0 * (((l * cos(k)) / k) / (pow(sin(k), 2.0) * pow(t_m, 2.0)))) * (l / hypot(1.0, hypot(1.0, (k / t_m))));
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 / (sin(k) * pow(t_m, 3.0))) * (l / tan(k))) * (l / ((pow((k / t_m), 2.0) + 1.0) + 1.0));
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt((2.0 * 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 tmp;
if (t_m <= 7e-118) {
tmp = Math.pow((((l * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 39000.0) {
tmp = (2.0 * (((l * Math.cos(k)) / k) / (Math.pow(Math.sin(k), 2.0) * Math.pow(t_m, 2.0)))) * (l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m))));
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))) * (l / Math.tan(k))) * (l / ((Math.pow((k / t_m), 2.0) + 1.0) + 1.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 * 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) tmp = 0.0 if (t_m <= 7e-118) tmp = Float64(Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 39000.0) tmp = Float64(Float64(2.0 * Float64(Float64(Float64(l * cos(k)) / k) / Float64((sin(k) ^ 2.0) * (t_m ^ 2.0)))) * Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m))))); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0))) * Float64(l / tan(k))) * Float64(l / Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0))); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * cbrt(Float64(2.0 * 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_] := N[(t$95$s * If[LessEqual[t$95$m, 7e-118], N[Power[N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 39000.0], N[(N[(2.0 * N[(N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $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[(2.0 * k), $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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7 \cdot 10^{-118}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 39000:\\
\;\;\;\;\left(2 \cdot \frac{\frac{\ell \cdot \cos k}{k}}{{\sin k}^{2} \cdot {t\_m}^{2}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\left(\frac{2}{\sin k \cdot {t\_m}^{3}} \cdot \frac{\ell}{\tan k}\right) \cdot \frac{\ell}{\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\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}}\\
\end{array}
\end{array}
if t < 7e-118Initial program 53.6%
Simplified50.7%
add-sqr-sqrt28.5%
pow228.5%
Applied egg-rr31.9%
Taylor expanded in t around 0 31.5%
if 7e-118 < t < 39000Initial program 59.5%
Simplified59.0%
associate-*r*59.9%
add-sqr-sqrt59.8%
times-frac59.8%
Applied egg-rr60.0%
Taylor expanded in t around 0 53.5%
associate-/r*53.5%
*-commutative53.5%
Simplified53.5%
if 39000 < t < 5.60000000000000037e102Initial program 82.5%
Simplified72.7%
associate-*r*79.6%
add-sqr-sqrt79.3%
times-frac79.6%
Applied egg-rr96.2%
frac-times92.5%
associate-*l/92.3%
pow292.3%
Applied egg-rr92.3%
associate-/l*92.6%
times-frac95.9%
*-commutative95.9%
unpow295.9%
hypot-undefine95.9%
hypot-undefine95.9%
rem-square-sqrt96.4%
metadata-eval96.4%
hypot-undefine96.4%
metadata-eval96.4%
unpow296.4%
hypot-undefine96.4%
metadata-eval96.4%
unpow296.4%
Simplified96.4%
if 5.60000000000000037e102 < t Initial program 46.9%
Simplified50.3%
unpow250.3%
frac-2neg50.3%
frac-times26.8%
Applied egg-rr26.8%
add-cube-cbrt26.8%
pow326.8%
Applied egg-rr81.9%
associate-*r*82.0%
Simplified82.0%
pow1/353.3%
associate-*l*53.3%
unpow-prod-down34.2%
pow1/347.3%
Applied egg-rr47.3%
unpow1/396.4%
Simplified96.4%
Taylor expanded in k around 0 77.6%
Final simplification47.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.5e-118)
(pow (* (/ (* l (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 31500.0)
(/
(* l (* 2.0 (* (/ l k) (/ (cos k) (pow (* t_m (sin k)) 2.0)))))
(hypot 1.0 (hypot 1.0 (/ k t_m))))
(if (<= t_m 5.6e+102)
(*
(* (/ 2.0 (* (sin k) (pow t_m 3.0))) (/ l (tan k)))
(/ l (+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0)))
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt (sin k)) (cbrt (* 2.0 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 tmp;
if (t_m <= 7.5e-118) {
tmp = pow((((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 31500.0) {
tmp = (l * (2.0 * ((l / k) * (cos(k) / pow((t_m * sin(k)), 2.0))))) / hypot(1.0, hypot(1.0, (k / t_m)));
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 / (sin(k) * pow(t_m, 3.0))) * (l / tan(k))) * (l / ((pow((k / t_m), 2.0) + 1.0) + 1.0));
} else {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt((2.0 * 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 tmp;
if (t_m <= 7.5e-118) {
tmp = Math.pow((((l * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 31500.0) {
tmp = (l * (2.0 * ((l / k) * (Math.cos(k) / Math.pow((t_m * Math.sin(k)), 2.0))))) / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
} else if (t_m <= 5.6e+102) {
tmp = ((2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))) * (l / Math.tan(k))) * (l / ((Math.pow((k / t_m), 2.0) + 1.0) + 1.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 * 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) tmp = 0.0 if (t_m <= 7.5e-118) tmp = Float64(Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 31500.0) tmp = Float64(Float64(l * Float64(2.0 * Float64(Float64(l / k) * Float64(cos(k) / (Float64(t_m * sin(k)) ^ 2.0))))) / hypot(1.0, hypot(1.0, Float64(k / t_m)))); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0))) * Float64(l / tan(k))) * Float64(l / Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0))); else tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * cbrt(Float64(2.0 * 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_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-118], N[Power[N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 31500.0], N[(N[(l * N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $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[(2.0 * k), $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)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-118}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 31500:\\
\;\;\;\;\frac{\ell \cdot \left(2 \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{{\left(t\_m \cdot \sin k\right)}^{2}}\right)\right)}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\left(\frac{2}{\sin k \cdot {t\_m}^{3}} \cdot \frac{\ell}{\tan k}\right) \cdot \frac{\ell}{\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\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}}\\
\end{array}
\end{array}
if t < 7.49999999999999978e-118Initial program 53.6%
Simplified50.7%
add-sqr-sqrt28.5%
pow228.5%
Applied egg-rr31.9%
Taylor expanded in t around 0 31.5%
if 7.49999999999999978e-118 < t < 31500Initial program 59.5%
Simplified59.0%
associate-*r*59.9%
add-sqr-sqrt59.8%
times-frac59.8%
Applied egg-rr60.0%
Taylor expanded in t around 0 53.5%
*-commutative53.5%
Simplified53.5%
associate-*r/53.4%
times-frac53.5%
pow-prod-down53.4%
Applied egg-rr53.4%
if 31500 < t < 5.60000000000000037e102Initial program 82.5%
Simplified72.7%
associate-*r*79.6%
add-sqr-sqrt79.3%
times-frac79.6%
Applied egg-rr96.2%
frac-times92.5%
associate-*l/92.3%
pow292.3%
Applied egg-rr92.3%
associate-/l*92.6%
times-frac95.9%
*-commutative95.9%
unpow295.9%
hypot-undefine95.9%
hypot-undefine95.9%
rem-square-sqrt96.4%
metadata-eval96.4%
hypot-undefine96.4%
metadata-eval96.4%
unpow296.4%
hypot-undefine96.4%
metadata-eval96.4%
unpow296.4%
Simplified96.4%
if 5.60000000000000037e102 < t Initial program 46.9%
Simplified50.3%
unpow250.3%
frac-2neg50.3%
frac-times26.8%
Applied egg-rr26.8%
add-cube-cbrt26.8%
pow326.8%
Applied egg-rr81.9%
associate-*r*82.0%
Simplified82.0%
pow1/353.3%
associate-*l*53.3%
unpow-prod-down34.2%
pow1/347.3%
Applied egg-rr47.3%
unpow1/396.4%
Simplified96.4%
Taylor expanded in k around 0 77.6%
Final simplification47.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0))
(t_3 (+ 2.0 t_2))
(t_4 (* (sin k) (pow t_m 3.0))))
(*
t_s
(if (<= t_m 7e-118)
(pow (* (/ (* l (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 40000.0)
(/
(* l (* 2.0 (* (/ l k) (/ (cos k) (pow (* t_m (sin k)) 2.0)))))
(hypot 1.0 (hypot 1.0 (/ k t_m))))
(if (<= t_m 2.6e+107)
(* (* (/ 2.0 t_4) (/ l (tan k))) (/ l (+ (+ t_2 1.0) 1.0)))
(if (<= t_m 7.8e+194)
(/
2.0
(* (pow (/ (pow t_m 1.5) l) 2.0) (* (sin k) (* (tan k) t_3))))
(* (* l (/ 2.0 (* (tan k) t_4))) (/ l t_3)))))))))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 + t_2;
double t_4 = sin(k) * pow(t_m, 3.0);
double tmp;
if (t_m <= 7e-118) {
tmp = pow((((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 40000.0) {
tmp = (l * (2.0 * ((l / k) * (cos(k) / pow((t_m * sin(k)), 2.0))))) / hypot(1.0, hypot(1.0, (k / t_m)));
} else if (t_m <= 2.6e+107) {
tmp = ((2.0 / t_4) * (l / tan(k))) * (l / ((t_2 + 1.0) + 1.0));
} else if (t_m <= 7.8e+194) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (sin(k) * (tan(k) * t_3)));
} else {
tmp = (l * (2.0 / (tan(k) * t_4))) * (l / t_3);
}
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 = 2.0 + t_2;
double t_4 = Math.sin(k) * Math.pow(t_m, 3.0);
double tmp;
if (t_m <= 7e-118) {
tmp = Math.pow((((l * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 40000.0) {
tmp = (l * (2.0 * ((l / k) * (Math.cos(k) / Math.pow((t_m * Math.sin(k)), 2.0))))) / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
} else if (t_m <= 2.6e+107) {
tmp = ((2.0 / t_4) * (l / Math.tan(k))) * (l / ((t_2 + 1.0) + 1.0));
} else if (t_m <= 7.8e+194) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (Math.sin(k) * (Math.tan(k) * t_3)));
} else {
tmp = (l * (2.0 / (Math.tan(k) * t_4))) * (l / t_3);
}
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 + t_2 t_4 = math.sin(k) * math.pow(t_m, 3.0) tmp = 0 if t_m <= 7e-118: tmp = math.pow((((l * math.sqrt(2.0)) / (k * math.sin(k))) * math.sqrt((math.cos(k) / t_m))), 2.0) elif t_m <= 40000.0: tmp = (l * (2.0 * ((l / k) * (math.cos(k) / math.pow((t_m * math.sin(k)), 2.0))))) / math.hypot(1.0, math.hypot(1.0, (k / t_m))) elif t_m <= 2.6e+107: tmp = ((2.0 / t_4) * (l / math.tan(k))) * (l / ((t_2 + 1.0) + 1.0)) elif t_m <= 7.8e+194: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (math.sin(k) * (math.tan(k) * t_3))) else: tmp = (l * (2.0 / (math.tan(k) * t_4))) * (l / t_3) 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 + t_2) t_4 = Float64(sin(k) * (t_m ^ 3.0)) tmp = 0.0 if (t_m <= 7e-118) tmp = Float64(Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 40000.0) tmp = Float64(Float64(l * Float64(2.0 * Float64(Float64(l / k) * Float64(cos(k) / (Float64(t_m * sin(k)) ^ 2.0))))) / hypot(1.0, hypot(1.0, Float64(k / t_m)))); elseif (t_m <= 2.6e+107) tmp = Float64(Float64(Float64(2.0 / t_4) * Float64(l / tan(k))) * Float64(l / Float64(Float64(t_2 + 1.0) + 1.0))); elseif (t_m <= 7.8e+194) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(sin(k) * Float64(tan(k) * t_3)))); else tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * t_4))) * Float64(l / t_3)); 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 + t_2; t_4 = sin(k) * (t_m ^ 3.0); tmp = 0.0; if (t_m <= 7e-118) tmp = (((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))) ^ 2.0; elseif (t_m <= 40000.0) tmp = (l * (2.0 * ((l / k) * (cos(k) / ((t_m * sin(k)) ^ 2.0))))) / hypot(1.0, hypot(1.0, (k / t_m))); elseif (t_m <= 2.6e+107) tmp = ((2.0 / t_4) * (l / tan(k))) * (l / ((t_2 + 1.0) + 1.0)); elseif (t_m <= 7.8e+194) tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (sin(k) * (tan(k) * t_3))); else tmp = (l * (2.0 / (tan(k) * t_4))) * (l / t_3); 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 + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 7e-118], N[Power[N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 40000.0], N[(N[(l * N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.6e+107], N[(N[(N[(2.0 / t$95$4), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[(t$95$2 + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.8e+194], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$3), $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 := 2 + t\_2\\
t_4 := \sin k \cdot {t\_m}^{3}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7 \cdot 10^{-118}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 40000:\\
\;\;\;\;\frac{\ell \cdot \left(2 \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{{\left(t\_m \cdot \sin k\right)}^{2}}\right)\right)}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
\mathbf{elif}\;t\_m \leq 2.6 \cdot 10^{+107}:\\
\;\;\;\;\left(\frac{2}{t\_4} \cdot \frac{\ell}{\tan k}\right) \cdot \frac{\ell}{\left(t\_2 + 1\right) + 1}\\
\mathbf{elif}\;t\_m \leq 7.8 \cdot 10^{+194}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(\sin k \cdot \left(\tan k \cdot t\_3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot t\_4}\right) \cdot \frac{\ell}{t\_3}\\
\end{array}
\end{array}
\end{array}
if t < 7e-118Initial program 53.6%
Simplified50.7%
add-sqr-sqrt28.5%
pow228.5%
Applied egg-rr31.9%
Taylor expanded in t around 0 31.5%
if 7e-118 < t < 4e4Initial program 59.5%
Simplified59.0%
associate-*r*59.9%
add-sqr-sqrt59.8%
times-frac59.8%
Applied egg-rr60.0%
Taylor expanded in t around 0 53.5%
*-commutative53.5%
Simplified53.5%
associate-*r/53.4%
times-frac53.5%
pow-prod-down53.4%
Applied egg-rr53.4%
if 4e4 < t < 2.6000000000000001e107Initial program 79.8%
Simplified70.1%
associate-*r*76.9%
add-sqr-sqrt76.6%
times-frac76.8%
Applied egg-rr93.0%
frac-times89.4%
associate-*l/89.2%
pow289.2%
Applied egg-rr89.2%
associate-/l*89.5%
times-frac92.7%
*-commutative92.7%
unpow292.7%
hypot-undefine92.7%
hypot-undefine92.7%
rem-square-sqrt93.2%
metadata-eval93.2%
hypot-undefine93.2%
metadata-eval93.2%
unpow293.2%
hypot-undefine93.2%
metadata-eval93.2%
unpow293.2%
Simplified93.2%
if 2.6000000000000001e107 < t < 7.80000000000000031e194Initial program 37.2%
Simplified38.2%
add-sqr-sqrt38.2%
pow238.2%
associate-/r*36.9%
sqrt-div36.9%
sqrt-pow159.9%
metadata-eval59.9%
sqrt-prod36.4%
add-sqr-sqrt86.1%
Applied egg-rr86.1%
distribute-lft-in86.1%
Applied egg-rr86.1%
distribute-lft-out86.1%
associate-*r*86.2%
Simplified86.2%
if 7.80000000000000031e194 < t Initial program 63.1%
Simplified56.3%
associate-*r*69.9%
*-un-lft-identity69.9%
times-frac69.9%
associate-*r*76.7%
Applied egg-rr76.7%
/-rgt-identity76.7%
*-commutative76.7%
*-commutative76.7%
Simplified76.7%
Final simplification47.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0))
(t_3 (+ 2.0 t_2))
(t_4 (* (sin k) (pow t_m 3.0))))
(*
t_s
(if (<= t_m 1e-63)
(pow (* (/ (* l (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
(if (<= t_m 2.6e+107)
(* (* (/ 2.0 t_4) (/ l (tan k))) (/ l (+ (+ t_2 1.0) 1.0)))
(if (<= t_m 1.5e+195)
(/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* (sin k) (* (tan k) t_3))))
(* (* l (/ 2.0 (* (tan k) t_4))) (/ l t_3))))))))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 + t_2;
double t_4 = sin(k) * pow(t_m, 3.0);
double tmp;
if (t_m <= 1e-63) {
tmp = pow((((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
} else if (t_m <= 2.6e+107) {
tmp = ((2.0 / t_4) * (l / tan(k))) * (l / ((t_2 + 1.0) + 1.0));
} else if (t_m <= 1.5e+195) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (sin(k) * (tan(k) * t_3)));
} else {
tmp = (l * (2.0 / (tan(k) * t_4))) * (l / t_3);
}
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) :: t_4
real(8) :: tmp
t_2 = (k / t_m) ** 2.0d0
t_3 = 2.0d0 + t_2
t_4 = sin(k) * (t_m ** 3.0d0)
if (t_m <= 1d-63) then
tmp = (((l * sqrt(2.0d0)) / (k * sin(k))) * sqrt((cos(k) / t_m))) ** 2.0d0
else if (t_m <= 2.6d+107) then
tmp = ((2.0d0 / t_4) * (l / tan(k))) * (l / ((t_2 + 1.0d0) + 1.0d0))
else if (t_m <= 1.5d+195) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (sin(k) * (tan(k) * t_3)))
else
tmp = (l * (2.0d0 / (tan(k) * t_4))) * (l / t_3)
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 + t_2;
double t_4 = Math.sin(k) * Math.pow(t_m, 3.0);
double tmp;
if (t_m <= 1e-63) {
tmp = Math.pow((((l * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
} else if (t_m <= 2.6e+107) {
tmp = ((2.0 / t_4) * (l / Math.tan(k))) * (l / ((t_2 + 1.0) + 1.0));
} else if (t_m <= 1.5e+195) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (Math.sin(k) * (Math.tan(k) * t_3)));
} else {
tmp = (l * (2.0 / (Math.tan(k) * t_4))) * (l / t_3);
}
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 + t_2 t_4 = math.sin(k) * math.pow(t_m, 3.0) tmp = 0 if t_m <= 1e-63: tmp = math.pow((((l * math.sqrt(2.0)) / (k * math.sin(k))) * math.sqrt((math.cos(k) / t_m))), 2.0) elif t_m <= 2.6e+107: tmp = ((2.0 / t_4) * (l / math.tan(k))) * (l / ((t_2 + 1.0) + 1.0)) elif t_m <= 1.5e+195: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (math.sin(k) * (math.tan(k) * t_3))) else: tmp = (l * (2.0 / (math.tan(k) * t_4))) * (l / t_3) 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 + t_2) t_4 = Float64(sin(k) * (t_m ^ 3.0)) tmp = 0.0 if (t_m <= 1e-63) tmp = Float64(Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0; elseif (t_m <= 2.6e+107) tmp = Float64(Float64(Float64(2.0 / t_4) * Float64(l / tan(k))) * Float64(l / Float64(Float64(t_2 + 1.0) + 1.0))); elseif (t_m <= 1.5e+195) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(sin(k) * Float64(tan(k) * t_3)))); else tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * t_4))) * Float64(l / t_3)); 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 + t_2; t_4 = sin(k) * (t_m ^ 3.0); tmp = 0.0; if (t_m <= 1e-63) tmp = (((l * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))) ^ 2.0; elseif (t_m <= 2.6e+107) tmp = ((2.0 / t_4) * (l / tan(k))) * (l / ((t_2 + 1.0) + 1.0)); elseif (t_m <= 1.5e+195) tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (sin(k) * (tan(k) * t_3))); else tmp = (l * (2.0 / (tan(k) * t_4))) * (l / t_3); 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 + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1e-63], N[Power[N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 2.6e+107], N[(N[(N[(2.0 / t$95$4), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[(t$95$2 + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.5e+195], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$3), $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 := 2 + t\_2\\
t_4 := \sin k \cdot {t\_m}^{3}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-63}:\\
\;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 2.6 \cdot 10^{+107}:\\
\;\;\;\;\left(\frac{2}{t\_4} \cdot \frac{\ell}{\tan k}\right) \cdot \frac{\ell}{\left(t\_2 + 1\right) + 1}\\
\mathbf{elif}\;t\_m \leq 1.5 \cdot 10^{+195}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(\sin k \cdot \left(\tan k \cdot t\_3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot t\_4}\right) \cdot \frac{\ell}{t\_3}\\
\end{array}
\end{array}
\end{array}
if t < 1.00000000000000007e-63Initial program 52.9%
Simplified50.1%
add-sqr-sqrt29.1%
pow229.1%
Applied egg-rr33.0%
Taylor expanded in t around 0 33.7%
if 1.00000000000000007e-63 < t < 2.6000000000000001e107Initial program 81.0%
Simplified73.1%
associate-*r*78.6%
add-sqr-sqrt78.4%
times-frac78.6%
Applied egg-rr91.6%
frac-times88.7%
associate-*l/88.6%
pow288.6%
Applied egg-rr88.6%
associate-/l*88.8%
times-frac94.0%
*-commutative94.0%
unpow294.0%
hypot-undefine94.0%
hypot-undefine94.0%
rem-square-sqrt94.5%
metadata-eval94.5%
hypot-undefine94.5%
metadata-eval94.5%
unpow294.5%
hypot-undefine94.5%
metadata-eval94.5%
unpow294.5%
Simplified94.5%
if 2.6000000000000001e107 < t < 1.5e195Initial program 37.2%
Simplified38.2%
add-sqr-sqrt38.2%
pow238.2%
associate-/r*36.9%
sqrt-div36.9%
sqrt-pow159.9%
metadata-eval59.9%
sqrt-prod36.4%
add-sqr-sqrt86.1%
Applied egg-rr86.1%
distribute-lft-in86.1%
Applied egg-rr86.1%
distribute-lft-out86.1%
associate-*r*86.2%
Simplified86.2%
if 1.5e195 < t Initial program 63.1%
Simplified56.3%
associate-*r*69.9%
*-un-lft-identity69.9%
times-frac69.9%
associate-*r*76.7%
Applied egg-rr76.7%
/-rgt-identity76.7%
*-commutative76.7%
*-commutative76.7%
Simplified76.7%
Final simplification49.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 9e-18)
(/ 2.0 (* (* 2.0 (* k k)) (pow (/ (/ t_m (cbrt l)) (cbrt l)) 3.0)))
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9e-18) {
tmp = 2.0 / ((2.0 * (k * k)) * pow(((t_m / cbrt(l)) / cbrt(l)), 3.0));
} else {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9e-18) {
tmp = 2.0 / ((2.0 * (k * k)) * Math.pow(((t_m / Math.cbrt(l)) / Math.cbrt(l)), 3.0));
} else {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 9e-18) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * (Float64(Float64(t_m / cbrt(l)) / cbrt(l)) ^ 3.0))); else tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9e-18], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $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}\;t\_m \leq 9 \cdot 10^{-18}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot {\left(\frac{\frac{t\_m}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 8.99999999999999987e-18Initial program 54.1%
Simplified56.5%
Taylor expanded in k around 0 57.3%
unpow257.3%
Applied egg-rr57.3%
add-log-exp32.1%
Applied egg-rr32.1%
add-cube-cbrt32.1%
pow332.1%
cbrt-div32.1%
rem-log-exp57.2%
cbrt-div57.3%
unpow357.2%
add-cbrt-cube61.2%
Applied egg-rr61.2%
if 8.99999999999999987e-18 < t Initial program 61.8%
Simplified55.9%
associate-*r*62.5%
*-un-lft-identity62.5%
times-frac62.6%
associate-*r*70.0%
Applied egg-rr70.0%
/-rgt-identity70.0%
*-commutative70.0%
*-commutative70.0%
Simplified70.0%
Final simplification63.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.2e-142)
(/ 2.0 (* (/ (/ (pow t_m 3.0) l) l) (* 2.0 (/ (pow (sin k) 2.0) (cos k)))))
(if (<= t_m 1.4e+154)
(/
2.0
(*
(* (/ (pow t_m 2.0) l) (/ t_m l))
(* (* (sin k) (tan k)) (+ 2.0 (/ (* k k) (* t_m t_m))))))
(/ 2.0 (* (* 2.0 (* k k)) (pow (/ (/ 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 <= 1.2e-142) {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * (2.0 * (pow(sin(k), 2.0) / cos(k))));
} else if (t_m <= 1.4e+154) {
tmp = 2.0 / (((pow(t_m, 2.0) / l) * (t_m / l)) * ((sin(k) * tan(k)) * (2.0 + ((k * k) / (t_m * t_m)))));
} else {
tmp = 2.0 / ((2.0 * (k * k)) * pow(((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 <= 1.2e-142) {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * (2.0 * (Math.pow(Math.sin(k), 2.0) / Math.cos(k))));
} else if (t_m <= 1.4e+154) {
tmp = 2.0 / (((Math.pow(t_m, 2.0) / l) * (t_m / l)) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k * k) / (t_m * t_m)))));
} else {
tmp = 2.0 / ((2.0 * (k * k)) * Math.pow(((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 <= 1.2e-142) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(2.0 * Float64((sin(k) ^ 2.0) / cos(k))))); elseif (t_m <= 1.4e+154) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k * k) / Float64(t_m * t_m)))))); else tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * 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, 1.2e-142], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.4e+154], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k * k), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $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 1.2 \cdot 10^{-142}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \frac{{\sin k}^{2}}{\cos k}\right)}\\
\mathbf{elif}\;t\_m \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;\frac{2}{\left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{k \cdot k}{t\_m \cdot t\_m}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot {\left(\frac{\frac{t\_m}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.19999999999999994e-142Initial program 53.6%
Simplified55.5%
Taylor expanded in t around inf 55.0%
if 1.19999999999999994e-142 < t < 1.4e154Initial program 67.1%
Simplified68.1%
unpow268.1%
frac-2neg68.1%
frac-times68.1%
Applied egg-rr68.1%
associate-/r*54.5%
unpow354.5%
times-frac63.0%
pow263.0%
Applied egg-rr79.1%
if 1.4e154 < t Initial program 50.9%
Simplified54.6%
Taylor expanded in k around 0 54.6%
unpow254.6%
Applied egg-rr54.6%
add-log-exp54.6%
Applied egg-rr54.6%
add-cube-cbrt54.6%
pow354.6%
cbrt-div54.6%
rem-log-exp54.6%
cbrt-div54.6%
unpow354.6%
add-cbrt-cube66.8%
Applied egg-rr66.8%
Final simplification61.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (or (<= t_m 5.2e-87) (not (<= t_m 1.4e+154)))
(/ 2.0 (* (* 2.0 (* k k)) (pow (/ (/ t_m (cbrt l)) (cbrt l)) 3.0)))
(/
2.0
(*
(* (/ (pow t_m 2.0) l) (/ t_m l))
(* (* (sin k) (tan k)) (+ 2.0 (/ (* k k) (* t_m t_m)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((t_m <= 5.2e-87) || !(t_m <= 1.4e+154)) {
tmp = 2.0 / ((2.0 * (k * k)) * pow(((t_m / cbrt(l)) / cbrt(l)), 3.0));
} else {
tmp = 2.0 / (((pow(t_m, 2.0) / l) * (t_m / l)) * ((sin(k) * tan(k)) * (2.0 + ((k * k) / (t_m * t_m)))));
}
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.2e-87) || !(t_m <= 1.4e+154)) {
tmp = 2.0 / ((2.0 * (k * k)) * Math.pow(((t_m / Math.cbrt(l)) / Math.cbrt(l)), 3.0));
} else {
tmp = 2.0 / (((Math.pow(t_m, 2.0) / l) * (t_m / l)) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k * k) / (t_m * t_m)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if ((t_m <= 5.2e-87) || !(t_m <= 1.4e+154)) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * (Float64(Float64(t_m / cbrt(l)) / cbrt(l)) ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k * k) / Float64(t_m * t_m)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[Or[LessEqual[t$95$m, 5.2e-87], N[Not[LessEqual[t$95$m, 1.4e+154]], $MachinePrecision]], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k * k), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.2 \cdot 10^{-87} \lor \neg \left(t\_m \leq 1.4 \cdot 10^{+154}\right):\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot {\left(\frac{\frac{t\_m}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{k \cdot k}{t\_m \cdot t\_m}\right)\right)}\\
\end{array}
\end{array}
if t < 5.20000000000000005e-87 or 1.4e154 < t Initial program 52.1%
Simplified54.4%
Taylor expanded in k around 0 55.1%
unpow255.1%
Applied egg-rr55.1%
add-log-exp34.8%
Applied egg-rr34.8%
add-cube-cbrt34.8%
pow334.8%
cbrt-div34.8%
rem-log-exp55.1%
cbrt-div55.1%
unpow355.1%
add-cbrt-cube60.5%
Applied egg-rr60.5%
if 5.20000000000000005e-87 < t < 1.4e154Initial program 74.4%
Simplified74.6%
unpow274.6%
frac-2neg74.6%
frac-times74.6%
Applied egg-rr74.6%
associate-/r*59.6%
unpow359.6%
times-frac62.1%
pow262.1%
Applied egg-rr80.9%
Final simplification64.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (or (<= t_m 5.2e-87) (not (<= t_m 3.7e+98)))
(/ 2.0 (* (* 2.0 (* k k)) (pow (/ (/ t_m (cbrt l)) (cbrt l)) 3.0)))
(/
2.0
(*
(/ (/ (pow t_m 3.0) l) l)
(* (* (sin k) (tan k)) (+ 2.0 (* (/ k t_m) (/ k t_m)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((t_m <= 5.2e-87) || !(t_m <= 3.7e+98)) {
tmp = 2.0 / ((2.0 * (k * k)) * pow(((t_m / cbrt(l)) / cbrt(l)), 3.0));
} else {
tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))));
}
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.2e-87) || !(t_m <= 3.7e+98)) {
tmp = 2.0 / ((2.0 * (k * k)) * Math.pow(((t_m / Math.cbrt(l)) / Math.cbrt(l)), 3.0));
} else {
tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if ((t_m <= 5.2e-87) || !(t_m <= 3.7e+98)) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * (Float64(Float64(t_m / cbrt(l)) / cbrt(l)) ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) * Float64(k / t_m)))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[Or[LessEqual[t$95$m, 5.2e-87], N[Not[LessEqual[t$95$m, 3.7e+98]], $MachinePrecision]], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.2 \cdot 10^{-87} \lor \neg \left(t\_m \leq 3.7 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot {\left(\frac{\frac{t\_m}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)\right)}\\
\end{array}
\end{array}
if t < 5.20000000000000005e-87 or 3.6999999999999999e98 < t Initial program 52.2%
Simplified53.7%
Taylor expanded in k around 0 54.3%
unpow254.3%
Applied egg-rr54.3%
add-log-exp34.9%
Applied egg-rr34.9%
add-cube-cbrt34.9%
pow334.9%
cbrt-div34.9%
rem-log-exp54.3%
cbrt-div54.3%
unpow354.3%
add-cbrt-cube59.9%
Applied egg-rr59.9%
if 5.20000000000000005e-87 < t < 3.6999999999999999e98Initial program 80.6%
Simplified85.6%
unpow285.6%
Applied egg-rr85.6%
Final simplification63.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 (/ 2.0 (* (* 2.0 (* k k)) (pow (/ (/ 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) {
return t_s * (2.0 / ((2.0 * (k * k)) * pow(((t_m / cbrt(l)) / cbrt(l)), 3.0)));
}
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 / ((2.0 * (k * k)) * Math.pow(((t_m / Math.cbrt(l)) / Math.cbrt(l)), 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(2.0 / Float64(Float64(2.0 * Float64(k * k)) * (Float64(Float64(t_m / cbrt(l)) / cbrt(l)) ^ 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[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot {\left(\frac{\frac{t\_m}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}}
\end{array}
Initial program 56.1%
Simplified58.0%
Taylor expanded in k around 0 56.0%
unpow256.0%
Applied egg-rr56.0%
add-log-exp35.8%
Applied egg-rr35.8%
add-cube-cbrt35.8%
pow335.8%
cbrt-div35.8%
rem-log-exp55.9%
cbrt-div55.9%
unpow355.9%
add-cbrt-cube60.7%
Applied egg-rr60.7%
Final simplification60.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (* k 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) {
return t_s * (2.0 / ((2.0 * (k * k)) * pow((t_m * pow(cbrt(l), -2.0)), 3.0)));
}
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 / ((2.0 * (k * k)) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 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(2.0 / Float64(Float64(2.0 * Float64(k * k)) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 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[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $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]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}}
\end{array}
Initial program 56.1%
Simplified58.0%
Taylor expanded in k around 0 56.0%
unpow256.0%
Applied egg-rr56.0%
associate-/r*52.0%
unpow352.0%
times-frac57.9%
pow257.9%
Applied egg-rr57.9%
frac-times52.0%
unpow252.0%
unpow352.0%
add-cube-cbrt52.0%
pow352.0%
add-cube-cbrt52.0%
pow352.0%
unpow-prod-down52.0%
unpow252.0%
cube-div60.7%
div-inv60.7%
pow-flip60.7%
metadata-eval60.7%
Applied egg-rr60.7%
Final simplification60.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))));
}
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((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}
\end{array}
Initial program 56.1%
Simplified58.0%
Taylor expanded in k around 0 56.0%
unpow256.0%
Applied egg-rr56.0%
add-sqr-sqrt27.8%
pow227.8%
associate-/r*24.4%
sqrt-div24.4%
sqrt-pow128.3%
metadata-eval28.3%
sqrt-prod18.2%
add-sqr-sqrt33.9%
Applied egg-rr30.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 (/ 2.0 (* (* 2.0 (* k k)) (* (/ (pow t_m 2.0) l) (/ t_m l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) / l) * (t_m / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) / l) * (t_m / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) / l) * (t_m / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $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}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}
\end{array}
Initial program 56.1%
Simplified58.0%
Taylor expanded in k around 0 56.0%
unpow256.0%
Applied egg-rr56.0%
associate-/r*52.0%
unpow352.0%
times-frac57.9%
pow257.9%
Applied egg-rr57.9%
Final simplification57.9%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (/ (/ (pow t_m 3.0) l) l)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((pow(t_m, 3.0) / l) / l)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 3.0d0) / l) / l)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 3.0) / l) / l)));
}
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 / ((2.0 * (k * k)) * ((math.pow(t_m, 3.0) / l) / l)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 3.0) / l) / l)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * (((t_m ^ 3.0) / l) / l))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}
\end{array}
Initial program 56.1%
Simplified58.0%
Taylor expanded in k around 0 56.0%
unpow256.0%
Applied egg-rr56.0%
Final simplification56.0%
herbie shell --seed 2024148
(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))))