
(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 13 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 t) (/ (* k (sin k)) l)) (/ (/ l k) (tan k))))
double code(double t, double l, double k) {
return ((2.0 / t) / ((k * sin(k)) / l)) * ((l / k) / tan(k));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((2.0d0 / t) / ((k * sin(k)) / l)) * ((l / k) / tan(k))
end function
public static double code(double t, double l, double k) {
return ((2.0 / t) / ((k * Math.sin(k)) / l)) * ((l / k) / Math.tan(k));
}
def code(t, l, k): return ((2.0 / t) / ((k * math.sin(k)) / l)) * ((l / k) / math.tan(k))
function code(t, l, k) return Float64(Float64(Float64(2.0 / t) / Float64(Float64(k * sin(k)) / l)) * Float64(Float64(l / k) / tan(k))) end
function tmp = code(t, l, k) tmp = ((2.0 / t) / ((k * sin(k)) / l)) * ((l / k) / tan(k)); end
code[t_, l_, k_] := N[(N[(N[(2.0 / t), $MachinePrecision] / N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{2}{t}}{\frac{k \cdot \sin k}{\ell}} \cdot \frac{\frac{\ell}{k}}{\tan k}
\end{array}
Initial program 34.0%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites28.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lift-*.f64N/A
pow2N/A
pow-flipN/A
lift-*.f64N/A
lift-*.f64N/A
cube-unmultN/A
pow-prod-upN/A
metadata-evalN/A
metadata-evalN/A
unpow1N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites93.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
div-invN/A
lift-/.f64N/A
clear-numN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6495.2
Applied rewrites95.2%
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
times-fracN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift-/.f64N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6498.5
Applied rewrites98.5%
(FPCore (t l k) :precision binary64 (/ (* 2.0 (/ l (* t k))) (* (sin k) (* (tan k) (/ k l)))))
double code(double t, double l, double k) {
return (2.0 * (l / (t * k))) / (sin(k) * (tan(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 * (l / (t * k))) / (sin(k) * (tan(k) * (k / l)))
end function
public static double code(double t, double l, double k) {
return (2.0 * (l / (t * k))) / (Math.sin(k) * (Math.tan(k) * (k / l)));
}
def code(t, l, k): return (2.0 * (l / (t * k))) / (math.sin(k) * (math.tan(k) * (k / l)))
function code(t, l, k) return Float64(Float64(2.0 * Float64(l / Float64(t * k))) / Float64(sin(k) * Float64(tan(k) * Float64(k / l)))) end
function tmp = code(t, l, k) tmp = (2.0 * (l / (t * k))) / (sin(k) * (tan(k) * (k / l))); end
code[t_, l_, k_] := N[(N[(2.0 * N[(l / N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2 \cdot \frac{\ell}{t \cdot k}}{\sin k \cdot \left(\tan k \cdot \frac{k}{\ell}\right)}
\end{array}
Initial program 34.0%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites28.2%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lift-*.f64N/A
pow2N/A
pow-flipN/A
lift-*.f64N/A
lift-*.f64N/A
cube-unmultN/A
pow-prod-upN/A
metadata-evalN/A
metadata-evalN/A
unpow1N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites93.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
div-invN/A
lift-/.f64N/A
clear-numN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6495.2
Applied rewrites95.2%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6496.0
Applied rewrites96.0%
Final simplification96.0%
(FPCore (t l k) :precision binary64 (if (<= k 6e-21) (/ (/ (+ l l) (* k k)) (* t (/ (* k k) l))) (* (/ (+ l l) k) (/ l (* (* t k) (* (sin k) (tan k)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 6e-21) {
tmp = ((l + l) / (k * k)) / (t * ((k * k) / l));
} else {
tmp = ((l + l) / k) * (l / ((t * k) * (sin(k) * tan(k))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 6d-21) then
tmp = ((l + l) / (k * k)) / (t * ((k * k) / l))
else
tmp = ((l + l) / k) * (l / ((t * k) * (sin(k) * tan(k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6e-21) {
tmp = ((l + l) / (k * k)) / (t * ((k * k) / l));
} else {
tmp = ((l + l) / k) * (l / ((t * k) * (Math.sin(k) * Math.tan(k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 6e-21: tmp = ((l + l) / (k * k)) / (t * ((k * k) / l)) else: tmp = ((l + l) / k) * (l / ((t * k) * (math.sin(k) * math.tan(k)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 6e-21) tmp = Float64(Float64(Float64(l + l) / Float64(k * k)) / Float64(t * Float64(Float64(k * k) / l))); else tmp = Float64(Float64(Float64(l + l) / k) * Float64(l / Float64(Float64(t * k) * Float64(sin(k) * tan(k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6e-21) tmp = ((l + l) / (k * k)) / (t * ((k * k) / l)); else tmp = ((l + l) / k) * (l / ((t * k) * (sin(k) * tan(k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 6e-21], N[(N[(N[(l + l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l + l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(N[(t * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6 \cdot 10^{-21}:\\
\;\;\;\;\frac{\frac{\ell + \ell}{k \cdot k}}{t \cdot \frac{k \cdot k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(t \cdot k\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 5.99999999999999982e-21Initial program 36.0%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6462.9
Applied rewrites62.9%
Applied rewrites69.8%
Applied rewrites74.4%
Applied rewrites81.0%
if 5.99999999999999982e-21 < k Initial program 30.5%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites30.5%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lift-*.f64N/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
lift-*.f64N/A
pow2N/A
pow-flipN/A
lift-*.f64N/A
lift-*.f64N/A
cube-unmultN/A
pow-prod-upN/A
metadata-evalN/A
metadata-evalN/A
unpow1N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
Applied rewrites97.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
div-invN/A
lift-/.f64N/A
clear-numN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6497.8
Applied rewrites97.8%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
div-invN/A
lift-/.f64N/A
clear-numN/A
associate-/l*N/A
lift-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
count-2N/A
lift-+.f64N/A
lift-/.f64N/A
associate-/l/N/A
lower-/.f64N/A
lower-*.f6497.8
Applied rewrites97.8%
Final simplification87.1%
(FPCore (t l k) :precision binary64 (if (<= k 18500.0) (/ (/ (+ l l) (* k k)) (* t (/ (* k k) l))) (/ (/ (/ (* 2.0 (* l l)) (- 0.5 (* 0.5 (cos (+ k k))))) (* t k)) k)))
double code(double t, double l, double k) {
double tmp;
if (k <= 18500.0) {
tmp = ((l + l) / (k * k)) / (t * ((k * k) / l));
} else {
tmp = (((2.0 * (l * l)) / (0.5 - (0.5 * cos((k + k))))) / (t * k)) / k;
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 18500.0d0) then
tmp = ((l + l) / (k * k)) / (t * ((k * k) / l))
else
tmp = (((2.0d0 * (l * l)) / (0.5d0 - (0.5d0 * cos((k + k))))) / (t * k)) / k
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 18500.0) {
tmp = ((l + l) / (k * k)) / (t * ((k * k) / l));
} else {
tmp = (((2.0 * (l * l)) / (0.5 - (0.5 * Math.cos((k + k))))) / (t * k)) / k;
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 18500.0: tmp = ((l + l) / (k * k)) / (t * ((k * k) / l)) else: tmp = (((2.0 * (l * l)) / (0.5 - (0.5 * math.cos((k + k))))) / (t * k)) / k return tmp
function code(t, l, k) tmp = 0.0 if (k <= 18500.0) tmp = Float64(Float64(Float64(l + l) / Float64(k * k)) / Float64(t * Float64(Float64(k * k) / l))); else tmp = Float64(Float64(Float64(Float64(2.0 * Float64(l * l)) / Float64(0.5 - Float64(0.5 * cos(Float64(k + k))))) / Float64(t * k)) / k); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 18500.0) tmp = ((l + l) / (k * k)) / (t * ((k * k) / l)); else tmp = (((2.0 * (l * l)) / (0.5 - (0.5 * cos((k + k))))) / (t * k)) / k; end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 18500.0], N[(N[(N[(l + l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 18500:\\
\;\;\;\;\frac{\frac{\ell + \ell}{k \cdot k}}{t \cdot \frac{k \cdot k}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2 \cdot \left(\ell \cdot \ell\right)}{0.5 - 0.5 \cdot \cos \left(k + k\right)}}{t \cdot k}}{k}\\
\end{array}
\end{array}
if k < 18500Initial program 35.2%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.0
Applied rewrites63.0%
Applied rewrites69.7%
Applied rewrites74.1%
Applied rewrites80.6%
if 18500 < k Initial program 31.7%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-cos.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lower-pow.f64N/A
lower-sin.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6483.8
Applied rewrites83.8%
Taylor expanded in k around 0
Applied rewrites57.9%
Applied rewrites58.0%
Final simplification72.7%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 2e-169) (* (/ (+ l l) (* t k)) (/ l (* k (* k k)))) (/ (* (/ l k) (+ l l)) (* (* t k) (* k k)))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-169) {
tmp = ((l + l) / (t * k)) * (l / (k * (k * k)));
} else {
tmp = ((l / k) * (l + l)) / ((t * k) * (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 ((l * l) <= 2d-169) then
tmp = ((l + l) / (t * k)) * (l / (k * (k * k)))
else
tmp = ((l / k) * (l + l)) / ((t * k) * (k * k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-169) {
tmp = ((l + l) / (t * k)) * (l / (k * (k * k)));
} else {
tmp = ((l / k) * (l + l)) / ((t * k) * (k * k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 2e-169: tmp = ((l + l) / (t * k)) * (l / (k * (k * k))) else: tmp = ((l / k) * (l + l)) / ((t * k) * (k * k)) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 2e-169) tmp = Float64(Float64(Float64(l + l) / Float64(t * k)) * Float64(l / Float64(k * Float64(k * k)))); else tmp = Float64(Float64(Float64(l / k) * Float64(l + l)) / Float64(Float64(t * k) * Float64(k * k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 2e-169) tmp = ((l + l) / (t * k)) * (l / (k * (k * k))); else tmp = ((l / k) * (l + l)) / ((t * k) * (k * k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 2e-169], N[(N[(N[(l + l), $MachinePrecision] / N[(t * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l + l), $MachinePrecision]), $MachinePrecision] / N[(N[(t * k), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-169}:\\
\;\;\;\;\frac{\ell + \ell}{t \cdot k} \cdot \frac{\ell}{k \cdot \left(k \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{k} \cdot \left(\ell + \ell\right)}{\left(t \cdot k\right) \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if (*.f64 l l) < 2.00000000000000004e-169Initial program 27.7%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6461.2
Applied rewrites61.2%
Applied rewrites73.6%
Applied rewrites80.9%
Applied rewrites80.9%
if 2.00000000000000004e-169 < (*.f64 l l) Initial program 37.3%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6457.0
Applied rewrites57.0%
Applied rewrites58.5%
Applied rewrites59.1%
Applied rewrites62.9%
Final simplification69.1%
(FPCore (t l k) :precision binary64 (/ (/ (+ l l) (* k k)) (* t (/ (* k k) l))))
double code(double t, double l, double k) {
return ((l + l) / (k * k)) / (t * ((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 = ((l + l) / (k * k)) / (t * ((k * k) / l))
end function
public static double code(double t, double l, double k) {
return ((l + l) / (k * k)) / (t * ((k * k) / l));
}
def code(t, l, k): return ((l + l) / (k * k)) / (t * ((k * k) / l))
function code(t, l, k) return Float64(Float64(Float64(l + l) / Float64(k * k)) / Float64(t * Float64(Float64(k * k) / l))) end
function tmp = code(t, l, k) tmp = ((l + l) / (k * k)) / (t * ((k * k) / l)); end
code[t_, l_, k_] := N[(N[(N[(l + l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(t * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\ell + \ell}{k \cdot k}}{t \cdot \frac{k \cdot k}{\ell}}
\end{array}
Initial program 34.0%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites63.7%
Applied rewrites66.6%
Applied rewrites71.6%
Final simplification71.6%
(FPCore (t l k) :precision binary64 (* (/ (+ l l) (* k k)) (/ (/ l (* k k)) t)))
double code(double t, double l, double k) {
return ((l + l) / (k * k)) * ((l / (k * k)) / t);
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((l + l) / (k * k)) * ((l / (k * k)) / t)
end function
public static double code(double t, double l, double k) {
return ((l + l) / (k * k)) * ((l / (k * k)) / t);
}
def code(t, l, k): return ((l + l) / (k * k)) * ((l / (k * k)) / t)
function code(t, l, k) return Float64(Float64(Float64(l + l) / Float64(k * k)) * Float64(Float64(l / Float64(k * k)) / t)) end
function tmp = code(t, l, k) tmp = ((l + l) / (k * k)) * ((l / (k * k)) / t); end
code[t_, l_, k_] := N[(N[(N[(l + l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell + \ell}{k \cdot k} \cdot \frac{\frac{\ell}{k \cdot k}}{t}
\end{array}
Initial program 34.0%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites63.7%
Applied rewrites66.6%
Applied rewrites71.6%
(FPCore (t l k) :precision binary64 (* (/ l (* k k)) (/ (* 2.0 l) (* t (* k k)))))
double code(double t, double l, double k) {
return (l / (k * k)) * ((2.0 * l) / (t * (k * k)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l / (k * k)) * ((2.0d0 * l) / (t * (k * k)))
end function
public static double code(double t, double l, double k) {
return (l / (k * k)) * ((2.0 * l) / (t * (k * k)));
}
def code(t, l, k): return (l / (k * k)) * ((2.0 * l) / (t * (k * k)))
function code(t, l, k) return Float64(Float64(l / Float64(k * k)) * Float64(Float64(2.0 * l) / Float64(t * Float64(k * k)))) end
function tmp = code(t, l, k) tmp = (l / (k * k)) * ((2.0 * l) / (t * (k * k))); end
code[t_, l_, k_] := N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * l), $MachinePrecision] / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{k \cdot k} \cdot \frac{2 \cdot \ell}{t \cdot \left(k \cdot k\right)}
\end{array}
Initial program 34.0%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites70.3%
Final simplification70.3%
(FPCore (t l k) :precision binary64 (/ (+ l l) (* (* k k) (/ (* t (* k k)) l))))
double code(double t, double l, double k) {
return (l + l) / ((k * k) * ((t * (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 = (l + l) / ((k * k) * ((t * (k * k)) / l))
end function
public static double code(double t, double l, double k) {
return (l + l) / ((k * k) * ((t * (k * k)) / l));
}
def code(t, l, k): return (l + l) / ((k * k) * ((t * (k * k)) / l))
function code(t, l, k) return Float64(Float64(l + l) / Float64(Float64(k * k) * Float64(Float64(t * Float64(k * k)) / l))) end
function tmp = code(t, l, k) tmp = (l + l) / ((k * k) * ((t * (k * k)) / l)); end
code[t_, l_, k_] := N[(N[(l + l), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell + \ell}{\left(k \cdot k\right) \cdot \frac{t \cdot \left(k \cdot k\right)}{\ell}}
\end{array}
Initial program 34.0%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites63.7%
Applied rewrites66.6%
Applied rewrites69.9%
Final simplification69.9%
(FPCore (t l k) :precision binary64 (* (+ l l) (/ l (* k (* (* t k) (* k k))))))
double code(double t, double l, double k) {
return (l + l) * (l / (k * ((t * k) * (k * k))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l + l) * (l / (k * ((t * k) * (k * k))))
end function
public static double code(double t, double l, double k) {
return (l + l) * (l / (k * ((t * k) * (k * k))));
}
def code(t, l, k): return (l + l) * (l / (k * ((t * k) * (k * k))))
function code(t, l, k) return Float64(Float64(l + l) * Float64(l / Float64(k * Float64(Float64(t * k) * Float64(k * k))))) end
function tmp = code(t, l, k) tmp = (l + l) * (l / (k * ((t * k) * (k * k)))); end
code[t_, l_, k_] := N[(N[(l + l), $MachinePrecision] * N[(l / N[(k * N[(N[(t * k), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell + \ell\right) \cdot \frac{\ell}{k \cdot \left(\left(t \cdot k\right) \cdot \left(k \cdot k\right)\right)}
\end{array}
Initial program 34.0%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites63.7%
Taylor expanded in l around 0
Applied rewrites63.7%
Applied rewrites67.3%
Final simplification67.3%
(FPCore (t l k) :precision binary64 (* (+ l l) (/ l (* (* k k) (* t (* k k))))))
double code(double t, double l, double k) {
return (l + l) * (l / ((k * k) * (t * (k * k))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l + l) * (l / ((k * k) * (t * (k * k))))
end function
public static double code(double t, double l, double k) {
return (l + l) * (l / ((k * k) * (t * (k * k))));
}
def code(t, l, k): return (l + l) * (l / ((k * k) * (t * (k * k))))
function code(t, l, k) return Float64(Float64(l + l) * Float64(l / Float64(Float64(k * k) * Float64(t * Float64(k * k))))) end
function tmp = code(t, l, k) tmp = (l + l) * (l / ((k * k) * (t * (k * k)))); end
code[t_, l_, k_] := N[(N[(l + l), $MachinePrecision] * N[(l / N[(N[(k * k), $MachinePrecision] * N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell + \ell\right) \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(t \cdot \left(k \cdot k\right)\right)}
\end{array}
Initial program 34.0%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites63.7%
Taylor expanded in l around 0
Applied rewrites63.7%
Applied rewrites67.3%
Final simplification67.3%
(FPCore (t l k) :precision binary64 (* (+ l l) (/ l (* (* t k) (* k (* k k))))))
double code(double t, double l, double k) {
return (l + l) * (l / ((t * k) * (k * (k * k))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l + l) * (l / ((t * k) * (k * (k * k))))
end function
public static double code(double t, double l, double k) {
return (l + l) * (l / ((t * k) * (k * (k * k))));
}
def code(t, l, k): return (l + l) * (l / ((t * k) * (k * (k * k))))
function code(t, l, k) return Float64(Float64(l + l) * Float64(l / Float64(Float64(t * k) * Float64(k * Float64(k * k))))) end
function tmp = code(t, l, k) tmp = (l + l) * (l / ((t * k) * (k * (k * k)))); end
code[t_, l_, k_] := N[(N[(l + l), $MachinePrecision] * N[(l / N[(N[(t * k), $MachinePrecision] * N[(k * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell + \ell\right) \cdot \frac{\ell}{\left(t \cdot k\right) \cdot \left(k \cdot \left(k \cdot k\right)\right)}
\end{array}
Initial program 34.0%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites63.7%
Taylor expanded in l around 0
Applied rewrites63.7%
Applied rewrites65.1%
(FPCore (t l k) :precision binary64 (* (+ l l) (/ l (* t (* (* k k) (* k k))))))
double code(double t, double l, double k) {
return (l + l) * (l / (t * ((k * k) * (k * k))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l + l) * (l / (t * ((k * k) * (k * k))))
end function
public static double code(double t, double l, double k) {
return (l + l) * (l / (t * ((k * k) * (k * k))));
}
def code(t, l, k): return (l + l) * (l / (t * ((k * k) * (k * k))))
function code(t, l, k) return Float64(Float64(l + l) * Float64(l / Float64(t * Float64(Float64(k * k) * Float64(k * k))))) end
function tmp = code(t, l, k) tmp = (l + l) * (l / (t * ((k * k) * (k * k)))); end
code[t_, l_, k_] := N[(N[(l + l), $MachinePrecision] * N[(l / N[(t * N[(N[(k * k), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell + \ell\right) \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)}
\end{array}
Initial program 34.0%
Taylor expanded in k around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
pow-sqrN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6458.5
Applied rewrites58.5%
Applied rewrites63.7%
Taylor expanded in l around 0
Applied rewrites63.7%
Taylor expanded in t around 0
Applied rewrites63.7%
herbie shell --seed 2024233
(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))))