
(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 12 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
(if (or (<= t -3.5e-26) (not (<= t 1.22e-14)))
(*
l
(*
l
(/
2.0
(* (+ 2.0 (pow (/ k t) 2.0)) (* (tan k) (* (pow t 3.0) (sin k)))))))
(* l (* l (/ (/ 2.0 (* (sin k) (* k (* t k)))) (tan k))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -3.5e-26) || !(t <= 1.22e-14)) {
tmp = l * (l * (2.0 / ((2.0 + pow((k / t), 2.0)) * (tan(k) * (pow(t, 3.0) * sin(k))))));
} else {
tmp = l * (l * ((2.0 / (sin(k) * (k * (t * 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) :: tmp
if ((t <= (-3.5d-26)) .or. (.not. (t <= 1.22d-14))) then
tmp = l * (l * (2.0d0 / ((2.0d0 + ((k / t) ** 2.0d0)) * (tan(k) * ((t ** 3.0d0) * sin(k))))))
else
tmp = l * (l * ((2.0d0 / (sin(k) * (k * (t * k)))) / tan(k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -3.5e-26) || !(t <= 1.22e-14)) {
tmp = l * (l * (2.0 / ((2.0 + Math.pow((k / t), 2.0)) * (Math.tan(k) * (Math.pow(t, 3.0) * Math.sin(k))))));
} else {
tmp = l * (l * ((2.0 / (Math.sin(k) * (k * (t * k)))) / Math.tan(k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -3.5e-26) or not (t <= 1.22e-14): tmp = l * (l * (2.0 / ((2.0 + math.pow((k / t), 2.0)) * (math.tan(k) * (math.pow(t, 3.0) * math.sin(k)))))) else: tmp = l * (l * ((2.0 / (math.sin(k) * (k * (t * k)))) / math.tan(k))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -3.5e-26) || !(t <= 1.22e-14)) tmp = Float64(l * Float64(l * Float64(2.0 / Float64(Float64(2.0 + (Float64(k / t) ^ 2.0)) * Float64(tan(k) * Float64((t ^ 3.0) * sin(k))))))); else tmp = Float64(l * Float64(l * Float64(Float64(2.0 / Float64(sin(k) * Float64(k * Float64(t * k)))) / tan(k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -3.5e-26) || ~((t <= 1.22e-14))) tmp = l * (l * (2.0 / ((2.0 + ((k / t) ^ 2.0)) * (tan(k) * ((t ^ 3.0) * sin(k)))))); else tmp = l * (l * ((2.0 / (sin(k) * (k * (t * k)))) / tan(k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -3.5e-26], N[Not[LessEqual[t, 1.22e-14]], $MachinePrecision]], N[(l * N[(l * N[(2.0 / N[(N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l * N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-26} \lor \neg \left(t \leq 1.22 \cdot 10^{-14}\right):\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{2}{\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\tan k \cdot \left({t}^{3} \cdot \sin k\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{\frac{2}{\sin k \cdot \left(k \cdot \left(t \cdot k\right)\right)}}{\tan k}\right)\\
\end{array}
\end{array}
if t < -3.49999999999999985e-26 or 1.21999999999999994e-14 < t Initial program 70.8%
associate-/l/70.8%
associate-*l/71.5%
associate-*l/70.8%
associate-/r/70.2%
*-commutative70.2%
associate-/l/70.2%
associate-*r*70.1%
*-commutative70.1%
associate-*r*70.1%
*-commutative70.1%
Simplified70.1%
expm1-log1p-u64.4%
expm1-udef59.0%
associate-*l*62.6%
associate-*r*62.6%
*-commutative62.6%
Applied egg-rr62.6%
expm1-def68.9%
expm1-log1p75.4%
associate-*l*75.4%
Simplified75.4%
if -3.49999999999999985e-26 < t < 1.21999999999999994e-14Initial program 43.9%
associate-/l/43.9%
associate-*l/43.9%
associate-*l/43.1%
associate-/r/43.1%
*-commutative43.1%
associate-/l/43.1%
associate-*r*43.1%
*-commutative43.1%
associate-*r*43.1%
*-commutative43.1%
Simplified43.1%
Taylor expanded in k around inf 79.3%
unpow279.3%
associate-*l*85.9%
*-commutative85.9%
Simplified85.9%
expm1-log1p-u62.3%
expm1-udef51.1%
associate-*r*51.1%
Applied egg-rr51.1%
expm1-def62.3%
expm1-log1p85.9%
associate-*l*94.9%
*-commutative94.9%
associate-/r*94.8%
associate-*r*94.8%
associate-*r*85.1%
unpow285.1%
*-commutative85.1%
unpow285.1%
associate-*r*94.8%
Simplified94.8%
Final simplification84.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ 1.0 (+ 1.0 t_1)))
INFINITY)
(* (/ 2.0 (* (sin k) (+ 2.0 t_1))) (/ (/ l (/ (pow t 3.0) l)) (tan k)))
(* l (* l (/ (/ 2.0 (* (sin k) (* k (* t k)))) (tan k)))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if (((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1))) <= ((double) INFINITY)) {
tmp = (2.0 / (sin(k) * (2.0 + t_1))) * ((l / (pow(t, 3.0) / l)) / tan(k));
} else {
tmp = l * (l * ((2.0 / (sin(k) * (k * (t * 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 (((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + t_1))) <= Double.POSITIVE_INFINITY) {
tmp = (2.0 / (Math.sin(k) * (2.0 + t_1))) * ((l / (Math.pow(t, 3.0) / l)) / Math.tan(k));
} else {
tmp = l * (l * ((2.0 / (Math.sin(k) * (k * (t * k)))) / Math.tan(k)));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow((k / t), 2.0) tmp = 0 if ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * (1.0 + (1.0 + t_1))) <= math.inf: tmp = (2.0 / (math.sin(k) * (2.0 + t_1))) * ((l / (math.pow(t, 3.0) / l)) / math.tan(k)) else: tmp = l * (l * ((2.0 / (math.sin(k) * (k * (t * k)))) / math.tan(k))) return tmp
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + t_1))) <= Inf) tmp = Float64(Float64(2.0 / Float64(sin(k) * Float64(2.0 + t_1))) * Float64(Float64(l / Float64((t ^ 3.0) / l)) / tan(k))); else tmp = Float64(l * Float64(l * Float64(Float64(2.0 / Float64(sin(k) * Float64(k * Float64(t * k)))) / tan(k)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / t) ^ 2.0; tmp = 0.0; if ((((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1))) <= Inf) tmp = (2.0 / (sin(k) * (2.0 + t_1))) * ((l / ((t ^ 3.0) / l)) / tan(k)); else tmp = l * (l * ((2.0 / (sin(k) * (k * (t * 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[(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[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l * N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + t_1\right)\right) \leq \infty:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(2 + t_1\right)} \cdot \frac{\frac{\ell}{\frac{{t}^{3}}{\ell}}}{\tan k}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{\frac{2}{\sin k \cdot \left(k \cdot \left(t \cdot k\right)\right)}}{\tan k}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < +inf.0Initial program 85.1%
associate-*l*85.1%
associate-/l/85.1%
*-commutative85.1%
associate-*r/85.7%
associate-/l*85.2%
associate-/r/77.8%
Simplified78.9%
expm1-log1p-u62.3%
expm1-udef57.1%
associate-*l/58.0%
associate-*l/58.0%
Applied egg-rr58.0%
expm1-def63.2%
expm1-log1p78.7%
associate-*r*78.7%
times-frac85.2%
associate-/l*86.8%
Simplified86.8%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) Initial program 0.0%
associate-/l/0.0%
associate-*l/0.0%
associate-*l/0.0%
associate-/r/0.1%
*-commutative0.1%
associate-/l/0.1%
associate-*r*0.1%
*-commutative0.1%
associate-*r*0.1%
*-commutative0.1%
Simplified0.1%
Taylor expanded in k around inf 51.2%
unpow251.2%
associate-*l*59.7%
*-commutative59.7%
Simplified59.7%
expm1-log1p-u48.6%
expm1-udef39.2%
associate-*r*39.2%
Applied egg-rr39.2%
expm1-def48.6%
expm1-log1p59.7%
associate-*l*77.4%
*-commutative77.4%
associate-/r*77.3%
associate-*r*77.4%
associate-*r*64.3%
unpow264.3%
*-commutative64.3%
unpow264.3%
associate-*r*77.4%
Simplified77.4%
Final simplification83.9%
(FPCore (t l k) :precision binary64 (if (or (<= k -3.3e-7) (not (<= k 4e-20))) (* l (* l (/ (/ 2.0 (* (sin k) (* k (* t k)))) (tan k)))) (/ 2.0 (* (/ (pow t 3.0) l) (* (/ k l) (+ k k))))))
double code(double t, double l, double k) {
double tmp;
if ((k <= -3.3e-7) || !(k <= 4e-20)) {
tmp = l * (l * ((2.0 / (sin(k) * (k * (t * k)))) / tan(k)));
} else {
tmp = 2.0 / ((pow(t, 3.0) / l) * ((k / l) * (k + 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) :: tmp
if ((k <= (-3.3d-7)) .or. (.not. (k <= 4d-20))) then
tmp = l * (l * ((2.0d0 / (sin(k) * (k * (t * k)))) / tan(k)))
else
tmp = 2.0d0 / (((t ** 3.0d0) / l) * ((k / l) * (k + k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((k <= -3.3e-7) || !(k <= 4e-20)) {
tmp = l * (l * ((2.0 / (Math.sin(k) * (k * (t * k)))) / Math.tan(k)));
} else {
tmp = 2.0 / ((Math.pow(t, 3.0) / l) * ((k / l) * (k + k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (k <= -3.3e-7) or not (k <= 4e-20): tmp = l * (l * ((2.0 / (math.sin(k) * (k * (t * k)))) / math.tan(k))) else: tmp = 2.0 / ((math.pow(t, 3.0) / l) * ((k / l) * (k + k))) return tmp
function code(t, l, k) tmp = 0.0 if ((k <= -3.3e-7) || !(k <= 4e-20)) tmp = Float64(l * Float64(l * Float64(Float64(2.0 / Float64(sin(k) * Float64(k * Float64(t * k)))) / tan(k)))); else tmp = Float64(2.0 / Float64(Float64((t ^ 3.0) / l) * Float64(Float64(k / l) * Float64(k + k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((k <= -3.3e-7) || ~((k <= 4e-20))) tmp = l * (l * ((2.0 / (sin(k) * (k * (t * k)))) / tan(k))); else tmp = 2.0 / (((t ^ 3.0) / l) * ((k / l) * (k + k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[k, -3.3e-7], N[Not[LessEqual[k, 4e-20]], $MachinePrecision]], N[(l * N[(l * N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(k + k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.3 \cdot 10^{-7} \lor \neg \left(k \leq 4 \cdot 10^{-20}\right):\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{\frac{2}{\sin k \cdot \left(k \cdot \left(t \cdot k\right)\right)}}{\tan k}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \left(\frac{k}{\ell} \cdot \left(k + k\right)\right)}\\
\end{array}
\end{array}
if k < -3.3000000000000002e-7 or 3.99999999999999978e-20 < k Initial program 49.2%
associate-/l/49.2%
associate-*l/49.3%
associate-*l/49.3%
associate-/r/48.7%
*-commutative48.7%
associate-/l/48.7%
associate-*r*48.6%
*-commutative48.6%
associate-*r*48.6%
*-commutative48.6%
Simplified48.6%
Taylor expanded in k around inf 73.1%
unpow273.1%
associate-*l*78.4%
*-commutative78.4%
Simplified78.4%
expm1-log1p-u71.0%
expm1-udef60.1%
associate-*r*60.1%
Applied egg-rr60.1%
expm1-def71.0%
expm1-log1p78.4%
associate-*l*86.8%
*-commutative86.8%
associate-/r*86.8%
associate-*r*86.8%
associate-*r*78.9%
unpow278.9%
*-commutative78.9%
unpow278.9%
associate-*r*86.8%
Simplified86.8%
if -3.3000000000000002e-7 < k < 3.99999999999999978e-20Initial program 70.7%
associate-*l*70.7%
+-commutative70.7%
Simplified70.7%
Taylor expanded in k around 0 63.1%
associate-*r/63.1%
associate-*r*63.1%
unpow263.1%
times-frac67.7%
*-commutative67.7%
unpow267.7%
associate-*l*67.7%
Simplified67.7%
expm1-log1p-u57.7%
expm1-udef33.4%
associate-/l*36.2%
Applied egg-rr36.2%
expm1-def63.0%
expm1-log1p79.4%
associate-/r/79.4%
*-commutative79.4%
count-279.4%
Simplified79.4%
Final simplification83.6%
(FPCore (t l k)
:precision binary64
(if (<= t -2.45e-25)
(/ 2.0 (* (/ (pow t 3.0) l) (* (/ k l) (+ k k))))
(if (<= t 3.4e-103)
(/ 2.0 (* (/ k (cos k)) (* (/ k l) (* (* k k) (/ t l)))))
(* (/ (cos k) (pow t 3.0)) (* l (/ (/ l k) k))))))
double code(double t, double l, double k) {
double tmp;
if (t <= -2.45e-25) {
tmp = 2.0 / ((pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else if (t <= 3.4e-103) {
tmp = 2.0 / ((k / cos(k)) * ((k / l) * ((k * k) * (t / l))));
} else {
tmp = (cos(k) / pow(t, 3.0)) * (l * ((l / k) / 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) :: tmp
if (t <= (-2.45d-25)) then
tmp = 2.0d0 / (((t ** 3.0d0) / l) * ((k / l) * (k + k)))
else if (t <= 3.4d-103) then
tmp = 2.0d0 / ((k / cos(k)) * ((k / l) * ((k * k) * (t / l))))
else
tmp = (cos(k) / (t ** 3.0d0)) * (l * ((l / k) / k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= -2.45e-25) {
tmp = 2.0 / ((Math.pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else if (t <= 3.4e-103) {
tmp = 2.0 / ((k / Math.cos(k)) * ((k / l) * ((k * k) * (t / l))));
} else {
tmp = (Math.cos(k) / Math.pow(t, 3.0)) * (l * ((l / k) / k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= -2.45e-25: tmp = 2.0 / ((math.pow(t, 3.0) / l) * ((k / l) * (k + k))) elif t <= 3.4e-103: tmp = 2.0 / ((k / math.cos(k)) * ((k / l) * ((k * k) * (t / l)))) else: tmp = (math.cos(k) / math.pow(t, 3.0)) * (l * ((l / k) / k)) return tmp
function code(t, l, k) tmp = 0.0 if (t <= -2.45e-25) tmp = Float64(2.0 / Float64(Float64((t ^ 3.0) / l) * Float64(Float64(k / l) * Float64(k + k)))); elseif (t <= 3.4e-103) tmp = Float64(2.0 / Float64(Float64(k / cos(k)) * Float64(Float64(k / l) * Float64(Float64(k * k) * Float64(t / l))))); else tmp = Float64(Float64(cos(k) / (t ^ 3.0)) * Float64(l * Float64(Float64(l / k) / k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -2.45e-25) tmp = 2.0 / (((t ^ 3.0) / l) * ((k / l) * (k + k))); elseif (t <= 3.4e-103) tmp = 2.0 / ((k / cos(k)) * ((k / l) * ((k * k) * (t / l)))); else tmp = (cos(k) / (t ^ 3.0)) * (l * ((l / k) / k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, -2.45e-25], N[(2.0 / N[(N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(k + k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-103], N[(2.0 / N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(l * N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.45 \cdot 10^{-25}:\\
\;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \left(\frac{k}{\ell} \cdot \left(k + k\right)\right)}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-103}:\\
\;\;\;\;\frac{2}{\frac{k}{\cos k} \cdot \left(\frac{k}{\ell} \cdot \left(\left(k \cdot k\right) \cdot \frac{t}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos k}{{t}^{3}} \cdot \left(\ell \cdot \frac{\frac{\ell}{k}}{k}\right)\\
\end{array}
\end{array}
if t < -2.44999999999999995e-25Initial program 67.1%
associate-*l*67.1%
+-commutative67.1%
Simplified67.1%
Taylor expanded in k around 0 51.5%
associate-*r/51.5%
associate-*r*51.5%
unpow251.5%
times-frac56.3%
*-commutative56.3%
unpow256.3%
associate-*l*56.3%
Simplified56.3%
expm1-log1p-u8.1%
expm1-udef0.0%
associate-/l*0.3%
Applied egg-rr0.3%
expm1-def10.6%
expm1-log1p68.0%
associate-/r/68.0%
*-commutative68.0%
count-268.0%
Simplified68.0%
if -2.44999999999999995e-25 < t < 3.40000000000000003e-103Initial program 39.8%
associate-*l*39.8%
+-commutative39.8%
Simplified39.8%
Taylor expanded in t around 0 78.9%
times-frac77.9%
unpow277.9%
*-commutative77.9%
unpow277.9%
times-frac84.6%
Simplified84.6%
Taylor expanded in k around inf 78.9%
unpow278.9%
associate-*r*78.8%
times-frac83.7%
unpow283.7%
*-commutative83.7%
associate-*l/84.6%
*-commutative84.6%
Simplified84.6%
expm1-log1p-u59.3%
expm1-udef51.9%
times-frac54.7%
Applied egg-rr54.7%
expm1-def63.2%
expm1-log1p88.7%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in k around 0 73.6%
unpow273.6%
Simplified73.6%
if 3.40000000000000003e-103 < t Initial program 74.3%
associate-/l/74.4%
associate-*l/74.2%
associate-*l/71.9%
associate-/r/70.7%
*-commutative70.7%
associate-/l/70.7%
associate-*r*70.7%
*-commutative70.7%
associate-*r*70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in t around inf 58.3%
*-commutative58.3%
times-frac59.4%
unpow259.4%
Simplified59.4%
Taylor expanded in k around 0 63.2%
unpow263.2%
associate-*r/66.4%
unpow266.4%
associate-/r*71.8%
Simplified71.8%
Final simplification71.4%
(FPCore (t l k)
:precision binary64
(if (<= t -9.6e-26)
(/ 2.0 (* (/ (pow t 3.0) l) (* (/ k l) (+ k k))))
(if (<= t 8e-68)
(/ 2.0 (* (/ k (cos k)) (* (/ k l) (* (* k k) (/ t l)))))
(* (/ (cos k) (pow t 3.0)) (/ (* l (/ l k)) k)))))
double code(double t, double l, double k) {
double tmp;
if (t <= -9.6e-26) {
tmp = 2.0 / ((pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else if (t <= 8e-68) {
tmp = 2.0 / ((k / cos(k)) * ((k / l) * ((k * k) * (t / l))));
} else {
tmp = (cos(k) / pow(t, 3.0)) * ((l * (l / k)) / 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) :: tmp
if (t <= (-9.6d-26)) then
tmp = 2.0d0 / (((t ** 3.0d0) / l) * ((k / l) * (k + k)))
else if (t <= 8d-68) then
tmp = 2.0d0 / ((k / cos(k)) * ((k / l) * ((k * k) * (t / l))))
else
tmp = (cos(k) / (t ** 3.0d0)) * ((l * (l / k)) / k)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= -9.6e-26) {
tmp = 2.0 / ((Math.pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else if (t <= 8e-68) {
tmp = 2.0 / ((k / Math.cos(k)) * ((k / l) * ((k * k) * (t / l))));
} else {
tmp = (Math.cos(k) / Math.pow(t, 3.0)) * ((l * (l / k)) / k);
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= -9.6e-26: tmp = 2.0 / ((math.pow(t, 3.0) / l) * ((k / l) * (k + k))) elif t <= 8e-68: tmp = 2.0 / ((k / math.cos(k)) * ((k / l) * ((k * k) * (t / l)))) else: tmp = (math.cos(k) / math.pow(t, 3.0)) * ((l * (l / k)) / k) return tmp
function code(t, l, k) tmp = 0.0 if (t <= -9.6e-26) tmp = Float64(2.0 / Float64(Float64((t ^ 3.0) / l) * Float64(Float64(k / l) * Float64(k + k)))); elseif (t <= 8e-68) tmp = Float64(2.0 / Float64(Float64(k / cos(k)) * Float64(Float64(k / l) * Float64(Float64(k * k) * Float64(t / l))))); else tmp = Float64(Float64(cos(k) / (t ^ 3.0)) * Float64(Float64(l * Float64(l / k)) / k)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -9.6e-26) tmp = 2.0 / (((t ^ 3.0) / l) * ((k / l) * (k + k))); elseif (t <= 8e-68) tmp = 2.0 / ((k / cos(k)) * ((k / l) * ((k * k) * (t / l)))); else tmp = (cos(k) / (t ^ 3.0)) * ((l * (l / k)) / k); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, -9.6e-26], N[(2.0 / N[(N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(k + k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-68], N[(2.0 / N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(l / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{-26}:\\
\;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \left(\frac{k}{\ell} \cdot \left(k + k\right)\right)}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-68}:\\
\;\;\;\;\frac{2}{\frac{k}{\cos k} \cdot \left(\frac{k}{\ell} \cdot \left(\left(k \cdot k\right) \cdot \frac{t}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos k}{{t}^{3}} \cdot \frac{\ell \cdot \frac{\ell}{k}}{k}\\
\end{array}
\end{array}
if t < -9.6000000000000004e-26Initial program 67.1%
associate-*l*67.1%
+-commutative67.1%
Simplified67.1%
Taylor expanded in k around 0 51.5%
associate-*r/51.5%
associate-*r*51.5%
unpow251.5%
times-frac56.3%
*-commutative56.3%
unpow256.3%
associate-*l*56.3%
Simplified56.3%
expm1-log1p-u8.1%
expm1-udef0.0%
associate-/l*0.3%
Applied egg-rr0.3%
expm1-def10.6%
expm1-log1p68.0%
associate-/r/68.0%
*-commutative68.0%
count-268.0%
Simplified68.0%
if -9.6000000000000004e-26 < t < 8.00000000000000053e-68Initial program 40.1%
associate-*l*40.1%
+-commutative40.1%
Simplified40.1%
Taylor expanded in t around 0 78.4%
times-frac77.5%
unpow277.5%
*-commutative77.5%
unpow277.5%
times-frac83.8%
Simplified83.8%
Taylor expanded in k around inf 78.4%
unpow278.4%
associate-*r*78.3%
times-frac83.8%
unpow283.8%
*-commutative83.8%
associate-*l/84.7%
*-commutative84.7%
Simplified84.7%
expm1-log1p-u60.1%
expm1-udef50.6%
times-frac53.2%
Applied egg-rr53.2%
expm1-def63.7%
expm1-log1p88.5%
associate-*l*92.6%
Simplified92.6%
Taylor expanded in k around 0 71.8%
unpow271.8%
Simplified71.8%
if 8.00000000000000053e-68 < t Initial program 77.2%
associate-/l/77.2%
associate-*l/77.2%
associate-*l/74.6%
associate-/r/73.3%
*-commutative73.3%
associate-/l/73.3%
associate-*r*73.3%
*-commutative73.3%
associate-*r*73.3%
*-commutative73.3%
Simplified73.3%
Taylor expanded in t around inf 61.0%
*-commutative61.0%
times-frac62.2%
unpow262.2%
Simplified62.2%
Taylor expanded in k around 0 66.3%
unpow266.3%
associate-*r/69.7%
unpow269.7%
associate-/r*74.3%
Simplified74.3%
associate-*r/74.9%
Applied egg-rr74.9%
Final simplification71.5%
(FPCore (t l k) :precision binary64 (if (or (<= t -9.8e-26) (not (<= t 1.68e-18))) (/ 2.0 (* (/ (pow t 3.0) l) (* (/ k l) (+ k k)))) (/ 2.0 (* (/ k (cos k)) (* (/ k l) (* (* k k) (/ t l)))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -9.8e-26) || !(t <= 1.68e-18)) {
tmp = 2.0 / ((pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else {
tmp = 2.0 / ((k / cos(k)) * ((k / l) * ((k * k) * (t / l))));
}
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 ((t <= (-9.8d-26)) .or. (.not. (t <= 1.68d-18))) then
tmp = 2.0d0 / (((t ** 3.0d0) / l) * ((k / l) * (k + k)))
else
tmp = 2.0d0 / ((k / cos(k)) * ((k / l) * ((k * k) * (t / l))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -9.8e-26) || !(t <= 1.68e-18)) {
tmp = 2.0 / ((Math.pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else {
tmp = 2.0 / ((k / Math.cos(k)) * ((k / l) * ((k * k) * (t / l))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -9.8e-26) or not (t <= 1.68e-18): tmp = 2.0 / ((math.pow(t, 3.0) / l) * ((k / l) * (k + k))) else: tmp = 2.0 / ((k / math.cos(k)) * ((k / l) * ((k * k) * (t / l)))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -9.8e-26) || !(t <= 1.68e-18)) tmp = Float64(2.0 / Float64(Float64((t ^ 3.0) / l) * Float64(Float64(k / l) * Float64(k + k)))); else tmp = Float64(2.0 / Float64(Float64(k / cos(k)) * Float64(Float64(k / l) * Float64(Float64(k * k) * Float64(t / l))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -9.8e-26) || ~((t <= 1.68e-18))) tmp = 2.0 / (((t ^ 3.0) / l) * ((k / l) * (k + k))); else tmp = 2.0 / ((k / cos(k)) * ((k / l) * ((k * k) * (t / l)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -9.8e-26], N[Not[LessEqual[t, 1.68e-18]], $MachinePrecision]], N[(2.0 / N[(N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(k + k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.8 \cdot 10^{-26} \lor \neg \left(t \leq 1.68 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \left(\frac{k}{\ell} \cdot \left(k + k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{k}{\cos k} \cdot \left(\frac{k}{\ell} \cdot \left(\left(k \cdot k\right) \cdot \frac{t}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < -9.7999999999999998e-26 or 1.6799999999999999e-18 < t Initial program 71.0%
associate-*l*71.0%
+-commutative71.0%
Simplified71.0%
Taylor expanded in k around 0 56.2%
associate-*r/56.2%
associate-*r*56.2%
unpow256.2%
times-frac61.1%
*-commutative61.1%
unpow261.1%
associate-*l*61.1%
Simplified61.1%
expm1-log1p-u34.6%
expm1-udef29.5%
associate-/l*31.8%
Applied egg-rr31.8%
expm1-def38.1%
expm1-log1p69.7%
associate-/r/69.7%
*-commutative69.7%
count-269.7%
Simplified69.7%
if -9.7999999999999998e-26 < t < 1.6799999999999999e-18Initial program 43.4%
associate-*l*43.5%
+-commutative43.5%
Simplified43.5%
Taylor expanded in t around 0 79.9%
times-frac79.1%
unpow279.1%
*-commutative79.1%
unpow279.1%
times-frac84.9%
Simplified84.9%
Taylor expanded in k around inf 79.9%
unpow279.9%
associate-*r*79.8%
times-frac84.9%
unpow284.9%
*-commutative84.9%
associate-*l/85.8%
*-commutative85.8%
Simplified85.8%
expm1-log1p-u62.0%
expm1-udef52.4%
times-frac54.8%
Applied egg-rr54.8%
expm1-def65.4%
expm1-log1p89.3%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in k around 0 73.0%
unpow273.0%
Simplified73.0%
Final simplification71.2%
(FPCore (t l k) :precision binary64 (if (<= t -6.6e-25) (/ 2.0 (* (/ (pow t 3.0) l) (* (/ k l) (+ k k)))) (/ 2.0 (* (/ (* k k) (cos k)) (/ (* k k) (* l (/ l t)))))))
double code(double t, double l, double k) {
double tmp;
if (t <= -6.6e-25) {
tmp = 2.0 / ((pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else {
tmp = 2.0 / (((k * k) / cos(k)) * ((k * k) / (l * (l / 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 (t <= (-6.6d-25)) then
tmp = 2.0d0 / (((t ** 3.0d0) / l) * ((k / l) * (k + k)))
else
tmp = 2.0d0 / (((k * k) / cos(k)) * ((k * k) / (l * (l / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= -6.6e-25) {
tmp = 2.0 / ((Math.pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else {
tmp = 2.0 / (((k * k) / Math.cos(k)) * ((k * k) / (l * (l / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= -6.6e-25: tmp = 2.0 / ((math.pow(t, 3.0) / l) * ((k / l) * (k + k))) else: tmp = 2.0 / (((k * k) / math.cos(k)) * ((k * k) / (l * (l / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (t <= -6.6e-25) tmp = Float64(2.0 / Float64(Float64((t ^ 3.0) / l) * Float64(Float64(k / l) * Float64(k + k)))); else tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / cos(k)) * Float64(Float64(k * k) / Float64(l * Float64(l / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -6.6e-25) tmp = 2.0 / (((t ^ 3.0) / l) * ((k / l) * (k + k))); else tmp = 2.0 / (((k * k) / cos(k)) * ((k * k) / (l * (l / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, -6.6e-25], N[(2.0 / N[(N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(k + k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \left(\frac{k}{\ell} \cdot \left(k + k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{k \cdot k}{\cos k} \cdot \frac{k \cdot k}{\ell \cdot \frac{\ell}{t}}}\\
\end{array}
\end{array}
if t < -6.5999999999999997e-25Initial program 67.1%
associate-*l*67.1%
+-commutative67.1%
Simplified67.1%
Taylor expanded in k around 0 51.5%
associate-*r/51.5%
associate-*r*51.5%
unpow251.5%
times-frac56.3%
*-commutative56.3%
unpow256.3%
associate-*l*56.3%
Simplified56.3%
expm1-log1p-u8.1%
expm1-udef0.0%
associate-/l*0.3%
Applied egg-rr0.3%
expm1-def10.6%
expm1-log1p68.0%
associate-/r/68.0%
*-commutative68.0%
count-268.0%
Simplified68.0%
if -6.5999999999999997e-25 < t Initial program 54.8%
associate-*l*54.8%
+-commutative54.8%
Simplified54.8%
Taylor expanded in t around 0 72.1%
times-frac72.0%
unpow272.0%
*-commutative72.0%
unpow272.0%
times-frac77.3%
Simplified77.3%
Taylor expanded in k around 0 68.6%
unpow268.6%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in t around 0 64.4%
associate-/l*66.7%
unpow266.7%
unpow266.7%
associate-*r/70.5%
Simplified70.5%
Final simplification69.7%
(FPCore (t l k) :precision binary64 (if (or (<= t -5.8e-132) (not (<= t 1.2e-19))) (/ 2.0 (* (/ (pow t 3.0) l) (* (/ k l) (+ k k)))) (/ 2.0 (* (/ t l) (/ (pow k 4.0) l)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -5.8e-132) || !(t <= 1.2e-19)) {
tmp = 2.0 / ((pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else {
tmp = 2.0 / ((t / l) * (pow(k, 4.0) / l));
}
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 ((t <= (-5.8d-132)) .or. (.not. (t <= 1.2d-19))) then
tmp = 2.0d0 / (((t ** 3.0d0) / l) * ((k / l) * (k + k)))
else
tmp = 2.0d0 / ((t / l) * ((k ** 4.0d0) / l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -5.8e-132) || !(t <= 1.2e-19)) {
tmp = 2.0 / ((Math.pow(t, 3.0) / l) * ((k / l) * (k + k)));
} else {
tmp = 2.0 / ((t / l) * (Math.pow(k, 4.0) / l));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -5.8e-132) or not (t <= 1.2e-19): tmp = 2.0 / ((math.pow(t, 3.0) / l) * ((k / l) * (k + k))) else: tmp = 2.0 / ((t / l) * (math.pow(k, 4.0) / l)) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -5.8e-132) || !(t <= 1.2e-19)) tmp = Float64(2.0 / Float64(Float64((t ^ 3.0) / l) * Float64(Float64(k / l) * Float64(k + k)))); else tmp = Float64(2.0 / Float64(Float64(t / l) * Float64((k ^ 4.0) / l))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -5.8e-132) || ~((t <= 1.2e-19))) tmp = 2.0 / (((t ^ 3.0) / l) * ((k / l) * (k + k))); else tmp = 2.0 / ((t / l) * ((k ^ 4.0) / l)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -5.8e-132], N[Not[LessEqual[t, 1.2e-19]], $MachinePrecision]], N[(2.0 / N[(N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(k + k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{-132} \lor \neg \left(t \leq 1.2 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \left(\frac{k}{\ell} \cdot \left(k + k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \frac{{k}^{4}}{\ell}}\\
\end{array}
\end{array}
if t < -5.79999999999999967e-132 or 1.20000000000000011e-19 < t Initial program 70.2%
associate-*l*70.2%
+-commutative70.2%
Simplified70.2%
Taylor expanded in k around 0 55.7%
associate-*r/55.7%
associate-*r*55.7%
unpow255.7%
times-frac60.7%
*-commutative60.7%
unpow260.7%
associate-*l*60.7%
Simplified60.7%
expm1-log1p-u33.6%
expm1-udef27.1%
associate-/l*29.2%
Applied egg-rr29.2%
expm1-def36.8%
expm1-log1p68.4%
associate-/r/68.4%
*-commutative68.4%
count-268.4%
Simplified68.4%
if -5.79999999999999967e-132 < t < 1.20000000000000011e-19Initial program 40.4%
associate-*l*40.4%
+-commutative40.4%
Simplified40.4%
Taylor expanded in t around 0 80.6%
times-frac79.7%
unpow279.7%
*-commutative79.7%
unpow279.7%
times-frac85.5%
Simplified85.5%
Taylor expanded in k around 0 63.4%
unpow263.4%
times-frac68.9%
Simplified68.9%
Final simplification68.6%
(FPCore (t l k) :precision binary64 (if (or (<= t -6.4e-34) (not (<= t 1.2e-19))) (* (/ l (pow t 3.0)) (/ l (* k k))) (* 2.0 (* (/ l t) (/ l (pow k 4.0))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -6.4e-34) || !(t <= 1.2e-19)) {
tmp = (l / pow(t, 3.0)) * (l / (k * k));
} else {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.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 ((t <= (-6.4d-34)) .or. (.not. (t <= 1.2d-19))) then
tmp = (l / (t ** 3.0d0)) * (l / (k * k))
else
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -6.4e-34) || !(t <= 1.2e-19)) {
tmp = (l / Math.pow(t, 3.0)) * (l / (k * k));
} else {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -6.4e-34) or not (t <= 1.2e-19): tmp = (l / math.pow(t, 3.0)) * (l / (k * k)) else: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -6.4e-34) || !(t <= 1.2e-19)) tmp = Float64(Float64(l / (t ^ 3.0)) * Float64(l / Float64(k * k))); else tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -6.4e-34) || ~((t <= 1.2e-19))) tmp = (l / (t ^ 3.0)) * (l / (k * k)); else tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -6.4e-34], N[Not[LessEqual[t, 1.2e-19]], $MachinePrecision]], N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{-34} \lor \neg \left(t \leq 1.2 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\end{array}
\end{array}
if t < -6.40000000000000005e-34 or 1.20000000000000011e-19 < t Initial program 71.4%
associate-/l/71.4%
associate-*l/72.1%
associate-*l/70.8%
associate-/r/70.1%
*-commutative70.1%
associate-/l/70.1%
associate-*r*70.1%
*-commutative70.1%
associate-*r*70.1%
*-commutative70.1%
Simplified70.1%
Taylor expanded in k around 0 56.1%
unpow256.1%
*-commutative56.1%
times-frac61.0%
unpow261.0%
Simplified61.0%
if -6.40000000000000005e-34 < t < 1.20000000000000011e-19Initial program 42.4%
associate-*l*42.5%
+-commutative42.5%
Simplified42.5%
Taylor expanded in t around 0 79.5%
times-frac78.7%
unpow278.7%
*-commutative78.7%
unpow278.7%
times-frac84.7%
Simplified84.7%
Taylor expanded in k around inf 79.5%
unpow279.5%
associate-*r*79.5%
times-frac84.7%
unpow284.7%
*-commutative84.7%
associate-*l/85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in k around 0 61.8%
unpow261.8%
*-commutative61.8%
times-frac67.6%
*-commutative67.6%
Simplified67.6%
Final simplification63.9%
(FPCore (t l k) :precision binary64 (if (or (<= t -6.4e-34) (not (<= t 1.2e-19))) (* (/ (/ l k) k) (/ l (pow t 3.0))) (* 2.0 (* (/ l t) (/ l (pow k 4.0))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -6.4e-34) || !(t <= 1.2e-19)) {
tmp = ((l / k) / k) * (l / pow(t, 3.0));
} else {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.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 ((t <= (-6.4d-34)) .or. (.not. (t <= 1.2d-19))) then
tmp = ((l / k) / k) * (l / (t ** 3.0d0))
else
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -6.4e-34) || !(t <= 1.2e-19)) {
tmp = ((l / k) / k) * (l / Math.pow(t, 3.0));
} else {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -6.4e-34) or not (t <= 1.2e-19): tmp = ((l / k) / k) * (l / math.pow(t, 3.0)) else: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -6.4e-34) || !(t <= 1.2e-19)) tmp = Float64(Float64(Float64(l / k) / k) * Float64(l / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -6.4e-34) || ~((t <= 1.2e-19))) tmp = ((l / k) / k) * (l / (t ^ 3.0)); else tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -6.4e-34], N[Not[LessEqual[t, 1.2e-19]], $MachinePrecision]], N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{-34} \lor \neg \left(t \leq 1.2 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{\frac{\ell}{k}}{k} \cdot \frac{\ell}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\end{array}
\end{array}
if t < -6.40000000000000005e-34 or 1.20000000000000011e-19 < t Initial program 71.4%
associate-/l/71.4%
associate-*l/72.1%
associate-*l/70.8%
associate-/r/70.1%
*-commutative70.1%
associate-/l/70.1%
associate-*r*70.1%
*-commutative70.1%
associate-*r*70.1%
*-commutative70.1%
Simplified70.1%
Taylor expanded in k around 0 56.1%
unpow256.1%
*-commutative56.1%
times-frac61.0%
unpow261.0%
Simplified61.0%
Taylor expanded in l around 0 56.1%
unpow256.1%
*-commutative56.1%
times-frac61.0%
unpow261.0%
associate-/r*68.7%
Simplified68.7%
if -6.40000000000000005e-34 < t < 1.20000000000000011e-19Initial program 42.4%
associate-*l*42.5%
+-commutative42.5%
Simplified42.5%
Taylor expanded in t around 0 79.5%
times-frac78.7%
unpow278.7%
*-commutative78.7%
unpow278.7%
times-frac84.7%
Simplified84.7%
Taylor expanded in k around inf 79.5%
unpow279.5%
associate-*r*79.5%
times-frac84.7%
unpow284.7%
*-commutative84.7%
associate-*l/85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in k around 0 61.8%
unpow261.8%
*-commutative61.8%
times-frac67.6%
*-commutative67.6%
Simplified67.6%
Final simplification68.2%
(FPCore (t l k) :precision binary64 (if (or (<= t -9.6e-26) (not (<= t 1.2e-19))) (* (/ (/ l k) k) (/ l (pow t 3.0))) (/ 2.0 (* (/ t l) (/ (pow k 4.0) l)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -9.6e-26) || !(t <= 1.2e-19)) {
tmp = ((l / k) / k) * (l / pow(t, 3.0));
} else {
tmp = 2.0 / ((t / l) * (pow(k, 4.0) / l));
}
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 ((t <= (-9.6d-26)) .or. (.not. (t <= 1.2d-19))) then
tmp = ((l / k) / k) * (l / (t ** 3.0d0))
else
tmp = 2.0d0 / ((t / l) * ((k ** 4.0d0) / l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -9.6e-26) || !(t <= 1.2e-19)) {
tmp = ((l / k) / k) * (l / Math.pow(t, 3.0));
} else {
tmp = 2.0 / ((t / l) * (Math.pow(k, 4.0) / l));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -9.6e-26) or not (t <= 1.2e-19): tmp = ((l / k) / k) * (l / math.pow(t, 3.0)) else: tmp = 2.0 / ((t / l) * (math.pow(k, 4.0) / l)) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -9.6e-26) || !(t <= 1.2e-19)) tmp = Float64(Float64(Float64(l / k) / k) * Float64(l / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(t / l) * Float64((k ^ 4.0) / l))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -9.6e-26) || ~((t <= 1.2e-19))) tmp = ((l / k) / k) * (l / (t ^ 3.0)); else tmp = 2.0 / ((t / l) * ((k ^ 4.0) / l)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -9.6e-26], N[Not[LessEqual[t, 1.2e-19]], $MachinePrecision]], N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{-26} \lor \neg \left(t \leq 1.2 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{\frac{\ell}{k}}{k} \cdot \frac{\ell}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \frac{{k}^{4}}{\ell}}\\
\end{array}
\end{array}
if t < -9.6000000000000004e-26 or 1.20000000000000011e-19 < t Initial program 71.2%
associate-/l/71.2%
associate-*l/71.9%
associate-*l/70.6%
associate-/r/69.9%
*-commutative69.9%
associate-/l/69.9%
associate-*r*69.9%
*-commutative69.9%
associate-*r*69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in k around 0 55.8%
unpow255.8%
*-commutative55.8%
times-frac60.7%
unpow260.7%
Simplified60.7%
Taylor expanded in l around 0 55.8%
unpow255.8%
*-commutative55.8%
times-frac60.7%
unpow260.7%
associate-/r*68.5%
Simplified68.5%
if -9.6000000000000004e-26 < t < 1.20000000000000011e-19Initial program 42.9%
associate-*l*43.0%
+-commutative43.0%
Simplified43.0%
Taylor expanded in t around 0 79.7%
times-frac78.9%
unpow278.9%
*-commutative78.9%
unpow278.9%
times-frac84.8%
Simplified84.8%
Taylor expanded in k around 0 62.2%
unpow262.2%
times-frac67.9%
Simplified67.9%
Final simplification68.2%
(FPCore (t l k) :precision binary64 (* 2.0 (* (/ l t) (/ l (pow k 4.0)))))
double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / 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 / t) * (l / (k ** 4.0d0)))
end function
public static double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
def code(t, l, k): return 2.0 * ((l / t) * (l / math.pow(k, 4.0)))
function code(t, l, k) return Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))) end
function tmp = code(t, l, k) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end
code[t_, l_, k_] := N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)
\end{array}
Initial program 58.5%
associate-*l*58.5%
+-commutative58.5%
Simplified58.5%
Taylor expanded in t around 0 65.6%
times-frac66.0%
unpow266.0%
*-commutative66.0%
unpow266.0%
times-frac70.6%
Simplified70.6%
Taylor expanded in k around inf 65.6%
unpow265.6%
associate-*r*65.6%
times-frac68.9%
unpow268.9%
*-commutative68.9%
associate-*l/71.0%
*-commutative71.0%
Simplified71.0%
Taylor expanded in k around 0 54.8%
unpow254.8%
*-commutative54.8%
times-frac58.7%
*-commutative58.7%
Simplified58.7%
Final simplification58.7%
herbie shell --seed 2023195
(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))))