
(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 16 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 1.25e+143) (/ (* 2.0 (/ (/ (/ l k) k) (* t (sin k)))) (/ (tan k) l)) (* 2.0 (/ (* (/ l (/ k l)) (/ (cos k) k)) (* t (pow (sin k) 2.0))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.25e+143) {
tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (tan(k) / l);
} else {
tmp = 2.0 * (((l / (k / l)) * (cos(k) / k)) / (t * pow(sin(k), 2.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 (k <= 1.25d+143) then
tmp = (2.0d0 * (((l / k) / k) / (t * sin(k)))) / (tan(k) / l)
else
tmp = 2.0d0 * (((l / (k / l)) * (cos(k) / k)) / (t * (sin(k) ** 2.0d0)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.25e+143) {
tmp = (2.0 * (((l / k) / k) / (t * Math.sin(k)))) / (Math.tan(k) / l);
} else {
tmp = 2.0 * (((l / (k / l)) * (Math.cos(k) / k)) / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.25e+143: tmp = (2.0 * (((l / k) / k) / (t * math.sin(k)))) / (math.tan(k) / l) else: tmp = 2.0 * (((l / (k / l)) * (math.cos(k) / k)) / (t * math.pow(math.sin(k), 2.0))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.25e+143) tmp = Float64(Float64(2.0 * Float64(Float64(Float64(l / k) / k) / Float64(t * sin(k)))) / Float64(tan(k) / l)); else tmp = Float64(2.0 * Float64(Float64(Float64(l / Float64(k / l)) * Float64(cos(k) / k)) / Float64(t * (sin(k) ^ 2.0)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.25e+143) tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (tan(k) / l); else tmp = 2.0 * (((l / (k / l)) * (cos(k) / k)) / (t * (sin(k) ^ 2.0))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.25e+143], N[(N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.25 \cdot 10^{+143}:\\
\;\;\;\;\frac{2 \cdot \frac{\frac{\frac{\ell}{k}}{k}}{t \cdot \sin k}}{\frac{\tan k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell}{\frac{k}{\ell}} \cdot \frac{\cos k}{k}}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if k < 1.25000000000000003e143Initial program 32.8%
associate-*l*32.8%
associate-*l*32.8%
associate-/r*32.8%
associate-/r/33.3%
*-commutative33.3%
times-frac33.4%
+-commutative33.4%
associate--l+42.1%
metadata-eval42.1%
+-rgt-identity42.1%
times-frac45.8%
Simplified45.8%
associate-*r*46.8%
frac-2neg46.8%
associate-*r/46.9%
div-inv46.8%
div-inv46.8%
pow-flip48.2%
metadata-eval48.2%
pow-flip48.2%
metadata-eval48.2%
Applied egg-rr48.2%
associate-/l*48.2%
associate-*l*48.0%
Simplified48.0%
Taylor expanded in t around 0 86.2%
associate-/r*89.6%
unpow289.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in l around 0 89.6%
unpow289.6%
associate-/r*94.9%
Simplified94.9%
frac-2neg94.9%
div-inv94.9%
Applied egg-rr94.9%
associate-*r/94.9%
*-rgt-identity94.9%
Simplified94.9%
if 1.25000000000000003e143 < k Initial program 47.8%
associate-*l*47.8%
associate-*l*47.8%
associate-/r*47.8%
associate-/r/45.2%
*-commutative45.2%
times-frac42.9%
+-commutative42.9%
associate--l+53.4%
metadata-eval53.4%
+-rgt-identity53.4%
times-frac53.4%
Simplified53.4%
associate-*r*54.0%
frac-2neg54.0%
associate-*r/54.0%
div-inv54.0%
div-inv54.0%
pow-flip54.0%
metadata-eval54.0%
pow-flip54.0%
metadata-eval54.0%
Applied egg-rr54.0%
associate-/l*54.0%
associate-*l*54.0%
Simplified54.0%
Taylor expanded in t around 0 72.7%
associate-/r*72.7%
unpow272.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in l around 0 72.0%
associate-/r*74.3%
*-commutative74.3%
unpow274.3%
times-frac77.8%
unpow277.8%
associate-/l*95.4%
Simplified95.4%
Final simplification95.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.85e-27) (/ (* 2.0 (/ (/ (/ l k) k) (* t (sin k)))) (/ k l)) (* l (* (/ l (sin k)) (/ (/ 2.0 (* k (* k t))) (tan k))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.85e-27) {
tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l);
} else {
tmp = l * ((l / sin(k)) * ((2.0 / (k * (k * t))) / 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 <= 1.85d-27) then
tmp = (2.0d0 * (((l / k) / k) / (t * sin(k)))) / (k / l)
else
tmp = l * ((l / sin(k)) * ((2.0d0 / (k * (k * t))) / 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 <= 1.85e-27) {
tmp = (2.0 * (((l / k) / k) / (t * Math.sin(k)))) / (k / l);
} else {
tmp = l * ((l / Math.sin(k)) * ((2.0 / (k * (k * t))) / Math.tan(k)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.85e-27: tmp = (2.0 * (((l / k) / k) / (t * math.sin(k)))) / (k / l) else: tmp = l * ((l / math.sin(k)) * ((2.0 / (k * (k * t))) / math.tan(k))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.85e-27) tmp = Float64(Float64(2.0 * Float64(Float64(Float64(l / k) / k) / Float64(t * sin(k)))) / Float64(k / l)); else tmp = Float64(l * Float64(Float64(l / sin(k)) * Float64(Float64(2.0 / Float64(k * Float64(k * t))) / tan(k)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.85e-27) tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l); else tmp = l * ((l / sin(k)) * ((2.0 / (k * (k * t))) / tan(k))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.85e-27], N[(N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.85 \cdot 10^{-27}:\\
\;\;\;\;\frac{2 \cdot \frac{\frac{\frac{\ell}{k}}{k}}{t \cdot \sin k}}{\frac{k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\frac{2}{k \cdot \left(k \cdot t\right)}}{\tan k}\right)\\
\end{array}
\end{array}
if k < 1.85000000000000014e-27Initial program 36.1%
associate-*l*36.1%
associate-*l*36.1%
associate-/r*36.1%
associate-/r/36.6%
*-commutative36.6%
times-frac36.2%
+-commutative36.2%
associate--l+44.1%
metadata-eval44.1%
+-rgt-identity44.1%
times-frac48.8%
Simplified48.8%
associate-*r*49.5%
frac-2neg49.5%
associate-*r/49.5%
div-inv49.5%
div-inv49.5%
pow-flip51.2%
metadata-eval51.2%
pow-flip51.2%
metadata-eval51.2%
Applied egg-rr51.2%
associate-/l*51.1%
associate-*l*50.9%
Simplified50.9%
Taylor expanded in t around 0 83.1%
associate-/r*87.8%
unpow287.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in l around 0 87.8%
unpow287.8%
associate-/r*94.3%
Simplified94.3%
Taylor expanded in k around 0 81.3%
if 1.85000000000000014e-27 < k Initial program 32.8%
associate-*l*32.8%
associate-*l*32.8%
associate-/r*32.8%
associate-/r/31.5%
*-commutative31.5%
times-frac31.7%
+-commutative31.7%
associate--l+43.0%
metadata-eval43.0%
+-rgt-identity43.0%
times-frac43.0%
Simplified43.0%
associate-*r*44.5%
frac-2neg44.5%
associate-*r/44.5%
div-inv44.5%
div-inv44.5%
pow-flip44.5%
metadata-eval44.5%
pow-flip44.5%
metadata-eval44.5%
Applied egg-rr44.5%
associate-/l*44.5%
associate-*l*44.4%
Simplified44.4%
Taylor expanded in t around 0 86.7%
associate-/r*85.6%
unpow285.6%
*-commutative85.6%
Simplified85.6%
div-inv85.6%
frac-2neg85.6%
Applied egg-rr85.6%
associate-*r/85.6%
*-rgt-identity85.6%
associate-/r/85.6%
Simplified89.1%
Final simplification83.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* (* (/ 2.0 k) (/ l (* (sin k) (* k t)))) (/ l (tan k))))
k = abs(k);
double code(double t, double l, double k) {
return ((2.0 / k) * (l / (sin(k) * (k * t)))) * (l / tan(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 = ((2.0d0 / k) * (l / (sin(k) * (k * t)))) * (l / tan(k))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return ((2.0 / k) * (l / (Math.sin(k) * (k * t)))) * (l / Math.tan(k));
}
k = abs(k) def code(t, l, k): return ((2.0 / k) * (l / (math.sin(k) * (k * t)))) * (l / math.tan(k))
k = abs(k) function code(t, l, k) return Float64(Float64(Float64(2.0 / k) * Float64(l / Float64(sin(k) * Float64(k * t)))) * Float64(l / tan(k))) end
k = abs(k) function tmp = code(t, l, k) tmp = ((2.0 / k) * (l / (sin(k) * (k * t)))) * (l / tan(k)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(N[(2.0 / k), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\left(\frac{2}{k} \cdot \frac{\ell}{\sin k \cdot \left(k \cdot t\right)}\right) \cdot \frac{\ell}{\tan k}
\end{array}
Initial program 35.1%
associate-*l*35.1%
associate-*l*35.1%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac34.8%
+-commutative34.8%
associate--l+43.8%
metadata-eval43.8%
+-rgt-identity43.8%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 82.0%
associate-/r*82.0%
unpow282.0%
associate-/r*82.4%
Simplified82.4%
*-commutative82.4%
clear-num82.4%
frac-times82.5%
*-un-lft-identity82.5%
Applied egg-rr82.5%
associate-*r/85.2%
associate-/l/88.7%
associate-*l/87.2%
Applied egg-rr87.2%
div-inv87.2%
*-commutative87.2%
associate-/l/87.2%
associate-*r*84.6%
*-commutative84.6%
associate-*l*87.2%
associate-/l*88.7%
Applied egg-rr88.7%
associate-*r/88.7%
*-rgt-identity88.7%
associate-/r/88.7%
times-frac86.8%
*-commutative86.8%
times-frac88.7%
Simplified92.4%
Final simplification92.4%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ (* 2.0 (/ (/ (/ l k) k) (* t (sin k)))) (/ (tan k) l)))
k = abs(k);
double code(double t, double l, double k) {
return (2.0 * (((l / k) / k) / (t * sin(k)))) / (tan(k) / l);
}
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) / k) / (t * sin(k)))) / (tan(k) / l)
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return (2.0 * (((l / k) / k) / (t * Math.sin(k)))) / (Math.tan(k) / l);
}
k = abs(k) def code(t, l, k): return (2.0 * (((l / k) / k) / (t * math.sin(k)))) / (math.tan(k) / l)
k = abs(k) function code(t, l, k) return Float64(Float64(2.0 * Float64(Float64(Float64(l / k) / k) / Float64(t * sin(k)))) / Float64(tan(k) / l)) end
k = abs(k) function tmp = code(t, l, k) tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (tan(k) / l); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2 \cdot \frac{\frac{\frac{\ell}{k}}{k}}{t \cdot \sin k}}{\frac{\tan k}{\ell}}
\end{array}
Initial program 35.1%
associate-*l*35.1%
associate-*l*35.1%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac34.8%
+-commutative34.8%
associate--l+43.8%
metadata-eval43.8%
+-rgt-identity43.8%
times-frac47.0%
Simplified47.0%
associate-*r*47.9%
frac-2neg47.9%
associate-*r/47.9%
div-inv47.9%
div-inv47.9%
pow-flip49.1%
metadata-eval49.1%
pow-flip49.1%
metadata-eval49.1%
Applied egg-rr49.1%
associate-/l*49.1%
associate-*l*48.9%
Simplified48.9%
Taylor expanded in t around 0 84.2%
associate-/r*87.1%
unpow287.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in l around 0 87.1%
unpow287.1%
associate-/r*93.5%
Simplified93.5%
frac-2neg93.5%
div-inv93.4%
Applied egg-rr93.4%
associate-*r/93.5%
*-rgt-identity93.5%
Simplified93.5%
Final simplification93.5%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 1.55e-13)
(/ (* 2.0 (/ (/ (/ l k) k) (* t (sin k)))) (/ k l))
(*
2.0
(*
(/ (cos k) (* k k))
(+ (/ (/ (* l l) (* k k)) t) (* 0.3333333333333333 (/ l (/ t l))))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.55e-13) {
tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l);
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((((l * l) / (k * k)) / t) + (0.3333333333333333 * (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 <= 1.55d-13) then
tmp = (2.0d0 * (((l / k) / k) / (t * sin(k)))) / (k / l)
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((((l * l) / (k * k)) / t) + (0.3333333333333333d0 * (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 <= 1.55e-13) {
tmp = (2.0 * (((l / k) / k) / (t * Math.sin(k)))) / (k / l);
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((((l * l) / (k * k)) / t) + (0.3333333333333333 * (l / (t / l)))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.55e-13: tmp = (2.0 * (((l / k) / k) / (t * math.sin(k)))) / (k / l) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((((l * l) / (k * k)) / t) + (0.3333333333333333 * (l / (t / l))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.55e-13) tmp = Float64(Float64(2.0 * Float64(Float64(Float64(l / k) / k) / Float64(t * sin(k)))) / Float64(k / l)); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(Float64(Float64(l * l) / Float64(k * k)) / t) + Float64(0.3333333333333333 * Float64(l / Float64(t / l)))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.55e-13) tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l); else tmp = 2.0 * ((cos(k) / (k * k)) * ((((l * l) / (k * k)) / t) + (0.3333333333333333 * (l / (t / l))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.55e-13], N[(N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(0.3333333333333333 * N[(l / N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.55 \cdot 10^{-13}:\\
\;\;\;\;\frac{2 \cdot \frac{\frac{\frac{\ell}{k}}{k}}{t \cdot \sin k}}{\frac{k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\frac{\frac{\ell \cdot \ell}{k \cdot k}}{t} + 0.3333333333333333 \cdot \frac{\ell}{\frac{t}{\ell}}\right)\right)\\
\end{array}
\end{array}
if k < 1.55e-13Initial program 35.8%
associate-*l*35.8%
associate-*l*35.8%
associate-/r*35.8%
associate-/r/36.4%
*-commutative36.4%
times-frac35.9%
+-commutative35.9%
associate--l+43.7%
metadata-eval43.7%
+-rgt-identity43.7%
times-frac48.2%
Simplified48.2%
associate-*r*48.9%
frac-2neg48.9%
associate-*r/48.9%
div-inv48.9%
div-inv48.9%
pow-flip50.6%
metadata-eval50.6%
pow-flip50.6%
metadata-eval50.6%
Applied egg-rr50.6%
associate-/l*50.6%
associate-*l*50.3%
Simplified50.3%
Taylor expanded in t around 0 83.4%
associate-/r*88.1%
unpow288.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in l around 0 88.1%
unpow288.1%
associate-/r*94.5%
Simplified94.5%
Taylor expanded in k around 0 81.7%
if 1.55e-13 < k Initial program 33.2%
associate-*l*33.2%
associate-*l*33.2%
associate-/r*33.2%
associate-/r/31.9%
*-commutative31.9%
times-frac32.0%
+-commutative32.0%
associate--l+43.9%
metadata-eval43.9%
+-rgt-identity43.9%
times-frac43.9%
Simplified43.9%
Taylor expanded in t around 0 82.1%
times-frac82.0%
unpow282.0%
*-commutative82.0%
associate-/r*82.0%
unpow282.0%
Simplified82.0%
Taylor expanded in k around 0 64.7%
associate-/r*64.7%
unpow264.7%
unpow264.7%
unpow264.7%
associate-/l*64.8%
Simplified64.8%
Final simplification76.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 2.8e-5) (/ (* 2.0 (/ (/ (/ l k) k) (* t (sin k)))) (/ k l)) (* 2.0 (* (/ (cos k) (* k k)) (/ (* l l) (* t (* k k)))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.8e-5) {
tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l);
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l * l) / (t * (k * 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.8d-5) then
tmp = (2.0d0 * (((l / k) / k) / (t * sin(k)))) / (k / l)
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l * l) / (t * (k * 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.8e-5) {
tmp = (2.0 * (((l / k) / k) / (t * Math.sin(k)))) / (k / l);
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l * l) / (t * (k * k))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 2.8e-5: tmp = (2.0 * (((l / k) / k) / (t * math.sin(k)))) / (k / l) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l * l) / (t * (k * k)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 2.8e-5) tmp = Float64(Float64(2.0 * Float64(Float64(Float64(l / k) / k) / Float64(t * sin(k)))) / Float64(k / l)); 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
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.8e-5) tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l); else tmp = 2.0 * ((cos(k) / (k * k)) * ((l * l) / (t * (k * k)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.8e-5], N[(N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k / l), $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}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-5}:\\
\;\;\;\;\frac{2 \cdot \frac{\frac{\frac{\ell}{k}}{k}}{t \cdot \sin k}}{\frac{k}{\ell}}\\
\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.79999999999999996e-5Initial program 35.4%
associate-*l*35.4%
associate-*l*35.4%
associate-/r*35.4%
associate-/r/36.0%
*-commutative36.0%
times-frac35.5%
+-commutative35.5%
associate--l+43.2%
metadata-eval43.2%
+-rgt-identity43.2%
times-frac47.7%
Simplified47.7%
associate-*r*48.4%
frac-2neg48.4%
associate-*r/48.4%
div-inv48.4%
div-inv48.4%
pow-flip50.0%
metadata-eval50.0%
pow-flip50.0%
metadata-eval50.0%
Applied egg-rr50.0%
associate-/l*50.0%
associate-*l*49.8%
Simplified49.8%
Taylor expanded in t around 0 83.6%
associate-/r*88.2%
unpow288.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in l around 0 88.2%
unpow288.2%
associate-/r*94.5%
Simplified94.5%
Taylor expanded in k around 0 81.8%
if 2.79999999999999996e-5 < k Initial program 34.1%
associate-*l*34.1%
associate-*l*34.1%
associate-/r*34.1%
associate-/r/32.8%
*-commutative32.8%
times-frac32.9%
+-commutative32.9%
associate--l+45.1%
metadata-eval45.1%
+-rgt-identity45.1%
times-frac45.1%
Simplified45.1%
Taylor expanded in t around 0 81.6%
times-frac81.6%
unpow281.6%
*-commutative81.6%
associate-/r*81.6%
unpow281.6%
Simplified81.6%
Taylor expanded in k around 0 61.5%
unpow261.5%
*-commutative61.5%
unpow261.5%
Simplified61.5%
Final simplification76.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 2.5e-5) (/ (* 2.0 (/ (/ (/ l k) k) (* t (sin k)))) (/ k l)) (* 2.0 (* (/ (cos k) (* k k)) (/ (/ (* l l) (* k k)) t)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-5) {
tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l);
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * (((l * l) / (k * k)) / 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 (k <= 2.5d-5) then
tmp = (2.0d0 * (((l / k) / k) / (t * sin(k)))) / (k / l)
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * (((l * l) / (k * k)) / t))
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.5e-5) {
tmp = (2.0 * (((l / k) / k) / (t * Math.sin(k)))) / (k / l);
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * (((l * l) / (k * k)) / t));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 2.5e-5: tmp = (2.0 * (((l / k) / k) / (t * math.sin(k)))) / (k / l) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * (((l * l) / (k * k)) / t)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 2.5e-5) tmp = Float64(Float64(2.0 * Float64(Float64(Float64(l / k) / k) / Float64(t * sin(k)))) / Float64(k / l)); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(Float64(l * l) / Float64(k * k)) / t))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.5e-5) tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l); else tmp = 2.0 * ((cos(k) / (k * k)) * (((l * l) / (k * k)) / t)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.5e-5], N[(N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{2 \cdot \frac{\frac{\frac{\ell}{k}}{k}}{t \cdot \sin k}}{\frac{k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \frac{\frac{\ell \cdot \ell}{k \cdot k}}{t}\right)\\
\end{array}
\end{array}
if k < 2.50000000000000012e-5Initial program 35.4%
associate-*l*35.4%
associate-*l*35.4%
associate-/r*35.4%
associate-/r/36.0%
*-commutative36.0%
times-frac35.5%
+-commutative35.5%
associate--l+43.2%
metadata-eval43.2%
+-rgt-identity43.2%
times-frac47.7%
Simplified47.7%
associate-*r*48.4%
frac-2neg48.4%
associate-*r/48.4%
div-inv48.4%
div-inv48.4%
pow-flip50.0%
metadata-eval50.0%
pow-flip50.0%
metadata-eval50.0%
Applied egg-rr50.0%
associate-/l*50.0%
associate-*l*49.8%
Simplified49.8%
Taylor expanded in t around 0 83.6%
associate-/r*88.2%
unpow288.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in l around 0 88.2%
unpow288.2%
associate-/r*94.5%
Simplified94.5%
Taylor expanded in k around 0 81.8%
if 2.50000000000000012e-5 < k Initial program 34.1%
associate-*l*34.1%
associate-*l*34.1%
associate-/r*34.1%
associate-/r/32.8%
*-commutative32.8%
times-frac32.9%
+-commutative32.9%
associate--l+45.1%
metadata-eval45.1%
+-rgt-identity45.1%
times-frac45.1%
Simplified45.1%
Taylor expanded in t around 0 81.6%
times-frac81.6%
unpow281.6%
*-commutative81.6%
associate-/r*81.6%
unpow281.6%
Simplified81.6%
Taylor expanded in k around 0 61.5%
associate-/r*61.5%
unpow261.5%
unpow261.5%
Simplified61.5%
Final simplification76.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ (* 2.0 (/ (/ l (* k k)) (* t (sin k)))) (/ k l)))
k = abs(k);
double code(double t, double l, double k) {
return (2.0 * ((l / (k * k)) / (t * sin(k)))) / (k / l);
}
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 * k)) / (t * sin(k)))) / (k / l)
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return (2.0 * ((l / (k * k)) / (t * Math.sin(k)))) / (k / l);
}
k = abs(k) def code(t, l, k): return (2.0 * ((l / (k * k)) / (t * math.sin(k)))) / (k / l)
k = abs(k) function code(t, l, k) return Float64(Float64(2.0 * Float64(Float64(l / Float64(k * k)) / Float64(t * sin(k)))) / Float64(k / l)) end
k = abs(k) function tmp = code(t, l, k) tmp = (2.0 * ((l / (k * k)) / (t * sin(k)))) / (k / l); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(2.0 * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2 \cdot \frac{\frac{\ell}{k \cdot k}}{t \cdot \sin k}}{\frac{k}{\ell}}
\end{array}
Initial program 35.1%
associate-*l*35.1%
associate-*l*35.1%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac34.8%
+-commutative34.8%
associate--l+43.8%
metadata-eval43.8%
+-rgt-identity43.8%
times-frac47.0%
Simplified47.0%
associate-*r*47.9%
frac-2neg47.9%
associate-*r/47.9%
div-inv47.9%
div-inv47.9%
pow-flip49.1%
metadata-eval49.1%
pow-flip49.1%
metadata-eval49.1%
Applied egg-rr49.1%
associate-/l*49.1%
associate-*l*48.9%
Simplified48.9%
Taylor expanded in t around 0 84.2%
associate-/r*87.1%
unpow287.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in k around 0 73.8%
Final simplification73.8%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ (* 2.0 (/ (/ (/ l k) k) (* t (sin k)))) (/ k l)))
k = abs(k);
double code(double t, double l, double k) {
return (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l);
}
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) / k) / (t * sin(k)))) / (k / l)
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return (2.0 * (((l / k) / k) / (t * Math.sin(k)))) / (k / l);
}
k = abs(k) def code(t, l, k): return (2.0 * (((l / k) / k) / (t * math.sin(k)))) / (k / l)
k = abs(k) function code(t, l, k) return Float64(Float64(2.0 * Float64(Float64(Float64(l / k) / k) / Float64(t * sin(k)))) / Float64(k / l)) end
k = abs(k) function tmp = code(t, l, k) tmp = (2.0 * (((l / k) / k) / (t * sin(k)))) / (k / l); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k / l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2 \cdot \frac{\frac{\frac{\ell}{k}}{k}}{t \cdot \sin k}}{\frac{k}{\ell}}
\end{array}
Initial program 35.1%
associate-*l*35.1%
associate-*l*35.1%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac34.8%
+-commutative34.8%
associate--l+43.8%
metadata-eval43.8%
+-rgt-identity43.8%
times-frac47.0%
Simplified47.0%
associate-*r*47.9%
frac-2neg47.9%
associate-*r/47.9%
div-inv47.9%
div-inv47.9%
pow-flip49.1%
metadata-eval49.1%
pow-flip49.1%
metadata-eval49.1%
Applied egg-rr49.1%
associate-/l*49.1%
associate-*l*48.9%
Simplified48.9%
Taylor expanded in t around 0 84.2%
associate-/r*87.1%
unpow287.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in l around 0 87.1%
unpow287.1%
associate-/r*93.5%
Simplified93.5%
Taylor expanded in k around 0 75.3%
Final simplification75.3%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.95e+29) (* (/ (* l l) (* k k)) (/ 2.0 (* t (* k k)))) (* (* l l) (/ -0.3333333333333333 (* k (* k t))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.95e+29) {
tmp = ((l * l) / (k * k)) * (2.0 / (t * (k * k)));
} else {
tmp = (l * l) * (-0.3333333333333333 / (k * (k * 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 (k <= 1.95d+29) then
tmp = ((l * l) / (k * k)) * (2.0d0 / (t * (k * k)))
else
tmp = (l * l) * ((-0.3333333333333333d0) / (k * (k * t)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.95e+29) {
tmp = ((l * l) / (k * k)) * (2.0 / (t * (k * k)));
} else {
tmp = (l * l) * (-0.3333333333333333 / (k * (k * t)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.95e+29: tmp = ((l * l) / (k * k)) * (2.0 / (t * (k * k))) else: tmp = (l * l) * (-0.3333333333333333 / (k * (k * t))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.95e+29) tmp = Float64(Float64(Float64(l * l) / Float64(k * k)) * Float64(2.0 / Float64(t * Float64(k * k)))); else tmp = Float64(Float64(l * l) * Float64(-0.3333333333333333 / Float64(k * Float64(k * t)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.95e+29) tmp = ((l * l) / (k * k)) * (2.0 / (t * (k * k))); else tmp = (l * l) * (-0.3333333333333333 / (k * (k * t))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.95e+29], N[(N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(-0.3333333333333333 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.95 \cdot 10^{+29}:\\
\;\;\;\;\frac{\ell \cdot \ell}{k \cdot k} \cdot \frac{2}{t \cdot \left(k \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333}{k \cdot \left(k \cdot t\right)}\\
\end{array}
\end{array}
if k < 1.94999999999999984e29Initial program 34.7%
associate-*l*34.7%
associate-*l*34.7%
associate-/r*34.7%
associate-/r/35.2%
*-commutative35.2%
times-frac35.3%
+-commutative35.3%
associate--l+42.7%
metadata-eval42.7%
+-rgt-identity42.7%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 82.3%
associate-/r*82.4%
unpow282.4%
associate-/r*82.9%
Simplified82.9%
Taylor expanded in k around 0 68.8%
unpow268.8%
unpow268.8%
Simplified68.8%
Taylor expanded in k around 0 68.8%
*-commutative68.8%
unpow268.8%
Simplified68.8%
if 1.94999999999999984e29 < k Initial program 36.1%
associate-*l*36.1%
associate-*l*36.1%
associate-/r*36.1%
associate-/r/34.6%
*-commutative34.6%
times-frac33.3%
+-commutative33.3%
associate--l+46.9%
metadata-eval46.9%
+-rgt-identity46.9%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 81.1%
associate-/r*81.1%
unpow281.1%
associate-/r*81.2%
Simplified81.2%
Taylor expanded in k around 0 50.2%
+-commutative50.2%
fma-def50.2%
unpow250.2%
*-commutative50.2%
times-frac50.1%
associate-*r/50.1%
*-commutative50.1%
times-frac50.3%
unpow250.3%
unpow250.3%
times-frac52.3%
unpow252.3%
associate-/l*52.7%
distribute-rgt-out52.7%
metadata-eval52.7%
Simplified52.7%
Taylor expanded in l around 0 59.1%
unpow259.1%
associate-*r/59.1%
metadata-eval59.1%
*-commutative59.1%
associate-*r/59.1%
metadata-eval59.1%
unpow259.1%
Simplified59.1%
Taylor expanded in k around inf 59.1%
unpow259.1%
associate-*r*59.3%
Simplified59.3%
Final simplification66.3%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.95e+29) (* (* (/ l k) (/ l k)) (/ (/ (/ 2.0 k) k) t)) (* (* l l) (/ -0.3333333333333333 (* k (* k t))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.95e+29) {
tmp = ((l / k) * (l / k)) * (((2.0 / k) / k) / t);
} else {
tmp = (l * l) * (-0.3333333333333333 / (k * (k * 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 (k <= 1.95d+29) then
tmp = ((l / k) * (l / k)) * (((2.0d0 / k) / k) / t)
else
tmp = (l * l) * ((-0.3333333333333333d0) / (k * (k * t)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.95e+29) {
tmp = ((l / k) * (l / k)) * (((2.0 / k) / k) / t);
} else {
tmp = (l * l) * (-0.3333333333333333 / (k * (k * t)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.95e+29: tmp = ((l / k) * (l / k)) * (((2.0 / k) / k) / t) else: tmp = (l * l) * (-0.3333333333333333 / (k * (k * t))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.95e+29) tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(Float64(2.0 / k) / k) / t)); else tmp = Float64(Float64(l * l) * Float64(-0.3333333333333333 / Float64(k * Float64(k * t)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.95e+29) tmp = ((l / k) * (l / k)) * (((2.0 / k) / k) / t); else tmp = (l * l) * (-0.3333333333333333 / (k * (k * t))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.95e+29], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 / k), $MachinePrecision] / k), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(-0.3333333333333333 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.95 \cdot 10^{+29}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\frac{\frac{2}{k}}{k}}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333}{k \cdot \left(k \cdot t\right)}\\
\end{array}
\end{array}
if k < 1.94999999999999984e29Initial program 34.7%
associate-*l*34.7%
associate-*l*34.7%
associate-/r*34.7%
associate-/r/35.2%
*-commutative35.2%
times-frac35.3%
+-commutative35.3%
associate--l+42.7%
metadata-eval42.7%
+-rgt-identity42.7%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 82.3%
associate-/r*82.4%
unpow282.4%
associate-/r*82.9%
Simplified82.9%
Taylor expanded in k around 0 68.8%
unpow268.8%
unpow268.8%
Simplified68.8%
times-frac75.8%
Applied egg-rr75.8%
if 1.94999999999999984e29 < k Initial program 36.1%
associate-*l*36.1%
associate-*l*36.1%
associate-/r*36.1%
associate-/r/34.6%
*-commutative34.6%
times-frac33.3%
+-commutative33.3%
associate--l+46.9%
metadata-eval46.9%
+-rgt-identity46.9%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 81.1%
associate-/r*81.1%
unpow281.1%
associate-/r*81.2%
Simplified81.2%
Taylor expanded in k around 0 50.2%
+-commutative50.2%
fma-def50.2%
unpow250.2%
*-commutative50.2%
times-frac50.1%
associate-*r/50.1%
*-commutative50.1%
times-frac50.3%
unpow250.3%
unpow250.3%
times-frac52.3%
unpow252.3%
associate-/l*52.7%
distribute-rgt-out52.7%
metadata-eval52.7%
Simplified52.7%
Taylor expanded in l around 0 59.1%
unpow259.1%
associate-*r/59.1%
metadata-eval59.1%
*-commutative59.1%
associate-*r/59.1%
metadata-eval59.1%
unpow259.1%
Simplified59.1%
Taylor expanded in k around inf 59.1%
unpow259.1%
associate-*r*59.3%
Simplified59.3%
Final simplification71.5%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.95e+29) (* (/ (/ (/ 2.0 k) k) t) (/ l (* k (/ k l)))) (* (* l l) (/ -0.3333333333333333 (* k (* k t))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.95e+29) {
tmp = (((2.0 / k) / k) / t) * (l / (k * (k / l)));
} else {
tmp = (l * l) * (-0.3333333333333333 / (k * (k * 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 (k <= 1.95d+29) then
tmp = (((2.0d0 / k) / k) / t) * (l / (k * (k / l)))
else
tmp = (l * l) * ((-0.3333333333333333d0) / (k * (k * t)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.95e+29) {
tmp = (((2.0 / k) / k) / t) * (l / (k * (k / l)));
} else {
tmp = (l * l) * (-0.3333333333333333 / (k * (k * t)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.95e+29: tmp = (((2.0 / k) / k) / t) * (l / (k * (k / l))) else: tmp = (l * l) * (-0.3333333333333333 / (k * (k * t))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.95e+29) tmp = Float64(Float64(Float64(Float64(2.0 / k) / k) / t) * Float64(l / Float64(k * Float64(k / l)))); else tmp = Float64(Float64(l * l) * Float64(-0.3333333333333333 / Float64(k * Float64(k * t)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.95e+29) tmp = (((2.0 / k) / k) / t) * (l / (k * (k / l))); else tmp = (l * l) * (-0.3333333333333333 / (k * (k * t))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.95e+29], N[(N[(N[(N[(2.0 / k), $MachinePrecision] / k), $MachinePrecision] / t), $MachinePrecision] * N[(l / N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(-0.3333333333333333 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.95 \cdot 10^{+29}:\\
\;\;\;\;\frac{\frac{\frac{2}{k}}{k}}{t} \cdot \frac{\ell}{k \cdot \frac{k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333}{k \cdot \left(k \cdot t\right)}\\
\end{array}
\end{array}
if k < 1.94999999999999984e29Initial program 34.7%
associate-*l*34.7%
associate-*l*34.7%
associate-/r*34.7%
associate-/r/35.2%
*-commutative35.2%
times-frac35.3%
+-commutative35.3%
associate--l+42.7%
metadata-eval42.7%
+-rgt-identity42.7%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 82.3%
associate-/r*82.4%
unpow282.4%
associate-/r*82.9%
Simplified82.9%
Taylor expanded in k around 0 68.8%
unpow268.8%
unpow268.8%
Simplified68.8%
Taylor expanded in l around 0 68.8%
unpow268.8%
associate-/l*75.8%
unpow275.8%
associate-*r/75.8%
Simplified75.8%
if 1.94999999999999984e29 < k Initial program 36.1%
associate-*l*36.1%
associate-*l*36.1%
associate-/r*36.1%
associate-/r/34.6%
*-commutative34.6%
times-frac33.3%
+-commutative33.3%
associate--l+46.9%
metadata-eval46.9%
+-rgt-identity46.9%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 81.1%
associate-/r*81.1%
unpow281.1%
associate-/r*81.2%
Simplified81.2%
Taylor expanded in k around 0 50.2%
+-commutative50.2%
fma-def50.2%
unpow250.2%
*-commutative50.2%
times-frac50.1%
associate-*r/50.1%
*-commutative50.1%
times-frac50.3%
unpow250.3%
unpow250.3%
times-frac52.3%
unpow252.3%
associate-/l*52.7%
distribute-rgt-out52.7%
metadata-eval52.7%
Simplified52.7%
Taylor expanded in l around 0 59.1%
unpow259.1%
associate-*r/59.1%
metadata-eval59.1%
*-commutative59.1%
associate-*r/59.1%
metadata-eval59.1%
unpow259.1%
Simplified59.1%
Taylor expanded in k around inf 59.1%
unpow259.1%
associate-*r*59.3%
Simplified59.3%
Final simplification71.5%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ (* 2.0 (* (/ l k) (/ l k))) (* k (* k t))))
k = abs(k);
double code(double t, double l, double k) {
return (2.0 * ((l / k) * (l / k))) / (k * (k * 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) * (l / k))) / (k * (k * t))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return (2.0 * ((l / k) * (l / k))) / (k * (k * t));
}
k = abs(k) def code(t, l, k): return (2.0 * ((l / k) * (l / k))) / (k * (k * t))
k = abs(k) function code(t, l, k) return Float64(Float64(2.0 * Float64(Float64(l / k) * Float64(l / k))) / Float64(k * Float64(k * t))) end
k = abs(k) function tmp = code(t, l, k) tmp = (2.0 * ((l / k) * (l / k))) / (k * (k * t)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2 \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right)}{k \cdot \left(k \cdot t\right)}
\end{array}
Initial program 35.1%
associate-*l*35.1%
associate-*l*35.1%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac34.8%
+-commutative34.8%
associate--l+43.8%
metadata-eval43.8%
+-rgt-identity43.8%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 82.0%
associate-/r*82.0%
unpow282.0%
associate-/r*82.4%
Simplified82.4%
Taylor expanded in k around 0 66.5%
unpow266.5%
unpow266.5%
Simplified66.5%
Taylor expanded in k around 0 66.5%
*-commutative66.5%
unpow266.5%
Simplified66.5%
associate-*l/66.6%
times-frac71.7%
*-commutative71.7%
associate-*l*73.2%
Applied egg-rr73.2%
Final simplification73.2%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ (* l (/ (/ 2.0 k) (* k t))) (/ k (/ l k))))
k = abs(k);
double code(double t, double l, double k) {
return (l * ((2.0 / k) / (k * t))) / (k / (l / 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 * ((2.0d0 / k) / (k * t))) / (k / (l / k))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return (l * ((2.0 / k) / (k * t))) / (k / (l / k));
}
k = abs(k) def code(t, l, k): return (l * ((2.0 / k) / (k * t))) / (k / (l / k))
k = abs(k) function code(t, l, k) return Float64(Float64(l * Float64(Float64(2.0 / k) / Float64(k * t))) / Float64(k / Float64(l / k))) end
k = abs(k) function tmp = code(t, l, k) tmp = (l * ((2.0 / k) / (k * t))) / (k / (l / k)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(l * N[(N[(2.0 / k), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{\ell \cdot \frac{\frac{2}{k}}{k \cdot t}}{\frac{k}{\frac{\ell}{k}}}
\end{array}
Initial program 35.1%
associate-*l*35.1%
associate-*l*35.1%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac34.8%
+-commutative34.8%
associate--l+43.8%
metadata-eval43.8%
+-rgt-identity43.8%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 82.0%
associate-/r*82.0%
unpow282.0%
associate-/r*82.4%
Simplified82.4%
*-commutative82.4%
clear-num82.4%
frac-times82.5%
*-un-lft-identity82.5%
Applied egg-rr82.5%
associate-*r/85.2%
associate-/l/88.7%
associate-*l/87.2%
Applied egg-rr87.2%
Taylor expanded in k around 0 71.9%
unpow271.9%
associate-/l*73.4%
Simplified73.4%
Final simplification73.4%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* (* l l) (/ -0.3333333333333333 (* k (* k t)))))
k = abs(k);
double code(double t, double l, double k) {
return (l * l) * (-0.3333333333333333 / (k * (k * 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 = (l * l) * ((-0.3333333333333333d0) / (k * (k * t)))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return (l * l) * (-0.3333333333333333 / (k * (k * t)));
}
k = abs(k) def code(t, l, k): return (l * l) * (-0.3333333333333333 / (k * (k * t)))
k = abs(k) function code(t, l, k) return Float64(Float64(l * l) * Float64(-0.3333333333333333 / Float64(k * Float64(k * t)))) end
k = abs(k) function tmp = code(t, l, k) tmp = (l * l) * (-0.3333333333333333 / (k * (k * t))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(-0.3333333333333333 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333}{k \cdot \left(k \cdot t\right)}
\end{array}
Initial program 35.1%
associate-*l*35.1%
associate-*l*35.1%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac34.8%
+-commutative34.8%
associate--l+43.8%
metadata-eval43.8%
+-rgt-identity43.8%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 82.0%
associate-/r*82.0%
unpow282.0%
associate-/r*82.4%
Simplified82.4%
Taylor expanded in k around 0 32.9%
+-commutative32.9%
fma-def32.9%
unpow232.9%
*-commutative32.9%
times-frac33.4%
associate-*r/33.4%
*-commutative33.4%
times-frac31.5%
unpow231.5%
unpow231.5%
times-frac35.0%
unpow235.0%
associate-/l*34.4%
distribute-rgt-out34.4%
metadata-eval34.4%
Simplified34.4%
Taylor expanded in l around 0 47.7%
unpow247.7%
associate-*r/47.7%
metadata-eval47.7%
*-commutative47.7%
associate-*r/48.1%
metadata-eval48.1%
unpow248.1%
Simplified48.1%
Taylor expanded in k around inf 35.8%
unpow235.8%
associate-*r*36.0%
Simplified36.0%
Final simplification36.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ (* (* l l) -0.3333333333333333) (* k (* k t))))
k = abs(k);
double code(double t, double l, double k) {
return ((l * l) * -0.3333333333333333) / (k * (k * 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 = ((l * l) * (-0.3333333333333333d0)) / (k * (k * t))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return ((l * l) * -0.3333333333333333) / (k * (k * t));
}
k = abs(k) def code(t, l, k): return ((l * l) * -0.3333333333333333) / (k * (k * t))
k = abs(k) function code(t, l, k) return Float64(Float64(Float64(l * l) * -0.3333333333333333) / Float64(k * Float64(k * t))) end
k = abs(k) function tmp = code(t, l, k) tmp = ((l * l) * -0.3333333333333333) / (k * (k * t)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(N[(l * l), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{\left(\ell \cdot \ell\right) \cdot -0.3333333333333333}{k \cdot \left(k \cdot t\right)}
\end{array}
Initial program 35.1%
associate-*l*35.1%
associate-*l*35.1%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac34.8%
+-commutative34.8%
associate--l+43.8%
metadata-eval43.8%
+-rgt-identity43.8%
times-frac47.0%
Simplified47.0%
Taylor expanded in t around 0 82.0%
associate-/r*82.0%
unpow282.0%
associate-/r*82.4%
Simplified82.4%
Taylor expanded in k around 0 32.9%
+-commutative32.9%
fma-def32.9%
unpow232.9%
*-commutative32.9%
times-frac33.4%
associate-*r/33.4%
*-commutative33.4%
times-frac31.5%
unpow231.5%
unpow231.5%
times-frac35.0%
unpow235.0%
associate-/l*34.4%
distribute-rgt-out34.4%
metadata-eval34.4%
Simplified34.4%
Taylor expanded in l around 0 47.7%
unpow247.7%
associate-*r/47.7%
metadata-eval47.7%
*-commutative47.7%
associate-*r/48.1%
metadata-eval48.1%
unpow248.1%
Simplified48.1%
Taylor expanded in k around inf 35.8%
unpow235.8%
associate-*r*36.0%
associate-*r/36.0%
unpow236.0%
Simplified36.0%
Final simplification36.0%
herbie shell --seed 2023228
(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))))