
(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 (* a (pow k m)))) (if (<= k 0.1) (* (fma k -10.0 1.0) t_0) (/ (/ t_0 k) k))))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double tmp;
if (k <= 0.1) {
tmp = fma(k, -10.0, 1.0) * t_0;
} else {
tmp = (t_0 / k) / k;
}
return tmp;
}
function code(a, k, m) t_0 = Float64(a * (k ^ m)) tmp = 0.0 if (k <= 0.1) tmp = Float64(fma(k, -10.0, 1.0) * t_0); else tmp = Float64(Float64(t_0 / k) / k); end return tmp end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 0.1], N[(N[(k * -10.0 + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(t$95$0 / k), $MachinePrecision] / k), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;k \leq 0.1:\\
\;\;\;\;\mathsf{fma}\left(k, -10, 1\right) \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_0}{k}}{k}\\
\end{array}
\end{array}
if k < 0.10000000000000001Initial program 93.9%
associate-*r/93.9%
associate-+l+93.9%
+-commutative93.9%
distribute-rgt-out93.9%
fma-def93.9%
+-commutative93.9%
Simplified93.9%
Taylor expanded in k around 0 33.0%
exp-to-pow33.0%
exp-to-pow33.0%
exp-to-pow33.0%
associate-*r*33.0%
exp-to-pow85.4%
distribute-lft1-in99.5%
*-commutative99.5%
fma-def99.5%
*-commutative99.5%
Simplified99.5%
if 0.10000000000000001 < k Initial program 85.3%
Taylor expanded in k around inf 84.4%
unpow284.4%
Simplified84.4%
*-commutative84.4%
add-cube-cbrt84.1%
times-frac98.7%
pow298.7%
*-commutative98.7%
*-commutative98.7%
Applied egg-rr98.7%
associate-*l/98.7%
associate-*r/98.7%
unpow298.7%
add-cube-cbrt99.0%
Applied egg-rr99.0%
Final simplification99.3%
(FPCore (a k m) :precision binary64 (let* ((t_0 (* a (pow k m)))) (if (<= k 1.0) t_0 (/ (/ t_0 k) k))))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double tmp;
if (k <= 1.0) {
tmp = t_0;
} else {
tmp = (t_0 / k) / 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) :: t_0
real(8) :: tmp
t_0 = a * (k ** m)
if (k <= 1.0d0) then
tmp = t_0
else
tmp = (t_0 / k) / k
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 (k <= 1.0) {
tmp = t_0;
} else {
tmp = (t_0 / k) / k;
}
return tmp;
}
def code(a, k, m): t_0 = a * math.pow(k, m) tmp = 0 if k <= 1.0: tmp = t_0 else: tmp = (t_0 / k) / k return tmp
function code(a, k, m) t_0 = Float64(a * (k ^ m)) tmp = 0.0 if (k <= 1.0) tmp = t_0; else tmp = Float64(Float64(t_0 / k) / k); end return tmp end
function tmp_2 = code(a, k, m) t_0 = a * (k ^ m); tmp = 0.0; if (k <= 1.0) tmp = t_0; else tmp = (t_0 / k) / k; end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.0], t$95$0, N[(N[(t$95$0 / k), $MachinePrecision] / k), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;k \leq 1:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_0}{k}}{k}\\
\end{array}
\end{array}
if k < 1Initial program 93.9%
associate-*r/93.9%
associate-+l+93.9%
+-commutative93.9%
distribute-rgt-out93.9%
fma-def93.9%
+-commutative93.9%
Simplified93.9%
Taylor expanded in k around 0 46.7%
exp-to-pow99.1%
Simplified99.1%
if 1 < k Initial program 85.3%
Taylor expanded in k around inf 84.4%
unpow284.4%
Simplified84.4%
*-commutative84.4%
add-cube-cbrt84.1%
times-frac98.7%
pow298.7%
*-commutative98.7%
*-commutative98.7%
Applied egg-rr98.7%
associate-*l/98.7%
associate-*r/98.7%
unpow298.7%
add-cube-cbrt99.0%
Applied egg-rr99.0%
Final simplification99.1%
(FPCore (a k m) :precision binary64 (if (or (<= m -5.8e-6) (not (<= m 1.32))) (* a (pow k m)) (/ a (+ 1.0 (* k (+ k 10.0))))))
double code(double a, double k, double m) {
double tmp;
if ((m <= -5.8e-6) || !(m <= 1.32)) {
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 <= (-5.8d-6)) .or. (.not. (m <= 1.32d0))) 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 <= -5.8e-6) || !(m <= 1.32)) {
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 <= -5.8e-6) or not (m <= 1.32): 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 <= -5.8e-6) || !(m <= 1.32)) 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 <= -5.8e-6) || ~((m <= 1.32))) 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, -5.8e-6], N[Not[LessEqual[m, 1.32]], $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 -5.8 \cdot 10^{-6} \lor \neg \left(m \leq 1.32\right):\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\end{array}
\end{array}
if m < -5.8000000000000004e-6 or 1.32000000000000006 < m Initial program 87.3%
associate-*r/87.3%
associate-+l+87.3%
+-commutative87.3%
distribute-rgt-out87.3%
fma-def87.3%
+-commutative87.3%
Simplified87.3%
Taylor expanded in k around 0 53.0%
exp-to-pow100.0%
Simplified100.0%
if -5.8000000000000004e-6 < m < 1.32000000000000006Initial program 95.8%
associate-*r/95.8%
associate-+l+95.8%
+-commutative95.8%
distribute-rgt-out95.8%
fma-def95.8%
+-commutative95.8%
Simplified95.8%
Taylor expanded in m around 0 95.2%
Final simplification98.3%
(FPCore (a k m) :precision binary64 (if (<= k 1.0) (* a (pow k m)) (/ a (pow k (- 2.0 m)))))
double code(double a, double k, double m) {
double tmp;
if (k <= 1.0) {
tmp = a * pow(k, m);
} else {
tmp = a / pow(k, (2.0 - 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 (k <= 1.0d0) then
tmp = a * (k ** m)
else
tmp = a / (k ** (2.0d0 - m))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= 1.0) {
tmp = a * Math.pow(k, m);
} else {
tmp = a / Math.pow(k, (2.0 - m));
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= 1.0: tmp = a * math.pow(k, m) else: tmp = a / math.pow(k, (2.0 - m)) return tmp
function code(a, k, m) tmp = 0.0 if (k <= 1.0) tmp = Float64(a * (k ^ m)); else tmp = Float64(a / (k ^ Float64(2.0 - m))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= 1.0) tmp = a * (k ^ m); else tmp = a / (k ^ (2.0 - m)); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, 1.0], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], N[(a / N[Power[k, N[(2.0 - m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1:\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{{k}^{\left(2 - m\right)}}\\
\end{array}
\end{array}
if k < 1Initial program 93.9%
associate-*r/93.9%
associate-+l+93.9%
+-commutative93.9%
distribute-rgt-out93.9%
fma-def93.9%
+-commutative93.9%
Simplified93.9%
Taylor expanded in k around 0 46.7%
exp-to-pow99.1%
Simplified99.1%
if 1 < k Initial program 85.3%
Taylor expanded in k around inf 84.4%
unpow284.4%
Simplified84.4%
expm1-log1p-u76.8%
expm1-udef63.2%
associate-/l*63.2%
pow263.2%
pow-div69.8%
Applied egg-rr69.8%
expm1-def83.4%
expm1-log1p95.6%
Simplified95.6%
Final simplification97.6%
(FPCore (a k m) :precision binary64 (if (<= m -0.3) (* a (/ (- -1.0) (* k k))) (if (<= m 7.2e+15) (/ a (+ 1.0 (* k (+ k 10.0)))) (* -10.0 (* k a)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -0.3) {
tmp = a * (-(-1.0) / (k * k));
} else if (m <= 7.2e+15) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = -10.0 * (k * a);
}
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 <= (-0.3d0)) then
tmp = a * (-(-1.0d0) / (k * k))
else if (m <= 7.2d+15) then
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
else
tmp = (-10.0d0) * (k * a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -0.3) {
tmp = a * (-(-1.0) / (k * k));
} else if (m <= 7.2e+15) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -0.3: tmp = a * (-(-1.0) / (k * k)) elif m <= 7.2e+15: tmp = a / (1.0 + (k * (k + 10.0))) else: tmp = -10.0 * (k * a) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -0.3) tmp = Float64(a * Float64(Float64(-(-1.0)) / Float64(k * k))); elseif (m <= 7.2e+15) tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); else tmp = Float64(-10.0 * Float64(k * a)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -0.3) tmp = a * (-(-1.0) / (k * k)); elseif (m <= 7.2e+15) tmp = a / (1.0 + (k * (k + 10.0))); else tmp = -10.0 * (k * a); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -0.3], N[(a * N[((--1.0) / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 7.2e+15], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -0.3:\\
\;\;\;\;a \cdot \frac{--1}{k \cdot k}\\
\mathbf{elif}\;m \leq 7.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -0.299999999999999989Initial program 100.0%
associate-*r/100.0%
associate-+l+100.0%
+-commutative100.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in m around 0 38.4%
Taylor expanded in k around inf 64.7%
unpow264.7%
Simplified64.7%
frac-2neg64.7%
div-inv65.9%
distribute-rgt-neg-in65.9%
Applied egg-rr65.9%
Taylor expanded in k around 0 65.9%
unpow265.9%
Simplified65.9%
if -0.299999999999999989 < m < 7.2e15Initial program 96.0%
associate-*r/95.9%
associate-+l+95.9%
+-commutative95.9%
distribute-rgt-out95.9%
fma-def95.9%
+-commutative95.9%
Simplified95.9%
Taylor expanded in m around 0 91.6%
if 7.2e15 < m Initial program 73.1%
associate-*r/73.1%
associate-+l+73.1%
+-commutative73.1%
distribute-rgt-out73.1%
fma-def73.1%
+-commutative73.1%
Simplified73.1%
Taylor expanded in m around 0 2.5%
Taylor expanded in k around 0 9.8%
Taylor expanded in k around inf 17.5%
Final simplification60.6%
(FPCore (a k m) :precision binary64 (if (<= k 5.3e-287) (/ a (* k k)) (if (<= k 0.1) (* a (+ 1.0 (* k -10.0))) (/ (/ a k) k))))
double code(double a, double k, double m) {
double tmp;
if (k <= 5.3e-287) {
tmp = a / (k * k);
} else if (k <= 0.1) {
tmp = a * (1.0 + (k * -10.0));
} else {
tmp = (a / k) / 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 (k <= 5.3d-287) then
tmp = a / (k * k)
else if (k <= 0.1d0) then
tmp = a * (1.0d0 + (k * (-10.0d0)))
else
tmp = (a / k) / k
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= 5.3e-287) {
tmp = a / (k * k);
} else if (k <= 0.1) {
tmp = a * (1.0 + (k * -10.0));
} else {
tmp = (a / k) / k;
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= 5.3e-287: tmp = a / (k * k) elif k <= 0.1: tmp = a * (1.0 + (k * -10.0)) else: tmp = (a / k) / k return tmp
function code(a, k, m) tmp = 0.0 if (k <= 5.3e-287) tmp = Float64(a / Float64(k * k)); elseif (k <= 0.1) tmp = Float64(a * Float64(1.0 + Float64(k * -10.0))); else tmp = Float64(Float64(a / k) / k); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= 5.3e-287) tmp = a / (k * k); elseif (k <= 0.1) tmp = a * (1.0 + (k * -10.0)); else tmp = (a / k) / k; end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, 5.3e-287], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.1], N[(a * N[(1.0 + N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a / k), $MachinePrecision] / k), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.3 \cdot 10^{-287}:\\
\;\;\;\;\frac{a}{k \cdot k}\\
\mathbf{elif}\;k \leq 0.1:\\
\;\;\;\;a \cdot \left(1 + k \cdot -10\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{a}{k}}{k}\\
\end{array}
\end{array}
if k < 5.29999999999999949e-287Initial program 88.8%
associate-*r/88.8%
associate-+l+88.8%
+-commutative88.8%
distribute-rgt-out88.8%
fma-def88.8%
+-commutative88.8%
Simplified88.8%
Taylor expanded in m around 0 20.2%
Taylor expanded in k around inf 34.3%
unpow234.3%
Simplified34.3%
if 5.29999999999999949e-287 < k < 0.10000000000000001Initial program 100.0%
associate-*r/100.0%
associate-+l+100.0%
+-commutative100.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in k around 0 71.3%
exp-to-pow71.3%
exp-to-pow71.3%
exp-to-pow71.3%
associate-*r*71.3%
exp-to-pow71.3%
distribute-lft1-in98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in m around 0 54.8%
if 0.10000000000000001 < k Initial program 85.3%
Taylor expanded in k around inf 84.4%
unpow284.4%
Simplified84.4%
*-commutative84.4%
add-cube-cbrt84.1%
times-frac98.7%
pow298.7%
*-commutative98.7%
*-commutative98.7%
Applied egg-rr98.7%
associate-*l/98.7%
associate-*r/98.7%
unpow298.7%
add-cube-cbrt99.0%
Applied egg-rr99.0%
Taylor expanded in m around 0 60.7%
unpow260.7%
associate-/r*61.1%
Simplified61.1%
Final simplification51.0%
(FPCore (a k m) :precision binary64 (if (<= k 2.4e-286) (/ a (* k k)) (if (<= k 0.1) (* a (+ 1.0 (* k -10.0))) (/ 1.0 (* k (/ k a))))))
double code(double a, double k, double m) {
double tmp;
if (k <= 2.4e-286) {
tmp = a / (k * k);
} else if (k <= 0.1) {
tmp = a * (1.0 + (k * -10.0));
} else {
tmp = 1.0 / (k * (k / a));
}
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 (k <= 2.4d-286) then
tmp = a / (k * k)
else if (k <= 0.1d0) then
tmp = a * (1.0d0 + (k * (-10.0d0)))
else
tmp = 1.0d0 / (k * (k / a))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= 2.4e-286) {
tmp = a / (k * k);
} else if (k <= 0.1) {
tmp = a * (1.0 + (k * -10.0));
} else {
tmp = 1.0 / (k * (k / a));
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= 2.4e-286: tmp = a / (k * k) elif k <= 0.1: tmp = a * (1.0 + (k * -10.0)) else: tmp = 1.0 / (k * (k / a)) return tmp
function code(a, k, m) tmp = 0.0 if (k <= 2.4e-286) tmp = Float64(a / Float64(k * k)); elseif (k <= 0.1) tmp = Float64(a * Float64(1.0 + Float64(k * -10.0))); else tmp = Float64(1.0 / Float64(k * Float64(k / a))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= 2.4e-286) tmp = a / (k * k); elseif (k <= 0.1) tmp = a * (1.0 + (k * -10.0)); else tmp = 1.0 / (k * (k / a)); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, 2.4e-286], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.1], N[(a * N[(1.0 + N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(k * N[(k / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.4 \cdot 10^{-286}:\\
\;\;\;\;\frac{a}{k \cdot k}\\
\mathbf{elif}\;k \leq 0.1:\\
\;\;\;\;a \cdot \left(1 + k \cdot -10\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{k \cdot \frac{k}{a}}\\
\end{array}
\end{array}
if k < 2.39999999999999993e-286Initial program 88.8%
associate-*r/88.8%
associate-+l+88.8%
+-commutative88.8%
distribute-rgt-out88.8%
fma-def88.8%
+-commutative88.8%
Simplified88.8%
Taylor expanded in m around 0 20.2%
Taylor expanded in k around inf 34.3%
unpow234.3%
Simplified34.3%
if 2.39999999999999993e-286 < k < 0.10000000000000001Initial program 100.0%
associate-*r/100.0%
associate-+l+100.0%
+-commutative100.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in k around 0 71.3%
exp-to-pow71.3%
exp-to-pow71.3%
exp-to-pow71.3%
associate-*r*71.3%
exp-to-pow71.3%
distribute-lft1-in98.9%
*-commutative98.9%
fma-def98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in m around 0 54.8%
if 0.10000000000000001 < k Initial program 85.3%
associate-*r/85.2%
associate-+l+85.2%
+-commutative85.2%
distribute-rgt-out85.2%
fma-def85.2%
+-commutative85.2%
Simplified85.2%
Taylor expanded in m around 0 61.3%
Taylor expanded in k around inf 60.7%
unpow260.7%
Simplified60.7%
associate-/r*61.1%
div-inv61.1%
Applied egg-rr61.1%
clear-num61.0%
frac-times61.4%
metadata-eval61.4%
Applied egg-rr61.4%
Final simplification51.2%
(FPCore (a k m) :precision binary64 (if (<= k 5.5e-288) (/ a (* k k)) (if (<= k 10.0) (/ a (+ 1.0 (* k 10.0))) (/ 1.0 (* k (/ k a))))))
double code(double a, double k, double m) {
double tmp;
if (k <= 5.5e-288) {
tmp = a / (k * k);
} else if (k <= 10.0) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = 1.0 / (k * (k / a));
}
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 (k <= 5.5d-288) then
tmp = a / (k * k)
else if (k <= 10.0d0) then
tmp = a / (1.0d0 + (k * 10.0d0))
else
tmp = 1.0d0 / (k * (k / a))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= 5.5e-288) {
tmp = a / (k * k);
} else if (k <= 10.0) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = 1.0 / (k * (k / a));
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= 5.5e-288: tmp = a / (k * k) elif k <= 10.0: tmp = a / (1.0 + (k * 10.0)) else: tmp = 1.0 / (k * (k / a)) return tmp
function code(a, k, m) tmp = 0.0 if (k <= 5.5e-288) tmp = Float64(a / Float64(k * k)); elseif (k <= 10.0) tmp = Float64(a / Float64(1.0 + Float64(k * 10.0))); else tmp = Float64(1.0 / Float64(k * Float64(k / a))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= 5.5e-288) tmp = a / (k * k); elseif (k <= 10.0) tmp = a / (1.0 + (k * 10.0)); else tmp = 1.0 / (k * (k / a)); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, 5.5e-288], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 10.0], N[(a / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(k * N[(k / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.5 \cdot 10^{-288}:\\
\;\;\;\;\frac{a}{k \cdot k}\\
\mathbf{elif}\;k \leq 10:\\
\;\;\;\;\frac{a}{1 + k \cdot 10}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{k \cdot \frac{k}{a}}\\
\end{array}
\end{array}
if k < 5.5e-288Initial program 88.8%
associate-*r/88.8%
associate-+l+88.8%
+-commutative88.8%
distribute-rgt-out88.8%
fma-def88.8%
+-commutative88.8%
Simplified88.8%
Taylor expanded in m around 0 20.2%
Taylor expanded in k around inf 34.3%
unpow234.3%
Simplified34.3%
if 5.5e-288 < k < 10Initial program 100.0%
associate-*r/100.0%
associate-+l+100.0%
+-commutative100.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in m around 0 55.9%
Taylor expanded in k around 0 54.9%
*-commutative54.9%
Simplified54.9%
if 10 < k Initial program 85.3%
associate-*r/85.2%
associate-+l+85.2%
+-commutative85.2%
distribute-rgt-out85.2%
fma-def85.2%
+-commutative85.2%
Simplified85.2%
Taylor expanded in m around 0 61.3%
Taylor expanded in k around inf 60.7%
unpow260.7%
Simplified60.7%
associate-/r*61.1%
div-inv61.1%
Applied egg-rr61.1%
clear-num61.0%
frac-times61.4%
metadata-eval61.4%
Applied egg-rr61.4%
Final simplification51.2%
(FPCore (a k m) :precision binary64 (if (<= m -0.25) (/ a (* k k)) (if (<= m 7.5e+15) (/ a (+ 1.0 (* k k))) (* -10.0 (* k a)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -0.25) {
tmp = a / (k * k);
} else if (m <= 7.5e+15) {
tmp = a / (1.0 + (k * k));
} else {
tmp = -10.0 * (k * a);
}
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 <= (-0.25d0)) then
tmp = a / (k * k)
else if (m <= 7.5d+15) then
tmp = a / (1.0d0 + (k * k))
else
tmp = (-10.0d0) * (k * a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -0.25) {
tmp = a / (k * k);
} else if (m <= 7.5e+15) {
tmp = a / (1.0 + (k * k));
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -0.25: tmp = a / (k * k) elif m <= 7.5e+15: tmp = a / (1.0 + (k * k)) else: tmp = -10.0 * (k * a) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -0.25) tmp = Float64(a / Float64(k * k)); elseif (m <= 7.5e+15) tmp = Float64(a / Float64(1.0 + Float64(k * k))); else tmp = Float64(-10.0 * Float64(k * a)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -0.25) tmp = a / (k * k); elseif (m <= 7.5e+15) tmp = a / (1.0 + (k * k)); else tmp = -10.0 * (k * a); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -0.25], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 7.5e+15], N[(a / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -0.25:\\
\;\;\;\;\frac{a}{k \cdot k}\\
\mathbf{elif}\;m \leq 7.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{a}{1 + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -0.25Initial program 100.0%
associate-*r/100.0%
associate-+l+100.0%
+-commutative100.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in m around 0 38.4%
Taylor expanded in k around inf 64.7%
unpow264.7%
Simplified64.7%
if -0.25 < m < 7.5e15Initial program 96.0%
associate-*r/95.9%
associate-+l+95.9%
+-commutative95.9%
distribute-rgt-out95.9%
fma-def95.9%
+-commutative95.9%
Simplified95.9%
Taylor expanded in m around 0 91.6%
Taylor expanded in k around inf 89.5%
unpow289.5%
Simplified89.5%
if 7.5e15 < m Initial program 73.1%
associate-*r/73.1%
associate-+l+73.1%
+-commutative73.1%
distribute-rgt-out73.1%
fma-def73.1%
+-commutative73.1%
Simplified73.1%
Taylor expanded in m around 0 2.5%
Taylor expanded in k around 0 9.8%
Taylor expanded in k around inf 17.5%
Final simplification59.4%
(FPCore (a k m) :precision binary64 (if (<= m -0.31) (* a (/ (- -1.0) (* k k))) (if (<= m 8.2e+15) (/ a (+ 1.0 (* k k))) (* -10.0 (* k a)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -0.31) {
tmp = a * (-(-1.0) / (k * k));
} else if (m <= 8.2e+15) {
tmp = a / (1.0 + (k * k));
} else {
tmp = -10.0 * (k * a);
}
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 <= (-0.31d0)) then
tmp = a * (-(-1.0d0) / (k * k))
else if (m <= 8.2d+15) then
tmp = a / (1.0d0 + (k * k))
else
tmp = (-10.0d0) * (k * a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -0.31) {
tmp = a * (-(-1.0) / (k * k));
} else if (m <= 8.2e+15) {
tmp = a / (1.0 + (k * k));
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -0.31: tmp = a * (-(-1.0) / (k * k)) elif m <= 8.2e+15: tmp = a / (1.0 + (k * k)) else: tmp = -10.0 * (k * a) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -0.31) tmp = Float64(a * Float64(Float64(-(-1.0)) / Float64(k * k))); elseif (m <= 8.2e+15) tmp = Float64(a / Float64(1.0 + Float64(k * k))); else tmp = Float64(-10.0 * Float64(k * a)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -0.31) tmp = a * (-(-1.0) / (k * k)); elseif (m <= 8.2e+15) tmp = a / (1.0 + (k * k)); else tmp = -10.0 * (k * a); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -0.31], N[(a * N[((--1.0) / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 8.2e+15], N[(a / N[(1.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -0.31:\\
\;\;\;\;a \cdot \frac{--1}{k \cdot k}\\
\mathbf{elif}\;m \leq 8.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{a}{1 + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -0.309999999999999998Initial program 100.0%
associate-*r/100.0%
associate-+l+100.0%
+-commutative100.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in m around 0 38.4%
Taylor expanded in k around inf 64.7%
unpow264.7%
Simplified64.7%
frac-2neg64.7%
div-inv65.9%
distribute-rgt-neg-in65.9%
Applied egg-rr65.9%
Taylor expanded in k around 0 65.9%
unpow265.9%
Simplified65.9%
if -0.309999999999999998 < m < 8.2e15Initial program 96.0%
associate-*r/95.9%
associate-+l+95.9%
+-commutative95.9%
distribute-rgt-out95.9%
fma-def95.9%
+-commutative95.9%
Simplified95.9%
Taylor expanded in m around 0 91.6%
Taylor expanded in k around inf 89.5%
unpow289.5%
Simplified89.5%
if 8.2e15 < m Initial program 73.1%
associate-*r/73.1%
associate-+l+73.1%
+-commutative73.1%
distribute-rgt-out73.1%
fma-def73.1%
+-commutative73.1%
Simplified73.1%
Taylor expanded in m around 0 2.5%
Taylor expanded in k around 0 9.8%
Taylor expanded in k around inf 17.5%
Final simplification59.8%
(FPCore (a k m) :precision binary64 (if (or (<= k 5.2e-288) (not (<= k 1.0))) (/ a (* k k)) a))
double code(double a, double k, double m) {
double tmp;
if ((k <= 5.2e-288) || !(k <= 1.0)) {
tmp = a / (k * k);
} else {
tmp = a;
}
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 ((k <= 5.2d-288) .or. (.not. (k <= 1.0d0))) then
tmp = a / (k * k)
else
tmp = a
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if ((k <= 5.2e-288) || !(k <= 1.0)) {
tmp = a / (k * k);
} else {
tmp = a;
}
return tmp;
}
def code(a, k, m): tmp = 0 if (k <= 5.2e-288) or not (k <= 1.0): tmp = a / (k * k) else: tmp = a return tmp
function code(a, k, m) tmp = 0.0 if ((k <= 5.2e-288) || !(k <= 1.0)) tmp = Float64(a / Float64(k * k)); else tmp = a; end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if ((k <= 5.2e-288) || ~((k <= 1.0))) tmp = a / (k * k); else tmp = a; end tmp_2 = tmp; end
code[a_, k_, m_] := If[Or[LessEqual[k, 5.2e-288], N[Not[LessEqual[k, 1.0]], $MachinePrecision]], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.2 \cdot 10^{-288} \lor \neg \left(k \leq 1\right):\\
\;\;\;\;\frac{a}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if k < 5.19999999999999979e-288 or 1 < k Initial program 86.8%
associate-*r/86.7%
associate-+l+86.7%
+-commutative86.7%
distribute-rgt-out86.7%
fma-def86.7%
+-commutative86.7%
Simplified86.7%
Taylor expanded in m around 0 43.8%
Taylor expanded in k around inf 49.4%
unpow249.4%
Simplified49.4%
if 5.19999999999999979e-288 < k < 1Initial program 100.0%
associate-*r/100.0%
associate-+l+100.0%
+-commutative100.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in m around 0 55.9%
Taylor expanded in k around 0 54.0%
Final simplification50.6%
(FPCore (a k m) :precision binary64 (if (<= k 9.5e-289) (/ a (* k k)) (if (<= k 1.0) a (/ (/ a k) k))))
double code(double a, double k, double m) {
double tmp;
if (k <= 9.5e-289) {
tmp = a / (k * k);
} else if (k <= 1.0) {
tmp = a;
} else {
tmp = (a / k) / 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 (k <= 9.5d-289) then
tmp = a / (k * k)
else if (k <= 1.0d0) then
tmp = a
else
tmp = (a / k) / k
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= 9.5e-289) {
tmp = a / (k * k);
} else if (k <= 1.0) {
tmp = a;
} else {
tmp = (a / k) / k;
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= 9.5e-289: tmp = a / (k * k) elif k <= 1.0: tmp = a else: tmp = (a / k) / k return tmp
function code(a, k, m) tmp = 0.0 if (k <= 9.5e-289) tmp = Float64(a / Float64(k * k)); elseif (k <= 1.0) tmp = a; else tmp = Float64(Float64(a / k) / k); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= 9.5e-289) tmp = a / (k * k); elseif (k <= 1.0) tmp = a; else tmp = (a / k) / k; end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, 9.5e-289], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.0], a, N[(N[(a / k), $MachinePrecision] / k), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 9.5 \cdot 10^{-289}:\\
\;\;\;\;\frac{a}{k \cdot k}\\
\mathbf{elif}\;k \leq 1:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{a}{k}}{k}\\
\end{array}
\end{array}
if k < 9.4999999999999995e-289Initial program 88.8%
associate-*r/88.8%
associate-+l+88.8%
+-commutative88.8%
distribute-rgt-out88.8%
fma-def88.8%
+-commutative88.8%
Simplified88.8%
Taylor expanded in m around 0 20.2%
Taylor expanded in k around inf 34.3%
unpow234.3%
Simplified34.3%
if 9.4999999999999995e-289 < k < 1Initial program 100.0%
associate-*r/100.0%
associate-+l+100.0%
+-commutative100.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in m around 0 55.9%
Taylor expanded in k around 0 54.0%
if 1 < k Initial program 85.3%
Taylor expanded in k around inf 84.4%
unpow284.4%
Simplified84.4%
*-commutative84.4%
add-cube-cbrt84.1%
times-frac98.7%
pow298.7%
*-commutative98.7%
*-commutative98.7%
Applied egg-rr98.7%
associate-*l/98.7%
associate-*r/98.7%
unpow298.7%
add-cube-cbrt99.0%
Applied egg-rr99.0%
Taylor expanded in m around 0 60.7%
unpow260.7%
associate-/r*61.1%
Simplified61.1%
Final simplification50.8%
(FPCore (a k m) :precision binary64 (if (<= k -2e-310) (* -10.0 (* k a)) a))
double code(double a, double k, double m) {
double tmp;
if (k <= -2e-310) {
tmp = -10.0 * (k * a);
} else {
tmp = a;
}
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 (k <= (-2d-310)) then
tmp = (-10.0d0) * (k * a)
else
tmp = a
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= -2e-310) {
tmp = -10.0 * (k * a);
} else {
tmp = a;
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= -2e-310: tmp = -10.0 * (k * a) else: tmp = a return tmp
function code(a, k, m) tmp = 0.0 if (k <= -2e-310) tmp = Float64(-10.0 * Float64(k * a)); else tmp = a; end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= -2e-310) tmp = -10.0 * (k * a); else tmp = a; end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, -2e-310], N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -2 \cdot 10^{-310}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if k < -1.999999999999994e-310Initial program 88.5%
associate-*r/88.5%
associate-+l+88.5%
+-commutative88.5%
distribute-rgt-out88.5%
fma-def88.5%
+-commutative88.5%
Simplified88.5%
Taylor expanded in m around 0 20.7%
Taylor expanded in k around 0 10.8%
Taylor expanded in k around inf 18.1%
if -1.999999999999994e-310 < k Initial program 91.1%
associate-*r/91.1%
associate-+l+91.1%
+-commutative91.1%
distribute-rgt-out91.1%
fma-def91.1%
+-commutative91.1%
Simplified91.1%
Taylor expanded in m around 0 58.6%
Taylor expanded in k around 0 23.6%
Final simplification21.9%
(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.3%
associate-*r/90.3%
associate-+l+90.3%
+-commutative90.3%
distribute-rgt-out90.3%
fma-def90.3%
+-commutative90.3%
Simplified90.3%
Taylor expanded in m around 0 47.0%
Taylor expanded in k around 0 17.5%
Final simplification17.5%
herbie shell --seed 2023240
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))