
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ k l) t) (sin k)) (* k (/ (tan k) l)))))
double code(double t, double l, double k) {
return 2.0 / ((((k / l) * t) * sin(k)) * (k * (tan(k) / l)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / ((((k / l) * t) * sin(k)) * (k * (tan(k) / l)))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((k / l) * t) * Math.sin(k)) * (k * (Math.tan(k) / l)));
}
def code(t, l, k): return 2.0 / ((((k / l) * t) * math.sin(k)) * (k * (math.tan(k) / l)))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64(k / l) * t) * sin(k)) * Float64(k * Float64(tan(k) / l)))) end
function tmp = code(t, l, k) tmp = 2.0 / ((((k / l) * t) * sin(k)) * (k * (tan(k) / l))); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(k / l), $MachinePrecision] * t), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{k}{\ell} \cdot t\right) \cdot \sin k\right) \cdot \left(k \cdot \frac{\tan k}{\ell}\right)}
\end{array}
Initial program 31.4%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.2
Applied rewrites94.2%
Applied rewrites99.1%
Applied rewrites99.4%
Applied rewrites99.5%
(FPCore (t l k) :precision binary64 (if (<= k 8.5e-9) (/ 2.0 (* (* (/ (* k t) l) k) (* (tan k) (/ k l)))) (/ 2.0 (* (/ (* (* k t) (sin k)) (* l l)) (* (tan k) k)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 8.5e-9) {
tmp = 2.0 / ((((k * t) / l) * k) * (tan(k) * (k / l)));
} else {
tmp = 2.0 / ((((k * t) * sin(k)) / (l * l)) * (tan(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 <= 8.5d-9) then
tmp = 2.0d0 / ((((k * t) / l) * k) * (tan(k) * (k / l)))
else
tmp = 2.0d0 / ((((k * t) * sin(k)) / (l * l)) * (tan(k) * k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 8.5e-9) {
tmp = 2.0 / ((((k * t) / l) * k) * (Math.tan(k) * (k / l)));
} else {
tmp = 2.0 / ((((k * t) * Math.sin(k)) / (l * l)) * (Math.tan(k) * k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 8.5e-9: tmp = 2.0 / ((((k * t) / l) * k) * (math.tan(k) * (k / l))) else: tmp = 2.0 / ((((k * t) * math.sin(k)) / (l * l)) * (math.tan(k) * k)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 8.5e-9) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * t) / l) * k) * Float64(tan(k) * Float64(k / l)))); else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * t) * sin(k)) / Float64(l * l)) * Float64(tan(k) * k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 8.5e-9) tmp = 2.0 / ((((k * t) / l) * k) * (tan(k) * (k / l))); else tmp = 2.0 / ((((k * t) * sin(k)) / (l * l)) * (tan(k) * k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 8.5e-9], N[(2.0 / N[(N[(N[(N[(k * t), $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * t), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 8.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\left(\frac{k \cdot t}{\ell} \cdot k\right) \cdot \left(\tan k \cdot \frac{k}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot t\right) \cdot \sin k}{\ell \cdot \ell} \cdot \left(\tan k \cdot k\right)}\\
\end{array}
\end{array}
if k < 8.5e-9Initial program 32.9%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.1
Applied rewrites94.1%
Applied rewrites99.2%
Applied rewrites99.7%
Taylor expanded in k around 0
Applied rewrites83.9%
if 8.5e-9 < k Initial program 27.6%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.6
Applied rewrites94.6%
Applied rewrites98.8%
Applied rewrites93.5%
Applied rewrites79.7%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (tan k) (/ (* (* (* (/ k l) t) (sin k)) k) l))))
double code(double t, double l, double k) {
return 2.0 / (tan(k) * (((((k / l) * t) * sin(k)) * k) / l));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (tan(k) * (((((k / l) * t) * sin(k)) * k) / l))
end function
public static double code(double t, double l, double k) {
return 2.0 / (Math.tan(k) * (((((k / l) * t) * Math.sin(k)) * k) / l));
}
def code(t, l, k): return 2.0 / (math.tan(k) * (((((k / l) * t) * math.sin(k)) * k) / l))
function code(t, l, k) return Float64(2.0 / Float64(tan(k) * Float64(Float64(Float64(Float64(Float64(k / l) * t) * sin(k)) * k) / l))) end
function tmp = code(t, l, k) tmp = 2.0 / (tan(k) * (((((k / l) * t) * sin(k)) * k) / l)); end
code[t_, l_, k_] := N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(N[(N[(N[(k / l), $MachinePrecision] * t), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\tan k \cdot \frac{\left(\left(\frac{k}{\ell} \cdot t\right) \cdot \sin k\right) \cdot k}{\ell}}
\end{array}
Initial program 31.4%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.2
Applied rewrites94.2%
Applied rewrites99.1%
Applied rewrites97.3%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 2e-148) (/ 2.0 (* (* (/ (* k t) l) k) (* (tan k) (/ k l)))) (* (* (/ l (* k t)) (/ l k)) (+ (/ 2.0 (* k k)) -0.3333333333333333))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-148) {
tmp = 2.0 / ((((k * t) / l) * k) * (tan(k) * (k / l)));
} else {
tmp = ((l / (k * t)) * (l / k)) * ((2.0 / (k * k)) + -0.3333333333333333);
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 2d-148) then
tmp = 2.0d0 / ((((k * t) / l) * k) * (tan(k) * (k / l)))
else
tmp = ((l / (k * t)) * (l / k)) * ((2.0d0 / (k * k)) + (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-148) {
tmp = 2.0 / ((((k * t) / l) * k) * (Math.tan(k) * (k / l)));
} else {
tmp = ((l / (k * t)) * (l / k)) * ((2.0 / (k * k)) + -0.3333333333333333);
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 2e-148: tmp = 2.0 / ((((k * t) / l) * k) * (math.tan(k) * (k / l))) else: tmp = ((l / (k * t)) * (l / k)) * ((2.0 / (k * k)) + -0.3333333333333333) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 2e-148) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * t) / l) * k) * Float64(tan(k) * Float64(k / l)))); else tmp = Float64(Float64(Float64(l / Float64(k * t)) * Float64(l / k)) * Float64(Float64(2.0 / Float64(k * k)) + -0.3333333333333333)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 2e-148) tmp = 2.0 / ((((k * t) / l) * k) * (tan(k) * (k / l))); else tmp = ((l / (k * t)) * (l / k)) * ((2.0 / (k * k)) + -0.3333333333333333); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 2e-148], N[(2.0 / N[(N[(N[(N[(k * t), $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] + -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-148}:\\
\;\;\;\;\frac{2}{\left(\frac{k \cdot t}{\ell} \cdot k\right) \cdot \left(\tan k \cdot \frac{k}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k \cdot t} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{2}{k \cdot k} + -0.3333333333333333\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 1.99999999999999987e-148Initial program 22.3%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6490.6
Applied rewrites90.6%
Applied rewrites98.6%
Applied rewrites99.6%
Taylor expanded in k around 0
Applied rewrites92.8%
if 1.99999999999999987e-148 < (*.f64 l l) Initial program 36.8%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6496.4
Applied rewrites96.4%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites39.1%
Taylor expanded in k around inf
Applied rewrites67.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ l (* k t))))
(if (<= k 1.8e+15)
(* (/ l (* k k)) (* t_1 (/ 2.0 k)))
(* (/ (* -0.3333333333333333 l) k) t_1))))
double code(double t, double l, double k) {
double t_1 = l / (k * t);
double tmp;
if (k <= 1.8e+15) {
tmp = (l / (k * k)) * (t_1 * (2.0 / k));
} else {
tmp = ((-0.3333333333333333 * l) / k) * t_1;
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = l / (k * t)
if (k <= 1.8d+15) then
tmp = (l / (k * k)) * (t_1 * (2.0d0 / k))
else
tmp = (((-0.3333333333333333d0) * l) / k) * t_1
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = l / (k * t);
double tmp;
if (k <= 1.8e+15) {
tmp = (l / (k * k)) * (t_1 * (2.0 / k));
} else {
tmp = ((-0.3333333333333333 * l) / k) * t_1;
}
return tmp;
}
def code(t, l, k): t_1 = l / (k * t) tmp = 0 if k <= 1.8e+15: tmp = (l / (k * k)) * (t_1 * (2.0 / k)) else: tmp = ((-0.3333333333333333 * l) / k) * t_1 return tmp
function code(t, l, k) t_1 = Float64(l / Float64(k * t)) tmp = 0.0 if (k <= 1.8e+15) tmp = Float64(Float64(l / Float64(k * k)) * Float64(t_1 * Float64(2.0 / k))); else tmp = Float64(Float64(Float64(-0.3333333333333333 * l) / k) * t_1); end return tmp end
function tmp_2 = code(t, l, k) t_1 = l / (k * t); tmp = 0.0; if (k <= 1.8e+15) tmp = (l / (k * k)) * (t_1 * (2.0 / k)); else tmp = ((-0.3333333333333333 * l) / k) * t_1; end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.8e+15], N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(2.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.3333333333333333 * l), $MachinePrecision] / k), $MachinePrecision] * t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{k \cdot t}\\
\mathbf{if}\;k \leq 1.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{\ell}{k \cdot k} \cdot \left(t\_1 \cdot \frac{2}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \ell}{k} \cdot t\_1\\
\end{array}
\end{array}
if k < 1.8e15Initial program 32.2%
Taylor expanded in k around 0
count-2-revN/A
unpow2N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
count-2-revN/A
lower-*.f6475.1
Applied rewrites75.1%
Applied rewrites76.6%
Applied rewrites82.7%
if 1.8e15 < k Initial program 29.3%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.3
Applied rewrites94.3%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites16.2%
Taylor expanded in k around inf
Applied rewrites56.2%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ l (* k t))))
(if (<= k 1.3e+114)
(* (* t_1 (/ l k)) (/ 2.0 (* k k)))
(* (/ (* -0.3333333333333333 l) k) t_1))))
double code(double t, double l, double k) {
double t_1 = l / (k * t);
double tmp;
if (k <= 1.3e+114) {
tmp = (t_1 * (l / k)) * (2.0 / (k * k));
} else {
tmp = ((-0.3333333333333333 * l) / k) * t_1;
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = l / (k * t)
if (k <= 1.3d+114) then
tmp = (t_1 * (l / k)) * (2.0d0 / (k * k))
else
tmp = (((-0.3333333333333333d0) * l) / k) * t_1
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = l / (k * t);
double tmp;
if (k <= 1.3e+114) {
tmp = (t_1 * (l / k)) * (2.0 / (k * k));
} else {
tmp = ((-0.3333333333333333 * l) / k) * t_1;
}
return tmp;
}
def code(t, l, k): t_1 = l / (k * t) tmp = 0 if k <= 1.3e+114: tmp = (t_1 * (l / k)) * (2.0 / (k * k)) else: tmp = ((-0.3333333333333333 * l) / k) * t_1 return tmp
function code(t, l, k) t_1 = Float64(l / Float64(k * t)) tmp = 0.0 if (k <= 1.3e+114) tmp = Float64(Float64(t_1 * Float64(l / k)) * Float64(2.0 / Float64(k * k))); else tmp = Float64(Float64(Float64(-0.3333333333333333 * l) / k) * t_1); end return tmp end
function tmp_2 = code(t, l, k) t_1 = l / (k * t); tmp = 0.0; if (k <= 1.3e+114) tmp = (t_1 * (l / k)) * (2.0 / (k * k)); else tmp = ((-0.3333333333333333 * l) / k) * t_1; end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.3e+114], N[(N[(t$95$1 * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.3333333333333333 * l), $MachinePrecision] / k), $MachinePrecision] * t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{k \cdot t}\\
\mathbf{if}\;k \leq 1.3 \cdot 10^{+114}:\\
\;\;\;\;\left(t\_1 \cdot \frac{\ell}{k}\right) \cdot \frac{2}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \ell}{k} \cdot t\_1\\
\end{array}
\end{array}
if k < 1.3e114Initial program 32.0%
Taylor expanded in k around 0
count-2-revN/A
unpow2N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
count-2-revN/A
lower-*.f6471.6
Applied rewrites71.6%
Applied rewrites72.9%
Applied rewrites71.6%
Taylor expanded in t around 0
Applied rewrites77.7%
if 1.3e114 < k Initial program 28.6%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6493.8
Applied rewrites93.8%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites2.4%
Taylor expanded in k around inf
Applied rewrites64.0%
(FPCore (t l k) :precision binary64 (* (* (/ l (* k t)) (/ l k)) (+ (/ 2.0 (* k k)) -0.3333333333333333)))
double code(double t, double l, double k) {
return ((l / (k * t)) * (l / k)) * ((2.0 / (k * k)) + -0.3333333333333333);
}
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 * t)) * (l / k)) * ((2.0d0 / (k * k)) + (-0.3333333333333333d0))
end function
public static double code(double t, double l, double k) {
return ((l / (k * t)) * (l / k)) * ((2.0 / (k * k)) + -0.3333333333333333);
}
def code(t, l, k): return ((l / (k * t)) * (l / k)) * ((2.0 / (k * k)) + -0.3333333333333333)
function code(t, l, k) return Float64(Float64(Float64(l / Float64(k * t)) * Float64(l / k)) * Float64(Float64(2.0 / Float64(k * k)) + -0.3333333333333333)) end
function tmp = code(t, l, k) tmp = ((l / (k * t)) * (l / k)) * ((2.0 / (k * k)) + -0.3333333333333333); end
code[t_, l_, k_] := N[(N[(N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] + -0.3333333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{\ell}{k \cdot t} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{2}{k \cdot k} + -0.3333333333333333\right)
\end{array}
Initial program 31.4%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.2
Applied rewrites94.2%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites41.2%
Taylor expanded in k around inf
Applied rewrites75.5%
(FPCore (t l k) :precision binary64 (if (<= k 1.8e+15) (* (/ (* l 2.0) (* (* k t) k)) (/ l (* k k))) (* (/ (* -0.3333333333333333 l) k) (/ l (* k t)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = ((l * 2.0) / ((k * t) * k)) * (l / (k * k));
} else {
tmp = ((-0.3333333333333333 * 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 (k <= 1.8d+15) then
tmp = ((l * 2.0d0) / ((k * t) * k)) * (l / (k * k))
else
tmp = (((-0.3333333333333333d0) * l) / k) * (l / (k * t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = ((l * 2.0) / ((k * t) * k)) * (l / (k * k));
} else {
tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.8e+15: tmp = ((l * 2.0) / ((k * t) * k)) * (l / (k * k)) else: tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.8e+15) tmp = Float64(Float64(Float64(l * 2.0) / Float64(Float64(k * t) * k)) * Float64(l / Float64(k * k))); else tmp = Float64(Float64(Float64(-0.3333333333333333 * l) / k) * Float64(l / Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.8e+15) tmp = ((l * 2.0) / ((k * t) * k)) * (l / (k * k)); else tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.8e+15], N[(N[(N[(l * 2.0), $MachinePrecision] / N[(N[(k * t), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.3333333333333333 * l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{\ell \cdot 2}{\left(k \cdot t\right) \cdot k} \cdot \frac{\ell}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \ell}{k} \cdot \frac{\ell}{k \cdot t}\\
\end{array}
\end{array}
if k < 1.8e15Initial program 32.2%
Taylor expanded in k around 0
count-2-revN/A
unpow2N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
count-2-revN/A
lower-*.f6475.1
Applied rewrites75.1%
Applied rewrites81.1%
if 1.8e15 < k Initial program 29.3%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.3
Applied rewrites94.3%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites16.2%
Taylor expanded in k around inf
Applied rewrites56.2%
(FPCore (t l k) :precision binary64 (if (<= k 1.8e+15) (* (/ (* l 2.0) (* k k)) (/ l (* (* k k) t))) (* (/ (* -0.3333333333333333 l) k) (/ l (* k t)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = ((l * 2.0) / (k * k)) * (l / ((k * k) * t));
} else {
tmp = ((-0.3333333333333333 * 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 (k <= 1.8d+15) then
tmp = ((l * 2.0d0) / (k * k)) * (l / ((k * k) * t))
else
tmp = (((-0.3333333333333333d0) * l) / k) * (l / (k * t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = ((l * 2.0) / (k * k)) * (l / ((k * k) * t));
} else {
tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.8e+15: tmp = ((l * 2.0) / (k * k)) * (l / ((k * k) * t)) else: tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.8e+15) tmp = Float64(Float64(Float64(l * 2.0) / Float64(k * k)) * Float64(l / Float64(Float64(k * k) * t))); else tmp = Float64(Float64(Float64(-0.3333333333333333 * l) / k) * Float64(l / Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.8e+15) tmp = ((l * 2.0) / (k * k)) * (l / ((k * k) * t)); else tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.8e+15], N[(N[(N[(l * 2.0), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.3333333333333333 * l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{\ell \cdot 2}{k \cdot k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \ell}{k} \cdot \frac{\ell}{k \cdot t}\\
\end{array}
\end{array}
if k < 1.8e15Initial program 32.2%
Taylor expanded in k around 0
count-2-revN/A
unpow2N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
count-2-revN/A
lower-*.f6475.1
Applied rewrites75.1%
Applied rewrites81.1%
if 1.8e15 < k Initial program 29.3%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.3
Applied rewrites94.3%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites16.2%
Taylor expanded in k around inf
Applied rewrites56.2%
(FPCore (t l k) :precision binary64 (if (<= k 1.8e+15) (* (/ (/ l (* (* k k) t)) (* k k)) (+ l l)) (* (/ (* -0.3333333333333333 l) k) (/ l (* k t)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = ((l / ((k * k) * t)) / (k * k)) * (l + l);
} else {
tmp = ((-0.3333333333333333 * 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 (k <= 1.8d+15) then
tmp = ((l / ((k * k) * t)) / (k * k)) * (l + l)
else
tmp = (((-0.3333333333333333d0) * l) / k) * (l / (k * t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = ((l / ((k * k) * t)) / (k * k)) * (l + l);
} else {
tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.8e+15: tmp = ((l / ((k * k) * t)) / (k * k)) * (l + l) else: tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.8e+15) tmp = Float64(Float64(Float64(l / Float64(Float64(k * k) * t)) / Float64(k * k)) * Float64(l + l)); else tmp = Float64(Float64(Float64(-0.3333333333333333 * l) / k) * Float64(l / Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.8e+15) tmp = ((l / ((k * k) * t)) / (k * k)) * (l + l); else tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.8e+15], N[(N[(N[(l / N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l + l), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.3333333333333333 * l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{\ell}{\left(k \cdot k\right) \cdot t}}{k \cdot k} \cdot \left(\ell + \ell\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \ell}{k} \cdot \frac{\ell}{k \cdot t}\\
\end{array}
\end{array}
if k < 1.8e15Initial program 32.2%
Taylor expanded in k around 0
count-2-revN/A
unpow2N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
count-2-revN/A
lower-*.f6475.1
Applied rewrites75.1%
Applied rewrites76.6%
Applied rewrites76.6%
Applied rewrites80.2%
if 1.8e15 < k Initial program 29.3%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.3
Applied rewrites94.3%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites16.2%
Taylor expanded in k around inf
Applied rewrites56.2%
(FPCore (t l k) :precision binary64 (if (<= k 1.8e+15) (* (/ l (* (* (* (* k t) k) k) k)) (* 2.0 l)) (* (/ (* -0.3333333333333333 l) k) (/ l (* k t)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = (l / ((((k * t) * k) * k) * k)) * (2.0 * l);
} else {
tmp = ((-0.3333333333333333 * 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 (k <= 1.8d+15) then
tmp = (l / ((((k * t) * k) * k) * k)) * (2.0d0 * l)
else
tmp = (((-0.3333333333333333d0) * l) / k) * (l / (k * t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = (l / ((((k * t) * k) * k) * k)) * (2.0 * l);
} else {
tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.8e+15: tmp = (l / ((((k * t) * k) * k) * k)) * (2.0 * l) else: tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.8e+15) tmp = Float64(Float64(l / Float64(Float64(Float64(Float64(k * t) * k) * k) * k)) * Float64(2.0 * l)); else tmp = Float64(Float64(Float64(-0.3333333333333333 * l) / k) * Float64(l / Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.8e+15) tmp = (l / ((((k * t) * k) * k) * k)) * (2.0 * l); else tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.8e+15], N[(N[(l / N[(N[(N[(N[(k * t), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.3333333333333333 * l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{\ell}{\left(\left(\left(k \cdot t\right) \cdot k\right) \cdot k\right) \cdot k} \cdot \left(2 \cdot \ell\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \ell}{k} \cdot \frac{\ell}{k \cdot t}\\
\end{array}
\end{array}
if k < 1.8e15Initial program 32.2%
Taylor expanded in k around 0
count-2-revN/A
unpow2N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
count-2-revN/A
lower-*.f6475.1
Applied rewrites75.1%
Applied rewrites76.6%
if 1.8e15 < k Initial program 29.3%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.3
Applied rewrites94.3%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites16.2%
Taylor expanded in k around inf
Applied rewrites56.2%
(FPCore (t l k) :precision binary64 (if (<= k 1.8e+15) (* (/ l (* (* k k) (* (* k t) k))) (+ l l)) (* (/ (* -0.3333333333333333 l) k) (/ l (* k t)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = (l / ((k * k) * ((k * t) * k))) * (l + l);
} else {
tmp = ((-0.3333333333333333 * 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 (k <= 1.8d+15) then
tmp = (l / ((k * k) * ((k * t) * k))) * (l + l)
else
tmp = (((-0.3333333333333333d0) * l) / k) * (l / (k * t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = (l / ((k * k) * ((k * t) * k))) * (l + l);
} else {
tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.8e+15: tmp = (l / ((k * k) * ((k * t) * k))) * (l + l) else: tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.8e+15) tmp = Float64(Float64(l / Float64(Float64(k * k) * Float64(Float64(k * t) * k))) * Float64(l + l)); else tmp = Float64(Float64(Float64(-0.3333333333333333 * l) / k) * Float64(l / Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.8e+15) tmp = (l / ((k * k) * ((k * t) * k))) * (l + l); else tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.8e+15], N[(N[(l / N[(N[(k * k), $MachinePrecision] * N[(N[(k * t), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l + l), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.3333333333333333 * l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(k \cdot t\right) \cdot k\right)} \cdot \left(\ell + \ell\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \ell}{k} \cdot \frac{\ell}{k \cdot t}\\
\end{array}
\end{array}
if k < 1.8e15Initial program 32.2%
Taylor expanded in k around 0
count-2-revN/A
unpow2N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
count-2-revN/A
lower-*.f6475.1
Applied rewrites75.1%
Applied rewrites76.6%
Applied rewrites76.6%
Applied rewrites76.6%
if 1.8e15 < k Initial program 29.3%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.3
Applied rewrites94.3%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites16.2%
Taylor expanded in k around inf
Applied rewrites56.2%
(FPCore (t l k) :precision binary64 (if (<= k 1.8e+15) (* (/ l (* (* k k) (* (* k k) t))) (+ l l)) (* (/ (* -0.3333333333333333 l) k) (/ l (* k t)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = (l / ((k * k) * ((k * k) * t))) * (l + l);
} else {
tmp = ((-0.3333333333333333 * 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 (k <= 1.8d+15) then
tmp = (l / ((k * k) * ((k * k) * t))) * (l + l)
else
tmp = (((-0.3333333333333333d0) * l) / k) * (l / (k * t))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.8e+15) {
tmp = (l / ((k * k) * ((k * k) * t))) * (l + l);
} else {
tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.8e+15: tmp = (l / ((k * k) * ((k * k) * t))) * (l + l) else: tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.8e+15) tmp = Float64(Float64(l / Float64(Float64(k * k) * Float64(Float64(k * k) * t))) * Float64(l + l)); else tmp = Float64(Float64(Float64(-0.3333333333333333 * l) / k) * Float64(l / Float64(k * t))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.8e+15) tmp = (l / ((k * k) * ((k * k) * t))) * (l + l); else tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.8e+15], N[(N[(l / N[(N[(k * k), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l + l), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.3333333333333333 * l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(k \cdot k\right) \cdot t\right)} \cdot \left(\ell + \ell\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \ell}{k} \cdot \frac{\ell}{k \cdot t}\\
\end{array}
\end{array}
if k < 1.8e15Initial program 32.2%
Taylor expanded in k around 0
count-2-revN/A
unpow2N/A
associate-/l*N/A
unpow2N/A
associate-/l*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-pow.f64N/A
count-2-revN/A
lower-*.f6475.1
Applied rewrites75.1%
Applied rewrites76.6%
Applied rewrites76.6%
if 1.8e15 < k Initial program 29.3%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.3
Applied rewrites94.3%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites16.2%
Taylor expanded in k around inf
Applied rewrites56.2%
(FPCore (t l k) :precision binary64 (* (/ (* -0.3333333333333333 l) k) (/ l (* k t))))
double code(double t, double l, double k) {
return ((-0.3333333333333333 * l) / k) * (l / (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 = (((-0.3333333333333333d0) * l) / k) * (l / (k * t))
end function
public static double code(double t, double l, double k) {
return ((-0.3333333333333333 * l) / k) * (l / (k * t));
}
def code(t, l, k): return ((-0.3333333333333333 * l) / k) * (l / (k * t))
function code(t, l, k) return Float64(Float64(Float64(-0.3333333333333333 * l) / k) * Float64(l / Float64(k * t))) end
function tmp = code(t, l, k) tmp = ((-0.3333333333333333 * l) / k) * (l / (k * t)); end
code[t_, l_, k_] := N[(N[(N[(-0.3333333333333333 * l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-0.3333333333333333 \cdot \ell}{k} \cdot \frac{\ell}{k \cdot t}
\end{array}
Initial program 31.4%
Taylor expanded in t around 0
*-commutativeN/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-cos.f6494.2
Applied rewrites94.2%
Taylor expanded in k around 0
+-commutativeN/A
div-addN/A
associate-*r/N/A
associate-/r*N/A
*-commutativeN/A
associate-*r/N/A
associate-/l/N/A
*-commutativeN/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites41.2%
Taylor expanded in k around inf
Applied rewrites33.7%
herbie shell --seed 2024329
(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))))