
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
(FPCore (t l k) :precision binary64 (if (<= (* l l) 5e-237) (* (/ l (sin k)) (* (/ l (tan k)) (/ 2.0 (* k (* k t))))) (* 2.0 (/ (cos k) (/ (* t (pow (sin k) 2.0)) (pow (/ l k) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-237) {
tmp = (l / sin(k)) * ((l / tan(k)) * (2.0 / (k * (k * t))));
} else {
tmp = 2.0 * (cos(k) / ((t * pow(sin(k), 2.0)) / pow((l / 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) <= 5d-237) then
tmp = (l / sin(k)) * ((l / tan(k)) * (2.0d0 / (k * (k * t))))
else
tmp = 2.0d0 * (cos(k) / ((t * (sin(k) ** 2.0d0)) / ((l / k) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-237) {
tmp = (l / Math.sin(k)) * ((l / Math.tan(k)) * (2.0 / (k * (k * t))));
} else {
tmp = 2.0 * (Math.cos(k) / ((t * Math.pow(Math.sin(k), 2.0)) / Math.pow((l / k), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 5e-237: tmp = (l / math.sin(k)) * ((l / math.tan(k)) * (2.0 / (k * (k * t)))) else: tmp = 2.0 * (math.cos(k) / ((t * math.pow(math.sin(k), 2.0)) / math.pow((l / k), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-237) tmp = Float64(Float64(l / sin(k)) * Float64(Float64(l / tan(k)) * Float64(2.0 / Float64(k * Float64(k * t))))); else tmp = Float64(2.0 * Float64(cos(k) / Float64(Float64(t * (sin(k) ^ 2.0)) / (Float64(l / k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-237) tmp = (l / sin(k)) * ((l / tan(k)) * (2.0 / (k * (k * t)))); else tmp = 2.0 * (cos(k) / ((t * (sin(k) ^ 2.0)) / ((l / k) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-237], N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[k], $MachinePrecision] / N[(N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-237}:\\
\;\;\;\;\frac{\ell}{\sin k} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{k \cdot \left(k \cdot t\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k}{\frac{t \cdot {\sin k}^{2}}{{\left(\frac{\ell}{k}\right)}^{2}}}\\
\end{array}
\end{array}
if (*.f64 l l) < 5.0000000000000002e-237Initial program 28.9%
associate-*l*28.9%
associate-*l*28.9%
associate-/r*28.9%
associate-/r/27.8%
*-commutative27.8%
times-frac30.0%
+-commutative30.0%
associate--l+37.2%
metadata-eval37.2%
+-rgt-identity37.2%
times-frac49.1%
Simplified49.1%
Taylor expanded in t around 0 84.7%
unpow284.7%
Simplified84.7%
Taylor expanded in k around 0 84.7%
unpow284.7%
associate-*r*89.5%
Simplified89.5%
expm1-log1p-u82.4%
expm1-udef72.9%
*-commutative72.9%
associate-/r*72.9%
Applied egg-rr72.9%
expm1-def82.4%
expm1-log1p89.5%
associate-*l*94.5%
associate-/l/94.5%
*-commutative94.5%
Simplified94.5%
if 5.0000000000000002e-237 < (*.f64 l l) Initial program 38.6%
associate-*l*38.6%
associate-*l*38.6%
associate-/r*38.6%
associate-/r/38.6%
*-commutative38.6%
times-frac38.1%
+-commutative38.1%
associate--l+45.9%
metadata-eval45.9%
+-rgt-identity45.9%
times-frac45.9%
Simplified45.9%
Taylor expanded in t around 0 77.8%
unpow277.8%
Simplified77.8%
Taylor expanded in k around 0 77.8%
unpow277.8%
associate-*r*82.7%
Simplified82.7%
expm1-log1p-u47.4%
expm1-udef37.5%
*-commutative37.5%
associate-/r*37.6%
Applied egg-rr37.6%
expm1-def47.5%
expm1-log1p82.8%
associate-*l*87.6%
associate-/l/87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in l around 0 78.3%
associate-/l*78.3%
*-commutative78.3%
associate-/l*79.6%
unpow279.6%
unpow279.6%
times-frac97.1%
unpow297.1%
*-commutative97.1%
Simplified97.1%
Final simplification96.2%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ 2.0 (* k (* k t)))))
(if (<= k 3.1e-15)
(* (/ l k) (* t_1 (/ l k)))
(* t_1 (* (/ l (sin k)) (/ l (tan k)))))))
double code(double t, double l, double k) {
double t_1 = 2.0 / (k * (k * t));
double tmp;
if (k <= 3.1e-15) {
tmp = (l / k) * (t_1 * (l / k));
} else {
tmp = t_1 * ((l / sin(k)) * (l / tan(k)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (k * (k * t))
if (k <= 3.1d-15) then
tmp = (l / k) * (t_1 * (l / k))
else
tmp = t_1 * ((l / sin(k)) * (l / tan(k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 2.0 / (k * (k * t));
double tmp;
if (k <= 3.1e-15) {
tmp = (l / k) * (t_1 * (l / k));
} else {
tmp = t_1 * ((l / Math.sin(k)) * (l / Math.tan(k)));
}
return tmp;
}
def code(t, l, k): t_1 = 2.0 / (k * (k * t)) tmp = 0 if k <= 3.1e-15: tmp = (l / k) * (t_1 * (l / k)) else: tmp = t_1 * ((l / math.sin(k)) * (l / math.tan(k))) return tmp
function code(t, l, k) t_1 = Float64(2.0 / Float64(k * Float64(k * t))) tmp = 0.0 if (k <= 3.1e-15) tmp = Float64(Float64(l / k) * Float64(t_1 * Float64(l / k))); else tmp = Float64(t_1 * Float64(Float64(l / sin(k)) * Float64(l / tan(k)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = 2.0 / (k * (k * t)); tmp = 0.0; if (k <= 3.1e-15) tmp = (l / k) * (t_1 * (l / k)); else tmp = t_1 * ((l / sin(k)) * (l / tan(k))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 3.1e-15], N[(N[(l / k), $MachinePrecision] * N[(t$95$1 * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{k \cdot \left(k \cdot t\right)}\\
\mathbf{if}\;k \leq 3.1 \cdot 10^{-15}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(t_1 \cdot \frac{\ell}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\ell}{\tan k}\right)\\
\end{array}
\end{array}
if k < 3.0999999999999999e-15Initial program 39.0%
associate-*l*39.0%
associate-*l*39.0%
associate-/r*39.0%
associate-/r/38.4%
*-commutative38.4%
times-frac39.1%
+-commutative39.1%
associate--l+44.0%
metadata-eval44.0%
+-rgt-identity44.0%
times-frac50.1%
Simplified50.1%
Taylor expanded in t around 0 83.1%
unpow283.1%
Simplified83.1%
Taylor expanded in k around 0 68.3%
unpow268.3%
unpow268.3%
times-frac74.8%
Simplified74.8%
associate-*r*77.3%
associate-*l/77.3%
pow277.3%
Applied egg-rr77.3%
pow277.3%
associate-*l/77.3%
associate-*r*79.9%
Applied egg-rr79.9%
if 3.0999999999999999e-15 < k Initial program 27.0%
associate-*l*27.0%
associate-*l*27.0%
associate-/r*27.0%
associate-/r/27.0%
*-commutative27.0%
times-frac27.1%
+-commutative27.1%
associate--l+40.5%
metadata-eval40.5%
+-rgt-identity40.5%
times-frac40.5%
Simplified40.5%
Taylor expanded in t around 0 73.9%
unpow273.9%
Simplified73.9%
Taylor expanded in k around 0 73.9%
unpow273.9%
associate-*r*80.1%
Simplified80.1%
Final simplification79.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ 2.0 (* k (* k t)))))
(if (<= k 3e-28)
(* (/ l k) (* t_1 (/ l k)))
(* t_1 (/ (* l l) (* (sin k) (tan k)))))))
double code(double t, double l, double k) {
double t_1 = 2.0 / (k * (k * t));
double tmp;
if (k <= 3e-28) {
tmp = (l / k) * (t_1 * (l / k));
} else {
tmp = t_1 * ((l * l) / (sin(k) * tan(k)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (k * (k * t))
if (k <= 3d-28) then
tmp = (l / k) * (t_1 * (l / k))
else
tmp = t_1 * ((l * l) / (sin(k) * tan(k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 2.0 / (k * (k * t));
double tmp;
if (k <= 3e-28) {
tmp = (l / k) * (t_1 * (l / k));
} else {
tmp = t_1 * ((l * l) / (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
def code(t, l, k): t_1 = 2.0 / (k * (k * t)) tmp = 0 if k <= 3e-28: tmp = (l / k) * (t_1 * (l / k)) else: tmp = t_1 * ((l * l) / (math.sin(k) * math.tan(k))) return tmp
function code(t, l, k) t_1 = Float64(2.0 / Float64(k * Float64(k * t))) tmp = 0.0 if (k <= 3e-28) tmp = Float64(Float64(l / k) * Float64(t_1 * Float64(l / k))); else tmp = Float64(t_1 * Float64(Float64(l * l) / Float64(sin(k) * tan(k)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = 2.0 / (k * (k * t)); tmp = 0.0; if (k <= 3e-28) tmp = (l / k) * (t_1 * (l / k)); else tmp = t_1 * ((l * l) / (sin(k) * tan(k))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 3e-28], N[(N[(l / k), $MachinePrecision] * N[(t$95$1 * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(l * l), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{k \cdot \left(k \cdot t\right)}\\
\mathbf{if}\;k \leq 3 \cdot 10^{-28}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(t_1 \cdot \frac{\ell}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \frac{\ell \cdot \ell}{\sin k \cdot \tan k}\\
\end{array}
\end{array}
if k < 3.00000000000000003e-28Initial program 39.1%
associate-*l*39.1%
associate-*l*39.1%
associate-/r*39.1%
associate-/r/38.5%
*-commutative38.5%
times-frac39.2%
+-commutative39.2%
associate--l+44.2%
metadata-eval44.2%
+-rgt-identity44.2%
times-frac50.4%
Simplified50.4%
Taylor expanded in t around 0 82.8%
unpow282.8%
Simplified82.8%
Taylor expanded in k around 0 67.8%
unpow267.8%
unpow267.8%
times-frac74.4%
Simplified74.4%
associate-*r*76.9%
associate-*l/76.9%
pow276.9%
Applied egg-rr76.9%
pow276.9%
associate-*l/76.9%
associate-*r*79.5%
Applied egg-rr79.5%
if 3.00000000000000003e-28 < k Initial program 27.2%
associate-*l*27.3%
associate-*l*27.3%
associate-/r*27.3%
associate-/r/27.3%
*-commutative27.3%
times-frac27.3%
+-commutative27.3%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac40.2%
Simplified40.2%
Taylor expanded in t around 0 74.8%
unpow274.8%
Simplified74.8%
Taylor expanded in k around 0 74.8%
unpow274.8%
associate-*r*80.8%
Simplified80.8%
frac-times80.9%
Applied egg-rr80.9%
Final simplification80.0%
(FPCore (t l k) :precision binary64 (* (/ l (sin k)) (* (/ l (tan k)) (/ 2.0 (* k (* k t))))))
double code(double t, double l, double k) {
return (l / sin(k)) * ((l / tan(k)) * (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 = (l / sin(k)) * ((l / tan(k)) * (2.0d0 / (k * (k * t))))
end function
public static double code(double t, double l, double k) {
return (l / Math.sin(k)) * ((l / Math.tan(k)) * (2.0 / (k * (k * t))));
}
def code(t, l, k): return (l / math.sin(k)) * ((l / math.tan(k)) * (2.0 / (k * (k * t))))
function code(t, l, k) return Float64(Float64(l / sin(k)) * Float64(Float64(l / tan(k)) * Float64(2.0 / Float64(k * Float64(k * t))))) end
function tmp = code(t, l, k) tmp = (l / sin(k)) * ((l / tan(k)) * (2.0 / (k * (k * t)))); end
code[t_, l_, k_] := N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{\sin k} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{k \cdot \left(k \cdot t\right)}\right)
\end{array}
Initial program 35.2%
associate-*l*35.2%
associate-*l*35.2%
associate-/r*35.2%
associate-/r/34.8%
*-commutative34.8%
times-frac35.3%
+-commutative35.3%
associate--l+42.9%
metadata-eval42.9%
+-rgt-identity42.9%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 80.2%
unpow280.2%
Simplified80.2%
Taylor expanded in k around 0 80.2%
unpow280.2%
associate-*r*85.1%
Simplified85.1%
expm1-log1p-u59.7%
expm1-udef50.0%
*-commutative50.0%
associate-/r*50.0%
Applied egg-rr50.0%
expm1-def59.8%
expm1-log1p85.1%
associate-*l*90.0%
associate-/l/89.9%
*-commutative89.9%
Simplified89.9%
Final simplification89.9%
(FPCore (t l k) :precision binary64 (* (/ l (sin k)) (* (/ l (tan k)) (/ (/ 2.0 k) (* k t)))))
double code(double t, double l, double k) {
return (l / sin(k)) * ((l / tan(k)) * ((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 = (l / sin(k)) * ((l / tan(k)) * ((2.0d0 / k) / (k * t)))
end function
public static double code(double t, double l, double k) {
return (l / Math.sin(k)) * ((l / Math.tan(k)) * ((2.0 / k) / (k * t)));
}
def code(t, l, k): return (l / math.sin(k)) * ((l / math.tan(k)) * ((2.0 / k) / (k * t)))
function code(t, l, k) return Float64(Float64(l / sin(k)) * Float64(Float64(l / tan(k)) * Float64(Float64(2.0 / k) / Float64(k * t)))) end
function tmp = code(t, l, k) tmp = (l / sin(k)) * ((l / tan(k)) * ((2.0 / k) / (k * t))); end
code[t_, l_, k_] := N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / k), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{\sin k} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\frac{2}{k}}{k \cdot t}\right)
\end{array}
Initial program 35.2%
associate-*l*35.2%
associate-*l*35.2%
associate-/r*35.2%
associate-/r/34.8%
*-commutative34.8%
times-frac35.3%
+-commutative35.3%
associate--l+42.9%
metadata-eval42.9%
+-rgt-identity42.9%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 80.2%
unpow280.2%
Simplified80.2%
Taylor expanded in k around 0 80.2%
unpow280.2%
associate-*r*85.1%
Simplified85.1%
expm1-log1p-u59.7%
expm1-udef50.0%
*-commutative50.0%
associate-/r*50.0%
Applied egg-rr50.0%
expm1-def59.8%
expm1-log1p85.1%
associate-*l*90.0%
associate-/l/89.9%
*-commutative89.9%
Simplified89.9%
frac-times87.7%
Applied egg-rr87.7%
times-frac89.9%
associate-/r*90.0%
Simplified90.0%
Final simplification90.0%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* k (* k t))))
(if (<= k 350.0)
(*
(* (/ l (tan k)) (/ 2.0 t_1))
(+ (/ l k) (* 0.16666666666666666 (* l k))))
(*
2.0
(*
(/ (cos k) (* k k))
(+ (/ (* l l) t_1) (* 0.3333333333333333 (/ (* l l) t))))))))
double code(double t, double l, double k) {
double t_1 = k * (k * t);
double tmp;
if (k <= 350.0) {
tmp = ((l / tan(k)) * (2.0 / t_1)) * ((l / k) + (0.16666666666666666 * (l * k)));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * (((l * l) / t_1) + (0.3333333333333333 * ((l * l) / t))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (k * t)
if (k <= 350.0d0) then
tmp = ((l / tan(k)) * (2.0d0 / t_1)) * ((l / k) + (0.16666666666666666d0 * (l * k)))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * (((l * l) / t_1) + (0.3333333333333333d0 * ((l * l) / t))))
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 <= 350.0) {
tmp = ((l / Math.tan(k)) * (2.0 / t_1)) * ((l / k) + (0.16666666666666666 * (l * k)));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * (((l * l) / t_1) + (0.3333333333333333 * ((l * l) / t))));
}
return tmp;
}
def code(t, l, k): t_1 = k * (k * t) tmp = 0 if k <= 350.0: tmp = ((l / math.tan(k)) * (2.0 / t_1)) * ((l / k) + (0.16666666666666666 * (l * k))) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * (((l * l) / t_1) + (0.3333333333333333 * ((l * l) / t)))) return tmp
function code(t, l, k) t_1 = Float64(k * Float64(k * t)) tmp = 0.0 if (k <= 350.0) tmp = Float64(Float64(Float64(l / tan(k)) * Float64(2.0 / t_1)) * Float64(Float64(l / k) + Float64(0.16666666666666666 * Float64(l * k)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(Float64(l * l) / t_1) + Float64(0.3333333333333333 * Float64(Float64(l * l) / t))))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = k * (k * t); tmp = 0.0; if (k <= 350.0) tmp = ((l / tan(k)) * (2.0 / t_1)) * ((l / k) + (0.16666666666666666 * (l * k))); else tmp = 2.0 * ((cos(k) / (k * k)) * (((l * l) / t_1) + (0.3333333333333333 * ((l * l) / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 350.0], N[(N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / t$95$1), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] + N[(0.16666666666666666 * N[(l * k), $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[(0.3333333333333333 * N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(k \cdot t\right)\\
\mathbf{if}\;k \leq 350:\\
\;\;\;\;\left(\frac{\ell}{\tan k} \cdot \frac{2}{t_1}\right) \cdot \left(\frac{\ell}{k} + 0.16666666666666666 \cdot \left(\ell \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\frac{\ell \cdot \ell}{t_1} + 0.3333333333333333 \cdot \frac{\ell \cdot \ell}{t}\right)\right)\\
\end{array}
\end{array}
if k < 350Initial program 38.5%
associate-*l*38.5%
associate-*l*38.5%
associate-/r*38.5%
associate-/r/38.0%
*-commutative38.0%
times-frac38.7%
+-commutative38.7%
associate--l+44.0%
metadata-eval44.0%
+-rgt-identity44.0%
times-frac50.1%
Simplified50.1%
Taylor expanded in t around 0 83.3%
unpow283.3%
Simplified83.3%
Taylor expanded in k around 0 83.3%
unpow283.3%
associate-*r*87.5%
Simplified87.5%
expm1-log1p-u54.9%
expm1-udef45.6%
*-commutative45.6%
associate-/r*45.6%
Applied egg-rr45.6%
expm1-def55.0%
expm1-log1p87.6%
associate-*l*91.4%
associate-/l/91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in k around 0 76.6%
if 350 < k Initial program 27.7%
associate-*l*27.7%
associate-*l*27.7%
associate-/r*27.7%
associate-/r/27.7%
*-commutative27.7%
times-frac27.7%
+-commutative27.7%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac40.2%
Simplified40.2%
Taylor expanded in t around 0 73.3%
unpow273.3%
times-frac72.1%
unpow272.1%
*-commutative72.1%
associate-/r*72.2%
Simplified72.2%
Taylor expanded in k around 0 55.3%
unpow255.3%
unpow255.3%
associate-*r*55.3%
unpow255.3%
Simplified55.3%
Final simplification70.0%
(FPCore (t l k) :precision binary64 (if (<= k 1.45e-108) (* (/ l k) (* (/ 2.0 (* k (* k t))) (/ l k))) (* 2.0 (* (/ (cos k) (* k k)) (/ 1.0 (* (/ t l) (/ (* k k) l)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.45e-108) {
tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * (1.0 / ((t / l) * ((k * k) / l))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.45d-108) then
tmp = (l / k) * ((2.0d0 / (k * (k * t))) * (l / k))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * (1.0d0 / ((t / l) * ((k * k) / l))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.45e-108) {
tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * (1.0 / ((t / l) * ((k * k) / l))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.45e-108: tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k)) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * (1.0 / ((t / l) * ((k * k) / l)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.45e-108) tmp = Float64(Float64(l / k) * Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(l / k))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(1.0 / Float64(Float64(t / l) * Float64(Float64(k * k) / l))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.45e-108) tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k)); else tmp = 2.0 * ((cos(k) / (k * k)) * (1.0 / ((t / l) * ((k * k) / l)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.45e-108], N[(N[(l / k), $MachinePrecision] * N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(t / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.45 \cdot 10^{-108}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \frac{\ell}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \frac{1}{\frac{t}{\ell} \cdot \frac{k \cdot k}{\ell}}\right)\\
\end{array}
\end{array}
if k < 1.45e-108Initial program 41.3%
associate-*l*41.3%
associate-*l*41.3%
associate-/r*41.4%
associate-/r/40.7%
*-commutative40.7%
times-frac41.5%
+-commutative41.5%
associate--l+46.7%
metadata-eval46.7%
+-rgt-identity46.7%
times-frac53.3%
Simplified53.3%
Taylor expanded in t around 0 82.7%
unpow282.7%
Simplified82.7%
Taylor expanded in k around 0 66.4%
unpow266.4%
unpow266.4%
times-frac73.4%
Simplified73.4%
associate-*r*76.2%
associate-*l/76.2%
pow276.2%
Applied egg-rr76.2%
pow276.2%
associate-*l/76.2%
associate-*r*77.9%
Applied egg-rr77.9%
if 1.45e-108 < k Initial program 25.7%
associate-*l*25.8%
associate-*l*25.8%
associate-/r*25.8%
associate-/r/25.8%
*-commutative25.8%
times-frac25.8%
+-commutative25.8%
associate--l+36.9%
metadata-eval36.9%
+-rgt-identity36.9%
times-frac37.5%
Simplified37.5%
Taylor expanded in t around 0 76.6%
unpow276.6%
times-frac75.4%
unpow275.4%
*-commutative75.4%
associate-/r*75.8%
Simplified75.8%
Taylor expanded in k around 0 60.8%
unpow260.8%
unpow260.8%
associate-*r*60.8%
Simplified60.8%
clear-num60.2%
inv-pow60.2%
Applied egg-rr60.2%
unpow-160.2%
associate-*r*60.2%
unpow260.2%
*-commutative60.2%
times-frac62.9%
unpow262.9%
Simplified62.9%
Final simplification72.0%
(FPCore (t l k) :precision binary64 (if (<= l 2.5e-251) (* (/ l k) (* (/ 2.0 (* k (* k t))) (/ l k))) (* 2.0 (* (/ (cos k) (* k k)) (* (/ l k) (/ l (* k t)))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 2.5e-251) {
tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l / k) * (l / (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) :: tmp
if (l <= 2.5d-251) then
tmp = (l / k) * ((2.0d0 / (k * (k * t))) * (l / k))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l / k) * (l / (k * t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 2.5e-251) {
tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l / k) * (l / (k * t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 2.5e-251: tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k)) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l / k) * (l / (k * t)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 2.5e-251) tmp = Float64(Float64(l / k) * Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(l / k))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(l / k) * Float64(l / Float64(k * t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 2.5e-251) tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k)); else tmp = 2.0 * ((cos(k) / (k * k)) * ((l / k) * (l / (k * t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 2.5e-251], N[(N[(l / k), $MachinePrecision] * N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.5 \cdot 10^{-251}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \frac{\ell}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t}\right)\right)\\
\end{array}
\end{array}
if l < 2.5000000000000001e-251Initial program 35.8%
associate-*l*35.8%
associate-*l*35.8%
associate-/r*35.8%
associate-/r/35.8%
*-commutative35.8%
times-frac36.5%
+-commutative36.5%
associate--l+45.0%
metadata-eval45.0%
+-rgt-identity45.0%
times-frac52.3%
Simplified52.3%
Taylor expanded in t around 0 81.4%
unpow281.4%
Simplified81.4%
Taylor expanded in k around 0 65.4%
unpow265.4%
unpow265.4%
times-frac73.2%
Simplified73.2%
associate-*r*76.2%
associate-*l/76.2%
pow276.2%
Applied egg-rr76.2%
pow276.2%
associate-*l/76.2%
associate-*r*78.7%
Applied egg-rr78.7%
if 2.5000000000000001e-251 < l Initial program 34.4%
associate-*l*34.4%
associate-*l*34.4%
associate-/r*34.4%
associate-/r/33.5%
*-commutative33.5%
times-frac33.7%
+-commutative33.7%
associate--l+40.1%
metadata-eval40.1%
+-rgt-identity40.1%
times-frac40.2%
Simplified40.2%
Taylor expanded in t around 0 79.4%
unpow279.4%
times-frac80.2%
unpow280.2%
*-commutative80.2%
associate-/r*79.5%
Simplified79.5%
Taylor expanded in k around 0 62.6%
unpow262.6%
unpow262.6%
associate-*r*62.6%
Simplified62.6%
times-frac63.9%
Applied egg-rr63.9%
Final simplification72.3%
(FPCore (t l k) :precision binary64 (if (<= k 6.5e-109) (* (/ l k) (* (/ 2.0 (* k (* k t))) (/ l k))) (* 2.0 (* (/ (cos k) (* k k)) (* (/ l t) (/ l (* k k)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 6.5e-109) {
tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * (l / (k * k))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 6.5d-109) then
tmp = (l / k) * ((2.0d0 / (k * (k * t))) * (l / k))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l / t) * (l / (k * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6.5e-109) {
tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l / t) * (l / (k * k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 6.5e-109: tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k)) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l / t) * (l / (k * k)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 6.5e-109) tmp = Float64(Float64(l / k) * Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(l / k))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(l / t) * Float64(l / Float64(k * k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6.5e-109) tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k)); else tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * (l / (k * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 6.5e-109], N[(N[(l / k), $MachinePrecision] * N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{\ell}{k} \cdot \left(\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \frac{\ell}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)\right)\\
\end{array}
\end{array}
if k < 6.49999999999999959e-109Initial program 41.3%
associate-*l*41.3%
associate-*l*41.3%
associate-/r*41.4%
associate-/r/40.7%
*-commutative40.7%
times-frac41.5%
+-commutative41.5%
associate--l+46.7%
metadata-eval46.7%
+-rgt-identity46.7%
times-frac53.3%
Simplified53.3%
Taylor expanded in t around 0 82.7%
unpow282.7%
Simplified82.7%
Taylor expanded in k around 0 66.4%
unpow266.4%
unpow266.4%
times-frac73.4%
Simplified73.4%
associate-*r*76.2%
associate-*l/76.2%
pow276.2%
Applied egg-rr76.2%
pow276.2%
associate-*l/76.2%
associate-*r*77.9%
Applied egg-rr77.9%
if 6.49999999999999959e-109 < k Initial program 25.7%
associate-*l*25.8%
associate-*l*25.8%
associate-/r*25.8%
associate-/r/25.8%
*-commutative25.8%
times-frac25.8%
+-commutative25.8%
associate--l+36.9%
metadata-eval36.9%
+-rgt-identity36.9%
times-frac37.5%
Simplified37.5%
Taylor expanded in t around 0 76.6%
unpow276.6%
times-frac75.4%
unpow275.4%
*-commutative75.4%
associate-/r*75.8%
Simplified75.8%
Taylor expanded in k around 0 60.8%
unpow260.8%
*-commutative60.8%
times-frac62.8%
unpow262.8%
Simplified62.8%
Final simplification72.0%
(FPCore (t l k) :precision binary64 (* (/ l k) (* (/ 2.0 (* k (* k t))) (/ l k))))
double code(double t, double l, double k) {
return (l / k) * ((2.0 / (k * (k * t))) * (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 = (l / k) * ((2.0d0 / (k * (k * t))) * (l / k))
end function
public static double code(double t, double l, double k) {
return (l / k) * ((2.0 / (k * (k * t))) * (l / k));
}
def code(t, l, k): return (l / k) * ((2.0 / (k * (k * t))) * (l / k))
function code(t, l, k) return Float64(Float64(l / k) * Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(l / k))) end
function tmp = code(t, l, k) tmp = (l / k) * ((2.0 / (k * (k * t))) * (l / k)); end
code[t_, l_, k_] := N[(N[(l / k), $MachinePrecision] * N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{k} \cdot \left(\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \frac{\ell}{k}\right)
\end{array}
Initial program 35.2%
associate-*l*35.2%
associate-*l*35.2%
associate-/r*35.2%
associate-/r/34.8%
*-commutative34.8%
times-frac35.3%
+-commutative35.3%
associate--l+42.9%
metadata-eval42.9%
+-rgt-identity42.9%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 80.2%
unpow280.2%
Simplified80.2%
Taylor expanded in k around 0 63.7%
unpow263.7%
unpow263.7%
times-frac68.0%
Simplified68.0%
associate-*r*69.7%
associate-*l/69.6%
pow269.6%
Applied egg-rr69.6%
pow269.6%
associate-*l/69.7%
associate-*r*71.4%
Applied egg-rr71.4%
Final simplification71.4%
(FPCore (t l k) :precision binary64 (* -0.11666666666666667 (/ l (/ t l))))
double code(double t, double l, double k) {
return -0.11666666666666667 * (l / (t / l));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (-0.11666666666666667d0) * (l / (t / l))
end function
public static double code(double t, double l, double k) {
return -0.11666666666666667 * (l / (t / l));
}
def code(t, l, k): return -0.11666666666666667 * (l / (t / l))
function code(t, l, k) return Float64(-0.11666666666666667 * Float64(l / Float64(t / l))) end
function tmp = code(t, l, k) tmp = -0.11666666666666667 * (l / (t / l)); end
code[t_, l_, k_] := N[(-0.11666666666666667 * N[(l / N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.11666666666666667 \cdot \frac{\ell}{\frac{t}{\ell}}
\end{array}
Initial program 35.2%
associate-*l*35.2%
associate-*l*35.2%
associate-/r*35.2%
associate-/r/34.8%
*-commutative34.8%
times-frac35.3%
+-commutative35.3%
associate--l+42.9%
metadata-eval42.9%
+-rgt-identity42.9%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 80.2%
unpow280.2%
Simplified80.2%
Taylor expanded in k around 0 31.6%
associate-+r+31.6%
mul-1-neg31.6%
unsub-neg31.6%
*-commutative31.6%
fma-def31.6%
unpow231.6%
unpow231.6%
unpow231.6%
times-frac36.4%
unpow236.4%
distribute-rgt-out36.4%
unpow236.4%
metadata-eval36.4%
Simplified36.4%
Taylor expanded in k around inf 23.4%
unpow223.4%
associate-/l*20.5%
Simplified20.5%
Final simplification20.5%
(FPCore (t l k) :precision binary64 (* (/ (* l l) t) -0.11666666666666667))
double code(double t, double l, double k) {
return ((l * l) / t) * -0.11666666666666667;
}
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) / t) * (-0.11666666666666667d0)
end function
public static double code(double t, double l, double k) {
return ((l * l) / t) * -0.11666666666666667;
}
def code(t, l, k): return ((l * l) / t) * -0.11666666666666667
function code(t, l, k) return Float64(Float64(Float64(l * l) / t) * -0.11666666666666667) end
function tmp = code(t, l, k) tmp = ((l * l) / t) * -0.11666666666666667; end
code[t_, l_, k_] := N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.11666666666666667), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell \cdot \ell}{t} \cdot -0.11666666666666667
\end{array}
Initial program 35.2%
associate-*l*35.2%
associate-*l*35.2%
associate-/r*35.2%
associate-/r/34.8%
*-commutative34.8%
times-frac35.3%
+-commutative35.3%
associate--l+42.9%
metadata-eval42.9%
+-rgt-identity42.9%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 80.2%
unpow280.2%
Simplified80.2%
Taylor expanded in k around 0 31.6%
associate-+r+31.6%
mul-1-neg31.6%
unsub-neg31.6%
*-commutative31.6%
fma-def31.6%
unpow231.6%
unpow231.6%
unpow231.6%
times-frac36.4%
unpow236.4%
distribute-rgt-out36.4%
unpow236.4%
metadata-eval36.4%
Simplified36.4%
Taylor expanded in k around inf 23.4%
unpow223.4%
Simplified23.4%
Final simplification23.4%
herbie shell --seed 2023192
(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))))