
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* l (/ (sqrt 2.0) (pow t 1.5)))) (t_2 (pow (/ k t) 2.0)))
(if (<= t -2.5e-94)
(/
2.0
(*
(* (pow (* (/ t (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0) (tan k))
(+ 1.0 (+ 1.0 t_2))))
(if (<= t 2.2e-85)
(* (/ (/ (* 2.0 l) (pow k 2.0)) t) (/ (/ l (sin k)) (tan k)))
(* (/ t_1 (* (sin k) (+ 2.0 t_2))) (/ t_1 (tan k)))))))
double code(double t, double l, double k) {
double t_1 = l * (sqrt(2.0) / pow(t, 1.5));
double t_2 = pow((k / t), 2.0);
double tmp;
if (t <= -2.5e-94) {
tmp = 2.0 / ((pow(((t / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * tan(k)) * (1.0 + (1.0 + t_2)));
} else if (t <= 2.2e-85) {
tmp = (((2.0 * l) / pow(k, 2.0)) / t) * ((l / sin(k)) / tan(k));
} else {
tmp = (t_1 / (sin(k) * (2.0 + t_2))) * (t_1 / tan(k));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = l * (Math.sqrt(2.0) / Math.pow(t, 1.5));
double t_2 = Math.pow((k / t), 2.0);
double tmp;
if (t <= -2.5e-94) {
tmp = 2.0 / ((Math.pow(((t / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * Math.tan(k)) * (1.0 + (1.0 + t_2)));
} else if (t <= 2.2e-85) {
tmp = (((2.0 * l) / Math.pow(k, 2.0)) / t) * ((l / Math.sin(k)) / Math.tan(k));
} else {
tmp = (t_1 / (Math.sin(k) * (2.0 + t_2))) * (t_1 / Math.tan(k));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(l * Float64(sqrt(2.0) / (t ^ 1.5))) t_2 = Float64(k / t) ^ 2.0 tmp = 0.0 if (t <= -2.5e-94) tmp = Float64(2.0 / Float64(Float64((Float64(Float64(t / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * tan(k)) * Float64(1.0 + Float64(1.0 + t_2)))); elseif (t <= 2.2e-85) tmp = Float64(Float64(Float64(Float64(2.0 * l) / (k ^ 2.0)) / t) * Float64(Float64(l / sin(k)) / tan(k))); else tmp = Float64(Float64(t_1 / Float64(sin(k) * Float64(2.0 + t_2))) * Float64(t_1 / tan(k))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[t, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, -2.5e-94], N[(2.0 / N[(N[(N[Power[N[(N[(t / 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[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-85], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 / N[(N[Sin[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\sqrt{2}}{{t}^{1.5}}\\
t_2 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{\left({\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \tan k\right) \cdot \left(1 + \left(1 + t_2\right)\right)}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{k}^{2}}}{t} \cdot \frac{\frac{\ell}{\sin k}}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{\sin k \cdot \left(2 + t_2\right)} \cdot \frac{t_1}{\tan k}\\
\end{array}
\end{array}
if t < -2.4999999999999998e-94Initial program 69.9%
associate-/r*74.3%
add-cube-cbrt74.3%
*-un-lft-identity74.3%
times-frac74.2%
pow274.2%
cbrt-div74.3%
rem-cbrt-cube74.4%
cbrt-div74.3%
rem-cbrt-cube84.9%
Applied egg-rr84.9%
add-cube-cbrt84.8%
pow384.8%
frac-times78.2%
unpow278.2%
*-un-lft-identity78.2%
cbrt-div78.3%
add-cbrt-cube86.2%
Applied egg-rr86.2%
pow1/339.1%
add-sqr-sqrt39.1%
unpow-prod-down39.2%
Applied egg-rr39.2%
unpow1/339.3%
unpow1/340.0%
Simplified40.0%
add-cube-cbrt40.0%
pow340.0%
Applied egg-rr88.7%
if -2.4999999999999998e-94 < t < 2.2e-85Initial program 36.4%
Simplified37.3%
associate-*r*43.6%
*-un-lft-identity43.6%
times-frac43.6%
Applied egg-rr43.6%
/-rgt-identity43.6%
associate-*r/43.6%
times-frac43.6%
*-commutative43.6%
associate-/r*43.6%
Simplified43.6%
Taylor expanded in t around 0 87.4%
associate-*r/87.4%
*-commutative87.4%
associate-/r*87.8%
*-commutative87.8%
Simplified87.8%
if 2.2e-85 < t Initial program 70.7%
Simplified62.6%
add-sqr-sqrt62.6%
associate-*r*62.6%
times-frac70.6%
*-commutative70.6%
sqrt-prod70.6%
sqrt-prod40.2%
add-sqr-sqrt60.4%
sqrt-div60.4%
sqrt-pow160.4%
metadata-eval60.4%
Applied egg-rr92.9%
Final simplification89.8%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (+ 1.0 (+ 1.0 (pow (/ k t) 2.0)))))
(if (<=
(/ 2.0 (* t_1 (* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))))
5e+198)
(/ 2.0 (* t_1 (* (tan k) (* (sin k) (* (/ (pow t 2.0) l) (/ t l))))))
(* (/ (/ (* 2.0 l) (pow k 2.0)) t) (/ (/ l (sin k)) (tan k))))))
double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + pow((k / t), 2.0));
double tmp;
if ((2.0 / (t_1 * (tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))))) <= 5e+198) {
tmp = 2.0 / (t_1 * (tan(k) * (sin(k) * ((pow(t, 2.0) / l) * (t / l)))));
} else {
tmp = (((2.0 * l) / pow(k, 2.0)) / t) * ((l / sin(k)) / tan(k));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 + (1.0d0 + ((k / t) ** 2.0d0))
if ((2.0d0 / (t_1 * (tan(k) * (sin(k) * ((t ** 3.0d0) / (l * l)))))) <= 5d+198) then
tmp = 2.0d0 / (t_1 * (tan(k) * (sin(k) * (((t ** 2.0d0) / l) * (t / l)))))
else
tmp = (((2.0d0 * l) / (k ** 2.0d0)) / t) * ((l / sin(k)) / tan(k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + Math.pow((k / t), 2.0));
double tmp;
if ((2.0 / (t_1 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))))) <= 5e+198) {
tmp = 2.0 / (t_1 * (Math.tan(k) * (Math.sin(k) * ((Math.pow(t, 2.0) / l) * (t / l)))));
} else {
tmp = (((2.0 * l) / Math.pow(k, 2.0)) / t) * ((l / Math.sin(k)) / Math.tan(k));
}
return tmp;
}
def code(t, l, k): t_1 = 1.0 + (1.0 + math.pow((k / t), 2.0)) tmp = 0 if (2.0 / (t_1 * (math.tan(k) * (math.sin(k) * (math.pow(t, 3.0) / (l * l)))))) <= 5e+198: tmp = 2.0 / (t_1 * (math.tan(k) * (math.sin(k) * ((math.pow(t, 2.0) / l) * (t / l))))) else: tmp = (((2.0 * l) / math.pow(k, 2.0)) / t) * ((l / math.sin(k)) / math.tan(k)) return tmp
function code(t, l, k) t_1 = Float64(1.0 + Float64(1.0 + (Float64(k / t) ^ 2.0))) tmp = 0.0 if (Float64(2.0 / Float64(t_1 * Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))))) <= 5e+198) tmp = Float64(2.0 / Float64(t_1 * Float64(tan(k) * Float64(sin(k) * Float64(Float64((t ^ 2.0) / l) * Float64(t / l)))))); else tmp = Float64(Float64(Float64(Float64(2.0 * l) / (k ^ 2.0)) / t) * Float64(Float64(l / sin(k)) / tan(k))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = 1.0 + (1.0 + ((k / t) ^ 2.0)); tmp = 0.0; if ((2.0 / (t_1 * (tan(k) * (sin(k) * ((t ^ 3.0) / (l * l)))))) <= 5e+198) tmp = 2.0 / (t_1 * (tan(k) * (sin(k) * (((t ^ 2.0) / l) * (t / l))))); else tmp = (((2.0 * l) / (k ^ 2.0)) / t) * ((l / sin(k)) / tan(k)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(1.0 + N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(t$95$1 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+198], N[(2.0 / N[(t$95$1 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\\
\mathbf{if}\;\frac{2}{t_1 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right)} \leq 5 \cdot 10^{+198}:\\
\;\;\;\;\frac{2}{t_1 \cdot \left(\tan k \cdot \left(\sin k \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{k}^{2}}}{t} \cdot \frac{\frac{\ell}{\sin k}}{\tan k}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 5.00000000000000049e198Initial program 85.8%
unpow385.8%
times-frac91.9%
pow291.9%
Applied egg-rr91.9%
if 5.00000000000000049e198 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 22.2%
Simplified23.0%
associate-*r*32.3%
*-un-lft-identity32.3%
times-frac33.1%
Applied egg-rr33.1%
/-rgt-identity33.1%
associate-*r/32.3%
times-frac33.1%
*-commutative33.1%
associate-/r*33.1%
Simplified33.1%
Taylor expanded in t around 0 74.1%
associate-*r/74.1%
*-commutative74.1%
associate-/r*74.5%
*-commutative74.5%
Simplified74.5%
Final simplification84.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(+ 1.0 (+ 1.0 t_1))
(* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))))
INFINITY)
(* (/ (* l (/ 2.0 (pow t 3.0))) (* (sin k) (+ 2.0 t_1))) (/ l (tan k)))
(* (/ (/ (* 2.0 l) (pow k 2.0)) t) (/ (/ l (sin k)) (tan k))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((1.0 + (1.0 + t_1)) * (tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))))) <= ((double) INFINITY)) {
tmp = ((l * (2.0 / pow(t, 3.0))) / (sin(k) * (2.0 + t_1))) * (l / tan(k));
} else {
tmp = (((2.0 * l) / pow(k, 2.0)) / t) * ((l / sin(k)) / tan(k));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((1.0 + (1.0 + t_1)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))))) <= Double.POSITIVE_INFINITY) {
tmp = ((l * (2.0 / Math.pow(t, 3.0))) / (Math.sin(k) * (2.0 + t_1))) * (l / Math.tan(k));
} else {
tmp = (((2.0 * l) / Math.pow(k, 2.0)) / t) * ((l / Math.sin(k)) / Math.tan(k));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow((k / t), 2.0) tmp = 0 if (2.0 / ((1.0 + (1.0 + t_1)) * (math.tan(k) * (math.sin(k) * (math.pow(t, 3.0) / (l * l)))))) <= math.inf: tmp = ((l * (2.0 / math.pow(t, 3.0))) / (math.sin(k) * (2.0 + t_1))) * (l / math.tan(k)) else: tmp = (((2.0 * l) / math.pow(k, 2.0)) / t) * ((l / math.sin(k)) / math.tan(k)) return tmp
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(1.0 + Float64(1.0 + t_1)) * Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))))) <= Inf) tmp = Float64(Float64(Float64(l * Float64(2.0 / (t ^ 3.0))) / Float64(sin(k) * Float64(2.0 + t_1))) * Float64(l / tan(k))); else tmp = Float64(Float64(Float64(Float64(2.0 * l) / (k ^ 2.0)) / t) * Float64(Float64(l / sin(k)) / tan(k))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / t) ^ 2.0; tmp = 0.0; if ((2.0 / ((1.0 + (1.0 + t_1)) * (tan(k) * (sin(k) * ((t ^ 3.0) / (l * l)))))) <= Inf) tmp = ((l * (2.0 / (t ^ 3.0))) / (sin(k) * (2.0 + t_1))) * (l / tan(k)); else tmp = (((2.0 * l) / (k ^ 2.0)) / t) * ((l / sin(k)) / tan(k)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(l * N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(1 + \left(1 + t_1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right)} \leq \infty:\\
\;\;\;\;\frac{\ell \cdot \frac{2}{{t}^{3}}}{\sin k \cdot \left(2 + t_1\right)} \cdot \frac{\ell}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{k}^{2}}}{t} \cdot \frac{\frac{\ell}{\sin k}}{\tan k}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < +inf.0Initial program 85.6%
Simplified79.0%
associate-*r*80.4%
associate-*r*80.5%
times-frac89.4%
Applied egg-rr89.4%
if +inf.0 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 0.0%
Simplified0.0%
associate-*r*11.5%
*-un-lft-identity11.5%
times-frac11.5%
Applied egg-rr11.5%
/-rgt-identity11.5%
associate-*r/11.5%
times-frac11.5%
*-commutative11.5%
associate-/r*11.5%
Simplified11.5%
Taylor expanded in t around 0 67.1%
associate-*r/67.1%
*-commutative67.1%
associate-/r*67.7%
*-commutative67.7%
Simplified67.7%
Final simplification82.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (+ 1.0 (+ 1.0 (pow (/ k t) 2.0)))))
(if (<= t -2e-94)
(/
2.0
(*
(* (pow (* (/ t (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0) (tan k))
t_1))
(if (<= t 1.4e-85)
(* (/ (/ (* 2.0 l) (pow k 2.0)) t) (/ (/ l (sin k)) (tan k)))
(/
2.0
(*
t_1
(* (tan k) (* (sin k) (pow (/ (/ t (cbrt l)) (cbrt l)) 3.0)))))))))
double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + pow((k / t), 2.0));
double tmp;
if (t <= -2e-94) {
tmp = 2.0 / ((pow(((t / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * tan(k)) * t_1);
} else if (t <= 1.4e-85) {
tmp = (((2.0 * l) / pow(k, 2.0)) / t) * ((l / sin(k)) / tan(k));
} else {
tmp = 2.0 / (t_1 * (tan(k) * (sin(k) * pow(((t / cbrt(l)) / cbrt(l)), 3.0))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + Math.pow((k / t), 2.0));
double tmp;
if (t <= -2e-94) {
tmp = 2.0 / ((Math.pow(((t / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * Math.tan(k)) * t_1);
} else if (t <= 1.4e-85) {
tmp = (((2.0 * l) / Math.pow(k, 2.0)) / t) * ((l / Math.sin(k)) / Math.tan(k));
} else {
tmp = 2.0 / (t_1 * (Math.tan(k) * (Math.sin(k) * Math.pow(((t / Math.cbrt(l)) / Math.cbrt(l)), 3.0))));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(1.0 + Float64(1.0 + (Float64(k / t) ^ 2.0))) tmp = 0.0 if (t <= -2e-94) tmp = Float64(2.0 / Float64(Float64((Float64(Float64(t / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * tan(k)) * t_1)); elseif (t <= 1.4e-85) tmp = Float64(Float64(Float64(Float64(2.0 * l) / (k ^ 2.0)) / t) * Float64(Float64(l / sin(k)) / tan(k))); else tmp = Float64(2.0 / Float64(t_1 * Float64(tan(k) * Float64(sin(k) * (Float64(Float64(t / cbrt(l)) / cbrt(l)) ^ 3.0))))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(1.0 + N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-94], N[(2.0 / N[(N[(N[Power[N[(N[(t / 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[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-85], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$1 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[(t / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{\left({\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \tan k\right) \cdot t_1}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{k}^{2}}}{t} \cdot \frac{\frac{\ell}{\sin k}}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t_1 \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}\right)\right)}\\
\end{array}
\end{array}
if t < -1.9999999999999999e-94Initial program 69.9%
associate-/r*74.3%
add-cube-cbrt74.3%
*-un-lft-identity74.3%
times-frac74.2%
pow274.2%
cbrt-div74.3%
rem-cbrt-cube74.4%
cbrt-div74.3%
rem-cbrt-cube84.9%
Applied egg-rr84.9%
add-cube-cbrt84.8%
pow384.8%
frac-times78.2%
unpow278.2%
*-un-lft-identity78.2%
cbrt-div78.3%
add-cbrt-cube86.2%
Applied egg-rr86.2%
pow1/339.1%
add-sqr-sqrt39.1%
unpow-prod-down39.2%
Applied egg-rr39.2%
unpow1/339.3%
unpow1/340.0%
Simplified40.0%
add-cube-cbrt40.0%
pow340.0%
Applied egg-rr88.7%
if -1.9999999999999999e-94 < t < 1.40000000000000008e-85Initial program 36.4%
Simplified37.3%
associate-*r*43.6%
*-un-lft-identity43.6%
times-frac43.6%
Applied egg-rr43.6%
/-rgt-identity43.6%
associate-*r/43.6%
times-frac43.6%
*-commutative43.6%
associate-/r*43.6%
Simplified43.6%
Taylor expanded in t around 0 87.4%
associate-*r/87.4%
*-commutative87.4%
associate-/r*87.8%
*-commutative87.8%
Simplified87.8%
if 1.40000000000000008e-85 < t Initial program 70.7%
associate-/r*75.8%
add-cube-cbrt75.6%
*-un-lft-identity75.6%
times-frac75.6%
pow275.6%
cbrt-div75.6%
rem-cbrt-cube75.7%
cbrt-div75.6%
rem-cbrt-cube88.7%
Applied egg-rr88.7%
add-cube-cbrt88.7%
pow388.7%
frac-times85.6%
unpow285.6%
*-un-lft-identity85.6%
cbrt-div85.4%
add-cbrt-cube91.8%
Applied egg-rr91.8%
Final simplification89.4%
(FPCore (t l k)
:precision binary64
(if (or (<= t -2.15e-94) (not (<= t 8.6e-86)))
(/
2.0
(*
(+ 1.0 (+ 1.0 (pow (/ k t) 2.0)))
(* (tan k) (* (sin k) (pow (/ (/ t (cbrt l)) (cbrt l)) 3.0)))))
(* (/ (/ (* 2.0 l) (pow k 2.0)) t) (/ (/ l (sin k)) (tan k)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -2.15e-94) || !(t <= 8.6e-86)) {
tmp = 2.0 / ((1.0 + (1.0 + pow((k / t), 2.0))) * (tan(k) * (sin(k) * pow(((t / cbrt(l)) / cbrt(l)), 3.0))));
} else {
tmp = (((2.0 * l) / pow(k, 2.0)) / t) * ((l / sin(k)) / tan(k));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -2.15e-94) || !(t <= 8.6e-86)) {
tmp = 2.0 / ((1.0 + (1.0 + Math.pow((k / t), 2.0))) * (Math.tan(k) * (Math.sin(k) * Math.pow(((t / Math.cbrt(l)) / Math.cbrt(l)), 3.0))));
} else {
tmp = (((2.0 * l) / Math.pow(k, 2.0)) / t) * ((l / Math.sin(k)) / Math.tan(k));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if ((t <= -2.15e-94) || !(t <= 8.6e-86)) tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(1.0 + (Float64(k / t) ^ 2.0))) * Float64(tan(k) * Float64(sin(k) * (Float64(Float64(t / cbrt(l)) / cbrt(l)) ^ 3.0))))); else tmp = Float64(Float64(Float64(Float64(2.0 * l) / (k ^ 2.0)) / t) * Float64(Float64(l / sin(k)) / tan(k))); end return tmp end
code[t_, l_, k_] := If[Or[LessEqual[t, -2.15e-94], N[Not[LessEqual[t, 8.6e-86]], $MachinePrecision]], N[(2.0 / N[(N[(1.0 + N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[(t / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{-94} \lor \neg \left(t \leq 8.6 \cdot 10^{-86}\right):\\
\;\;\;\;\frac{2}{\left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{k}^{2}}}{t} \cdot \frac{\frac{\ell}{\sin k}}{\tan k}\\
\end{array}
\end{array}
if t < -2.1499999999999999e-94 or 8.60000000000000026e-86 < t Initial program 70.3%
associate-/r*75.1%
add-cube-cbrt75.0%
*-un-lft-identity75.0%
times-frac75.0%
pow275.0%
cbrt-div75.0%
rem-cbrt-cube75.1%
cbrt-div75.0%
rem-cbrt-cube87.0%
Applied egg-rr87.0%
add-cube-cbrt87.0%
pow387.0%
frac-times82.3%
unpow282.3%
*-un-lft-identity82.3%
cbrt-div82.2%
add-cbrt-cube89.3%
Applied egg-rr89.3%
if -2.1499999999999999e-94 < t < 8.60000000000000026e-86Initial program 36.4%
Simplified37.3%
associate-*r*43.6%
*-un-lft-identity43.6%
times-frac43.6%
Applied egg-rr43.6%
/-rgt-identity43.6%
associate-*r/43.6%
times-frac43.6%
*-commutative43.6%
associate-/r*43.6%
Simplified43.6%
Taylor expanded in t around 0 87.4%
associate-*r/87.4%
*-commutative87.4%
associate-/r*87.8%
*-commutative87.8%
Simplified87.8%
Final simplification88.7%
(FPCore (t l k)
:precision binary64
(if (or (<= t -2.5e-94) (not (<= t 2.25e-85)))
(/
(/ 2.0 (* (tan k) (* (sin k) (pow (/ t (pow (cbrt l) 2.0)) 3.0))))
(+ 2.0 (pow (/ k t) 2.0)))
(* (/ (/ (* 2.0 l) (pow k 2.0)) t) (/ (/ l (sin k)) (tan k)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -2.5e-94) || !(t <= 2.25e-85)) {
tmp = (2.0 / (tan(k) * (sin(k) * pow((t / pow(cbrt(l), 2.0)), 3.0)))) / (2.0 + pow((k / t), 2.0));
} else {
tmp = (((2.0 * l) / pow(k, 2.0)) / t) * ((l / sin(k)) / tan(k));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -2.5e-94) || !(t <= 2.25e-85)) {
tmp = (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow((t / Math.pow(Math.cbrt(l), 2.0)), 3.0)))) / (2.0 + Math.pow((k / t), 2.0));
} else {
tmp = (((2.0 * l) / Math.pow(k, 2.0)) / t) * ((l / Math.sin(k)) / Math.tan(k));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if ((t <= -2.5e-94) || !(t <= 2.25e-85)) tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (Float64(t / (cbrt(l) ^ 2.0)) ^ 3.0)))) / Float64(2.0 + (Float64(k / t) ^ 2.0))); else tmp = Float64(Float64(Float64(Float64(2.0 * l) / (k ^ 2.0)) / t) * Float64(Float64(l / sin(k)) / tan(k))); end return tmp end
code[t_, l_, k_] := If[Or[LessEqual[t, -2.5e-94], N[Not[LessEqual[t, 2.25e-85]], $MachinePrecision]], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{-94} \lor \neg \left(t \leq 2.25 \cdot 10^{-85}\right):\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(\sin k \cdot {\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}\right)}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{k}^{2}}}{t} \cdot \frac{\frac{\ell}{\sin k}}{\tan k}\\
\end{array}
\end{array}
if t < -2.4999999999999998e-94 or 2.25000000000000002e-85 < t Initial program 70.3%
Simplified75.1%
add-cube-cbrt75.0%
pow375.0%
cbrt-div75.0%
rem-cbrt-cube82.3%
Applied egg-rr82.3%
add-cube-cbrt82.3%
pow382.3%
cbrt-div82.2%
unpow382.2%
add-cbrt-cube89.3%
associate-/l/89.2%
pow289.2%
Applied egg-rr89.2%
if -2.4999999999999998e-94 < t < 2.25000000000000002e-85Initial program 36.4%
Simplified37.3%
associate-*r*43.6%
*-un-lft-identity43.6%
times-frac43.6%
Applied egg-rr43.6%
/-rgt-identity43.6%
associate-*r/43.6%
times-frac43.6%
*-commutative43.6%
associate-/r*43.6%
Simplified43.6%
Taylor expanded in t around 0 87.4%
associate-*r/87.4%
*-commutative87.4%
associate-/r*87.8%
*-commutative87.8%
Simplified87.8%
Final simplification88.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ t (cbrt l))))
(if (<= t -2.5e-94)
(/
2.0
(*
(* (tan k) (* (sin k) (* (pow t_1 2.0) (/ t_1 l))))
(+ 1.0 (+ 1.0 (* (/ k t) (/ k t))))))
(if (<= t 2.2e-85)
(* (/ (/ (* 2.0 l) (pow k 2.0)) t) (/ (/ l (sin k)) (tan k)))
(/
2.0
(*
(+ 1.0 (+ 1.0 (pow (/ k t) 2.0)))
(* (tan k) (* (sin k) (pow (/ (pow t 1.5) l) 2.0)))))))))
double code(double t, double l, double k) {
double t_1 = t / cbrt(l);
double tmp;
if (t <= -2.5e-94) {
tmp = 2.0 / ((tan(k) * (sin(k) * (pow(t_1, 2.0) * (t_1 / l)))) * (1.0 + (1.0 + ((k / t) * (k / t)))));
} else if (t <= 2.2e-85) {
tmp = (((2.0 * l) / pow(k, 2.0)) / t) * ((l / sin(k)) / tan(k));
} else {
tmp = 2.0 / ((1.0 + (1.0 + pow((k / t), 2.0))) * (tan(k) * (sin(k) * pow((pow(t, 1.5) / l), 2.0))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = t / Math.cbrt(l);
double tmp;
if (t <= -2.5e-94) {
tmp = 2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t_1, 2.0) * (t_1 / l)))) * (1.0 + (1.0 + ((k / t) * (k / t)))));
} else if (t <= 2.2e-85) {
tmp = (((2.0 * l) / Math.pow(k, 2.0)) / t) * ((l / Math.sin(k)) / Math.tan(k));
} else {
tmp = 2.0 / ((1.0 + (1.0 + Math.pow((k / t), 2.0))) * (Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t, 1.5) / l), 2.0))));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(t / cbrt(l)) tmp = 0.0 if (t <= -2.5e-94) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_1 ^ 2.0) * Float64(t_1 / l)))) * Float64(1.0 + Float64(1.0 + Float64(Float64(k / t) * Float64(k / t)))))); elseif (t <= 2.2e-85) tmp = Float64(Float64(Float64(Float64(2.0 * l) / (k ^ 2.0)) / t) * Float64(Float64(l / sin(k)) / tan(k))); else tmp = Float64(2.0 / Float64(Float64(1.0 + Float64(1.0 + (Float64(k / t) ^ 2.0))) * Float64(tan(k) * Float64(sin(k) * (Float64((t ^ 1.5) / l) ^ 2.0))))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(t / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e-94], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$1, 2.0], $MachinePrecision] * N[(t$95$1 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-85], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(1.0 + N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\sqrt[3]{\ell}}\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \left({t_1}^{2} \cdot \frac{t_1}{\ell}\right)\right)\right) \cdot \left(1 + \left(1 + \frac{k}{t} \cdot \frac{k}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{k}^{2}}}{t} \cdot \frac{\frac{\ell}{\sin k}}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
if t < -2.4999999999999998e-94Initial program 69.9%
associate-/r*74.3%
add-cube-cbrt74.3%
*-un-lft-identity74.3%
times-frac74.2%
pow274.2%
cbrt-div74.3%
rem-cbrt-cube74.4%
cbrt-div74.3%
rem-cbrt-cube84.9%
Applied egg-rr84.9%
unpow284.9%
Applied egg-rr84.9%
if -2.4999999999999998e-94 < t < 2.2e-85Initial program 36.4%
Simplified37.3%
associate-*r*43.6%
*-un-lft-identity43.6%
times-frac43.6%
Applied egg-rr43.6%
/-rgt-identity43.6%
associate-*r/43.6%
times-frac43.6%
*-commutative43.6%
associate-/r*43.6%
Simplified43.6%
Taylor expanded in t around 0 87.4%
associate-*r/87.4%
*-commutative87.4%
associate-/r*87.8%
*-commutative87.8%
Simplified87.8%
if 2.2e-85 < t Initial program 70.7%
add-sqr-sqrt70.6%
pow270.6%
sqrt-div70.7%
sqrt-pow179.7%
metadata-eval79.7%
sqrt-prod50.6%
add-sqr-sqrt89.0%
Applied egg-rr89.0%
Final simplification87.4%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ (/ l (sin k)) (tan k))))
(if (<= t -2.5e-94)
(* t_1 (/ (* l (/ 2.0 (pow t 3.0))) (+ 2.0 (pow (/ k t) 2.0))))
(if (<= t 5.8e-82)
(* (/ (/ (* 2.0 l) (pow k 2.0)) t) t_1)
(/
2.0
(pow
(* (* k (/ (pow t 1.5) l)) (hypot 1.0 (hypot 1.0 (/ k t))))
2.0))))))
double code(double t, double l, double k) {
double t_1 = (l / sin(k)) / tan(k);
double tmp;
if (t <= -2.5e-94) {
tmp = t_1 * ((l * (2.0 / pow(t, 3.0))) / (2.0 + pow((k / t), 2.0)));
} else if (t <= 5.8e-82) {
tmp = (((2.0 * l) / pow(k, 2.0)) / t) * t_1;
} else {
tmp = 2.0 / pow(((k * (pow(t, 1.5) / l)) * hypot(1.0, hypot(1.0, (k / t)))), 2.0);
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = (l / Math.sin(k)) / Math.tan(k);
double tmp;
if (t <= -2.5e-94) {
tmp = t_1 * ((l * (2.0 / Math.pow(t, 3.0))) / (2.0 + Math.pow((k / t), 2.0)));
} else if (t <= 5.8e-82) {
tmp = (((2.0 * l) / Math.pow(k, 2.0)) / t) * t_1;
} else {
tmp = 2.0 / Math.pow(((k * (Math.pow(t, 1.5) / l)) * Math.hypot(1.0, Math.hypot(1.0, (k / t)))), 2.0);
}
return tmp;
}
def code(t, l, k): t_1 = (l / math.sin(k)) / math.tan(k) tmp = 0 if t <= -2.5e-94: tmp = t_1 * ((l * (2.0 / math.pow(t, 3.0))) / (2.0 + math.pow((k / t), 2.0))) elif t <= 5.8e-82: tmp = (((2.0 * l) / math.pow(k, 2.0)) / t) * t_1 else: tmp = 2.0 / math.pow(((k * (math.pow(t, 1.5) / l)) * math.hypot(1.0, math.hypot(1.0, (k / t)))), 2.0) return tmp
function code(t, l, k) t_1 = Float64(Float64(l / sin(k)) / tan(k)) tmp = 0.0 if (t <= -2.5e-94) tmp = Float64(t_1 * Float64(Float64(l * Float64(2.0 / (t ^ 3.0))) / Float64(2.0 + (Float64(k / t) ^ 2.0)))); elseif (t <= 5.8e-82) tmp = Float64(Float64(Float64(Float64(2.0 * l) / (k ^ 2.0)) / t) * t_1); else tmp = Float64(2.0 / (Float64(Float64(k * Float64((t ^ 1.5) / l)) * hypot(1.0, hypot(1.0, Float64(k / t)))) ^ 2.0)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (l / sin(k)) / tan(k); tmp = 0.0; if (t <= -2.5e-94) tmp = t_1 * ((l * (2.0 / (t ^ 3.0))) / (2.0 + ((k / t) ^ 2.0))); elseif (t <= 5.8e-82) tmp = (((2.0 * l) / (k ^ 2.0)) / t) * t_1; else tmp = 2.0 / (((k * ((t ^ 1.5) / l)) * hypot(1.0, hypot(1.0, (k / t)))) ^ 2.0); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.5e-94], N[(t$95$1 * N[(N[(l * N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e-82], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * t$95$1), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{\ell}{\sin k}}{\tan k}\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{-94}:\\
\;\;\;\;t_1 \cdot \frac{\ell \cdot \frac{2}{{t}^{3}}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-82}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{k}^{2}}}{t} \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{{t}^{1.5}}{\ell}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < -2.4999999999999998e-94Initial program 69.9%
Simplified62.9%
associate-*r*66.5%
*-un-lft-identity66.5%
times-frac67.7%
Applied egg-rr67.7%
/-rgt-identity67.7%
associate-*r/66.5%
times-frac67.7%
*-commutative67.7%
associate-/r*73.9%
Simplified73.9%
if -2.4999999999999998e-94 < t < 5.79999999999999954e-82Initial program 37.7%
Simplified38.5%
associate-*r*44.7%
*-un-lft-identity44.7%
times-frac44.7%
Applied egg-rr44.7%
/-rgt-identity44.7%
associate-*r/44.7%
times-frac44.8%
*-commutative44.8%
associate-/r*44.8%
Simplified44.8%
Taylor expanded in t around 0 87.6%
associate-*r/87.6%
*-commutative87.6%
associate-/r*88.1%
*-commutative88.1%
Simplified88.1%
if 5.79999999999999954e-82 < t Initial program 70.0%
add-sqr-sqrt57.0%
pow257.0%
Applied egg-rr65.8%
Taylor expanded in k around 0 80.8%
Final simplification81.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ (/ l (sin k)) (tan k))))
(if (<= t -3.75e+18)
(* t_1 (/ l (pow t 3.0)))
(if (<= t 7.8e-82)
(* (/ (/ (* 2.0 l) (pow k 2.0)) t) t_1)
(/
2.0
(pow
(* (* k (/ (pow t 1.5) l)) (hypot 1.0 (hypot 1.0 (/ k t))))
2.0))))))
double code(double t, double l, double k) {
double t_1 = (l / sin(k)) / tan(k);
double tmp;
if (t <= -3.75e+18) {
tmp = t_1 * (l / pow(t, 3.0));
} else if (t <= 7.8e-82) {
tmp = (((2.0 * l) / pow(k, 2.0)) / t) * t_1;
} else {
tmp = 2.0 / pow(((k * (pow(t, 1.5) / l)) * hypot(1.0, hypot(1.0, (k / t)))), 2.0);
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = (l / Math.sin(k)) / Math.tan(k);
double tmp;
if (t <= -3.75e+18) {
tmp = t_1 * (l / Math.pow(t, 3.0));
} else if (t <= 7.8e-82) {
tmp = (((2.0 * l) / Math.pow(k, 2.0)) / t) * t_1;
} else {
tmp = 2.0 / Math.pow(((k * (Math.pow(t, 1.5) / l)) * Math.hypot(1.0, Math.hypot(1.0, (k / t)))), 2.0);
}
return tmp;
}
def code(t, l, k): t_1 = (l / math.sin(k)) / math.tan(k) tmp = 0 if t <= -3.75e+18: tmp = t_1 * (l / math.pow(t, 3.0)) elif t <= 7.8e-82: tmp = (((2.0 * l) / math.pow(k, 2.0)) / t) * t_1 else: tmp = 2.0 / math.pow(((k * (math.pow(t, 1.5) / l)) * math.hypot(1.0, math.hypot(1.0, (k / t)))), 2.0) return tmp
function code(t, l, k) t_1 = Float64(Float64(l / sin(k)) / tan(k)) tmp = 0.0 if (t <= -3.75e+18) tmp = Float64(t_1 * Float64(l / (t ^ 3.0))); elseif (t <= 7.8e-82) tmp = Float64(Float64(Float64(Float64(2.0 * l) / (k ^ 2.0)) / t) * t_1); else tmp = Float64(2.0 / (Float64(Float64(k * Float64((t ^ 1.5) / l)) * hypot(1.0, hypot(1.0, Float64(k / t)))) ^ 2.0)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (l / sin(k)) / tan(k); tmp = 0.0; if (t <= -3.75e+18) tmp = t_1 * (l / (t ^ 3.0)); elseif (t <= 7.8e-82) tmp = (((2.0 * l) / (k ^ 2.0)) / t) * t_1; else tmp = 2.0 / (((k * ((t ^ 1.5) / l)) * hypot(1.0, hypot(1.0, (k / t)))) ^ 2.0); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.75e+18], N[(t$95$1 * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-82], N[(N[(N[(N[(2.0 * l), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * t$95$1), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{\ell}{\sin k}}{\tan k}\\
\mathbf{if}\;t \leq -3.75 \cdot 10^{+18}:\\
\;\;\;\;t_1 \cdot \frac{\ell}{{t}^{3}}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-82}:\\
\;\;\;\;\frac{\frac{2 \cdot \ell}{{k}^{2}}}{t} \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{{t}^{1.5}}{\ell}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < -3.75e18Initial program 70.8%
Simplified62.0%
associate-*r*65.7%
*-un-lft-identity65.7%
times-frac67.1%
Applied egg-rr67.1%
/-rgt-identity67.1%
associate-*r/65.7%
times-frac67.1%
*-commutative67.1%
associate-/r*74.1%
Simplified74.1%
Taylor expanded in t around inf 70.8%
if -3.75e18 < t < 7.79999999999999947e-82Initial program 41.5%
Simplified42.2%
associate-*r*48.0%
*-un-lft-identity48.0%
times-frac48.0%
Applied egg-rr48.0%
/-rgt-identity48.0%
associate-*r/48.0%
times-frac48.0%
*-commutative48.0%
associate-/r*48.5%
Simplified48.5%
Taylor expanded in t around 0 84.2%
associate-*r/84.2%
*-commutative84.2%
associate-/r*84.5%
*-commutative84.5%
Simplified84.5%
if 7.79999999999999947e-82 < t Initial program 70.0%
add-sqr-sqrt57.0%
pow257.0%
Applied egg-rr65.8%
Taylor expanded in k around 0 80.8%
Final simplification80.2%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ (/ l (sin k)) (tan k))))
(if (or (<= k 9.6e-231) (not (<= k 2.5e-49)))
(* t_1 (* 2.0 (/ l (* t (pow k 2.0)))))
(* t_1 (/ l (pow t 3.0))))))
double code(double t, double l, double k) {
double t_1 = (l / sin(k)) / tan(k);
double tmp;
if ((k <= 9.6e-231) || !(k <= 2.5e-49)) {
tmp = t_1 * (2.0 * (l / (t * pow(k, 2.0))));
} else {
tmp = t_1 * (l / pow(t, 3.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (l / sin(k)) / tan(k)
if ((k <= 9.6d-231) .or. (.not. (k <= 2.5d-49))) then
tmp = t_1 * (2.0d0 * (l / (t * (k ** 2.0d0))))
else
tmp = t_1 * (l / (t ** 3.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (l / Math.sin(k)) / Math.tan(k);
double tmp;
if ((k <= 9.6e-231) || !(k <= 2.5e-49)) {
tmp = t_1 * (2.0 * (l / (t * Math.pow(k, 2.0))));
} else {
tmp = t_1 * (l / Math.pow(t, 3.0));
}
return tmp;
}
def code(t, l, k): t_1 = (l / math.sin(k)) / math.tan(k) tmp = 0 if (k <= 9.6e-231) or not (k <= 2.5e-49): tmp = t_1 * (2.0 * (l / (t * math.pow(k, 2.0)))) else: tmp = t_1 * (l / math.pow(t, 3.0)) return tmp
function code(t, l, k) t_1 = Float64(Float64(l / sin(k)) / tan(k)) tmp = 0.0 if ((k <= 9.6e-231) || !(k <= 2.5e-49)) tmp = Float64(t_1 * Float64(2.0 * Float64(l / Float64(t * (k ^ 2.0))))); else tmp = Float64(t_1 * Float64(l / (t ^ 3.0))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (l / sin(k)) / tan(k); tmp = 0.0; if ((k <= 9.6e-231) || ~((k <= 2.5e-49))) tmp = t_1 * (2.0 * (l / (t * (k ^ 2.0)))); else tmp = t_1 * (l / (t ^ 3.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[k, 9.6e-231], N[Not[LessEqual[k, 2.5e-49]], $MachinePrecision]], N[(t$95$1 * N[(2.0 * N[(l / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{\ell}{\sin k}}{\tan k}\\
\mathbf{if}\;k \leq 9.6 \cdot 10^{-231} \lor \neg \left(k \leq 2.5 \cdot 10^{-49}\right):\\
\;\;\;\;t_1 \cdot \left(2 \cdot \frac{\ell}{t \cdot {k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \frac{\ell}{{t}^{3}}\\
\end{array}
\end{array}
if k < 9.59999999999999967e-231 or 2.4999999999999999e-49 < k Initial program 55.4%
Simplified52.1%
associate-*r*56.5%
*-un-lft-identity56.5%
times-frac57.4%
Applied egg-rr57.4%
/-rgt-identity57.4%
associate-*r/56.5%
times-frac57.4%
*-commutative57.4%
associate-/r*59.7%
Simplified59.7%
Taylor expanded in t around 0 72.6%
if 9.59999999999999967e-231 < k < 2.4999999999999999e-49Initial program 69.4%
Simplified58.7%
associate-*r*65.2%
*-un-lft-identity65.2%
times-frac64.9%
Applied egg-rr64.9%
/-rgt-identity64.9%
associate-*r/65.2%
times-frac64.9%
*-commutative64.9%
associate-/r*76.9%
Simplified76.9%
Taylor expanded in t around inf 79.4%
Final simplification73.6%
(FPCore (t l k) :precision binary64 (if (<= k 2.95e+122) (* (/ (/ l (sin k)) (tan k)) (/ l (pow t 3.0))) (* 2.0 (/ (* (pow k -4.0) (pow l 2.0)) t))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.95e+122) {
tmp = ((l / sin(k)) / tan(k)) * (l / pow(t, 3.0));
} else {
tmp = 2.0 * ((pow(k, -4.0) * pow(l, 2.0)) / t);
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.95d+122) then
tmp = ((l / sin(k)) / tan(k)) * (l / (t ** 3.0d0))
else
tmp = 2.0d0 * (((k ** (-4.0d0)) * (l ** 2.0d0)) / t)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.95e+122) {
tmp = ((l / Math.sin(k)) / Math.tan(k)) * (l / Math.pow(t, 3.0));
} else {
tmp = 2.0 * ((Math.pow(k, -4.0) * Math.pow(l, 2.0)) / t);
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.95e+122: tmp = ((l / math.sin(k)) / math.tan(k)) * (l / math.pow(t, 3.0)) else: tmp = 2.0 * ((math.pow(k, -4.0) * math.pow(l, 2.0)) / t) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.95e+122) tmp = Float64(Float64(Float64(l / sin(k)) / tan(k)) * Float64(l / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64((k ^ -4.0) * (l ^ 2.0)) / t)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.95e+122) tmp = ((l / sin(k)) / tan(k)) * (l / (t ^ 3.0)); else tmp = 2.0 * (((k ^ -4.0) * (l ^ 2.0)) / t); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.95e+122], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[k, -4.0], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.95 \cdot 10^{+122}:\\
\;\;\;\;\frac{\frac{\ell}{\sin k}}{\tan k} \cdot \frac{\ell}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{k}^{-4} \cdot {\ell}^{2}}{t}\\
\end{array}
\end{array}
if k < 2.95000000000000016e122Initial program 59.9%
Simplified54.8%
associate-*r*59.9%
*-un-lft-identity59.9%
times-frac60.2%
Applied egg-rr60.2%
/-rgt-identity60.2%
associate-*r/59.9%
times-frac60.2%
*-commutative60.2%
associate-/r*64.6%
Simplified64.6%
Taylor expanded in t around inf 63.1%
if 2.95000000000000016e122 < k Initial program 43.8%
add-sqr-sqrt28.4%
pow228.4%
Applied egg-rr28.1%
Taylor expanded in k around inf 51.1%
*-commutative51.1%
associate-/l*51.0%
associate-*r/48.6%
Simplified48.6%
Taylor expanded in k around 0 62.5%
*-commutative62.5%
associate-/r*61.9%
Simplified61.9%
expm1-log1p-u61.9%
expm1-udef61.9%
div-inv61.9%
pow-flip61.9%
metadata-eval61.9%
Applied egg-rr61.9%
expm1-def61.9%
expm1-log1p61.9%
*-commutative61.9%
associate-*r/62.5%
Simplified62.5%
Final simplification63.0%
(FPCore (t l k) :precision binary64 (if (or (<= k 1.7e-171) (not (<= k 1.65e-50))) (* 2.0 (/ (* (pow k -4.0) (pow l 2.0)) t)) (/ (* (* l l) (* 2.0 (pow t -3.0))) (* 2.0 (pow k 2.0)))))
double code(double t, double l, double k) {
double tmp;
if ((k <= 1.7e-171) || !(k <= 1.65e-50)) {
tmp = 2.0 * ((pow(k, -4.0) * pow(l, 2.0)) / t);
} else {
tmp = ((l * l) * (2.0 * pow(t, -3.0))) / (2.0 * pow(k, 2.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= 1.7d-171) .or. (.not. (k <= 1.65d-50))) then
tmp = 2.0d0 * (((k ** (-4.0d0)) * (l ** 2.0d0)) / t)
else
tmp = ((l * l) * (2.0d0 * (t ** (-3.0d0)))) / (2.0d0 * (k ** 2.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((k <= 1.7e-171) || !(k <= 1.65e-50)) {
tmp = 2.0 * ((Math.pow(k, -4.0) * Math.pow(l, 2.0)) / t);
} else {
tmp = ((l * l) * (2.0 * Math.pow(t, -3.0))) / (2.0 * Math.pow(k, 2.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (k <= 1.7e-171) or not (k <= 1.65e-50): tmp = 2.0 * ((math.pow(k, -4.0) * math.pow(l, 2.0)) / t) else: tmp = ((l * l) * (2.0 * math.pow(t, -3.0))) / (2.0 * math.pow(k, 2.0)) return tmp
function code(t, l, k) tmp = 0.0 if ((k <= 1.7e-171) || !(k <= 1.65e-50)) tmp = Float64(2.0 * Float64(Float64((k ^ -4.0) * (l ^ 2.0)) / t)); else tmp = Float64(Float64(Float64(l * l) * Float64(2.0 * (t ^ -3.0))) / Float64(2.0 * (k ^ 2.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((k <= 1.7e-171) || ~((k <= 1.65e-50))) tmp = 2.0 * (((k ^ -4.0) * (l ^ 2.0)) / t); else tmp = ((l * l) * (2.0 * (t ^ -3.0))) / (2.0 * (k ^ 2.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[k, 1.7e-171], N[Not[LessEqual[k, 1.65e-50]], $MachinePrecision]], N[(2.0 * N[(N[(N[Power[k, -4.0], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.7 \cdot 10^{-171} \lor \neg \left(k \leq 1.65 \cdot 10^{-50}\right):\\
\;\;\;\;2 \cdot \frac{{k}^{-4} \cdot {\ell}^{2}}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot \left(2 \cdot {t}^{-3}\right)}{2 \cdot {k}^{2}}\\
\end{array}
\end{array}
if k < 1.69999999999999993e-171 or 1.6499999999999999e-50 < k Initial program 56.5%
add-sqr-sqrt27.9%
pow227.9%
Applied egg-rr27.2%
Taylor expanded in k around inf 37.2%
*-commutative37.2%
associate-/l*37.2%
associate-*r/36.8%
Simplified36.8%
Taylor expanded in k around 0 55.3%
*-commutative55.3%
associate-/r*56.2%
Simplified56.2%
expm1-log1p-u43.7%
expm1-udef44.9%
div-inv44.5%
pow-flip44.5%
metadata-eval44.5%
Applied egg-rr44.5%
expm1-def43.2%
expm1-log1p55.8%
*-commutative55.8%
associate-*r/56.0%
Simplified56.0%
if 1.69999999999999993e-171 < k < 1.6499999999999999e-50Initial program 65.4%
Simplified61.7%
Taylor expanded in k around 0 65.3%
div-inv65.3%
pow-flip68.9%
metadata-eval68.9%
Applied egg-rr68.9%
Final simplification57.4%
(FPCore (t l k) :precision binary64 (* 2.0 (/ (* (pow k -4.0) (pow l 2.0)) t)))
double code(double t, double l, double k) {
return 2.0 * ((pow(k, -4.0) * pow(l, 2.0)) / t);
}
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 * (((k ** (-4.0d0)) * (l ** 2.0d0)) / t)
end function
public static double code(double t, double l, double k) {
return 2.0 * ((Math.pow(k, -4.0) * Math.pow(l, 2.0)) / t);
}
def code(t, l, k): return 2.0 * ((math.pow(k, -4.0) * math.pow(l, 2.0)) / t)
function code(t, l, k) return Float64(2.0 * Float64(Float64((k ^ -4.0) * (l ^ 2.0)) / t)) end
function tmp = code(t, l, k) tmp = 2.0 * (((k ^ -4.0) * (l ^ 2.0)) / t); end
code[t_, l_, k_] := N[(2.0 * N[(N[(N[Power[k, -4.0], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{{k}^{-4} \cdot {\ell}^{2}}{t}
\end{array}
Initial program 57.5%
add-sqr-sqrt29.2%
pow229.2%
Applied egg-rr30.0%
Taylor expanded in k around inf 37.2%
*-commutative37.2%
associate-/l*37.2%
associate-*r/36.8%
Simplified36.8%
Taylor expanded in k around 0 54.8%
*-commutative54.8%
associate-/r*56.1%
Simplified56.1%
expm1-log1p-u43.3%
expm1-udef44.8%
div-inv44.4%
pow-flip44.4%
metadata-eval44.4%
Applied egg-rr44.4%
expm1-def42.9%
expm1-log1p55.7%
*-commutative55.7%
associate-*r/55.5%
Simplified55.5%
Final simplification55.5%
(FPCore (t l k) :precision binary64 (* 2.0 (/ (/ (pow l 2.0) t) (pow k 4.0))))
double code(double t, double l, double k) {
return 2.0 * ((pow(l, 2.0) / t) / pow(k, 4.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 * (((l ** 2.0d0) / t) / (k ** 4.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 * ((Math.pow(l, 2.0) / t) / Math.pow(k, 4.0));
}
def code(t, l, k): return 2.0 * ((math.pow(l, 2.0) / t) / math.pow(k, 4.0))
function code(t, l, k) return Float64(2.0 * Float64(Float64((l ^ 2.0) / t) / (k ^ 4.0))) end
function tmp = code(t, l, k) tmp = 2.0 * (((l ^ 2.0) / t) / (k ^ 4.0)); end
code[t_, l_, k_] := N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}
\end{array}
Initial program 57.5%
add-sqr-sqrt29.2%
pow229.2%
Applied egg-rr30.0%
Taylor expanded in k around inf 37.2%
*-commutative37.2%
associate-/l*37.2%
associate-*r/36.8%
Simplified36.8%
Taylor expanded in k around 0 54.8%
*-commutative54.8%
associate-/r*56.1%
Simplified56.1%
Final simplification56.1%
herbie shell --seed 2023309
(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))))