
(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 16 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 -1.8e-254)
(* a (/ (pow k m) (fma k (+ k 10.0) 1.0)))
(if (<= m 40.0) (* (/ (pow k m) t_0) (/ a t_0)) (* a (pow k m))))))
double code(double a, double k, double m) {
double t_0 = hypot(k, sqrt(fma(k, 10.0, 1.0)));
double tmp;
if (m <= -1.8e-254) {
tmp = a * (pow(k, m) / fma(k, (k + 10.0), 1.0));
} else if (m <= 40.0) {
tmp = (pow(k, m) / t_0) * (a / t_0);
} else {
tmp = a * pow(k, m);
}
return tmp;
}
function code(a, k, m) t_0 = hypot(k, sqrt(fma(k, 10.0, 1.0))) tmp = 0.0 if (m <= -1.8e-254) tmp = Float64(a * Float64((k ^ m) / fma(k, Float64(k + 10.0), 1.0))); elseif (m <= 40.0) tmp = Float64(Float64((k ^ m) / t_0) * Float64(a / t_0)); else tmp = Float64(a * (k ^ m)); 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, -1.8e-254], N[(a * N[(N[Power[k, m], $MachinePrecision] / N[(k * N[(k + 10.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 40.0], N[(N[(N[Power[k, m], $MachinePrecision] / t$95$0), $MachinePrecision] * N[(a / t$95$0), $MachinePrecision]), $MachinePrecision], N[(a * N[Power[k, m], $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 -1.8 \cdot 10^{-254}:\\
\;\;\;\;a \cdot \frac{{k}^{m}}{\mathsf{fma}\left(k, k + 10, 1\right)}\\
\mathbf{elif}\;m \leq 40:\\
\;\;\;\;\frac{{k}^{m}}{t_0} \cdot \frac{a}{t_0}\\
\mathbf{else}:\\
\;\;\;\;a \cdot {k}^{m}\\
\end{array}
\end{array}
if m < -1.79999999999999992e-254Initial program 99.9%
associate-*r/99.9%
associate-+l+99.9%
+-commutative99.9%
distribute-rgt-out99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
if -1.79999999999999992e-254 < m < 40Initial program 85.9%
add-cbrt-cube46.1%
pow346.0%
*-commutative46.0%
Applied egg-rr46.0%
rem-cbrt-cube85.9%
add-sqr-sqrt85.8%
times-frac85.8%
+-commutative85.8%
add-sqr-sqrt85.8%
hypot-def85.8%
+-commutative85.8%
*-commutative85.8%
fma-def85.8%
+-commutative85.8%
add-sqr-sqrt85.8%
hypot-def99.7%
+-commutative99.7%
Applied egg-rr99.7%
if 40 < m Initial program 76.4%
associate-*r/76.4%
associate-+l+76.4%
+-commutative76.4%
distribute-rgt-out76.4%
fma-def76.4%
+-commutative76.4%
Simplified76.4%
Taylor expanded in k around 0 44.9%
exp-to-pow100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (a k m)
:precision binary64
(let* ((t_0 (hypot k (sqrt (fma k 10.0 1.0))))
(t_1 (* a (pow k m)))
(t_2 (cbrt t_1)))
(if (<= k 3.2e-17) t_1 (* (/ (pow t_2 2.0) t_0) (/ t_2 t_0)))))
double code(double a, double k, double m) {
double t_0 = hypot(k, sqrt(fma(k, 10.0, 1.0)));
double t_1 = a * pow(k, m);
double t_2 = cbrt(t_1);
double tmp;
if (k <= 3.2e-17) {
tmp = t_1;
} else {
tmp = (pow(t_2, 2.0) / t_0) * (t_2 / t_0);
}
return tmp;
}
function code(a, k, m) t_0 = hypot(k, sqrt(fma(k, 10.0, 1.0))) t_1 = Float64(a * (k ^ m)) t_2 = cbrt(t_1) tmp = 0.0 if (k <= 3.2e-17) tmp = t_1; else tmp = Float64(Float64((t_2 ^ 2.0) / t_0) * Float64(t_2 / t_0)); 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]}, Block[{t$95$1 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 1/3], $MachinePrecision]}, If[LessEqual[k, 3.2e-17], t$95$1, N[(N[(N[Power[t$95$2, 2.0], $MachinePrecision] / t$95$0), $MachinePrecision] * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{hypot}\left(k, \sqrt{\mathsf{fma}\left(k, 10, 1\right)}\right)\\
t_1 := a \cdot {k}^{m}\\
t_2 := \sqrt[3]{t_1}\\
\mathbf{if}\;k \leq 3.2 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{{t_2}^{2}}{t_0} \cdot \frac{t_2}{t_0}\\
\end{array}
\end{array}
if k < 3.2000000000000002e-17Initial program 91.6%
associate-*r/91.6%
associate-+l+91.6%
+-commutative91.6%
distribute-rgt-out91.6%
fma-def91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in k around 0 50.0%
exp-to-pow100.0%
Simplified100.0%
if 3.2000000000000002e-17 < k Initial program 83.2%
add-cbrt-cube70.5%
pow370.5%
*-commutative70.5%
Applied egg-rr70.5%
rem-cbrt-cube83.2%
add-cube-cbrt82.9%
add-sqr-sqrt82.9%
times-frac82.9%
pow282.9%
+-commutative82.9%
add-sqr-sqrt82.9%
hypot-def82.9%
+-commutative82.9%
*-commutative82.9%
fma-def82.9%
Applied egg-rr99.3%
Final simplification99.8%
(FPCore (a k m)
:precision binary64
(let* ((t_0 (* a (pow k m))) (t_1 (cbrt t_0)))
(if (<= k 4.2e-17)
t_0
(*
(/ (pow t_1 2.0) (hypot k (sqrt (fma k 10.0 1.0))))
(/ t_1 (hypot k 1.0))))))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double t_1 = cbrt(t_0);
double tmp;
if (k <= 4.2e-17) {
tmp = t_0;
} else {
tmp = (pow(t_1, 2.0) / hypot(k, sqrt(fma(k, 10.0, 1.0)))) * (t_1 / hypot(k, 1.0));
}
return tmp;
}
function code(a, k, m) t_0 = Float64(a * (k ^ m)) t_1 = cbrt(t_0) tmp = 0.0 if (k <= 4.2e-17) tmp = t_0; else tmp = Float64(Float64((t_1 ^ 2.0) / hypot(k, sqrt(fma(k, 10.0, 1.0)))) * Float64(t_1 / hypot(k, 1.0))); end return tmp end
code[a_, k_, m_] := Block[{t$95$0 = N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 1/3], $MachinePrecision]}, If[LessEqual[k, 4.2e-17], t$95$0, N[(N[(N[Power[t$95$1, 2.0], $MachinePrecision] / N[Sqrt[k ^ 2 + N[Sqrt[N[(k * 10.0 + 1.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 / N[Sqrt[k ^ 2 + 1.0 ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
t_1 := \sqrt[3]{t_0}\\
\mathbf{if}\;k \leq 4.2 \cdot 10^{-17}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{{t_1}^{2}}{\mathsf{hypot}\left(k, \sqrt{\mathsf{fma}\left(k, 10, 1\right)}\right)} \cdot \frac{t_1}{\mathsf{hypot}\left(k, 1\right)}\\
\end{array}
\end{array}
if k < 4.19999999999999984e-17Initial program 91.6%
associate-*r/91.6%
associate-+l+91.6%
+-commutative91.6%
distribute-rgt-out91.6%
fma-def91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in k around 0 50.0%
exp-to-pow100.0%
Simplified100.0%
if 4.19999999999999984e-17 < k Initial program 83.2%
add-cbrt-cube70.5%
pow370.5%
*-commutative70.5%
Applied egg-rr70.5%
rem-cbrt-cube83.2%
add-cube-cbrt82.9%
add-sqr-sqrt82.9%
times-frac82.9%
pow282.9%
+-commutative82.9%
add-sqr-sqrt82.9%
hypot-def82.9%
+-commutative82.9%
*-commutative82.9%
fma-def82.9%
Applied egg-rr99.3%
Taylor expanded in k around 0 98.7%
Final simplification99.6%
(FPCore (a k m)
:precision binary64
(let* ((t_0 (* a (pow k m))))
(if (<= k 6.5e-12)
t_0
(if (<= k 2.7e+157) (/ t_0 (* k k)) (* (/ a k) (/ 1.0 k))))))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double tmp;
if (k <= 6.5e-12) {
tmp = t_0;
} else if (k <= 2.7e+157) {
tmp = t_0 / (k * k);
} else {
tmp = (a / 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) :: t_0
real(8) :: tmp
t_0 = a * (k ** m)
if (k <= 6.5d-12) then
tmp = t_0
else if (k <= 2.7d+157) then
tmp = t_0 / (k * k)
else
tmp = (a / k) * (1.0d0 / 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 <= 6.5e-12) {
tmp = t_0;
} else if (k <= 2.7e+157) {
tmp = t_0 / (k * k);
} else {
tmp = (a / k) * (1.0 / k);
}
return tmp;
}
def code(a, k, m): t_0 = a * math.pow(k, m) tmp = 0 if k <= 6.5e-12: tmp = t_0 elif k <= 2.7e+157: tmp = t_0 / (k * k) else: tmp = (a / k) * (1.0 / k) return tmp
function code(a, k, m) t_0 = Float64(a * (k ^ m)) tmp = 0.0 if (k <= 6.5e-12) tmp = t_0; elseif (k <= 2.7e+157) tmp = Float64(t_0 / Float64(k * k)); else tmp = Float64(Float64(a / k) * Float64(1.0 / k)); end return tmp end
function tmp_2 = code(a, k, m) t_0 = a * (k ^ m); tmp = 0.0; if (k <= 6.5e-12) tmp = t_0; elseif (k <= 2.7e+157) tmp = t_0 / (k * k); else tmp = (a / k) * (1.0 / 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, 6.5e-12], t$95$0, If[LessEqual[k, 2.7e+157], N[(t$95$0 / N[(k * k), $MachinePrecision]), $MachinePrecision], N[(N[(a / k), $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
\mathbf{if}\;k \leq 6.5 \cdot 10^{-12}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;k \leq 2.7 \cdot 10^{+157}:\\
\;\;\;\;\frac{t_0}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{k} \cdot \frac{1}{k}\\
\end{array}
\end{array}
if k < 6.5000000000000002e-12Initial program 91.7%
associate-*r/91.7%
associate-+l+91.7%
+-commutative91.7%
distribute-rgt-out91.7%
fma-def91.7%
+-commutative91.7%
Simplified91.7%
Taylor expanded in k around 0 50.5%
exp-to-pow99.9%
Simplified99.9%
if 6.5000000000000002e-12 < k < 2.7e157Initial program 99.6%
Taylor expanded in k around inf 98.7%
unpow298.7%
Simplified98.7%
if 2.7e157 < k Initial program 59.6%
associate-*r/59.6%
associate-+l+59.6%
+-commutative59.6%
distribute-rgt-out59.6%
fma-def59.6%
+-commutative59.6%
Simplified59.6%
Taylor expanded in m around 0 59.9%
Taylor expanded in k around inf 59.9%
unpow259.9%
Simplified59.9%
clear-num59.9%
inv-pow59.9%
Applied egg-rr59.9%
unpow-159.9%
associate-/l*77.4%
Simplified77.4%
inv-pow77.4%
associate-/r/77.5%
unpow-prod-down77.7%
inv-pow77.7%
clear-num77.7%
inv-pow77.7%
Applied egg-rr77.7%
Final simplification96.4%
(FPCore (a k m) :precision binary64 (if (<= k 6.5e-12) (* a (pow k m)) (/ 1.0 (* (/ k (pow k m)) (/ k a)))))
double code(double a, double k, double m) {
double tmp;
if (k <= 6.5e-12) {
tmp = a * pow(k, m);
} else {
tmp = 1.0 / ((k / pow(k, m)) * (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 <= 6.5d-12) then
tmp = a * (k ** m)
else
tmp = 1.0d0 / ((k / (k ** m)) * (k / a))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= 6.5e-12) {
tmp = a * Math.pow(k, m);
} else {
tmp = 1.0 / ((k / Math.pow(k, m)) * (k / a));
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= 6.5e-12: tmp = a * math.pow(k, m) else: tmp = 1.0 / ((k / math.pow(k, m)) * (k / a)) return tmp
function code(a, k, m) tmp = 0.0 if (k <= 6.5e-12) tmp = Float64(a * (k ^ m)); else tmp = Float64(1.0 / Float64(Float64(k / (k ^ m)) * Float64(k / a))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= 6.5e-12) tmp = a * (k ^ m); else tmp = 1.0 / ((k / (k ^ m)) * (k / a)); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, 6.5e-12], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(k / N[Power[k, m], $MachinePrecision]), $MachinePrecision] * N[(k / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.5 \cdot 10^{-12}:\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{k}{{k}^{m}} \cdot \frac{k}{a}}\\
\end{array}
\end{array}
if k < 6.5000000000000002e-12Initial program 91.7%
associate-*r/91.7%
associate-+l+91.7%
+-commutative91.7%
distribute-rgt-out91.7%
fma-def91.7%
+-commutative91.7%
Simplified91.7%
Taylor expanded in k around 0 50.5%
exp-to-pow99.9%
Simplified99.9%
if 6.5000000000000002e-12 < k Initial program 82.8%
associate-*r/82.8%
associate-+l+82.8%
+-commutative82.8%
distribute-rgt-out82.8%
fma-def82.8%
+-commutative82.8%
Simplified82.8%
associate-*r/82.8%
add-sqr-sqrt82.8%
associate-/r*82.8%
*-commutative82.8%
Applied egg-rr82.8%
clear-num82.8%
inv-pow82.8%
associate-/l*80.5%
Applied egg-rr80.5%
unpow-180.5%
associate-/r/80.6%
Simplified80.6%
Taylor expanded in k around inf 82.3%
mul-1-neg82.3%
log-rec82.3%
distribute-lft-neg-in82.3%
remove-double-neg82.3%
exp-to-pow82.3%
unpow282.3%
times-frac93.1%
Simplified93.1%
Final simplification97.6%
(FPCore (a k m) :precision binary64 (if (or (<= m -2.8e-6) (not (<= m 2.9e-5))) (* a (pow k m)) (* a (/ 1.0 (+ 1.0 (* k (+ k 10.0)))))))
double code(double a, double k, double m) {
double tmp;
if ((m <= -2.8e-6) || !(m <= 2.9e-5)) {
tmp = a * pow(k, m);
} else {
tmp = a * (1.0 / (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 <= (-2.8d-6)) .or. (.not. (m <= 2.9d-5))) then
tmp = a * (k ** m)
else
tmp = a * (1.0d0 / (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 <= -2.8e-6) || !(m <= 2.9e-5)) {
tmp = a * Math.pow(k, m);
} else {
tmp = a * (1.0 / (1.0 + (k * (k + 10.0))));
}
return tmp;
}
def code(a, k, m): tmp = 0 if (m <= -2.8e-6) or not (m <= 2.9e-5): tmp = a * math.pow(k, m) else: tmp = a * (1.0 / (1.0 + (k * (k + 10.0)))) return tmp
function code(a, k, m) tmp = 0.0 if ((m <= -2.8e-6) || !(m <= 2.9e-5)) tmp = Float64(a * (k ^ m)); else tmp = Float64(a * Float64(1.0 / 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 <= -2.8e-6) || ~((m <= 2.9e-5))) tmp = a * (k ^ m); else tmp = a * (1.0 / (1.0 + (k * (k + 10.0)))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[Or[LessEqual[m, -2.8e-6], N[Not[LessEqual[m, 2.9e-5]], $MachinePrecision]], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -2.8 \cdot 10^{-6} \lor \neg \left(m \leq 2.9 \cdot 10^{-5}\right):\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{1}{1 + k \cdot \left(k + 10\right)}\\
\end{array}
\end{array}
if m < -2.79999999999999987e-6 or 2.9e-5 < m Initial program 87.6%
associate-*r/87.6%
associate-+l+87.6%
+-commutative87.6%
distribute-rgt-out87.6%
fma-def87.6%
+-commutative87.6%
Simplified87.6%
Taylor expanded in k around 0 50.6%
exp-to-pow99.4%
Simplified99.4%
if -2.79999999999999987e-6 < m < 2.9e-5Initial program 90.5%
associate-*r/90.5%
associate-+l+90.5%
+-commutative90.5%
distribute-rgt-out90.5%
fma-def90.5%
+-commutative90.5%
Simplified90.5%
Taylor expanded in m around 0 89.2%
Final simplification96.0%
(FPCore (a k m)
:precision binary64
(let* ((t_0 (* (/ a k) (/ 1.0 k))))
(if (<= m -9.5e-29)
(* a (/ 1.0 (* k k)))
(if (<= m -1.6e-177)
a
(if (<= m 1.25e-226)
t_0
(if (<= m 8e-108) a (if (<= m 19000.0) t_0 (* -10.0 (* k a)))))))))
double code(double a, double k, double m) {
double t_0 = (a / k) * (1.0 / k);
double tmp;
if (m <= -9.5e-29) {
tmp = a * (1.0 / (k * k));
} else if (m <= -1.6e-177) {
tmp = a;
} else if (m <= 1.25e-226) {
tmp = t_0;
} else if (m <= 8e-108) {
tmp = a;
} else if (m <= 19000.0) {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = (a / k) * (1.0d0 / k)
if (m <= (-9.5d-29)) then
tmp = a * (1.0d0 / (k * k))
else if (m <= (-1.6d-177)) then
tmp = a
else if (m <= 1.25d-226) then
tmp = t_0
else if (m <= 8d-108) then
tmp = a
else if (m <= 19000.0d0) then
tmp = t_0
else
tmp = (-10.0d0) * (k * a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double t_0 = (a / k) * (1.0 / k);
double tmp;
if (m <= -9.5e-29) {
tmp = a * (1.0 / (k * k));
} else if (m <= -1.6e-177) {
tmp = a;
} else if (m <= 1.25e-226) {
tmp = t_0;
} else if (m <= 8e-108) {
tmp = a;
} else if (m <= 19000.0) {
tmp = t_0;
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): t_0 = (a / k) * (1.0 / k) tmp = 0 if m <= -9.5e-29: tmp = a * (1.0 / (k * k)) elif m <= -1.6e-177: tmp = a elif m <= 1.25e-226: tmp = t_0 elif m <= 8e-108: tmp = a elif m <= 19000.0: tmp = t_0 else: tmp = -10.0 * (k * a) return tmp
function code(a, k, m) t_0 = Float64(Float64(a / k) * Float64(1.0 / k)) tmp = 0.0 if (m <= -9.5e-29) tmp = Float64(a * Float64(1.0 / Float64(k * k))); elseif (m <= -1.6e-177) tmp = a; elseif (m <= 1.25e-226) tmp = t_0; elseif (m <= 8e-108) tmp = a; elseif (m <= 19000.0) tmp = t_0; else tmp = Float64(-10.0 * Float64(k * a)); end return tmp end
function tmp_2 = code(a, k, m) t_0 = (a / k) * (1.0 / k); tmp = 0.0; if (m <= -9.5e-29) tmp = a * (1.0 / (k * k)); elseif (m <= -1.6e-177) tmp = a; elseif (m <= 1.25e-226) tmp = t_0; elseif (m <= 8e-108) tmp = a; elseif (m <= 19000.0) tmp = t_0; else tmp = -10.0 * (k * a); end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(N[(a / k), $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -9.5e-29], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, -1.6e-177], a, If[LessEqual[m, 1.25e-226], t$95$0, If[LessEqual[m, 8e-108], a, If[LessEqual[m, 19000.0], t$95$0, N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{a}{k} \cdot \frac{1}{k}\\
\mathbf{if}\;m \leq -9.5 \cdot 10^{-29}:\\
\;\;\;\;a \cdot \frac{1}{k \cdot k}\\
\mathbf{elif}\;m \leq -1.6 \cdot 10^{-177}:\\
\;\;\;\;a\\
\mathbf{elif}\;m \leq 1.25 \cdot 10^{-226}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;m \leq 8 \cdot 10^{-108}:\\
\;\;\;\;a\\
\mathbf{elif}\;m \leq 19000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -9.50000000000000023e-29Initial 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 36.0%
Taylor expanded in k around inf 65.9%
unpow265.9%
Simplified65.9%
if -9.50000000000000023e-29 < m < -1.5999999999999999e-177 or 1.2499999999999999e-226 < m < 8.00000000000000032e-108Initial program 94.8%
associate-*r/94.9%
associate-+l+94.9%
+-commutative94.9%
distribute-rgt-out94.9%
fma-def94.9%
+-commutative94.9%
Simplified94.9%
Taylor expanded in k around 0 74.7%
exp-to-pow74.7%
Simplified74.7%
Taylor expanded in m around 0 74.7%
if -1.5999999999999999e-177 < m < 1.2499999999999999e-226 or 8.00000000000000032e-108 < m < 19000Initial program 84.0%
associate-*r/84.0%
associate-+l+84.0%
+-commutative84.0%
distribute-rgt-out84.0%
fma-def84.0%
+-commutative84.0%
Simplified84.0%
Taylor expanded in m around 0 83.6%
Taylor expanded in k around inf 57.4%
unpow257.4%
Simplified57.4%
clear-num57.5%
inv-pow57.5%
Applied egg-rr57.5%
unpow-157.5%
associate-/l*69.8%
Simplified69.8%
inv-pow69.8%
associate-/r/70.0%
unpow-prod-down70.1%
inv-pow70.1%
clear-num70.0%
inv-pow70.0%
Applied egg-rr70.0%
if 19000 < m Initial program 77.3%
associate-*r/77.3%
associate-+l+77.3%
+-commutative77.3%
distribute-rgt-out77.3%
fma-def77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in k around inf 21.7%
Final simplification52.8%
(FPCore (a k m)
:precision binary64
(if (<= m -2.05e-25)
(* a (/ 1.0 (* k k)))
(if (<= m -7e-178)
a
(if (<= m 3.3e-227)
(/ 1.0 (* k (/ k a)))
(if (<= m 1.4e-106)
a
(if (<= m 210000.0) (* (/ a k) (/ 1.0 k)) (* -10.0 (* k a))))))))
double code(double a, double k, double m) {
double tmp;
if (m <= -2.05e-25) {
tmp = a * (1.0 / (k * k));
} else if (m <= -7e-178) {
tmp = a;
} else if (m <= 3.3e-227) {
tmp = 1.0 / (k * (k / a));
} else if (m <= 1.4e-106) {
tmp = a;
} else if (m <= 210000.0) {
tmp = (a / k) * (1.0 / 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 <= (-2.05d-25)) then
tmp = a * (1.0d0 / (k * k))
else if (m <= (-7d-178)) then
tmp = a
else if (m <= 3.3d-227) then
tmp = 1.0d0 / (k * (k / a))
else if (m <= 1.4d-106) then
tmp = a
else if (m <= 210000.0d0) then
tmp = (a / k) * (1.0d0 / 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 <= -2.05e-25) {
tmp = a * (1.0 / (k * k));
} else if (m <= -7e-178) {
tmp = a;
} else if (m <= 3.3e-227) {
tmp = 1.0 / (k * (k / a));
} else if (m <= 1.4e-106) {
tmp = a;
} else if (m <= 210000.0) {
tmp = (a / k) * (1.0 / k);
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -2.05e-25: tmp = a * (1.0 / (k * k)) elif m <= -7e-178: tmp = a elif m <= 3.3e-227: tmp = 1.0 / (k * (k / a)) elif m <= 1.4e-106: tmp = a elif m <= 210000.0: tmp = (a / k) * (1.0 / k) else: tmp = -10.0 * (k * a) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -2.05e-25) tmp = Float64(a * Float64(1.0 / Float64(k * k))); elseif (m <= -7e-178) tmp = a; elseif (m <= 3.3e-227) tmp = Float64(1.0 / Float64(k * Float64(k / a))); elseif (m <= 1.4e-106) tmp = a; elseif (m <= 210000.0) tmp = Float64(Float64(a / k) * Float64(1.0 / 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 <= -2.05e-25) tmp = a * (1.0 / (k * k)); elseif (m <= -7e-178) tmp = a; elseif (m <= 3.3e-227) tmp = 1.0 / (k * (k / a)); elseif (m <= 1.4e-106) tmp = a; elseif (m <= 210000.0) tmp = (a / k) * (1.0 / k); else tmp = -10.0 * (k * a); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -2.05e-25], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, -7e-178], a, If[LessEqual[m, 3.3e-227], N[(1.0 / N[(k * N[(k / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.4e-106], a, If[LessEqual[m, 210000.0], N[(N[(a / k), $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision], N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -2.05 \cdot 10^{-25}:\\
\;\;\;\;a \cdot \frac{1}{k \cdot k}\\
\mathbf{elif}\;m \leq -7 \cdot 10^{-178}:\\
\;\;\;\;a\\
\mathbf{elif}\;m \leq 3.3 \cdot 10^{-227}:\\
\;\;\;\;\frac{1}{k \cdot \frac{k}{a}}\\
\mathbf{elif}\;m \leq 1.4 \cdot 10^{-106}:\\
\;\;\;\;a\\
\mathbf{elif}\;m \leq 210000:\\
\;\;\;\;\frac{a}{k} \cdot \frac{1}{k}\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -2.04999999999999994e-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 36.0%
Taylor expanded in k around inf 65.9%
unpow265.9%
Simplified65.9%
if -2.04999999999999994e-25 < m < -6.99999999999999966e-178 or 3.2999999999999999e-227 < m < 1.39999999999999994e-106Initial program 94.8%
associate-*r/94.9%
associate-+l+94.9%
+-commutative94.9%
distribute-rgt-out94.9%
fma-def94.9%
+-commutative94.9%
Simplified94.9%
Taylor expanded in k around 0 74.7%
exp-to-pow74.7%
Simplified74.7%
Taylor expanded in m around 0 74.7%
if -6.99999999999999966e-178 < m < 3.2999999999999999e-227Initial program 85.6%
associate-*r/85.5%
associate-+l+85.5%
+-commutative85.5%
distribute-rgt-out85.5%
fma-def85.5%
+-commutative85.5%
Simplified85.5%
Taylor expanded in m around 0 85.6%
Taylor expanded in k around inf 52.8%
unpow252.8%
Simplified52.8%
clear-num52.8%
inv-pow52.8%
Applied egg-rr52.8%
unpow-152.8%
associate-/l*66.8%
Simplified66.8%
associate-/r/67.1%
Applied egg-rr67.1%
if 1.39999999999999994e-106 < m < 2.1e5Initial program 79.8%
associate-*r/79.8%
associate-+l+79.8%
+-commutative79.8%
distribute-rgt-out79.8%
fma-def79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in m around 0 78.0%
Taylor expanded in k around inf 70.2%
unpow270.2%
Simplified70.2%
clear-num70.3%
inv-pow70.3%
Applied egg-rr70.3%
unpow-170.3%
associate-/l*78.0%
Simplified78.0%
inv-pow78.0%
associate-/r/78.0%
unpow-prod-down78.9%
inv-pow78.9%
clear-num78.9%
inv-pow78.9%
Applied egg-rr78.9%
if 2.1e5 < m Initial program 77.3%
associate-*r/77.3%
associate-+l+77.3%
+-commutative77.3%
distribute-rgt-out77.3%
fma-def77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in k around inf 21.7%
Final simplification52.8%
(FPCore (a k m)
:precision binary64
(let* ((t_0 (/ a (+ 1.0 (* k 10.0)))))
(if (<= m -5.2e-26)
(* a (/ 1.0 (* k k)))
(if (<= m -2.3e-175)
t_0
(if (<= m -2e-308)
(/ 1.0 (* k (/ k a)))
(if (<= m 2.3e-102)
t_0
(if (<= m 210000.0) (* (/ a k) (/ 1.0 k)) (* -10.0 (* k a)))))))))
double code(double a, double k, double m) {
double t_0 = a / (1.0 + (k * 10.0));
double tmp;
if (m <= -5.2e-26) {
tmp = a * (1.0 / (k * k));
} else if (m <= -2.3e-175) {
tmp = t_0;
} else if (m <= -2e-308) {
tmp = 1.0 / (k * (k / a));
} else if (m <= 2.3e-102) {
tmp = t_0;
} else if (m <= 210000.0) {
tmp = (a / k) * (1.0 / 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) :: t_0
real(8) :: tmp
t_0 = a / (1.0d0 + (k * 10.0d0))
if (m <= (-5.2d-26)) then
tmp = a * (1.0d0 / (k * k))
else if (m <= (-2.3d-175)) then
tmp = t_0
else if (m <= (-2d-308)) then
tmp = 1.0d0 / (k * (k / a))
else if (m <= 2.3d-102) then
tmp = t_0
else if (m <= 210000.0d0) then
tmp = (a / k) * (1.0d0 / k)
else
tmp = (-10.0d0) * (k * a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double t_0 = a / (1.0 + (k * 10.0));
double tmp;
if (m <= -5.2e-26) {
tmp = a * (1.0 / (k * k));
} else if (m <= -2.3e-175) {
tmp = t_0;
} else if (m <= -2e-308) {
tmp = 1.0 / (k * (k / a));
} else if (m <= 2.3e-102) {
tmp = t_0;
} else if (m <= 210000.0) {
tmp = (a / k) * (1.0 / k);
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): t_0 = a / (1.0 + (k * 10.0)) tmp = 0 if m <= -5.2e-26: tmp = a * (1.0 / (k * k)) elif m <= -2.3e-175: tmp = t_0 elif m <= -2e-308: tmp = 1.0 / (k * (k / a)) elif m <= 2.3e-102: tmp = t_0 elif m <= 210000.0: tmp = (a / k) * (1.0 / k) else: tmp = -10.0 * (k * a) return tmp
function code(a, k, m) t_0 = Float64(a / Float64(1.0 + Float64(k * 10.0))) tmp = 0.0 if (m <= -5.2e-26) tmp = Float64(a * Float64(1.0 / Float64(k * k))); elseif (m <= -2.3e-175) tmp = t_0; elseif (m <= -2e-308) tmp = Float64(1.0 / Float64(k * Float64(k / a))); elseif (m <= 2.3e-102) tmp = t_0; elseif (m <= 210000.0) tmp = Float64(Float64(a / k) * Float64(1.0 / k)); else tmp = Float64(-10.0 * Float64(k * a)); end return tmp end
function tmp_2 = code(a, k, m) t_0 = a / (1.0 + (k * 10.0)); tmp = 0.0; if (m <= -5.2e-26) tmp = a * (1.0 / (k * k)); elseif (m <= -2.3e-175) tmp = t_0; elseif (m <= -2e-308) tmp = 1.0 / (k * (k / a)); elseif (m <= 2.3e-102) tmp = t_0; elseif (m <= 210000.0) tmp = (a / k) * (1.0 / k); else tmp = -10.0 * (k * a); end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(a / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -5.2e-26], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, -2.3e-175], t$95$0, If[LessEqual[m, -2e-308], N[(1.0 / N[(k * N[(k / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 2.3e-102], t$95$0, If[LessEqual[m, 210000.0], N[(N[(a / k), $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision], N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{a}{1 + k \cdot 10}\\
\mathbf{if}\;m \leq -5.2 \cdot 10^{-26}:\\
\;\;\;\;a \cdot \frac{1}{k \cdot k}\\
\mathbf{elif}\;m \leq -2.3 \cdot 10^{-175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;m \leq -2 \cdot 10^{-308}:\\
\;\;\;\;\frac{1}{k \cdot \frac{k}{a}}\\
\mathbf{elif}\;m \leq 2.3 \cdot 10^{-102}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;m \leq 210000:\\
\;\;\;\;\frac{a}{k} \cdot \frac{1}{k}\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -5.2000000000000002e-26Initial 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 36.0%
Taylor expanded in k around inf 65.9%
unpow265.9%
Simplified65.9%
if -5.2000000000000002e-26 < m < -2.3e-175 or -1.9999999999999998e-308 < m < 2.29999999999999987e-102Initial program 92.8%
associate-*r/92.8%
associate-+l+92.8%
+-commutative92.8%
distribute-rgt-out92.8%
fma-def92.8%
+-commutative92.8%
Simplified92.8%
Taylor expanded in m around 0 92.8%
Taylor expanded in k around 0 72.8%
*-commutative72.8%
Simplified72.8%
if -2.3e-175 < m < -1.9999999999999998e-308Initial program 83.4%
associate-*r/83.4%
associate-+l+83.4%
+-commutative83.4%
distribute-rgt-out83.4%
fma-def83.4%
+-commutative83.4%
Simplified83.4%
Taylor expanded in m around 0 83.4%
Taylor expanded in k around inf 61.2%
unpow261.2%
Simplified61.2%
clear-num61.1%
inv-pow61.1%
Applied egg-rr61.1%
unpow-161.1%
associate-/l*77.4%
Simplified77.4%
associate-/r/77.6%
Applied egg-rr77.6%
if 2.29999999999999987e-102 < m < 2.1e5Initial program 79.8%
associate-*r/79.8%
associate-+l+79.8%
+-commutative79.8%
distribute-rgt-out79.8%
fma-def79.8%
+-commutative79.8%
Simplified79.8%
Taylor expanded in m around 0 78.0%
Taylor expanded in k around inf 70.2%
unpow270.2%
Simplified70.2%
clear-num70.3%
inv-pow70.3%
Applied egg-rr70.3%
unpow-170.3%
associate-/l*78.0%
Simplified78.0%
inv-pow78.0%
associate-/r/78.0%
unpow-prod-down78.9%
inv-pow78.9%
clear-num78.9%
inv-pow78.9%
Applied egg-rr78.9%
if 2.1e5 < m Initial program 77.3%
associate-*r/77.3%
associate-+l+77.3%
+-commutative77.3%
distribute-rgt-out77.3%
fma-def77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in k around inf 21.7%
Final simplification53.6%
(FPCore (a k m)
:precision binary64
(let* ((t_0 (/ a (* k k))))
(if (<= m -1.6e-25)
t_0
(if (<= m -9.8e-178)
a
(if (<= m 1.05e-306)
t_0
(if (<= m 4.6e-102) a (if (<= m 19000.0) t_0 (* -10.0 (* k a)))))))))
double code(double a, double k, double m) {
double t_0 = a / (k * k);
double tmp;
if (m <= -1.6e-25) {
tmp = t_0;
} else if (m <= -9.8e-178) {
tmp = a;
} else if (m <= 1.05e-306) {
tmp = t_0;
} else if (m <= 4.6e-102) {
tmp = a;
} else if (m <= 19000.0) {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = a / (k * k)
if (m <= (-1.6d-25)) then
tmp = t_0
else if (m <= (-9.8d-178)) then
tmp = a
else if (m <= 1.05d-306) then
tmp = t_0
else if (m <= 4.6d-102) then
tmp = a
else if (m <= 19000.0d0) then
tmp = t_0
else
tmp = (-10.0d0) * (k * a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double t_0 = a / (k * k);
double tmp;
if (m <= -1.6e-25) {
tmp = t_0;
} else if (m <= -9.8e-178) {
tmp = a;
} else if (m <= 1.05e-306) {
tmp = t_0;
} else if (m <= 4.6e-102) {
tmp = a;
} else if (m <= 19000.0) {
tmp = t_0;
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): t_0 = a / (k * k) tmp = 0 if m <= -1.6e-25: tmp = t_0 elif m <= -9.8e-178: tmp = a elif m <= 1.05e-306: tmp = t_0 elif m <= 4.6e-102: tmp = a elif m <= 19000.0: tmp = t_0 else: tmp = -10.0 * (k * a) return tmp
function code(a, k, m) t_0 = Float64(a / Float64(k * k)) tmp = 0.0 if (m <= -1.6e-25) tmp = t_0; elseif (m <= -9.8e-178) tmp = a; elseif (m <= 1.05e-306) tmp = t_0; elseif (m <= 4.6e-102) tmp = a; elseif (m <= 19000.0) tmp = t_0; else tmp = Float64(-10.0 * Float64(k * a)); end return tmp end
function tmp_2 = code(a, k, m) t_0 = a / (k * k); tmp = 0.0; if (m <= -1.6e-25) tmp = t_0; elseif (m <= -9.8e-178) tmp = a; elseif (m <= 1.05e-306) tmp = t_0; elseif (m <= 4.6e-102) tmp = a; elseif (m <= 19000.0) tmp = t_0; else tmp = -10.0 * (k * a); end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -1.6e-25], t$95$0, If[LessEqual[m, -9.8e-178], a, If[LessEqual[m, 1.05e-306], t$95$0, If[LessEqual[m, 4.6e-102], a, If[LessEqual[m, 19000.0], t$95$0, N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{a}{k \cdot k}\\
\mathbf{if}\;m \leq -1.6 \cdot 10^{-25}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;m \leq -9.8 \cdot 10^{-178}:\\
\;\;\;\;a\\
\mathbf{elif}\;m \leq 1.05 \cdot 10^{-306}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;m \leq 4.6 \cdot 10^{-102}:\\
\;\;\;\;a\\
\mathbf{elif}\;m \leq 19000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -1.6000000000000001e-25 or -9.80000000000000041e-178 < m < 1.0500000000000001e-306 or 4.59999999999999973e-102 < m < 19000Initial program 95.4%
associate-*r/95.4%
associate-+l+95.4%
+-commutative95.4%
distribute-rgt-out95.4%
fma-def95.4%
+-commutative95.4%
Simplified95.4%
Taylor expanded in m around 0 48.0%
Taylor expanded in k around inf 66.0%
unpow266.0%
Simplified66.0%
if -1.6000000000000001e-25 < m < -9.80000000000000041e-178 or 1.0500000000000001e-306 < m < 4.59999999999999973e-102Initial program 92.7%
associate-*r/92.7%
associate-+l+92.7%
+-commutative92.7%
distribute-rgt-out92.7%
fma-def92.7%
+-commutative92.7%
Simplified92.7%
Taylor expanded in k around 0 67.4%
exp-to-pow67.4%
Simplified67.4%
Taylor expanded in m around 0 67.4%
if 19000 < m Initial program 77.3%
associate-*r/77.3%
associate-+l+77.3%
+-commutative77.3%
distribute-rgt-out77.3%
fma-def77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in k around inf 21.7%
Final simplification51.1%
(FPCore (a k m)
:precision binary64
(let* ((t_0 (/ a (* k k))))
(if (<= m -1.75e-25)
(* a (/ 1.0 (* k k)))
(if (<= m -5.1e-177)
a
(if (<= m 9.8e-308)
t_0
(if (<= m 4.3e-103) a (if (<= m 20000.0) t_0 (* -10.0 (* k a)))))))))
double code(double a, double k, double m) {
double t_0 = a / (k * k);
double tmp;
if (m <= -1.75e-25) {
tmp = a * (1.0 / (k * k));
} else if (m <= -5.1e-177) {
tmp = a;
} else if (m <= 9.8e-308) {
tmp = t_0;
} else if (m <= 4.3e-103) {
tmp = a;
} else if (m <= 20000.0) {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = a / (k * k)
if (m <= (-1.75d-25)) then
tmp = a * (1.0d0 / (k * k))
else if (m <= (-5.1d-177)) then
tmp = a
else if (m <= 9.8d-308) then
tmp = t_0
else if (m <= 4.3d-103) then
tmp = a
else if (m <= 20000.0d0) then
tmp = t_0
else
tmp = (-10.0d0) * (k * a)
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double t_0 = a / (k * k);
double tmp;
if (m <= -1.75e-25) {
tmp = a * (1.0 / (k * k));
} else if (m <= -5.1e-177) {
tmp = a;
} else if (m <= 9.8e-308) {
tmp = t_0;
} else if (m <= 4.3e-103) {
tmp = a;
} else if (m <= 20000.0) {
tmp = t_0;
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): t_0 = a / (k * k) tmp = 0 if m <= -1.75e-25: tmp = a * (1.0 / (k * k)) elif m <= -5.1e-177: tmp = a elif m <= 9.8e-308: tmp = t_0 elif m <= 4.3e-103: tmp = a elif m <= 20000.0: tmp = t_0 else: tmp = -10.0 * (k * a) return tmp
function code(a, k, m) t_0 = Float64(a / Float64(k * k)) tmp = 0.0 if (m <= -1.75e-25) tmp = Float64(a * Float64(1.0 / Float64(k * k))); elseif (m <= -5.1e-177) tmp = a; elseif (m <= 9.8e-308) tmp = t_0; elseif (m <= 4.3e-103) tmp = a; elseif (m <= 20000.0) tmp = t_0; else tmp = Float64(-10.0 * Float64(k * a)); end return tmp end
function tmp_2 = code(a, k, m) t_0 = a / (k * k); tmp = 0.0; if (m <= -1.75e-25) tmp = a * (1.0 / (k * k)); elseif (m <= -5.1e-177) tmp = a; elseif (m <= 9.8e-308) tmp = t_0; elseif (m <= 4.3e-103) tmp = a; elseif (m <= 20000.0) tmp = t_0; else tmp = -10.0 * (k * a); end tmp_2 = tmp; end
code[a_, k_, m_] := Block[{t$95$0 = N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[m, -1.75e-25], N[(a * N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, -5.1e-177], a, If[LessEqual[m, 9.8e-308], t$95$0, If[LessEqual[m, 4.3e-103], a, If[LessEqual[m, 20000.0], t$95$0, N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{a}{k \cdot k}\\
\mathbf{if}\;m \leq -1.75 \cdot 10^{-25}:\\
\;\;\;\;a \cdot \frac{1}{k \cdot k}\\
\mathbf{elif}\;m \leq -5.1 \cdot 10^{-177}:\\
\;\;\;\;a\\
\mathbf{elif}\;m \leq 9.8 \cdot 10^{-308}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;m \leq 4.3 \cdot 10^{-103}:\\
\;\;\;\;a\\
\mathbf{elif}\;m \leq 20000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -1.7500000000000001e-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 36.0%
Taylor expanded in k around inf 65.9%
unpow265.9%
Simplified65.9%
if -1.7500000000000001e-25 < m < -5.10000000000000008e-177 or 9.7999999999999997e-308 < m < 4.30000000000000023e-103Initial program 92.7%
associate-*r/92.7%
associate-+l+92.7%
+-commutative92.7%
distribute-rgt-out92.7%
fma-def92.7%
+-commutative92.7%
Simplified92.7%
Taylor expanded in k around 0 67.4%
exp-to-pow67.4%
Simplified67.4%
Taylor expanded in m around 0 67.4%
if -5.10000000000000008e-177 < m < 9.7999999999999997e-308 or 4.30000000000000023e-103 < m < 2e4Initial program 82.5%
associate-*r/82.5%
associate-+l+82.5%
+-commutative82.5%
distribute-rgt-out82.5%
fma-def82.5%
+-commutative82.5%
Simplified82.5%
Taylor expanded in m around 0 81.8%
Taylor expanded in k around inf 66.1%
unpow266.1%
Simplified66.1%
if 2e4 < m Initial program 77.3%
associate-*r/77.3%
associate-+l+77.3%
+-commutative77.3%
distribute-rgt-out77.3%
fma-def77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in k around inf 21.7%
Final simplification51.1%
(FPCore (a k m)
:precision binary64
(if (<= m -0.122)
(/ a (* k k))
(if (<= m 21000.0)
(* a (/ 1.0 (+ 1.0 (* k (+ k 10.0)))))
(* -10.0 (* k a)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -0.122) {
tmp = a / (k * k);
} else if (m <= 21000.0) {
tmp = a * (1.0 / (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.122d0)) then
tmp = a / (k * k)
else if (m <= 21000.0d0) then
tmp = a * (1.0d0 / (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.122) {
tmp = a / (k * k);
} else if (m <= 21000.0) {
tmp = a * (1.0 / (1.0 + (k * (k + 10.0))));
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -0.122: tmp = a / (k * k) elif m <= 21000.0: tmp = a * (1.0 / (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.122) tmp = Float64(a / Float64(k * k)); elseif (m <= 21000.0) tmp = Float64(a * Float64(1.0 / 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.122) tmp = a / (k * k); elseif (m <= 21000.0) tmp = a * (1.0 / (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.122], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 21000.0], N[(a * N[(1.0 / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -0.122:\\
\;\;\;\;\frac{a}{k \cdot k}\\
\mathbf{elif}\;m \leq 21000:\\
\;\;\;\;a \cdot \frac{1}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -0.122Initial 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 34.3%
Taylor expanded in k around inf 67.4%
unpow267.4%
Simplified67.4%
if -0.122 < m < 21000Initial program 89.7%
associate-*r/89.7%
associate-+l+89.7%
+-commutative89.7%
distribute-rgt-out89.7%
fma-def89.7%
+-commutative89.7%
Simplified89.7%
Taylor expanded in m around 0 86.7%
if 21000 < m Initial program 77.3%
associate-*r/77.3%
associate-+l+77.3%
+-commutative77.3%
distribute-rgt-out77.3%
fma-def77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in k around inf 21.7%
Final simplification58.4%
(FPCore (a k m) :precision binary64 (if (<= m -0.13) (/ a (* k k)) (if (<= m 20000.0) (/ a (+ 1.0 (* k (+ k 10.0)))) (* -10.0 (* k a)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -0.13) {
tmp = a / (k * k);
} else if (m <= 20000.0) {
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.13d0)) then
tmp = a / (k * k)
else if (m <= 20000.0d0) 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.13) {
tmp = a / (k * k);
} else if (m <= 20000.0) {
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.13: tmp = a / (k * k) elif m <= 20000.0: 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.13) tmp = Float64(a / Float64(k * k)); elseif (m <= 20000.0) 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.13) tmp = a / (k * k); elseif (m <= 20000.0) 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.13], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 20000.0], 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.13:\\
\;\;\;\;\frac{a}{k \cdot k}\\
\mathbf{elif}\;m \leq 20000:\\
\;\;\;\;\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.13Initial 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 34.3%
Taylor expanded in k around inf 67.4%
unpow267.4%
Simplified67.4%
if -0.13 < m < 2e4Initial program 89.7%
associate-*r/89.7%
associate-+l+89.7%
+-commutative89.7%
distribute-rgt-out89.7%
fma-def89.7%
+-commutative89.7%
Simplified89.7%
Taylor expanded in m around 0 86.7%
if 2e4 < m Initial program 77.3%
associate-*r/77.3%
associate-+l+77.3%
+-commutative77.3%
distribute-rgt-out77.3%
fma-def77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in k around inf 21.7%
Final simplification58.4%
(FPCore (a k m) :precision binary64 (if (<= m -0.47) (/ a (* k k)) (if (<= m 680000.0) (/ a (+ 1.0 (* k k))) (* -10.0 (* k a)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -0.47) {
tmp = a / (k * k);
} else if (m <= 680000.0) {
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.47d0)) then
tmp = a / (k * k)
else if (m <= 680000.0d0) 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.47) {
tmp = a / (k * k);
} else if (m <= 680000.0) {
tmp = a / (1.0 + (k * k));
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -0.47: tmp = a / (k * k) elif m <= 680000.0: 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.47) tmp = Float64(a / Float64(k * k)); elseif (m <= 680000.0) 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.47) tmp = a / (k * k); elseif (m <= 680000.0) 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.47], N[(a / N[(k * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 680000.0], 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.47:\\
\;\;\;\;\frac{a}{k \cdot k}\\
\mathbf{elif}\;m \leq 680000:\\
\;\;\;\;\frac{a}{1 + k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < -0.46999999999999997Initial 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 34.3%
Taylor expanded in k around inf 67.4%
unpow267.4%
Simplified67.4%
if -0.46999999999999997 < m < 6.8e5Initial program 89.7%
associate-*r/89.7%
associate-+l+89.7%
+-commutative89.7%
distribute-rgt-out89.7%
fma-def89.7%
+-commutative89.7%
Simplified89.7%
Taylor expanded in m around 0 86.7%
Taylor expanded in k around inf 86.0%
unpow286.0%
Simplified86.0%
if 6.8e5 < m Initial program 77.3%
associate-*r/77.3%
associate-+l+77.3%
+-commutative77.3%
distribute-rgt-out77.3%
fma-def77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in k around inf 21.7%
Final simplification58.2%
(FPCore (a k m) :precision binary64 (if (<= m 19000.0) a (* -10.0 (* k a))))
double code(double a, double k, double m) {
double tmp;
if (m <= 19000.0) {
tmp = a;
} 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 <= 19000.0d0) then
tmp = a
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 <= 19000.0) {
tmp = a;
} else {
tmp = -10.0 * (k * a);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 19000.0: tmp = a else: tmp = -10.0 * (k * a) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 19000.0) tmp = a; else tmp = Float64(-10.0 * Float64(k * a)); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 19000.0) tmp = a; else tmp = -10.0 * (k * a); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 19000.0], a, N[(-10.0 * N[(k * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 19000:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;-10 \cdot \left(k \cdot a\right)\\
\end{array}
\end{array}
if m < 19000Initial program 94.6%
associate-*r/94.6%
associate-+l+94.6%
+-commutative94.6%
distribute-rgt-out94.6%
fma-def94.6%
+-commutative94.6%
Simplified94.6%
Taylor expanded in k around 0 53.5%
exp-to-pow73.7%
Simplified73.7%
Taylor expanded in m around 0 27.2%
if 19000 < m Initial program 77.3%
associate-*r/77.3%
associate-+l+77.3%
+-commutative77.3%
distribute-rgt-out77.3%
fma-def77.3%
+-commutative77.3%
Simplified77.3%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 9.4%
*-commutative9.4%
Simplified9.4%
Taylor expanded in k around inf 21.7%
Final simplification25.3%
(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 88.6%
associate-*r/88.6%
associate-+l+88.6%
+-commutative88.6%
distribute-rgt-out88.6%
fma-def88.6%
+-commutative88.6%
Simplified88.6%
Taylor expanded in k around 0 50.3%
exp-to-pow82.8%
Simplified82.8%
Taylor expanded in m around 0 19.1%
Final simplification19.1%
herbie shell --seed 2023230
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))