
(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 11 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 (<= (* l l) 1e+223) (* (/ (/ l (sin k)) (/ k (/ l (tan k)))) (/ 2.0 (* k t))) (* 2.0 (* (/ (pow (/ l k) 2.0) t) (/ (cos k) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 1e+223) {
tmp = ((l / sin(k)) / (k / (l / tan(k)))) * (2.0 / (k * t));
} else {
tmp = 2.0 * ((pow((l / k), 2.0) / t) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 1d+223) then
tmp = ((l / sin(k)) / (k / (l / tan(k)))) * (2.0d0 / (k * t))
else
tmp = 2.0d0 * ((((l / k) ** 2.0d0) / t) * (cos(k) / (sin(k) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 1e+223) {
tmp = ((l / Math.sin(k)) / (k / (l / Math.tan(k)))) * (2.0 / (k * t));
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 1e+223: tmp = ((l / math.sin(k)) / (k / (l / math.tan(k)))) * (2.0 / (k * t)) else: tmp = 2.0 * ((math.pow((l / k), 2.0) / t) * (math.cos(k) / math.pow(math.sin(k), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 1e+223) tmp = Float64(Float64(Float64(l / sin(k)) / Float64(k / Float64(l / tan(k)))) * Float64(2.0 / Float64(k * t))); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 1e+223) tmp = ((l / sin(k)) / (k / (l / tan(k)))) * (2.0 / (k * t)); else tmp = 2.0 * ((((l / k) ^ 2.0) / t) * (cos(k) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 1e+223], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(k / N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{+223}:\\
\;\;\;\;\frac{\frac{\ell}{\sin k}}{\frac{k}{\frac{\ell}{\tan k}}} \cdot \frac{2}{k \cdot t}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 1.00000000000000005e223Initial program 34.1%
associate-*l*34.1%
associate-*l*34.1%
associate-/r*34.1%
associate-/r/33.6%
*-commutative33.6%
times-frac33.7%
+-commutative33.7%
associate--l+43.0%
metadata-eval43.0%
+-rgt-identity43.0%
times-frac49.9%
Simplified49.9%
Taylor expanded in t around 0 88.5%
unpow288.5%
Simplified88.5%
associate-*l/88.5%
associate-*l*93.5%
Applied egg-rr93.5%
associate-*l/93.5%
*-commutative93.5%
associate-*l/91.0%
associate-/l*93.5%
Simplified93.5%
associate-*r/93.5%
associate-/r/93.5%
*-commutative93.5%
Applied egg-rr93.5%
times-frac97.0%
*-commutative97.0%
Simplified97.0%
*-un-lft-identity97.0%
associate-/l*97.5%
Applied egg-rr97.5%
if 1.00000000000000005e223 < (*.f64 l l) Initial program 36.3%
associate-*l*36.3%
associate-*l*36.3%
associate-/r*36.3%
associate-/r/36.3%
*-commutative36.3%
times-frac36.2%
+-commutative36.2%
associate--l+36.3%
metadata-eval36.3%
+-rgt-identity36.3%
times-frac36.3%
Simplified36.3%
Taylor expanded in t around 0 60.9%
associate-/r*63.5%
unpow263.5%
unpow263.5%
*-commutative63.5%
Simplified63.5%
Taylor expanded in k around inf 63.5%
associate-/l*63.5%
unpow263.5%
unpow263.5%
times-frac96.1%
Simplified96.1%
Taylor expanded in k around inf 60.9%
*-commutative60.9%
associate-*r*60.9%
unpow260.9%
associate-*r*64.8%
*-commutative64.8%
times-frac64.8%
associate-*r*60.9%
unpow260.9%
associate-/r*63.5%
unpow263.5%
unpow263.5%
times-frac96.1%
unpow296.1%
Simplified96.1%
Final simplification97.1%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 2e+233) (* (/ (/ l (sin k)) (/ k (/ l (tan k)))) (/ 2.0 (* k t))) (* 2.0 (/ (cos k) (* t (pow (* (sin k) (/ k l)) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e+233) {
tmp = ((l / sin(k)) / (k / (l / tan(k)))) * (2.0 / (k * t));
} else {
tmp = 2.0 * (cos(k) / (t * pow((sin(k) * (k / l)), 2.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 2d+233) then
tmp = ((l / sin(k)) / (k / (l / tan(k)))) * (2.0d0 / (k * t))
else
tmp = 2.0d0 * (cos(k) / (t * ((sin(k) * (k / l)) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e+233) {
tmp = ((l / Math.sin(k)) / (k / (l / Math.tan(k)))) * (2.0 / (k * t));
} else {
tmp = 2.0 * (Math.cos(k) / (t * Math.pow((Math.sin(k) * (k / l)), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 2e+233: tmp = ((l / math.sin(k)) / (k / (l / math.tan(k)))) * (2.0 / (k * t)) else: tmp = 2.0 * (math.cos(k) / (t * math.pow((math.sin(k) * (k / l)), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 2e+233) tmp = Float64(Float64(Float64(l / sin(k)) / Float64(k / Float64(l / tan(k)))) * Float64(2.0 / Float64(k * t))); else tmp = Float64(2.0 * Float64(cos(k) / Float64(t * (Float64(sin(k) * Float64(k / l)) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 2e+233) tmp = ((l / sin(k)) / (k / (l / tan(k)))) * (2.0 / (k * t)); else tmp = 2.0 * (cos(k) / (t * ((sin(k) * (k / l)) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 2e+233], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(k / N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[(N[Sin[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{+233}:\\
\;\;\;\;\frac{\frac{\ell}{\sin k}}{\frac{k}{\frac{\ell}{\tan k}}} \cdot \frac{2}{k \cdot t}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k}{t \cdot {\left(\sin k \cdot \frac{k}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if (*.f64 l l) < 1.99999999999999995e233Initial program 33.9%
associate-*l*33.9%
associate-*l*33.9%
associate-/r*33.9%
associate-/r/33.4%
*-commutative33.4%
times-frac33.5%
+-commutative33.5%
associate--l+42.8%
metadata-eval42.8%
+-rgt-identity42.8%
times-frac49.6%
Simplified49.6%
Taylor expanded in t around 0 88.5%
unpow288.5%
Simplified88.5%
associate-*l/88.5%
associate-*l*93.5%
Applied egg-rr93.5%
associate-*l/93.5%
*-commutative93.5%
associate-*l/91.0%
associate-/l*93.5%
Simplified93.5%
associate-*r/93.6%
associate-/r/93.5%
*-commutative93.5%
Applied egg-rr93.5%
times-frac97.0%
*-commutative97.0%
Simplified97.0%
*-un-lft-identity97.0%
associate-/l*97.6%
Applied egg-rr97.6%
if 1.99999999999999995e233 < (*.f64 l l) Initial program 36.8%
associate-*l*36.8%
associate-*l*36.8%
associate-/r*36.8%
associate-/r/36.8%
*-commutative36.8%
times-frac36.7%
+-commutative36.7%
associate--l+36.8%
metadata-eval36.8%
+-rgt-identity36.8%
times-frac36.8%
Simplified36.8%
Taylor expanded in t around 0 60.3%
associate-/r*63.0%
unpow263.0%
unpow263.0%
*-commutative63.0%
Simplified63.0%
Taylor expanded in k around inf 63.0%
associate-/l*63.0%
unpow263.0%
unpow263.0%
times-frac96.0%
Simplified96.0%
expm1-log1p-u49.6%
expm1-udef34.9%
associate-/l/34.9%
pow234.9%
Applied egg-rr34.9%
expm1-def49.6%
expm1-log1p96.0%
associate-*l*96.0%
Simplified96.0%
*-commutative96.0%
pow-prod-down96.0%
Applied egg-rr96.0%
Final simplification97.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ 2.0 (* k t))))
(if (<= (* l l) 0.0)
(* t_1 (* (/ l (sin k)) (/ (/ l k) (tan k))))
(* (/ l (* k (sin k))) (* (/ l (tan k)) t_1)))))
double code(double t, double l, double k) {
double t_1 = 2.0 / (k * t);
double tmp;
if ((l * l) <= 0.0) {
tmp = t_1 * ((l / sin(k)) * ((l / k) / tan(k)));
} else {
tmp = (l / (k * sin(k))) * ((l / tan(k)) * t_1);
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (k * t)
if ((l * l) <= 0.0d0) then
tmp = t_1 * ((l / sin(k)) * ((l / k) / tan(k)))
else
tmp = (l / (k * sin(k))) * ((l / tan(k)) * t_1)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 2.0 / (k * t);
double tmp;
if ((l * l) <= 0.0) {
tmp = t_1 * ((l / Math.sin(k)) * ((l / k) / Math.tan(k)));
} else {
tmp = (l / (k * Math.sin(k))) * ((l / Math.tan(k)) * t_1);
}
return tmp;
}
def code(t, l, k): t_1 = 2.0 / (k * t) tmp = 0 if (l * l) <= 0.0: tmp = t_1 * ((l / math.sin(k)) * ((l / k) / math.tan(k))) else: tmp = (l / (k * math.sin(k))) * ((l / math.tan(k)) * t_1) return tmp
function code(t, l, k) t_1 = Float64(2.0 / Float64(k * t)) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(t_1 * Float64(Float64(l / sin(k)) * Float64(Float64(l / k) / tan(k)))); else tmp = Float64(Float64(l / Float64(k * sin(k))) * Float64(Float64(l / tan(k)) * t_1)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = 2.0 / (k * t); tmp = 0.0; if ((l * l) <= 0.0) tmp = t_1 * ((l / sin(k)) * ((l / k) / tan(k))); else tmp = (l / (k * sin(k))) * ((l / tan(k)) * t_1); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(2.0 / N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(t$95$1 * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{k \cdot t}\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;t_1 \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\frac{\ell}{k}}{\tan k}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k \cdot \sin k} \cdot \left(\frac{\ell}{\tan k} \cdot t_1\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 15.5%
associate-*l*15.5%
associate-*l*15.5%
associate-/r*15.5%
associate-/r/15.5%
*-commutative15.5%
times-frac15.5%
+-commutative15.5%
associate--l+21.9%
metadata-eval21.9%
+-rgt-identity21.9%
times-frac37.5%
Simplified37.5%
Taylor expanded in t around 0 86.0%
unpow286.0%
Simplified86.0%
associate-*l/85.9%
associate-*l*93.7%
Applied egg-rr93.7%
associate-*l/93.8%
*-commutative93.8%
associate-*l/88.0%
associate-/l*93.8%
Simplified93.8%
associate-*r/93.7%
associate-/r/93.7%
*-commutative93.7%
Applied egg-rr93.7%
times-frac94.9%
*-commutative94.9%
Simplified94.9%
expm1-log1p-u89.3%
expm1-udef85.6%
associate-/l*85.6%
Applied egg-rr85.6%
expm1-def90.5%
expm1-log1p96.1%
associate-/r/96.0%
associate-*l/94.9%
times-frac62.0%
*-rgt-identity62.0%
associate-*r/62.0%
unpow262.0%
associate-*l/62.0%
unpow262.0%
associate-*l*83.1%
times-frac96.0%
associate-*r/96.0%
*-rgt-identity96.0%
Simplified96.0%
if 0.0 < (*.f64 l l) Initial program 43.2%
associate-*l*43.2%
associate-*l*43.2%
associate-/r*43.2%
associate-/r/42.7%
*-commutative42.7%
times-frac42.8%
+-commutative42.8%
associate--l+49.3%
metadata-eval49.3%
+-rgt-identity49.3%
times-frac49.4%
Simplified49.4%
Taylor expanded in t around 0 77.5%
unpow277.5%
Simplified77.5%
associate-*l/77.5%
associate-*l*80.8%
Applied egg-rr80.8%
associate-*l/80.8%
*-commutative80.8%
associate-*l/80.8%
associate-/l*80.8%
Simplified80.8%
associate-*r/80.8%
associate-/r/80.8%
*-commutative80.8%
Applied egg-rr80.8%
times-frac84.7%
*-commutative84.7%
Simplified84.7%
expm1-log1p-u52.0%
expm1-udef40.5%
associate-/l*43.7%
*-commutative43.7%
Applied egg-rr43.7%
expm1-def56.8%
expm1-log1p90.1%
associate-/r/90.1%
associate-*l*94.9%
associate-/l/94.9%
*-commutative94.9%
Simplified94.9%
Final simplification95.2%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ l (tan k))))
(if (<= (* l l) 2e-196)
(* t_1 (/ (* l (/ 2.0 (* k (* k t)))) (sin k)))
(* (/ l (* k (sin k))) (* t_1 (/ 2.0 (* k t)))))))
double code(double t, double l, double k) {
double t_1 = l / tan(k);
double tmp;
if ((l * l) <= 2e-196) {
tmp = t_1 * ((l * (2.0 / (k * (k * t)))) / sin(k));
} else {
tmp = (l / (k * sin(k))) * (t_1 * (2.0 / (k * 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) :: t_1
real(8) :: tmp
t_1 = l / tan(k)
if ((l * l) <= 2d-196) then
tmp = t_1 * ((l * (2.0d0 / (k * (k * t)))) / sin(k))
else
tmp = (l / (k * sin(k))) * (t_1 * (2.0d0 / (k * t)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = l / Math.tan(k);
double tmp;
if ((l * l) <= 2e-196) {
tmp = t_1 * ((l * (2.0 / (k * (k * t)))) / Math.sin(k));
} else {
tmp = (l / (k * Math.sin(k))) * (t_1 * (2.0 / (k * t)));
}
return tmp;
}
def code(t, l, k): t_1 = l / math.tan(k) tmp = 0 if (l * l) <= 2e-196: tmp = t_1 * ((l * (2.0 / (k * (k * t)))) / math.sin(k)) else: tmp = (l / (k * math.sin(k))) * (t_1 * (2.0 / (k * t))) return tmp
function code(t, l, k) t_1 = Float64(l / tan(k)) tmp = 0.0 if (Float64(l * l) <= 2e-196) tmp = Float64(t_1 * Float64(Float64(l * Float64(2.0 / Float64(k * Float64(k * t)))) / sin(k))); else tmp = Float64(Float64(l / Float64(k * sin(k))) * Float64(t_1 * Float64(2.0 / Float64(k * t)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = l / tan(k); tmp = 0.0; if ((l * l) <= 2e-196) tmp = t_1 * ((l * (2.0 / (k * (k * t)))) / sin(k)); else tmp = (l / (k * sin(k))) * (t_1 * (2.0 / (k * t))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 2e-196], N[(t$95$1 * N[(N[(l * N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(2.0 / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{\tan k}\\
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-196}:\\
\;\;\;\;t_1 \cdot \frac{\ell \cdot \frac{2}{k \cdot \left(k \cdot t\right)}}{\sin k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k \cdot \sin k} \cdot \left(t_1 \cdot \frac{2}{k \cdot t}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 2.0000000000000001e-196Initial program 23.2%
associate-*l*23.2%
associate-*l*23.2%
associate-/r*23.2%
associate-/r/22.3%
*-commutative22.3%
times-frac22.3%
+-commutative22.3%
associate--l+30.4%
metadata-eval30.4%
+-rgt-identity30.4%
times-frac42.7%
Simplified42.7%
Taylor expanded in t around 0 88.9%
unpow288.9%
Simplified88.9%
associate-*l/88.8%
associate-*l*95.0%
Applied egg-rr95.0%
associate-*l/95.1%
associate-*r*96.9%
associate-*r/97.0%
Simplified97.0%
if 2.0000000000000001e-196 < (*.f64 l l) Initial program 42.1%
associate-*l*42.1%
associate-*l*42.0%
associate-/r*42.1%
associate-/r/42.1%
*-commutative42.1%
times-frac42.1%
+-commutative42.1%
associate--l+47.6%
metadata-eval47.6%
+-rgt-identity47.6%
times-frac47.7%
Simplified47.7%
Taylor expanded in t around 0 74.5%
unpow274.5%
Simplified74.5%
associate-*l/74.5%
associate-*l*78.3%
Applied egg-rr78.3%
associate-*l/78.3%
*-commutative78.3%
associate-*l/78.2%
associate-/l*78.2%
Simplified78.2%
associate-*r/78.3%
associate-/r/78.3%
*-commutative78.3%
Applied egg-rr78.3%
times-frac83.3%
*-commutative83.3%
Simplified83.3%
expm1-log1p-u47.5%
expm1-udef36.9%
associate-/l*40.4%
*-commutative40.4%
Applied egg-rr40.4%
expm1-def52.9%
expm1-log1p89.5%
associate-/r/89.4%
associate-*l*94.3%
associate-/l/94.2%
*-commutative94.2%
Simplified94.2%
Final simplification95.3%
(FPCore (t l k) :precision binary64 (* (/ 2.0 (* k t)) (* (/ l (sin k)) (/ (/ l k) (tan k)))))
double code(double t, double l, double k) {
return (2.0 / (k * t)) * ((l / sin(k)) * ((l / k) / tan(k)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (2.0d0 / (k * t)) * ((l / sin(k)) * ((l / k) / tan(k)))
end function
public static double code(double t, double l, double k) {
return (2.0 / (k * t)) * ((l / Math.sin(k)) * ((l / k) / Math.tan(k)));
}
def code(t, l, k): return (2.0 / (k * t)) * ((l / math.sin(k)) * ((l / k) / math.tan(k)))
function code(t, l, k) return Float64(Float64(2.0 / Float64(k * t)) * Float64(Float64(l / sin(k)) * Float64(Float64(l / k) / tan(k)))) end
function tmp = code(t, l, k) tmp = (2.0 / (k * t)) * ((l / sin(k)) * ((l / k) / tan(k))); end
code[t_, l_, k_] := N[(N[(2.0 / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{k \cdot t} \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\frac{\ell}{k}}{\tan k}\right)
\end{array}
Initial program 34.8%
associate-*l*34.8%
associate-*l*34.8%
associate-/r*34.8%
associate-/r/34.4%
*-commutative34.4%
times-frac34.5%
+-commutative34.5%
associate--l+41.0%
metadata-eval41.0%
+-rgt-identity41.0%
times-frac45.7%
Simplified45.7%
Taylor expanded in t around 0 80.0%
unpow280.0%
Simplified80.0%
associate-*l/80.0%
associate-*l*84.8%
Applied egg-rr84.8%
associate-*l/84.8%
*-commutative84.8%
associate-*l/83.0%
associate-/l*84.8%
Simplified84.8%
associate-*r/84.8%
associate-/r/84.8%
*-commutative84.8%
Applied egg-rr84.8%
times-frac87.8%
*-commutative87.8%
Simplified87.8%
expm1-log1p-u69.3%
expm1-udef60.5%
associate-/l*62.6%
Applied egg-rr62.6%
expm1-def71.7%
expm1-log1p92.0%
associate-/r/91.9%
associate-*l/87.8%
times-frac77.8%
*-rgt-identity77.8%
associate-*r/77.7%
unpow277.7%
associate-*l/77.8%
unpow277.8%
associate-*l*88.0%
times-frac91.9%
associate-*r/91.9%
*-rgt-identity91.9%
Simplified91.9%
Final simplification91.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* k (* k t))))
(if (<= k 6.8e-66)
(* (/ 2.0 t_1) (/ l (* k (/ k l))))
(*
2.0
(*
(/ (cos k) (* k k))
(+ (/ (* l l) t_1) (* (/ (* l l) t) 0.3333333333333333)))))))
double code(double t, double l, double k) {
double t_1 = k * (k * t);
double tmp;
if (k <= 6.8e-66) {
tmp = (2.0 / t_1) * (l / (k * (k / l)));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * (((l * l) / t_1) + (((l * l) / t) * 0.3333333333333333)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (k * t)
if (k <= 6.8d-66) then
tmp = (2.0d0 / t_1) * (l / (k * (k / l)))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * (((l * l) / t_1) + (((l * l) / t) * 0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = k * (k * t);
double tmp;
if (k <= 6.8e-66) {
tmp = (2.0 / t_1) * (l / (k * (k / l)));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * (((l * l) / t_1) + (((l * l) / t) * 0.3333333333333333)));
}
return tmp;
}
def code(t, l, k): t_1 = k * (k * t) tmp = 0 if k <= 6.8e-66: tmp = (2.0 / t_1) * (l / (k * (k / l))) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * (((l * l) / t_1) + (((l * l) / t) * 0.3333333333333333))) return tmp
function code(t, l, k) t_1 = Float64(k * Float64(k * t)) tmp = 0.0 if (k <= 6.8e-66) tmp = Float64(Float64(2.0 / t_1) * Float64(l / Float64(k * Float64(k / l)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(Float64(l * l) / t_1) + Float64(Float64(Float64(l * l) / t) * 0.3333333333333333)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = k * (k * t); tmp = 0.0; if (k <= 6.8e-66) tmp = (2.0 / t_1) * (l / (k * (k / l))); else tmp = 2.0 * ((cos(k) / (k * k)) * (((l * l) / t_1) + (((l * l) / t) * 0.3333333333333333))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 6.8e-66], N[(N[(2.0 / t$95$1), $MachinePrecision] * N[(l / N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(k \cdot t\right)\\
\mathbf{if}\;k \leq 6.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{2}{t_1} \cdot \frac{\ell}{k \cdot \frac{k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\frac{\ell \cdot \ell}{t_1} + \frac{\ell \cdot \ell}{t} \cdot 0.3333333333333333\right)\right)\\
\end{array}
\end{array}
if k < 6.79999999999999994e-66Initial program 37.8%
associate-*l*37.8%
associate-*l*37.8%
associate-/r*37.8%
associate-/r/37.3%
*-commutative37.3%
times-frac36.8%
+-commutative36.8%
associate--l+40.8%
metadata-eval40.8%
+-rgt-identity40.8%
times-frac48.0%
Simplified48.0%
Taylor expanded in t around 0 84.2%
unpow284.2%
Simplified84.2%
associate-*l/84.2%
associate-*l*88.4%
Applied egg-rr88.4%
associate-*l/88.4%
*-commutative88.4%
associate-*l/85.7%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in k around 0 77.0%
unpow277.0%
associate-*r/80.6%
Simplified80.6%
if 6.79999999999999994e-66 < k Initial program 28.9%
associate-*l*28.9%
associate-*l*28.9%
associate-/r*29.0%
associate-/r/28.9%
*-commutative28.9%
times-frac30.0%
+-commutative30.0%
associate--l+41.3%
metadata-eval41.3%
+-rgt-identity41.3%
times-frac41.4%
Simplified41.4%
Taylor expanded in t around 0 72.2%
unpow272.2%
times-frac74.4%
unpow274.4%
*-commutative74.4%
Simplified74.4%
Taylor expanded in k around 0 66.7%
unpow266.7%
unpow266.7%
associate-*r*66.7%
*-commutative66.7%
unpow266.7%
Simplified66.7%
Final simplification75.8%
(FPCore (t l k) :precision binary64 (if (<= k 2.2e-46) (/ (* 2.0 (pow (/ k l) -2.0)) (* k (* k t))) (* 2.0 (* (/ (cos k) (* k k)) (/ (* l l) (* t (* k k)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.2e-46) {
tmp = (2.0 * pow((k / l), -2.0)) / (k * (k * t));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l * l) / (t * (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 <= 2.2d-46) then
tmp = (2.0d0 * ((k / l) ** (-2.0d0))) / (k * (k * t))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l * l) / (t * (k * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.2e-46) {
tmp = (2.0 * Math.pow((k / l), -2.0)) / (k * (k * t));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l * l) / (t * (k * k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.2e-46: tmp = (2.0 * math.pow((k / l), -2.0)) / (k * (k * t)) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l * l) / (t * (k * k)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.2e-46) tmp = Float64(Float64(2.0 * (Float64(k / l) ^ -2.0)) / Float64(k * Float64(k * t))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(l * l) / Float64(t * Float64(k * k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.2e-46) tmp = (2.0 * ((k / l) ^ -2.0)) / (k * (k * t)); else tmp = 2.0 * ((cos(k) / (k * k)) * ((l * l) / (t * (k * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.2e-46], N[(N[(2.0 * N[Power[N[(k / l), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-46}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k}{\ell}\right)}^{-2}}{k \cdot \left(k \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \frac{\ell \cdot \ell}{t \cdot \left(k \cdot k\right)}\right)\\
\end{array}
\end{array}
if k < 2.2000000000000001e-46Initial program 38.5%
associate-*l*38.5%
associate-*l*38.5%
associate-/r*38.5%
associate-/r/38.0%
*-commutative38.0%
times-frac37.5%
+-commutative37.5%
associate--l+41.9%
metadata-eval41.9%
+-rgt-identity41.9%
times-frac49.0%
Simplified49.0%
Taylor expanded in t around 0 84.6%
unpow284.6%
Simplified84.6%
Taylor expanded in k around 0 66.1%
unpow266.1%
unpow266.1%
Simplified66.1%
associate-*r*66.1%
associate-*l/66.1%
clear-num66.1%
frac-times81.1%
pow281.1%
pow-flip81.2%
metadata-eval81.2%
Applied egg-rr81.2%
if 2.2000000000000001e-46 < k Initial program 27.0%
associate-*l*27.0%
associate-*l*27.0%
associate-/r*27.0%
associate-/r/27.0%
*-commutative27.0%
times-frac28.1%
+-commutative28.1%
associate--l+39.0%
metadata-eval39.0%
+-rgt-identity39.0%
times-frac39.1%
Simplified39.1%
Taylor expanded in t around 0 70.5%
unpow270.5%
times-frac72.8%
unpow272.8%
*-commutative72.8%
Simplified72.8%
Taylor expanded in k around 0 63.9%
unpow263.9%
Simplified63.9%
Final simplification75.6%
(FPCore (t l k) :precision binary64 (if (<= k 2.2e-46) (/ (* 2.0 (pow (/ k l) -2.0)) (* k (* k t))) (* 2.0 (/ (/ (* (* l l) (cos k)) (* k k)) (* t (* k k))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.2e-46) {
tmp = (2.0 * pow((k / l), -2.0)) / (k * (k * t));
} else {
tmp = 2.0 * ((((l * l) * cos(k)) / (k * k)) / (t * (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 <= 2.2d-46) then
tmp = (2.0d0 * ((k / l) ** (-2.0d0))) / (k * (k * t))
else
tmp = 2.0d0 * ((((l * l) * cos(k)) / (k * k)) / (t * (k * k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.2e-46) {
tmp = (2.0 * Math.pow((k / l), -2.0)) / (k * (k * t));
} else {
tmp = 2.0 * ((((l * l) * Math.cos(k)) / (k * k)) / (t * (k * k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.2e-46: tmp = (2.0 * math.pow((k / l), -2.0)) / (k * (k * t)) else: tmp = 2.0 * ((((l * l) * math.cos(k)) / (k * k)) / (t * (k * k))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.2e-46) tmp = Float64(Float64(2.0 * (Float64(k / l) ^ -2.0)) / Float64(k * Float64(k * t))); else tmp = Float64(2.0 * Float64(Float64(Float64(Float64(l * l) * cos(k)) / Float64(k * k)) / Float64(t * Float64(k * k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.2e-46) tmp = (2.0 * ((k / l) ^ -2.0)) / (k * (k * t)); else tmp = 2.0 * ((((l * l) * cos(k)) / (k * k)) / (t * (k * k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.2e-46], N[(N[(2.0 * N[Power[N[(k / l), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[(l * l), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-46}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k}{\ell}\right)}^{-2}}{k \cdot \left(k \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{k \cdot k}}{t \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 2.2000000000000001e-46Initial program 38.5%
associate-*l*38.5%
associate-*l*38.5%
associate-/r*38.5%
associate-/r/38.0%
*-commutative38.0%
times-frac37.5%
+-commutative37.5%
associate--l+41.9%
metadata-eval41.9%
+-rgt-identity41.9%
times-frac49.0%
Simplified49.0%
Taylor expanded in t around 0 84.6%
unpow284.6%
Simplified84.6%
Taylor expanded in k around 0 66.1%
unpow266.1%
unpow266.1%
Simplified66.1%
associate-*r*66.1%
associate-*l/66.1%
clear-num66.1%
frac-times81.1%
pow281.1%
pow-flip81.2%
metadata-eval81.2%
Applied egg-rr81.2%
if 2.2000000000000001e-46 < k Initial program 27.0%
associate-*l*27.0%
associate-*l*27.0%
associate-/r*27.0%
associate-/r/27.0%
*-commutative27.0%
times-frac28.1%
+-commutative28.1%
associate--l+39.0%
metadata-eval39.0%
+-rgt-identity39.0%
times-frac39.1%
Simplified39.1%
Taylor expanded in t around 0 70.5%
associate-/r*73.0%
unpow273.0%
unpow273.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in k around 0 63.9%
unpow263.9%
Simplified63.9%
Final simplification75.6%
(FPCore (t l k) :precision binary64 (/ (* 2.0 (pow (/ k l) -2.0)) (* k (* k t))))
double code(double t, double l, double k) {
return (2.0 * pow((k / l), -2.0)) / (k * (k * t));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (2.0d0 * ((k / l) ** (-2.0d0))) / (k * (k * t))
end function
public static double code(double t, double l, double k) {
return (2.0 * Math.pow((k / l), -2.0)) / (k * (k * t));
}
def code(t, l, k): return (2.0 * math.pow((k / l), -2.0)) / (k * (k * t))
function code(t, l, k) return Float64(Float64(2.0 * (Float64(k / l) ^ -2.0)) / Float64(k * Float64(k * t))) end
function tmp = code(t, l, k) tmp = (2.0 * ((k / l) ^ -2.0)) / (k * (k * t)); end
code[t_, l_, k_] := N[(N[(2.0 * N[Power[N[(k / l), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2 \cdot {\left(\frac{k}{\ell}\right)}^{-2}}{k \cdot \left(k \cdot t\right)}
\end{array}
Initial program 34.8%
associate-*l*34.8%
associate-*l*34.8%
associate-/r*34.8%
associate-/r/34.4%
*-commutative34.4%
times-frac34.5%
+-commutative34.5%
associate--l+41.0%
metadata-eval41.0%
+-rgt-identity41.0%
times-frac45.7%
Simplified45.7%
Taylor expanded in t around 0 80.0%
unpow280.0%
Simplified80.0%
Taylor expanded in k around 0 64.9%
unpow264.9%
unpow264.9%
Simplified64.9%
associate-*r*64.9%
associate-*l/64.9%
clear-num64.9%
frac-times74.8%
pow274.8%
pow-flip74.8%
metadata-eval74.8%
Applied egg-rr74.8%
Final simplification74.8%
(FPCore (t l k) :precision binary64 (* (/ 2.0 (* t (* k k))) (* (/ l k) (/ l k))))
double code(double t, double l, double k) {
return (2.0 / (t * (k * k))) * ((l / k) * (l / k));
}
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 * (k * k))) * ((l / k) * (l / k))
end function
public static double code(double t, double l, double k) {
return (2.0 / (t * (k * k))) * ((l / k) * (l / k));
}
def code(t, l, k): return (2.0 / (t * (k * k))) * ((l / k) * (l / k))
function code(t, l, k) return Float64(Float64(2.0 / Float64(t * Float64(k * k))) * Float64(Float64(l / k) * Float64(l / k))) end
function tmp = code(t, l, k) tmp = (2.0 / (t * (k * k))) * ((l / k) * (l / k)); end
code[t_, l_, k_] := N[(N[(2.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{t \cdot \left(k \cdot k\right)} \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right)
\end{array}
Initial program 34.8%
associate-*l*34.8%
associate-*l*34.8%
associate-/r*34.8%
associate-/r/34.4%
*-commutative34.4%
times-frac34.5%
+-commutative34.5%
associate--l+41.0%
metadata-eval41.0%
+-rgt-identity41.0%
times-frac45.7%
Simplified45.7%
Taylor expanded in t around 0 80.0%
unpow280.0%
Simplified80.0%
Taylor expanded in k around 0 64.9%
unpow264.9%
unpow264.9%
Simplified64.9%
times-frac72.4%
Applied egg-rr72.4%
Final simplification72.4%
(FPCore (t l k) :precision binary64 (* (/ 2.0 (* k (* k t))) (/ l (* k (/ k l)))))
double code(double t, double l, double k) {
return (2.0 / (k * (k * t))) * (l / (k * (k / l)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (2.0d0 / (k * (k * t))) * (l / (k * (k / l)))
end function
public static double code(double t, double l, double k) {
return (2.0 / (k * (k * t))) * (l / (k * (k / l)));
}
def code(t, l, k): return (2.0 / (k * (k * t))) * (l / (k * (k / l)))
function code(t, l, k) return Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(l / Float64(k * Float64(k / l)))) end
function tmp = code(t, l, k) tmp = (2.0 / (k * (k * t))) * (l / (k * (k / l))); end
code[t_, l_, k_] := N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \frac{\ell}{k \cdot \frac{k}{\ell}}
\end{array}
Initial program 34.8%
associate-*l*34.8%
associate-*l*34.8%
associate-/r*34.8%
associate-/r/34.4%
*-commutative34.4%
times-frac34.5%
+-commutative34.5%
associate--l+41.0%
metadata-eval41.0%
+-rgt-identity41.0%
times-frac45.7%
Simplified45.7%
Taylor expanded in t around 0 80.0%
unpow280.0%
Simplified80.0%
associate-*l/80.0%
associate-*l*84.8%
Applied egg-rr84.8%
associate-*l/84.8%
*-commutative84.8%
associate-*l/83.0%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in k around 0 72.4%
unpow272.4%
associate-*r/74.8%
Simplified74.8%
Final simplification74.8%
herbie shell --seed 2023224
(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))))