
(FPCore (a k m) :precision binary64 (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))
double code(double a, double k, double m) {
return (a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
code = (a * (k ** m)) / ((1.0d0 + (10.0d0 * k)) + (k * k))
end function
public static double code(double a, double k, double m) {
return (a * Math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
def code(a, k, m): return (a * math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))
function code(a, k, m) return Float64(Float64(a * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) end
function tmp = code(a, k, m) tmp = (a * (k ^ m)) / ((1.0 + (10.0 * k)) + (k * k)); end
code[a_, k_, m_] := N[(N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a k m) :precision binary64 (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))
double code(double a, double k, double m) {
return (a * pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
code = (a * (k ** m)) / ((1.0d0 + (10.0d0 * k)) + (k * k))
end function
public static double code(double a, double k, double m) {
return (a * Math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k));
}
def code(a, k, m): return (a * math.pow(k, m)) / ((1.0 + (10.0 * k)) + (k * k))
function code(a, k, m) return Float64(Float64(a * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k))) end
function tmp = code(a, k, m) tmp = (a * (k ^ m)) / ((1.0 + (10.0 * k)) + (k * k)); end
code[a_, k_, m_] := N[(N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + N[(10.0 * k), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\end{array}
(FPCore (a k m)
:precision binary64
(let* ((t_0 (hypot k (sqrt (fma k 10.0 1.0)))))
(if (<= m -2.3e-13)
(* a (pow k m))
(if (<= m 5.2e-13)
(/ (/ a t_0) t_0)
(* a (/ (pow k m) (* k (/ 1.0 k))))))))
double code(double a, double k, double m) {
double t_0 = hypot(k, sqrt(fma(k, 10.0, 1.0)));
double tmp;
if (m <= -2.3e-13) {
tmp = a * pow(k, m);
} else if (m <= 5.2e-13) {
tmp = (a / t_0) / t_0;
} else {
tmp = a * (pow(k, m) / (k * (1.0 / k)));
}
return tmp;
}
function code(a, k, m) t_0 = hypot(k, sqrt(fma(k, 10.0, 1.0))) tmp = 0.0 if (m <= -2.3e-13) tmp = Float64(a * (k ^ m)); elseif (m <= 5.2e-13) tmp = Float64(Float64(a / t_0) / t_0); else tmp = Float64(a * Float64((k ^ m) / Float64(k * Float64(1.0 / k)))); end return tmp end
code[a_, k_, m_] := Block[{t$95$0 = N[Sqrt[k ^ 2 + N[Sqrt[N[(k * 10.0 + 1.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]}, If[LessEqual[m, -2.3e-13], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 5.2e-13], N[(N[(a / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision], N[(a * N[(N[Power[k, m], $MachinePrecision] / N[(k * N[(1.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(k, \sqrt{\mathsf{fma}\left(k, 10, 1\right)}\right)\\
\mathbf{if}\;m \leq -2.3 \cdot 10^{-13}:\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{elif}\;m \leq 5.2 \cdot 10^{-13}:\\
\;\;\;\;\frac{\frac{a}{t\_0}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{{k}^{m}}{k \cdot \frac{1}{k}}\\
\end{array}
\end{array}
if m < -2.29999999999999979e-13Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
distribute-frac-neg2100.0%
distribute-neg-frac2100.0%
remove-double-neg100.0%
sqr-neg100.0%
associate-+l+100.0%
sqr-neg100.0%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in k around 0 100.0%
if -2.29999999999999979e-13 < m < 5.2000000000000001e-13Initial program 89.8%
associate-/l*89.8%
remove-double-neg89.8%
distribute-frac-neg289.8%
distribute-neg-frac289.8%
remove-double-neg89.8%
sqr-neg89.8%
associate-+l+89.8%
sqr-neg89.8%
distribute-rgt-out89.8%
Simplified89.8%
Taylor expanded in m around 0 89.8%
*-un-lft-identity89.8%
+-commutative89.8%
+-commutative89.8%
fma-undefine89.8%
add-sqr-sqrt89.8%
times-frac89.8%
fma-undefine89.8%
distribute-lft-in89.8%
associate-+r+89.8%
+-commutative89.8%
add-sqr-sqrt89.8%
hypot-define89.8%
+-commutative89.8%
fma-define89.8%
fma-undefine89.8%
distribute-lft-in89.8%
associate-+r+89.8%
+-commutative89.8%
Applied egg-rr99.8%
associate-*l/99.9%
*-lft-identity99.9%
Simplified99.9%
if 5.2000000000000001e-13 < m Initial program 81.8%
associate-/l*81.8%
remove-double-neg81.8%
distribute-frac-neg281.8%
distribute-neg-frac281.8%
remove-double-neg81.8%
sqr-neg81.8%
associate-+l+81.8%
sqr-neg81.8%
distribute-rgt-out81.8%
Simplified81.8%
Taylor expanded in k around 0 81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in k around inf 81.8%
Taylor expanded in k around 0 98.8%
(FPCore (a k m)
:precision binary64
(if (<= m -2.6e-13)
(* a (pow k m))
(if (<= m 9.5e-12)
(/ (/ a (hypot 1.0 k)) (hypot 1.0 k))
(* a (/ (pow k m) (* k (/ 1.0 k)))))))
double code(double a, double k, double m) {
double tmp;
if (m <= -2.6e-13) {
tmp = a * pow(k, m);
} else if (m <= 9.5e-12) {
tmp = (a / hypot(1.0, k)) / hypot(1.0, k);
} else {
tmp = a * (pow(k, m) / (k * (1.0 / k)));
}
return tmp;
}
public static double code(double a, double k, double m) {
double tmp;
if (m <= -2.6e-13) {
tmp = a * Math.pow(k, m);
} else if (m <= 9.5e-12) {
tmp = (a / Math.hypot(1.0, k)) / Math.hypot(1.0, k);
} else {
tmp = a * (Math.pow(k, m) / (k * (1.0 / k)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -2.6e-13: tmp = a * math.pow(k, m) elif m <= 9.5e-12: tmp = (a / math.hypot(1.0, k)) / math.hypot(1.0, k) else: tmp = a * (math.pow(k, m) / (k * (1.0 / k))) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -2.6e-13) tmp = Float64(a * (k ^ m)); elseif (m <= 9.5e-12) tmp = Float64(Float64(a / hypot(1.0, k)) / hypot(1.0, k)); else tmp = Float64(a * Float64((k ^ m) / Float64(k * Float64(1.0 / k)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -2.6e-13) tmp = a * (k ^ m); elseif (m <= 9.5e-12) tmp = (a / hypot(1.0, k)) / hypot(1.0, k); else tmp = a * ((k ^ m) / (k * (1.0 / k))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -2.6e-13], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 9.5e-12], N[(N[(a / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + k ^ 2], $MachinePrecision]), $MachinePrecision], N[(a * N[(N[Power[k, m], $MachinePrecision] / N[(k * N[(1.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -2.6 \cdot 10^{-13}:\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{elif}\;m \leq 9.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{a}{\mathsf{hypot}\left(1, k\right)}}{\mathsf{hypot}\left(1, k\right)}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{{k}^{m}}{k \cdot \frac{1}{k}}\\
\end{array}
\end{array}
if m < -2.6e-13Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
distribute-frac-neg2100.0%
distribute-neg-frac2100.0%
remove-double-neg100.0%
sqr-neg100.0%
associate-+l+100.0%
sqr-neg100.0%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in k around 0 100.0%
if -2.6e-13 < m < 9.4999999999999995e-12Initial program 89.8%
associate-/l*89.8%
remove-double-neg89.8%
distribute-frac-neg289.8%
distribute-neg-frac289.8%
remove-double-neg89.8%
sqr-neg89.8%
associate-+l+89.8%
sqr-neg89.8%
distribute-rgt-out89.8%
Simplified89.8%
Taylor expanded in m around 0 89.8%
Taylor expanded in k around inf 88.5%
*-un-lft-identity88.5%
add-sqr-sqrt88.5%
times-frac88.5%
hypot-1-def88.5%
hypot-1-def98.6%
Applied egg-rr98.6%
associate-*l/98.6%
*-un-lft-identity98.6%
Applied egg-rr98.6%
if 9.4999999999999995e-12 < m Initial program 81.8%
associate-/l*81.8%
remove-double-neg81.8%
distribute-frac-neg281.8%
distribute-neg-frac281.8%
remove-double-neg81.8%
sqr-neg81.8%
associate-+l+81.8%
sqr-neg81.8%
distribute-rgt-out81.8%
Simplified81.8%
Taylor expanded in k around 0 81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in k around inf 81.8%
Taylor expanded in k around 0 98.8%
(FPCore (a k m)
:precision binary64
(if (<= m -2e-13)
(* a (pow k m))
(if (<= m 5.8e-13)
(/ a (+ 1.0 (* k (+ k 10.0))))
(* a (/ (pow k m) (* k (/ 1.0 k)))))))
double code(double a, double k, double m) {
double tmp;
if (m <= -2e-13) {
tmp = a * pow(k, m);
} else if (m <= 5.8e-13) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a * (pow(k, m) / (k * (1.0 / k)));
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= (-2d-13)) then
tmp = a * (k ** m)
else if (m <= 5.8d-13) then
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
else
tmp = a * ((k ** m) / (k * (1.0d0 / k)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -2e-13) {
tmp = a * Math.pow(k, m);
} else if (m <= 5.8e-13) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a * (Math.pow(k, m) / (k * (1.0 / k)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -2e-13: tmp = a * math.pow(k, m) elif m <= 5.8e-13: tmp = a / (1.0 + (k * (k + 10.0))) else: tmp = a * (math.pow(k, m) / (k * (1.0 / k))) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -2e-13) tmp = Float64(a * (k ^ m)); elseif (m <= 5.8e-13) tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); else tmp = Float64(a * Float64((k ^ m) / Float64(k * Float64(1.0 / k)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -2e-13) tmp = a * (k ^ m); elseif (m <= 5.8e-13) tmp = a / (1.0 + (k * (k + 10.0))); else tmp = a * ((k ^ m) / (k * (1.0 / k))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -2e-13], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 5.8e-13], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[Power[k, m], $MachinePrecision] / N[(k * N[(1.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -2 \cdot 10^{-13}:\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{elif}\;m \leq 5.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{{k}^{m}}{k \cdot \frac{1}{k}}\\
\end{array}
\end{array}
if m < -2.0000000000000001e-13Initial program 100.0%
associate-/l*100.0%
remove-double-neg100.0%
distribute-frac-neg2100.0%
distribute-neg-frac2100.0%
remove-double-neg100.0%
sqr-neg100.0%
associate-+l+100.0%
sqr-neg100.0%
distribute-rgt-out100.0%
Simplified100.0%
Taylor expanded in k around 0 100.0%
if -2.0000000000000001e-13 < m < 5.7999999999999995e-13Initial program 89.8%
associate-/l*89.8%
remove-double-neg89.8%
distribute-frac-neg289.8%
distribute-neg-frac289.8%
remove-double-neg89.8%
sqr-neg89.8%
associate-+l+89.8%
sqr-neg89.8%
distribute-rgt-out89.8%
Simplified89.8%
Taylor expanded in m around 0 89.8%
if 5.7999999999999995e-13 < m Initial program 81.8%
associate-/l*81.8%
remove-double-neg81.8%
distribute-frac-neg281.8%
distribute-neg-frac281.8%
remove-double-neg81.8%
sqr-neg81.8%
associate-+l+81.8%
sqr-neg81.8%
distribute-rgt-out81.8%
Simplified81.8%
Taylor expanded in k around 0 81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in k around inf 81.8%
Taylor expanded in k around 0 98.8%
Final simplification95.9%
(FPCore (a k m) :precision binary64 (let* ((t_0 (* a (pow k m)))) (if (<= m 3.4) (/ t_0 (+ (+ 1.0 (* k 10.0)) (* k k))) t_0)))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double tmp;
if (m <= 3.4) {
tmp = t_0 / ((1.0 + (k * 10.0)) + (k * k));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: t_0
real(8) :: tmp
t_0 = a * (k ** m)
if (m <= 3.4d0) then
tmp = t_0 / ((1.0d0 + (k * 10.0d0)) + (k * k))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double t_0 = a * Math.pow(k, m);
double tmp;
if (m <= 3.4) {
tmp = t_0 / ((1.0 + (k * 10.0)) + (k * k));
} else {
tmp = t_0;
}
return tmp;
}
def code(a, k, m): t_0 = a * math.pow(k, m) tmp = 0 if m <= 3.4: tmp = t_0 / ((1.0 + (k * 10.0)) + (k * k)) else: tmp = t_0 return tmp
function code(a, k, m) t_0 = Float64(a * (k ^ m)) tmp = 0.0 if (m <= 3.4) tmp = Float64(t_0 / Float64(Float64(1.0 + Float64(k * 10.0)) + Float64(k * k))); else tmp = t_0; end return tmp end
function tmp_2 = code(a, k, m) t_0 = a * (k ^ m); tmp = 0.0; if (m <= 3.4) tmp = t_0 / ((1.0 + (k * 10.0)) + (k * k)); else tmp = t_0; end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, 3.4], N[(t$95$0 / N[(N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;m \leq 3.4:\\
\;\;\;\;\frac{t\_0}{\left(1 + k \cdot 10\right) + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if m < 3.39999999999999991Initial program 94.8%
if 3.39999999999999991 < m Initial program 81.1%
associate-/l*81.1%
remove-double-neg81.1%
distribute-frac-neg281.1%
distribute-neg-frac281.1%
remove-double-neg81.1%
sqr-neg81.1%
associate-+l+81.1%
sqr-neg81.1%
distribute-rgt-out81.1%
Simplified81.1%
Taylor expanded in k around 0 100.0%
Final simplification96.3%
(FPCore (a k m) :precision binary64 (if (<= m 4.8) (* a (/ (pow k m) (+ 1.0 (* k (+ k 10.0))))) (* a (pow k m))))
double code(double a, double k, double m) {
double tmp;
if (m <= 4.8) {
tmp = a * (pow(k, m) / (1.0 + (k * (k + 10.0))));
} else {
tmp = a * pow(k, m);
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= 4.8d0) then
tmp = a * ((k ** m) / (1.0d0 + (k * (k + 10.0d0))))
else
tmp = a * (k ** m)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 4.8) {
tmp = a * (Math.pow(k, m) / (1.0 + (k * (k + 10.0))));
} else {
tmp = a * Math.pow(k, m);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 4.8: tmp = a * (math.pow(k, m) / (1.0 + (k * (k + 10.0)))) else: tmp = a * math.pow(k, m) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 4.8) tmp = Float64(a * Float64((k ^ m) / Float64(1.0 + Float64(k * Float64(k + 10.0))))); else tmp = Float64(a * (k ^ m)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 4.8) tmp = a * ((k ^ m) / (1.0 + (k * (k + 10.0)))); else tmp = a * (k ^ m); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 4.8], N[(a * N[(N[Power[k, m], $MachinePrecision] / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 4.8:\\
\;\;\;\;a \cdot \frac{{k}^{m}}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a \cdot {k}^{m}\\
\end{array}
\end{array}
if m < 4.79999999999999982Initial program 94.8%
associate-/l*94.7%
remove-double-neg94.7%
distribute-frac-neg294.7%
distribute-neg-frac294.7%
remove-double-neg94.7%
sqr-neg94.7%
associate-+l+94.7%
sqr-neg94.7%
distribute-rgt-out94.7%
Simplified94.7%
if 4.79999999999999982 < m Initial program 81.1%
associate-/l*81.1%
remove-double-neg81.1%
distribute-frac-neg281.1%
distribute-neg-frac281.1%
remove-double-neg81.1%
sqr-neg81.1%
associate-+l+81.1%
sqr-neg81.1%
distribute-rgt-out81.1%
Simplified81.1%
Taylor expanded in k around 0 100.0%
Final simplification96.3%
(FPCore (a k m) :precision binary64 (if (or (<= m -1.35e-15) (not (<= m 5.5e-23))) (* a (pow k m)) (/ a (+ 1.0 (* k (+ k 10.0))))))
double code(double a, double k, double m) {
double tmp;
if ((m <= -1.35e-15) || !(m <= 5.5e-23)) {
tmp = a * pow(k, m);
} else {
tmp = a / (1.0 + (k * (k + 10.0)));
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if ((m <= (-1.35d-15)) .or. (.not. (m <= 5.5d-23))) then
tmp = a * (k ** m)
else
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if ((m <= -1.35e-15) || !(m <= 5.5e-23)) {
tmp = a * Math.pow(k, m);
} else {
tmp = a / (1.0 + (k * (k + 10.0)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if (m <= -1.35e-15) or not (m <= 5.5e-23): tmp = a * math.pow(k, m) else: tmp = a / (1.0 + (k * (k + 10.0))) return tmp
function code(a, k, m) tmp = 0.0 if ((m <= -1.35e-15) || !(m <= 5.5e-23)) tmp = Float64(a * (k ^ m)); else tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if ((m <= -1.35e-15) || ~((m <= 5.5e-23))) tmp = a * (k ^ m); else tmp = a / (1.0 + (k * (k + 10.0))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[Or[LessEqual[m, -1.35e-15], N[Not[LessEqual[m, 5.5e-23]], $MachinePrecision]], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -1.35 \cdot 10^{-15} \lor \neg \left(m \leq 5.5 \cdot 10^{-23}\right):\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\end{array}
\end{array}
if m < -1.35000000000000005e-15 or 5.5000000000000001e-23 < m Initial program 91.5%
associate-/l*91.5%
remove-double-neg91.5%
distribute-frac-neg291.5%
distribute-neg-frac291.5%
remove-double-neg91.5%
sqr-neg91.5%
associate-+l+91.5%
sqr-neg91.5%
distribute-rgt-out91.5%
Simplified91.5%
Taylor expanded in k around 0 99.4%
if -1.35000000000000005e-15 < m < 5.5000000000000001e-23Initial program 89.6%
associate-/l*89.5%
remove-double-neg89.5%
distribute-frac-neg289.5%
distribute-neg-frac289.5%
remove-double-neg89.5%
sqr-neg89.5%
associate-+l+89.5%
sqr-neg89.5%
distribute-rgt-out89.5%
Simplified89.5%
Taylor expanded in m around 0 89.6%
Final simplification95.9%
(FPCore (a k m) :precision binary64 (if (<= m 1.95) (/ a (+ 1.0 (* k (+ k 10.0)))) (+ a (* a (* k (- (* k 99.0) 10.0))))))
double code(double a, double k, double m) {
double tmp;
if (m <= 1.95) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a + (a * (k * ((k * 99.0) - 10.0)));
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= 1.95d0) then
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
else
tmp = a + (a * (k * ((k * 99.0d0) - 10.0d0)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 1.95) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a + (a * (k * ((k * 99.0) - 10.0)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 1.95: tmp = a / (1.0 + (k * (k + 10.0))) else: tmp = a + (a * (k * ((k * 99.0) - 10.0))) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 1.95) tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); else tmp = Float64(a + Float64(a * Float64(k * Float64(Float64(k * 99.0) - 10.0)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 1.95) tmp = a / (1.0 + (k * (k + 10.0))); else tmp = a + (a * (k * ((k * 99.0) - 10.0))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 1.95], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(a * N[(k * N[(N[(k * 99.0), $MachinePrecision] - 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 1.95:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a + a \cdot \left(k \cdot \left(k \cdot 99 - 10\right)\right)\\
\end{array}
\end{array}
if m < 1.94999999999999996Initial program 94.8%
associate-/l*94.7%
remove-double-neg94.7%
distribute-frac-neg294.7%
distribute-neg-frac294.7%
remove-double-neg94.7%
sqr-neg94.7%
associate-+l+94.7%
sqr-neg94.7%
distribute-rgt-out94.7%
Simplified94.7%
Taylor expanded in m around 0 63.3%
if 1.94999999999999996 < m Initial program 81.1%
associate-/l*81.1%
remove-double-neg81.1%
distribute-frac-neg281.1%
distribute-neg-frac281.1%
remove-double-neg81.1%
sqr-neg81.1%
associate-+l+81.1%
sqr-neg81.1%
distribute-rgt-out81.1%
Simplified81.1%
Taylor expanded in m around 0 3.1%
Taylor expanded in k around 0 28.8%
Taylor expanded in a around 0 32.5%
Final simplification54.4%
(FPCore (a k m) :precision binary64 (if (<= m 2.3) (/ a (+ 1.0 (* k (+ k 10.0)))) (+ a (* k (* 99.0 (* a k))))))
double code(double a, double k, double m) {
double tmp;
if (m <= 2.3) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a + (k * (99.0 * (a * k)));
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= 2.3d0) then
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
else
tmp = a + (k * (99.0d0 * (a * k)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 2.3) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a + (k * (99.0 * (a * k)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 2.3: tmp = a / (1.0 + (k * (k + 10.0))) else: tmp = a + (k * (99.0 * (a * k))) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 2.3) tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); else tmp = Float64(a + Float64(k * Float64(99.0 * Float64(a * k)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 2.3) tmp = a / (1.0 + (k * (k + 10.0))); else tmp = a + (k * (99.0 * (a * k))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 2.3], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(k * N[(99.0 * N[(a * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 2.3:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a + k \cdot \left(99 \cdot \left(a \cdot k\right)\right)\\
\end{array}
\end{array}
if m < 2.2999999999999998Initial program 94.8%
associate-/l*94.7%
remove-double-neg94.7%
distribute-frac-neg294.7%
distribute-neg-frac294.7%
remove-double-neg94.7%
sqr-neg94.7%
associate-+l+94.7%
sqr-neg94.7%
distribute-rgt-out94.7%
Simplified94.7%
Taylor expanded in m around 0 63.3%
if 2.2999999999999998 < m Initial program 81.1%
associate-/l*81.1%
remove-double-neg81.1%
distribute-frac-neg281.1%
distribute-neg-frac281.1%
remove-double-neg81.1%
sqr-neg81.1%
associate-+l+81.1%
sqr-neg81.1%
distribute-rgt-out81.1%
Simplified81.1%
Taylor expanded in m around 0 3.1%
Taylor expanded in k around 0 28.8%
Taylor expanded in a around 0 28.8%
Taylor expanded in k around inf 28.8%
Final simplification53.3%
(FPCore (a k m) :precision binary64 (if (<= m 2.2) (/ a (+ 1.0 (* k k))) (+ a (* k (* 99.0 (* a k))))))
double code(double a, double k, double m) {
double tmp;
if (m <= 2.2) {
tmp = a / (1.0 + (k * k));
} else {
tmp = a + (k * (99.0 * (a * k)));
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= 2.2d0) then
tmp = a / (1.0d0 + (k * k))
else
tmp = a + (k * (99.0d0 * (a * k)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 2.2) {
tmp = a / (1.0 + (k * k));
} else {
tmp = a + (k * (99.0 * (a * k)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 2.2: tmp = a / (1.0 + (k * k)) else: tmp = a + (k * (99.0 * (a * k))) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 2.2) tmp = Float64(a / Float64(1.0 + Float64(k * k))); else tmp = Float64(a + Float64(k * Float64(99.0 * Float64(a * k)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 2.2) tmp = a / (1.0 + (k * k)); else tmp = a + (k * (99.0 * (a * k))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 2.2], N[(a / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(k * N[(99.0 * N[(a * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 2.2:\\
\;\;\;\;\frac{a}{1 + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;a + k \cdot \left(99 \cdot \left(a \cdot k\right)\right)\\
\end{array}
\end{array}
if m < 2.2000000000000002Initial program 94.8%
associate-/l*94.7%
remove-double-neg94.7%
distribute-frac-neg294.7%
distribute-neg-frac294.7%
remove-double-neg94.7%
sqr-neg94.7%
associate-+l+94.7%
sqr-neg94.7%
distribute-rgt-out94.7%
Simplified94.7%
Taylor expanded in m around 0 63.3%
Taylor expanded in k around inf 62.6%
if 2.2000000000000002 < m Initial program 81.1%
associate-/l*81.1%
remove-double-neg81.1%
distribute-frac-neg281.1%
distribute-neg-frac281.1%
remove-double-neg81.1%
sqr-neg81.1%
associate-+l+81.1%
sqr-neg81.1%
distribute-rgt-out81.1%
Simplified81.1%
Taylor expanded in m around 0 3.1%
Taylor expanded in k around 0 28.8%
Taylor expanded in a around 0 28.8%
Taylor expanded in k around inf 28.8%
(FPCore (a k m) :precision binary64 (if (<= m 1.4e+18) (/ a (+ 1.0 (* k k))) (* a (* k -10.0))))
double code(double a, double k, double m) {
double tmp;
if (m <= 1.4e+18) {
tmp = a / (1.0 + (k * k));
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= 1.4d+18) then
tmp = a / (1.0d0 + (k * k))
else
tmp = a * (k * (-10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 1.4e+18) {
tmp = a / (1.0 + (k * k));
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 1.4e+18: tmp = a / (1.0 + (k * k)) else: tmp = a * (k * -10.0) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 1.4e+18) tmp = Float64(a / Float64(1.0 + Float64(k * k))); else tmp = Float64(a * Float64(k * -10.0)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 1.4e+18) tmp = a / (1.0 + (k * k)); else tmp = a * (k * -10.0); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 1.4e+18], N[(a / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 1.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{a}{1 + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot -10\right)\\
\end{array}
\end{array}
if m < 1.4e18Initial program 94.3%
associate-/l*94.3%
remove-double-neg94.3%
distribute-frac-neg294.3%
distribute-neg-frac294.3%
remove-double-neg94.3%
sqr-neg94.3%
associate-+l+94.3%
sqr-neg94.3%
distribute-rgt-out94.3%
Simplified94.3%
Taylor expanded in m around 0 62.3%
Taylor expanded in k around inf 61.6%
if 1.4e18 < m Initial program 81.7%
associate-/l*81.7%
remove-double-neg81.7%
distribute-frac-neg281.7%
distribute-neg-frac281.7%
remove-double-neg81.7%
sqr-neg81.7%
associate-+l+81.7%
sqr-neg81.7%
distribute-rgt-out81.7%
Simplified81.7%
Taylor expanded in m around 0 3.1%
Taylor expanded in k around 0 8.5%
Taylor expanded in k around inf 23.3%
*-commutative23.3%
associate-*r*23.3%
*-commutative23.3%
Simplified23.3%
Final simplification51.0%
(FPCore (a k m) :precision binary64 (if (<= m 1.4e+18) (/ a (+ 1.0 (* k 10.0))) (* a (* k -10.0))))
double code(double a, double k, double m) {
double tmp;
if (m <= 1.4e+18) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= 1.4d+18) then
tmp = a / (1.0d0 + (k * 10.0d0))
else
tmp = a * (k * (-10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 1.4e+18) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 1.4e+18: tmp = a / (1.0 + (k * 10.0)) else: tmp = a * (k * -10.0) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 1.4e+18) tmp = Float64(a / Float64(1.0 + Float64(k * 10.0))); else tmp = Float64(a * Float64(k * -10.0)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 1.4e+18) tmp = a / (1.0 + (k * 10.0)); else tmp = a * (k * -10.0); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 1.4e+18], N[(a / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 1.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{a}{1 + k \cdot 10}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot -10\right)\\
\end{array}
\end{array}
if m < 1.4e18Initial program 94.3%
associate-/l*94.3%
remove-double-neg94.3%
distribute-frac-neg294.3%
distribute-neg-frac294.3%
remove-double-neg94.3%
sqr-neg94.3%
associate-+l+94.3%
sqr-neg94.3%
distribute-rgt-out94.3%
Simplified94.3%
Taylor expanded in m around 0 62.3%
Taylor expanded in k around 0 43.9%
*-commutative82.5%
Simplified43.9%
if 1.4e18 < m Initial program 81.7%
associate-/l*81.7%
remove-double-neg81.7%
distribute-frac-neg281.7%
distribute-neg-frac281.7%
remove-double-neg81.7%
sqr-neg81.7%
associate-+l+81.7%
sqr-neg81.7%
distribute-rgt-out81.7%
Simplified81.7%
Taylor expanded in m around 0 3.1%
Taylor expanded in k around 0 8.5%
Taylor expanded in k around inf 23.3%
*-commutative23.3%
associate-*r*23.3%
*-commutative23.3%
Simplified23.3%
Final simplification38.2%
(FPCore (a k m) :precision binary64 (if (<= m 1.4e+18) a (* a (* k -10.0))))
double code(double a, double k, double m) {
double tmp;
if (m <= 1.4e+18) {
tmp = a;
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= 1.4d+18) then
tmp = a
else
tmp = a * (k * (-10.0d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 1.4e+18) {
tmp = a;
} else {
tmp = a * (k * -10.0);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 1.4e+18: tmp = a else: tmp = a * (k * -10.0) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 1.4e+18) tmp = a; else tmp = Float64(a * Float64(k * -10.0)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 1.4e+18) tmp = a; else tmp = a * (k * -10.0); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 1.4e+18], a, N[(a * N[(k * -10.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 1.4 \cdot 10^{+18}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(k \cdot -10\right)\\
\end{array}
\end{array}
if m < 1.4e18Initial program 94.3%
associate-/l*94.3%
remove-double-neg94.3%
distribute-frac-neg294.3%
distribute-neg-frac294.3%
remove-double-neg94.3%
sqr-neg94.3%
associate-+l+94.3%
sqr-neg94.3%
distribute-rgt-out94.3%
Simplified94.3%
Taylor expanded in m around 0 62.3%
Taylor expanded in k around 0 30.9%
if 1.4e18 < m Initial program 81.7%
associate-/l*81.7%
remove-double-neg81.7%
distribute-frac-neg281.7%
distribute-neg-frac281.7%
remove-double-neg81.7%
sqr-neg81.7%
associate-+l+81.7%
sqr-neg81.7%
distribute-rgt-out81.7%
Simplified81.7%
Taylor expanded in m around 0 3.1%
Taylor expanded in k around 0 8.5%
Taylor expanded in k around inf 23.3%
*-commutative23.3%
associate-*r*23.3%
*-commutative23.3%
Simplified23.3%
Final simplification28.8%
(FPCore (a k m) :precision binary64 (if (<= m 1.4e+18) a (* -10.0 (* a k))))
double code(double a, double k, double m) {
double tmp;
if (m <= 1.4e+18) {
tmp = a;
} else {
tmp = -10.0 * (a * k);
}
return tmp;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
real(8) :: tmp
if (m <= 1.4d+18) then
tmp = a
else
tmp = (-10.0d0) * (a * k)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 1.4e+18) {
tmp = a;
} else {
tmp = -10.0 * (a * k);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 1.4e+18: tmp = a else: tmp = -10.0 * (a * k) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 1.4e+18) tmp = a; else tmp = Float64(-10.0 * Float64(a * k)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 1.4e+18) tmp = a; else tmp = -10.0 * (a * k); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 1.4e+18], a, N[(-10.0 * N[(a * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 1.4 \cdot 10^{+18}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(a \cdot k\right)\\
\end{array}
\end{array}
if m < 1.4e18Initial program 94.3%
associate-/l*94.3%
remove-double-neg94.3%
distribute-frac-neg294.3%
distribute-neg-frac294.3%
remove-double-neg94.3%
sqr-neg94.3%
associate-+l+94.3%
sqr-neg94.3%
distribute-rgt-out94.3%
Simplified94.3%
Taylor expanded in m around 0 62.3%
Taylor expanded in k around 0 30.9%
if 1.4e18 < m Initial program 81.7%
associate-/l*81.7%
remove-double-neg81.7%
distribute-frac-neg281.7%
distribute-neg-frac281.7%
remove-double-neg81.7%
sqr-neg81.7%
associate-+l+81.7%
sqr-neg81.7%
distribute-rgt-out81.7%
Simplified81.7%
Taylor expanded in m around 0 3.1%
Taylor expanded in k around 0 8.5%
Taylor expanded in k around inf 23.3%
*-commutative23.3%
Simplified23.3%
Final simplification28.8%
(FPCore (a k m) :precision binary64 a)
double code(double a, double k, double m) {
return a;
}
real(8) function code(a, k, m)
real(8), intent (in) :: a
real(8), intent (in) :: k
real(8), intent (in) :: m
code = a
end function
public static double code(double a, double k, double m) {
return a;
}
def code(a, k, m): return a
function code(a, k, m) return a end
function tmp = code(a, k, m) tmp = a; end
code[a_, k_, m_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 90.8%
associate-/l*90.8%
remove-double-neg90.8%
distribute-frac-neg290.8%
distribute-neg-frac290.8%
remove-double-neg90.8%
sqr-neg90.8%
associate-+l+90.8%
sqr-neg90.8%
distribute-rgt-out90.8%
Simplified90.8%
Taylor expanded in m around 0 45.9%
Taylor expanded in k around 0 23.4%
herbie shell --seed 2024151
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))