
(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}
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 5.6e-63)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(if (<= k 2.85e+193)
(/ 2.0 (* (sin k) (* (tan k) (/ (* t (* k (/ k l))) l))))
(/ 2.0 (* (sin k) (* (tan k) (* k (/ (* t (/ k l)) l))))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 5.6e-63) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else if (k <= 2.85e+193) {
tmp = 2.0 / (sin(k) * (tan(k) * ((t * (k * (k / l))) / l)));
} else {
tmp = 2.0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l))));
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= 5.6d-63) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else if (k <= 2.85d+193) then
tmp = 2.0d0 / (sin(k) * (tan(k) * ((t * (k * (k / l))) / l)))
else
tmp = 2.0d0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5.6e-63) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else if (k <= 2.85e+193) {
tmp = 2.0 / (Math.sin(k) * (Math.tan(k) * ((t * (k * (k / l))) / l)));
} else {
tmp = 2.0 / (Math.sin(k) * (Math.tan(k) * (k * ((t * (k / l)) / l))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 5.6e-63: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) elif k <= 2.85e+193: tmp = 2.0 / (math.sin(k) * (math.tan(k) * ((t * (k * (k / l))) / l))) else: tmp = 2.0 / (math.sin(k) * (math.tan(k) * (k * ((t * (k / l)) / l)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 5.6e-63) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); elseif (k <= 2.85e+193) tmp = Float64(2.0 / Float64(sin(k) * Float64(tan(k) * Float64(Float64(t * Float64(k * Float64(k / l))) / l)))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(tan(k) * Float64(k * Float64(Float64(t * Float64(k / l)) / l))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5.6e-63) tmp = (l / k) * ((l / k) / (t ^ 3.0)); elseif (k <= 2.85e+193) tmp = 2.0 / (sin(k) * (tan(k) * ((t * (k * (k / l))) / l))); else tmp = 2.0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 5.6e-63], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.85e+193], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(t * N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.6 \cdot 10^{-63}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{elif}\;k \leq 2.85 \cdot 10^{+193}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\tan k \cdot \frac{t \cdot \left(k \cdot \frac{k}{\ell}\right)}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\tan k \cdot \left(k \cdot \frac{t \cdot \frac{k}{\ell}}{\ell}\right)\right)}\\
\end{array}
\end{array}
if k < 5.6000000000000005e-63Initial program 55.8%
associate-*l*55.8%
associate-/l/55.9%
*-commutative55.9%
associate-*r/56.4%
associate-/l*55.9%
associate-/r/51.2%
Simplified57.4%
Taylor expanded in k around 0 52.6%
unpow252.6%
unpow252.6%
Simplified52.6%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
Simplified65.5%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
associate-/r*66.0%
Simplified66.0%
if 5.6000000000000005e-63 < k < 2.85e193Initial program 49.5%
*-commutative49.5%
associate-*l*49.5%
associate-*r*49.5%
+-commutative49.5%
associate-+r+49.5%
metadata-eval49.5%
Simplified49.5%
Taylor expanded in k around inf 58.1%
*-commutative58.1%
unpow258.1%
times-frac70.6%
unpow270.6%
Simplified70.6%
expm1-log1p-u49.9%
expm1-udef25.3%
frac-times25.0%
Applied egg-rr25.0%
expm1-def41.5%
expm1-log1p58.1%
*-commutative58.1%
associate-*l*58.1%
unpow258.1%
*-commutative58.1%
times-frac70.5%
unpow270.5%
associate-*l/72.9%
Simplified72.9%
associate-*r/80.3%
*-commutative80.3%
Applied egg-rr80.3%
if 2.85e193 < k Initial program 37.9%
*-commutative37.9%
associate-*l*37.9%
associate-*r*37.9%
+-commutative37.9%
associate-+r+37.9%
metadata-eval37.9%
Simplified37.9%
Taylor expanded in k around inf 62.5%
*-commutative62.5%
unpow262.5%
times-frac63.3%
unpow263.3%
Simplified63.3%
expm1-log1p-u18.1%
expm1-udef18.1%
frac-times17.4%
Applied egg-rr17.4%
expm1-def17.4%
expm1-log1p62.5%
*-commutative62.5%
associate-*l*62.5%
unpow262.5%
*-commutative62.5%
times-frac63.3%
unpow263.3%
associate-*l/73.4%
Simplified73.4%
Taylor expanded in k around 0 62.5%
unpow262.5%
associate-*r*66.0%
unpow266.0%
times-frac89.9%
associate-*r/86.6%
*-commutative86.6%
associate-*l*86.6%
Simplified86.6%
associate-*l/90.0%
Applied egg-rr90.0%
Final simplification71.5%
NOTE: k should be positive before calling this function
(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)
(* l (* l (/ 2.0 (* (tan k) (* (* (pow t 3.0) (sin k)) (+ 2.0 t_1))))))
(/ 2.0 (* (sin k) (* (tan k) (* k (/ (* t (/ k l)) l))))))))k = abs(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 = l * (l * (2.0 / (tan(k) * ((pow(t, 3.0) * sin(k)) * (2.0 + t_1)))));
} else {
tmp = 2.0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l))));
}
return tmp;
}
k = Math.abs(k);
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 = l * (l * (2.0 / (Math.tan(k) * ((Math.pow(t, 3.0) * Math.sin(k)) * (2.0 + t_1)))));
} else {
tmp = 2.0 / (Math.sin(k) * (Math.tan(k) * (k * ((t * (k / l)) / l))));
}
return tmp;
}
k = abs(k) 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 = l * (l * (2.0 / (math.tan(k) * ((math.pow(t, 3.0) * math.sin(k)) * (2.0 + t_1))))) else: tmp = 2.0 / (math.sin(k) * (math.tan(k) * (k * ((t * (k / l)) / l)))) return tmp
k = abs(k) 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(l * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(Float64((t ^ 3.0) * sin(k)) * Float64(2.0 + t_1)))))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(tan(k) * Float64(k * Float64(Float64(t * Float64(k / l)) / l))))); end return tmp end
k = abs(k) 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 = l * (l * (2.0 / (tan(k) * (((t ^ 3.0) * sin(k)) * (2.0 + t_1))))); else tmp = 2.0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
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[(l * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[t, 3.0], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\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:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(\left({t}^{3} \cdot \sin k\right) \cdot \left(2 + t_1\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\tan k \cdot \left(k \cdot \frac{t \cdot \frac{k}{\ell}}{\ell}\right)\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 84.1%
associate-/l/84.2%
associate-*l/84.8%
associate-*l/83.6%
associate-/r/85.2%
*-commutative85.2%
associate-/l/85.2%
associate-*r*85.2%
*-commutative85.2%
associate-*r*85.2%
*-commutative85.2%
Simplified85.2%
expm1-log1p-u67.3%
expm1-udef65.1%
associate-*l*65.7%
*-commutative65.7%
Applied egg-rr65.7%
expm1-def69.5%
expm1-log1p88.6%
*-commutative88.6%
*-commutative88.6%
Simplified88.6%
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%
*-commutative0.0%
associate-*l*0.0%
associate-*r*0.0%
+-commutative0.0%
associate-+r+0.0%
metadata-eval0.0%
Simplified0.0%
Taylor expanded in k around inf 37.2%
*-commutative37.2%
unpow237.2%
times-frac53.3%
unpow253.3%
Simplified53.3%
expm1-log1p-u37.7%
expm1-udef17.8%
frac-times11.0%
Applied egg-rr11.0%
expm1-def23.7%
expm1-log1p37.2%
*-commutative37.2%
associate-*l*37.1%
unpow237.1%
*-commutative37.1%
times-frac53.3%
unpow253.3%
associate-*l/62.6%
Simplified62.6%
Taylor expanded in k around 0 37.1%
unpow237.1%
associate-*r*43.3%
unpow243.3%
times-frac75.6%
associate-*r/67.8%
*-commutative67.8%
associate-*l*64.0%
Simplified64.0%
associate-*l/68.8%
Applied egg-rr68.8%
Final simplification81.2%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 9.2e-64)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(if (<= k 1.6e+157)
(/ 2.0 (* (sin k) (* (tan k) (* (* k (/ k l)) (/ t l)))))
(/ 2.0 (* (sin k) (* (tan k) (* k (/ (* t (/ k l)) l))))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 9.2e-64) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else if (k <= 1.6e+157) {
tmp = 2.0 / (sin(k) * (tan(k) * ((k * (k / l)) * (t / l))));
} else {
tmp = 2.0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l))));
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= 9.2d-64) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else if (k <= 1.6d+157) then
tmp = 2.0d0 / (sin(k) * (tan(k) * ((k * (k / l)) * (t / l))))
else
tmp = 2.0d0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 9.2e-64) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else if (k <= 1.6e+157) {
tmp = 2.0 / (Math.sin(k) * (Math.tan(k) * ((k * (k / l)) * (t / l))));
} else {
tmp = 2.0 / (Math.sin(k) * (Math.tan(k) * (k * ((t * (k / l)) / l))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 9.2e-64: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) elif k <= 1.6e+157: tmp = 2.0 / (math.sin(k) * (math.tan(k) * ((k * (k / l)) * (t / l)))) else: tmp = 2.0 / (math.sin(k) * (math.tan(k) * (k * ((t * (k / l)) / l)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 9.2e-64) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); elseif (k <= 1.6e+157) tmp = Float64(2.0 / Float64(sin(k) * Float64(tan(k) * Float64(Float64(k * Float64(k / l)) * Float64(t / l))))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(tan(k) * Float64(k * Float64(Float64(t * Float64(k / l)) / l))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 9.2e-64) tmp = (l / k) * ((l / k) / (t ^ 3.0)); elseif (k <= 1.6e+157) tmp = 2.0 / (sin(k) * (tan(k) * ((k * (k / l)) * (t / l)))); else tmp = 2.0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 9.2e-64], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.6e+157], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 9.2 \cdot 10^{-64}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{elif}\;k \leq 1.6 \cdot 10^{+157}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\tan k \cdot \left(\left(k \cdot \frac{k}{\ell}\right) \cdot \frac{t}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\tan k \cdot \left(k \cdot \frac{t \cdot \frac{k}{\ell}}{\ell}\right)\right)}\\
\end{array}
\end{array}
if k < 9.2000000000000006e-64Initial program 55.8%
associate-*l*55.8%
associate-/l/55.9%
*-commutative55.9%
associate-*r/56.4%
associate-/l*55.9%
associate-/r/51.2%
Simplified57.4%
Taylor expanded in k around 0 52.6%
unpow252.6%
unpow252.6%
Simplified52.6%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
Simplified65.5%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
associate-/r*66.0%
Simplified66.0%
if 9.2000000000000006e-64 < k < 1.6e157Initial program 49.4%
*-commutative49.4%
associate-*l*49.4%
associate-*r*49.4%
+-commutative49.4%
associate-+r+49.4%
metadata-eval49.4%
Simplified49.4%
Taylor expanded in k around inf 60.2%
*-commutative60.2%
unpow260.2%
times-frac73.0%
unpow273.0%
Simplified73.0%
expm1-log1p-u54.7%
expm1-udef23.9%
frac-times23.7%
Applied egg-rr23.7%
expm1-def44.5%
expm1-log1p60.2%
*-commutative60.2%
associate-*l*60.1%
unpow260.1%
*-commutative60.1%
times-frac73.0%
unpow273.0%
associate-*l/75.5%
Simplified75.5%
if 1.6e157 < k Initial program 41.0%
*-commutative41.0%
associate-*l*41.0%
associate-*r*41.0%
+-commutative41.0%
associate-+r+41.0%
metadata-eval41.0%
Simplified41.0%
Taylor expanded in k around inf 59.3%
*-commutative59.3%
unpow259.3%
times-frac62.7%
unpow262.7%
Simplified62.7%
expm1-log1p-u21.3%
expm1-udef21.3%
frac-times20.6%
Applied egg-rr20.6%
expm1-def20.6%
expm1-log1p59.3%
*-commutative59.3%
associate-*l*59.3%
unpow259.3%
*-commutative59.3%
times-frac62.7%
unpow262.7%
associate-*l/70.6%
Simplified70.6%
Taylor expanded in k around 0 59.3%
unpow259.3%
associate-*r*62.2%
unpow262.2%
times-frac87.7%
associate-*r/80.4%
*-commutative80.4%
associate-*l*80.4%
Simplified80.4%
associate-*l/82.9%
Applied egg-rr82.9%
Final simplification70.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 2.2e-14) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* (* l l) (/ 2.0 (* (tan k) (* (* k k) (* t (sin k))))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.2e-14) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = (l * l) * (2.0 / (tan(k) * ((k * k) * (t * sin(k)))));
}
return tmp;
}
NOTE: k should be positive before calling this function
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.2d-14) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = (l * l) * (2.0d0 / (tan(k) * ((k * k) * (t * sin(k)))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.2e-14) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = (l * l) * (2.0 / (Math.tan(k) * ((k * k) * (t * Math.sin(k)))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 2.2e-14: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = (l * l) * (2.0 / (math.tan(k) * ((k * k) * (t * math.sin(k))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 2.2e-14) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(Float64(l * l) * Float64(2.0 / Float64(tan(k) * Float64(Float64(k * k) * Float64(t * sin(k)))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.2e-14) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = (l * l) * (2.0 / (tan(k) * ((k * k) * (t * sin(k))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.2e-14], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-14}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{\tan k \cdot \left(\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)\right)}\\
\end{array}
\end{array}
if k < 2.2000000000000001e-14Initial program 56.1%
associate-*l*56.1%
associate-/l/56.2%
*-commutative56.2%
associate-*r/56.7%
associate-/l*56.2%
associate-/r/51.7%
Simplified57.7%
Taylor expanded in k around 0 53.1%
unpow253.1%
unpow253.1%
Simplified53.1%
Taylor expanded in l around 0 53.1%
unpow253.1%
unpow253.1%
associate-*r*57.3%
times-frac65.4%
Simplified65.4%
Taylor expanded in l around 0 53.1%
unpow253.1%
unpow253.1%
associate-*r*57.3%
times-frac65.4%
associate-/r*65.9%
Simplified65.9%
if 2.2000000000000001e-14 < k Initial program 43.1%
associate-/l/43.1%
associate-*l/43.1%
associate-*l/41.8%
associate-/r/41.8%
*-commutative41.8%
associate-/l/41.8%
associate-*r*41.8%
*-commutative41.8%
associate-*r*41.8%
*-commutative41.8%
Simplified41.8%
Taylor expanded in k around inf 59.3%
unpow259.3%
*-commutative59.3%
Simplified59.3%
Final simplification64.1%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 5e-63) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* k (* (* (/ k l) (/ t l)) (* (sin k) (tan k)))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 5e-63) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / (k * (((k / l) * (t / l)) * (sin(k) * tan(k))));
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= 5d-63) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (k * (((k / l) * (t / l)) * (sin(k) * tan(k))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5e-63) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / (k * (((k / l) * (t / l)) * (Math.sin(k) * Math.tan(k))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 5e-63: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / (k * (((k / l) * (t / l)) * (math.sin(k) * math.tan(k)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 5e-63) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(k * Float64(Float64(Float64(k / l) * Float64(t / l)) * Float64(sin(k) * tan(k))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5e-63) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (k * (((k / l) * (t / l)) * (sin(k) * tan(k)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 5e-63], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(k * N[(N[(N[(k / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{-63}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(\left(\frac{k}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(\sin k \cdot \tan k\right)\right)}\\
\end{array}
\end{array}
if k < 5.0000000000000002e-63Initial program 55.8%
associate-*l*55.8%
associate-/l/55.9%
*-commutative55.9%
associate-*r/56.4%
associate-/l*55.9%
associate-/r/51.2%
Simplified57.4%
Taylor expanded in k around 0 52.6%
unpow252.6%
unpow252.6%
Simplified52.6%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
Simplified65.5%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
associate-/r*66.0%
Simplified66.0%
if 5.0000000000000002e-63 < k Initial program 45.2%
*-commutative45.2%
associate-*l*45.2%
associate-*r*45.2%
+-commutative45.2%
associate-+r+45.2%
metadata-eval45.2%
Simplified45.2%
Taylor expanded in k around inf 59.7%
*-commutative59.7%
unpow259.7%
times-frac67.9%
unpow267.9%
Simplified67.9%
expm1-log1p-u38.0%
expm1-udef22.6%
frac-times22.2%
Applied egg-rr22.2%
expm1-def32.6%
expm1-log1p59.7%
*-commutative59.7%
associate-*l*59.7%
unpow259.7%
*-commutative59.7%
times-frac67.9%
unpow267.9%
associate-*l/73.1%
Simplified73.1%
Taylor expanded in k around 0 59.7%
unpow259.7%
associate-*r*61.1%
unpow261.1%
times-frac83.9%
associate-*r/78.0%
*-commutative78.0%
associate-*l*74.3%
Simplified74.3%
expm1-log1p-u41.6%
expm1-udef27.3%
associate-*r*27.3%
*-commutative27.3%
frac-times23.9%
*-commutative23.9%
Applied egg-rr23.9%
expm1-def34.4%
expm1-log1p62.8%
*-commutative62.8%
associate-*l*62.8%
*-commutative62.8%
times-frac74.3%
*-commutative74.3%
Simplified74.3%
Final simplification68.5%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 3.3e-63) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (sin k) (* (tan k) (* k (* (/ k l) (/ t l))))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 3.3e-63) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / (sin(k) * (tan(k) * (k * ((k / l) * (t / l)))));
}
return tmp;
}
NOTE: k should be positive before calling this function
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-63) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (sin(k) * (tan(k) * (k * ((k / l) * (t / l)))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3.3e-63) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / (Math.sin(k) * (Math.tan(k) * (k * ((k / l) * (t / l)))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 3.3e-63: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / (math.sin(k) * (math.tan(k) * (k * ((k / l) * (t / l))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 3.3e-63) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(tan(k) * Float64(k * Float64(Float64(k / l) * Float64(t / l)))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 3.3e-63) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (sin(k) * (tan(k) * (k * ((k / l) * (t / l))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 3.3e-63], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(N[(k / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.3 \cdot 10^{-63}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\tan k \cdot \left(k \cdot \left(\frac{k}{\ell} \cdot \frac{t}{\ell}\right)\right)\right)}\\
\end{array}
\end{array}
if k < 3.29999999999999994e-63Initial program 55.8%
associate-*l*55.8%
associate-/l/55.9%
*-commutative55.9%
associate-*r/56.4%
associate-/l*55.9%
associate-/r/51.2%
Simplified57.4%
Taylor expanded in k around 0 52.6%
unpow252.6%
unpow252.6%
Simplified52.6%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
Simplified65.5%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
associate-/r*66.0%
Simplified66.0%
if 3.29999999999999994e-63 < k Initial program 45.2%
*-commutative45.2%
associate-*l*45.2%
associate-*r*45.2%
+-commutative45.2%
associate-+r+45.2%
metadata-eval45.2%
Simplified45.2%
Taylor expanded in k around inf 59.7%
*-commutative59.7%
unpow259.7%
times-frac67.9%
unpow267.9%
Simplified67.9%
expm1-log1p-u38.0%
expm1-udef22.6%
frac-times22.2%
Applied egg-rr22.2%
expm1-def32.6%
expm1-log1p59.7%
*-commutative59.7%
associate-*l*59.7%
unpow259.7%
*-commutative59.7%
times-frac67.9%
unpow267.9%
associate-*l/73.1%
Simplified73.1%
Taylor expanded in k around 0 59.7%
unpow259.7%
associate-*r*61.1%
unpow261.1%
times-frac83.9%
associate-*r/78.0%
*-commutative78.0%
associate-*l*74.3%
Simplified74.3%
Final simplification68.5%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 6.8e-64) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (sin k) (* (tan k) (* k (/ (* t (/ k l)) l)))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.8e-64) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l))));
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= 6.8d-64) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6.8e-64) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / (Math.sin(k) * (Math.tan(k) * (k * ((t * (k / l)) / l))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 6.8e-64: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / (math.sin(k) * (math.tan(k) * (k * ((t * (k / l)) / l)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 6.8e-64) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(sin(k) * Float64(tan(k) * Float64(k * Float64(Float64(t * Float64(k / l)) / l))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6.8e-64) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (sin(k) * (tan(k) * (k * ((t * (k / l)) / l)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.8e-64], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.8 \cdot 10^{-64}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \left(\tan k \cdot \left(k \cdot \frac{t \cdot \frac{k}{\ell}}{\ell}\right)\right)}\\
\end{array}
\end{array}
if k < 6.80000000000000024e-64Initial program 55.8%
associate-*l*55.8%
associate-/l/55.9%
*-commutative55.9%
associate-*r/56.4%
associate-/l*55.9%
associate-/r/51.2%
Simplified57.4%
Taylor expanded in k around 0 52.6%
unpow252.6%
unpow252.6%
Simplified52.6%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
Simplified65.5%
Taylor expanded in l around 0 52.6%
unpow252.6%
unpow252.6%
associate-*r*57.0%
times-frac65.5%
associate-/r*66.0%
Simplified66.0%
if 6.80000000000000024e-64 < k Initial program 45.2%
*-commutative45.2%
associate-*l*45.2%
associate-*r*45.2%
+-commutative45.2%
associate-+r+45.2%
metadata-eval45.2%
Simplified45.2%
Taylor expanded in k around inf 59.7%
*-commutative59.7%
unpow259.7%
times-frac67.9%
unpow267.9%
Simplified67.9%
expm1-log1p-u38.0%
expm1-udef22.6%
frac-times22.2%
Applied egg-rr22.2%
expm1-def32.6%
expm1-log1p59.7%
*-commutative59.7%
associate-*l*59.7%
unpow259.7%
*-commutative59.7%
times-frac67.9%
unpow267.9%
associate-*l/73.1%
Simplified73.1%
Taylor expanded in k around 0 59.7%
unpow259.7%
associate-*r*61.1%
unpow261.1%
times-frac83.9%
associate-*r/78.0%
*-commutative78.0%
associate-*l*74.3%
Simplified74.3%
associate-*l/75.5%
Applied egg-rr75.5%
Final simplification68.9%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (or (<= t -1.05e-86) (not (<= t 2.65e-73))) (* (/ l k) (/ l (* (pow t 3.0) k))) (* 2.0 (* (/ l (pow k 4.0)) (/ l t)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.05e-86) || !(t <= 2.65e-73)) {
tmp = (l / k) * (l / (pow(t, 3.0) * k));
} else {
tmp = 2.0 * ((l / pow(k, 4.0)) * (l / t));
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= (-1.05d-86)) .or. (.not. (t <= 2.65d-73))) then
tmp = (l / k) * (l / ((t ** 3.0d0) * k))
else
tmp = 2.0d0 * ((l / (k ** 4.0d0)) * (l / t))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.05e-86) || !(t <= 2.65e-73)) {
tmp = (l / k) * (l / (Math.pow(t, 3.0) * k));
} else {
tmp = 2.0 * ((l / Math.pow(k, 4.0)) * (l / t));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if (t <= -1.05e-86) or not (t <= 2.65e-73): tmp = (l / k) * (l / (math.pow(t, 3.0) * k)) else: tmp = 2.0 * ((l / math.pow(k, 4.0)) * (l / t)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -1.05e-86) || !(t <= 2.65e-73)) tmp = Float64(Float64(l / k) * Float64(l / Float64((t ^ 3.0) * k))); else tmp = Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.05e-86) || ~((t <= 2.65e-73))) tmp = (l / k) * (l / ((t ^ 3.0) * k)); else tmp = 2.0 * ((l / (k ^ 4.0)) * (l / t)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -1.05e-86], N[Not[LessEqual[t, 2.65e-73]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-86} \lor \neg \left(t \leq 2.65 \cdot 10^{-73}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{{t}^{3} \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)\\
\end{array}
\end{array}
if t < -1.05e-86 or 2.64999999999999986e-73 < t Initial program 63.0%
associate-*l*63.0%
associate-/l/63.2%
*-commutative63.2%
associate-*r/63.7%
associate-/l*63.2%
associate-/r/57.9%
Simplified63.7%
Taylor expanded in k around 0 55.2%
unpow255.2%
unpow255.2%
Simplified55.2%
Taylor expanded in l around 0 55.2%
unpow255.2%
unpow255.2%
associate-*r*59.9%
times-frac67.5%
Simplified67.5%
if -1.05e-86 < t < 2.64999999999999986e-73Initial program 34.9%
*-commutative34.9%
associate-*l*34.9%
associate-*r*34.9%
+-commutative34.9%
associate-+r+34.9%
metadata-eval34.9%
Simplified34.9%
Taylor expanded in k around inf 68.6%
*-commutative68.6%
unpow268.6%
times-frac79.3%
unpow279.3%
Simplified79.3%
Taylor expanded in k around 0 56.6%
unpow256.6%
*-commutative56.6%
times-frac68.0%
Simplified68.0%
Final simplification67.7%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -3.5e-87)
(* (/ l k) (/ l (* (pow t 3.0) k)))
(if (<= t 9.6e-73)
(* 2.0 (* (/ l (pow k 4.0)) (/ l t)))
(* (/ l k) (/ (/ l k) (pow t 3.0))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (t <= -3.5e-87) {
tmp = (l / k) * (l / (pow(t, 3.0) * k));
} else if (t <= 9.6e-73) {
tmp = 2.0 * ((l / pow(k, 4.0)) * (l / t));
} else {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
}
return tmp;
}
NOTE: k should be positive before calling this function
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-87)) then
tmp = (l / k) * (l / ((t ** 3.0d0) * k))
else if (t <= 9.6d-73) then
tmp = 2.0d0 * ((l / (k ** 4.0d0)) * (l / t))
else
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -3.5e-87) {
tmp = (l / k) * (l / (Math.pow(t, 3.0) * k));
} else if (t <= 9.6e-73) {
tmp = 2.0 * ((l / Math.pow(k, 4.0)) * (l / t));
} else {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if t <= -3.5e-87: tmp = (l / k) * (l / (math.pow(t, 3.0) * k)) elif t <= 9.6e-73: tmp = 2.0 * ((l / math.pow(k, 4.0)) * (l / t)) else: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (t <= -3.5e-87) tmp = Float64(Float64(l / k) * Float64(l / Float64((t ^ 3.0) * k))); elseif (t <= 9.6e-73) tmp = Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -3.5e-87) tmp = (l / k) * (l / ((t ^ 3.0) * k)); elseif (t <= 9.6e-73) tmp = 2.0 * ((l / (k ^ 4.0)) * (l / t)); else tmp = (l / k) * ((l / k) / (t ^ 3.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -3.5e-87], N[(N[(l / k), $MachinePrecision] * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e-73], N[(2.0 * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-87}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{{t}^{3} \cdot k}\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-73}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\end{array}
\end{array}
if t < -3.50000000000000012e-87Initial program 65.4%
associate-*l*65.4%
associate-/l/65.7%
*-commutative65.7%
associate-*r/66.7%
associate-/l*65.7%
associate-/r/62.1%
Simplified65.5%
Taylor expanded in k around 0 60.7%
unpow260.7%
unpow260.7%
Simplified60.7%
Taylor expanded in l around 0 60.7%
unpow260.7%
unpow260.7%
associate-*r*64.3%
times-frac67.9%
Simplified67.9%
if -3.50000000000000012e-87 < t < 9.60000000000000022e-73Initial program 34.9%
*-commutative34.9%
associate-*l*34.9%
associate-*r*34.9%
+-commutative34.9%
associate-+r+34.9%
metadata-eval34.9%
Simplified34.9%
Taylor expanded in k around inf 68.6%
*-commutative68.6%
unpow268.6%
times-frac79.3%
unpow279.3%
Simplified79.3%
Taylor expanded in k around 0 56.6%
unpow256.6%
*-commutative56.6%
times-frac68.0%
Simplified68.0%
if 9.60000000000000022e-73 < t Initial program 60.2%
associate-*l*60.2%
associate-/l/60.2%
*-commutative60.2%
associate-*r/60.1%
associate-/l*60.2%
associate-/r/53.0%
Simplified61.7%
Taylor expanded in k around 0 48.6%
unpow248.6%
unpow248.6%
Simplified48.6%
Taylor expanded in l around 0 48.6%
unpow248.6%
unpow248.6%
associate-*r*54.7%
times-frac67.1%
Simplified67.1%
Taylor expanded in l around 0 48.6%
unpow248.6%
unpow248.6%
associate-*r*54.7%
times-frac67.1%
associate-/r*68.4%
Simplified68.4%
Final simplification68.1%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -1e-86)
(* (/ l k) (/ l (* (pow t 3.0) k)))
(if (<= t 1.4e-74)
(/ 2.0 (* (/ t l) (/ (pow k 4.0) l)))
(* (/ l k) (/ (/ l k) (pow t 3.0))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (t <= -1e-86) {
tmp = (l / k) * (l / (pow(t, 3.0) * k));
} else if (t <= 1.4e-74) {
tmp = 2.0 / ((t / l) * (pow(k, 4.0) / l));
} else {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= (-1d-86)) then
tmp = (l / k) * (l / ((t ** 3.0d0) * k))
else if (t <= 1.4d-74) then
tmp = 2.0d0 / ((t / l) * ((k ** 4.0d0) / l))
else
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -1e-86) {
tmp = (l / k) * (l / (Math.pow(t, 3.0) * k));
} else if (t <= 1.4e-74) {
tmp = 2.0 / ((t / l) * (Math.pow(k, 4.0) / l));
} else {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if t <= -1e-86: tmp = (l / k) * (l / (math.pow(t, 3.0) * k)) elif t <= 1.4e-74: tmp = 2.0 / ((t / l) * (math.pow(k, 4.0) / l)) else: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (t <= -1e-86) tmp = Float64(Float64(l / k) * Float64(l / Float64((t ^ 3.0) * k))); elseif (t <= 1.4e-74) tmp = Float64(2.0 / Float64(Float64(t / l) * Float64((k ^ 4.0) / l))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -1e-86) tmp = (l / k) * (l / ((t ^ 3.0) * k)); elseif (t <= 1.4e-74) tmp = 2.0 / ((t / l) * ((k ^ 4.0) / l)); else tmp = (l / k) * ((l / k) / (t ^ 3.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -1e-86], N[(N[(l / k), $MachinePrecision] * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-74], N[(2.0 / N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-86}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{{t}^{3} \cdot k}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \frac{{k}^{4}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\end{array}
\end{array}
if t < -1.00000000000000008e-86Initial program 65.4%
associate-*l*65.4%
associate-/l/65.7%
*-commutative65.7%
associate-*r/66.7%
associate-/l*65.7%
associate-/r/62.1%
Simplified65.5%
Taylor expanded in k around 0 60.7%
unpow260.7%
unpow260.7%
Simplified60.7%
Taylor expanded in l around 0 60.7%
unpow260.7%
unpow260.7%
associate-*r*64.3%
times-frac67.9%
Simplified67.9%
if -1.00000000000000008e-86 < t < 1.39999999999999994e-74Initial program 34.9%
*-commutative34.9%
associate-*l*34.9%
associate-*r*34.9%
+-commutative34.9%
associate-+r+34.9%
metadata-eval34.9%
Simplified34.9%
Taylor expanded in k around inf 68.6%
*-commutative68.6%
unpow268.6%
times-frac79.3%
unpow279.3%
Simplified79.3%
Taylor expanded in k around 0 56.6%
*-commutative56.6%
unpow256.6%
times-frac68.0%
Simplified68.0%
if 1.39999999999999994e-74 < t Initial program 60.2%
associate-*l*60.2%
associate-/l/60.2%
*-commutative60.2%
associate-*r/60.1%
associate-/l*60.2%
associate-/r/53.0%
Simplified61.7%
Taylor expanded in k around 0 48.6%
unpow248.6%
unpow248.6%
Simplified48.6%
Taylor expanded in l around 0 48.6%
unpow248.6%
unpow248.6%
associate-*r*54.7%
times-frac67.1%
Simplified67.1%
Taylor expanded in l around 0 48.6%
unpow248.6%
unpow248.6%
associate-*r*54.7%
times-frac67.1%
associate-/r*68.4%
Simplified68.4%
Final simplification68.1%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -1.05e-86)
(* (/ l k) (/ l (* (pow t 3.0) k)))
(if (<= t 2.7e-72)
(/ (* l 2.0) (/ t (/ l (pow k 4.0))))
(* (/ l k) (/ (/ l k) (pow t 3.0))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (t <= -1.05e-86) {
tmp = (l / k) * (l / (pow(t, 3.0) * k));
} else if (t <= 2.7e-72) {
tmp = (l * 2.0) / (t / (l / pow(k, 4.0)));
} else {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= (-1.05d-86)) then
tmp = (l / k) * (l / ((t ** 3.0d0) * k))
else if (t <= 2.7d-72) then
tmp = (l * 2.0d0) / (t / (l / (k ** 4.0d0)))
else
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -1.05e-86) {
tmp = (l / k) * (l / (Math.pow(t, 3.0) * k));
} else if (t <= 2.7e-72) {
tmp = (l * 2.0) / (t / (l / Math.pow(k, 4.0)));
} else {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if t <= -1.05e-86: tmp = (l / k) * (l / (math.pow(t, 3.0) * k)) elif t <= 2.7e-72: tmp = (l * 2.0) / (t / (l / math.pow(k, 4.0))) else: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (t <= -1.05e-86) tmp = Float64(Float64(l / k) * Float64(l / Float64((t ^ 3.0) * k))); elseif (t <= 2.7e-72) tmp = Float64(Float64(l * 2.0) / Float64(t / Float64(l / (k ^ 4.0)))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -1.05e-86) tmp = (l / k) * (l / ((t ^ 3.0) * k)); elseif (t <= 2.7e-72) tmp = (l * 2.0) / (t / (l / (k ^ 4.0))); else tmp = (l / k) * ((l / k) / (t ^ 3.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -1.05e-86], N[(N[(l / k), $MachinePrecision] * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e-72], N[(N[(l * 2.0), $MachinePrecision] / N[(t / N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-86}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{{t}^{3} \cdot k}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-72}:\\
\;\;\;\;\frac{\ell \cdot 2}{\frac{t}{\frac{\ell}{{k}^{4}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\end{array}
\end{array}
if t < -1.05e-86Initial program 65.4%
associate-*l*65.4%
associate-/l/65.7%
*-commutative65.7%
associate-*r/66.7%
associate-/l*65.7%
associate-/r/62.1%
Simplified65.5%
Taylor expanded in k around 0 60.7%
unpow260.7%
unpow260.7%
Simplified60.7%
Taylor expanded in l around 0 60.7%
unpow260.7%
unpow260.7%
associate-*r*64.3%
times-frac67.9%
Simplified67.9%
if -1.05e-86 < t < 2.7e-72Initial program 34.9%
*-commutative34.9%
associate-*l*34.9%
associate-*r*34.9%
+-commutative34.9%
associate-+r+34.9%
metadata-eval34.9%
Simplified34.9%
Taylor expanded in k around inf 68.6%
*-commutative68.6%
unpow268.6%
times-frac79.3%
unpow279.3%
Simplified79.3%
expm1-log1p-u63.6%
expm1-udef36.3%
frac-times31.0%
Applied egg-rr31.0%
expm1-def53.0%
expm1-log1p68.6%
*-commutative68.6%
associate-*l*68.6%
unpow268.6%
*-commutative68.6%
times-frac79.3%
unpow279.3%
associate-*l/81.6%
Simplified81.6%
Taylor expanded in k around 0 56.6%
unpow256.6%
times-frac68.0%
*-commutative68.0%
*-commutative68.0%
associate-*l/67.4%
associate-/l*68.4%
associate-*l/68.4%
Simplified68.4%
if 2.7e-72 < t Initial program 60.2%
associate-*l*60.2%
associate-/l/60.2%
*-commutative60.2%
associate-*r/60.1%
associate-/l*60.2%
associate-/r/53.0%
Simplified61.7%
Taylor expanded in k around 0 48.6%
unpow248.6%
unpow248.6%
Simplified48.6%
Taylor expanded in l around 0 48.6%
unpow248.6%
unpow248.6%
associate-*r*54.7%
times-frac67.1%
Simplified67.1%
Taylor expanded in l around 0 48.6%
unpow248.6%
unpow248.6%
associate-*r*54.7%
times-frac67.1%
associate-/r*68.4%
Simplified68.4%
Final simplification68.2%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -8e-87)
(/ (* l (/ l (* (pow t 3.0) k))) k)
(if (<= t 6.5e-75)
(/ (* l 2.0) (/ t (/ l (pow k 4.0))))
(* (/ l k) (/ (/ l k) (pow t 3.0))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (t <= -8e-87) {
tmp = (l * (l / (pow(t, 3.0) * k))) / k;
} else if (t <= 6.5e-75) {
tmp = (l * 2.0) / (t / (l / pow(k, 4.0)));
} else {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= (-8d-87)) then
tmp = (l * (l / ((t ** 3.0d0) * k))) / k
else if (t <= 6.5d-75) then
tmp = (l * 2.0d0) / (t / (l / (k ** 4.0d0)))
else
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -8e-87) {
tmp = (l * (l / (Math.pow(t, 3.0) * k))) / k;
} else if (t <= 6.5e-75) {
tmp = (l * 2.0) / (t / (l / Math.pow(k, 4.0)));
} else {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if t <= -8e-87: tmp = (l * (l / (math.pow(t, 3.0) * k))) / k elif t <= 6.5e-75: tmp = (l * 2.0) / (t / (l / math.pow(k, 4.0))) else: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (t <= -8e-87) tmp = Float64(Float64(l * Float64(l / Float64((t ^ 3.0) * k))) / k); elseif (t <= 6.5e-75) tmp = Float64(Float64(l * 2.0) / Float64(t / Float64(l / (k ^ 4.0)))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -8e-87) tmp = (l * (l / ((t ^ 3.0) * k))) / k; elseif (t <= 6.5e-75) tmp = (l * 2.0) / (t / (l / (k ^ 4.0))); else tmp = (l / k) * ((l / k) / (t ^ 3.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -8e-87], N[(N[(l * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], If[LessEqual[t, 6.5e-75], N[(N[(l * 2.0), $MachinePrecision] / N[(t / N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-87}:\\
\;\;\;\;\frac{\ell \cdot \frac{\ell}{{t}^{3} \cdot k}}{k}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-75}:\\
\;\;\;\;\frac{\ell \cdot 2}{\frac{t}{\frac{\ell}{{k}^{4}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\end{array}
\end{array}
if t < -8.00000000000000014e-87Initial program 65.4%
associate-*l*65.4%
associate-/l/65.7%
*-commutative65.7%
associate-*r/66.7%
associate-/l*65.7%
associate-/r/62.1%
Simplified65.5%
Taylor expanded in k around 0 60.7%
unpow260.7%
unpow260.7%
Simplified60.7%
Taylor expanded in l around 0 60.7%
unpow260.7%
unpow260.7%
associate-*r*64.3%
times-frac67.9%
Simplified67.9%
associate-*l/68.0%
Applied egg-rr68.0%
if -8.00000000000000014e-87 < t < 6.5000000000000002e-75Initial program 34.9%
*-commutative34.9%
associate-*l*34.9%
associate-*r*34.9%
+-commutative34.9%
associate-+r+34.9%
metadata-eval34.9%
Simplified34.9%
Taylor expanded in k around inf 68.6%
*-commutative68.6%
unpow268.6%
times-frac79.3%
unpow279.3%
Simplified79.3%
expm1-log1p-u63.6%
expm1-udef36.3%
frac-times31.0%
Applied egg-rr31.0%
expm1-def53.0%
expm1-log1p68.6%
*-commutative68.6%
associate-*l*68.6%
unpow268.6%
*-commutative68.6%
times-frac79.3%
unpow279.3%
associate-*l/81.6%
Simplified81.6%
Taylor expanded in k around 0 56.6%
unpow256.6%
times-frac68.0%
*-commutative68.0%
*-commutative68.0%
associate-*l/67.4%
associate-/l*68.4%
associate-*l/68.4%
Simplified68.4%
if 6.5000000000000002e-75 < t Initial program 60.2%
associate-*l*60.2%
associate-/l/60.2%
*-commutative60.2%
associate-*r/60.1%
associate-/l*60.2%
associate-/r/53.0%
Simplified61.7%
Taylor expanded in k around 0 48.6%
unpow248.6%
unpow248.6%
Simplified48.6%
Taylor expanded in l around 0 48.6%
unpow248.6%
unpow248.6%
associate-*r*54.7%
times-frac67.1%
Simplified67.1%
Taylor expanded in l around 0 48.6%
unpow248.6%
unpow248.6%
associate-*r*54.7%
times-frac67.1%
associate-/r*68.4%
Simplified68.4%
Final simplification68.3%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (* (/ l (pow k 4.0)) (/ l t))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((l / pow(k, 4.0)) * (l / t));
}
NOTE: k should be positive before calling this function
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 / (k ** 4.0d0)) * (l / t))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((l / Math.pow(k, 4.0)) * (l / t));
}
k = abs(k) def code(t, l, k): return 2.0 * ((l / math.pow(k, 4.0)) * (l / t))
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((l / (k ^ 4.0)) * (l / t)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)
\end{array}
Initial program 52.6%
*-commutative52.6%
associate-*l*49.5%
associate-*r*49.5%
+-commutative49.5%
associate-+r+49.5%
metadata-eval49.5%
Simplified49.5%
Taylor expanded in k around inf 60.4%
*-commutative60.4%
unpow260.4%
times-frac66.9%
unpow266.9%
Simplified66.9%
Taylor expanded in k around 0 52.8%
unpow252.8%
*-commutative52.8%
times-frac57.9%
Simplified57.9%
Final simplification57.9%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ (* (* l l) 2.0) (* (* k k) (* k (* t k)))))
k = abs(k);
double code(double t, double l, double k) {
return ((l * l) * 2.0) / ((k * k) * (k * (t * k)));
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((l * l) * 2.0d0) / ((k * k) * (k * (t * k)))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return ((l * l) * 2.0) / ((k * k) * (k * (t * k)));
}
k = abs(k) def code(t, l, k): return ((l * l) * 2.0) / ((k * k) * (k * (t * k)))
k = abs(k) function code(t, l, k) return Float64(Float64(Float64(l * l) * 2.0) / Float64(Float64(k * k) * Float64(k * Float64(t * k)))) end
k = abs(k) function tmp = code(t, l, k) tmp = ((l * l) * 2.0) / ((k * k) * (k * (t * k))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(N[(l * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{\left(\ell \cdot \ell\right) \cdot 2}{\left(k \cdot k\right) \cdot \left(k \cdot \left(t \cdot k\right)\right)}
\end{array}
Initial program 52.6%
*-commutative52.6%
associate-*l*49.5%
associate-*r*49.5%
+-commutative49.5%
associate-+r+49.5%
metadata-eval49.5%
Simplified49.5%
Taylor expanded in k around inf 60.4%
*-commutative60.4%
unpow260.4%
times-frac66.9%
unpow266.9%
Simplified66.9%
Taylor expanded in t around 0 59.0%
associate-*r/59.0%
*-commutative59.0%
unpow259.0%
*-commutative59.0%
associate-*r*59.0%
unpow259.0%
associate-*l*61.3%
Simplified61.3%
Taylor expanded in k around 0 54.5%
unpow254.5%
Simplified54.5%
Taylor expanded in k around 0 53.3%
unpow253.3%
Simplified53.3%
Final simplification53.3%
herbie shell --seed 2023217
(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))))