
(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 (if (<= m -3e-11) (* a (/ (pow k m) (+ 1.0 (* k 10.0)))) (if (<= m 1.1e-43) (/ a (+ 1.0 (* k (+ k 10.0)))) (* a (pow k m)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -3e-11) {
tmp = a * (pow(k, m) / (1.0 + (k * 10.0)));
} else if (m <= 1.1e-43) {
tmp = a / (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 <= (-3d-11)) then
tmp = a * ((k ** m) / (1.0d0 + (k * 10.0d0)))
else if (m <= 1.1d-43) then
tmp = a / (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 <= -3e-11) {
tmp = a * (Math.pow(k, m) / (1.0 + (k * 10.0)));
} else if (m <= 1.1e-43) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a * Math.pow(k, m);
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -3e-11: tmp = a * (math.pow(k, m) / (1.0 + (k * 10.0))) elif m <= 1.1e-43: tmp = a / (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 <= -3e-11) tmp = Float64(a * Float64((k ^ m) / Float64(1.0 + Float64(k * 10.0)))); elseif (m <= 1.1e-43) tmp = Float64(a / 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 <= -3e-11) tmp = a * ((k ^ m) / (1.0 + (k * 10.0))); elseif (m <= 1.1e-43) tmp = a / (1.0 + (k * (k + 10.0))); else tmp = a * (k ^ m); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -3e-11], N[(a * N[(N[Power[k, m], $MachinePrecision] / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.1e-43], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -3 \cdot 10^{-11}:\\
\;\;\;\;a \cdot \frac{{k}^{m}}{1 + k \cdot 10}\\
\mathbf{elif}\;m \leq 1.1 \cdot 10^{-43}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a \cdot {k}^{m}\\
\end{array}
\end{array}
if m < -3e-11Initial program 97.5%
associate-/l*97.5%
remove-double-neg97.5%
distribute-frac-neg297.5%
distribute-neg-frac297.5%
remove-double-neg97.5%
sqr-neg97.5%
associate-+l+97.5%
sqr-neg97.5%
distribute-rgt-out97.5%
Simplified97.5%
Taylor expanded in k around 0 97.5%
*-commutative97.5%
Simplified97.5%
if -3e-11 < m < 1.09999999999999999e-43Initial program 96.3%
associate-/l*96.3%
remove-double-neg96.3%
distribute-frac-neg296.3%
distribute-neg-frac296.3%
remove-double-neg96.3%
sqr-neg96.3%
associate-+l+96.3%
sqr-neg96.3%
distribute-rgt-out96.3%
Simplified96.3%
Taylor expanded in m around 0 96.3%
if 1.09999999999999999e-43 < m Initial program 74.5%
associate-/l*74.5%
remove-double-neg74.5%
distribute-frac-neg274.5%
distribute-neg-frac274.5%
remove-double-neg74.5%
sqr-neg74.5%
associate-+l+74.5%
sqr-neg74.5%
distribute-rgt-out74.5%
Simplified74.5%
Taylor expanded in k around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification98.1%
(FPCore (a k m) :precision binary64 (let* ((t_0 (* a (pow k m))) (t_1 (/ t_0 (+ (* k k) (+ 1.0 (* k 10.0)))))) (if (<= t_1 5e+247) t_1 t_0)))
double code(double a, double k, double m) {
double t_0 = a * pow(k, m);
double t_1 = t_0 / ((k * k) + (1.0 + (k * 10.0)));
double tmp;
if (t_1 <= 5e+247) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = a * (k ** m)
t_1 = t_0 / ((k * k) + (1.0d0 + (k * 10.0d0)))
if (t_1 <= 5d+247) then
tmp = t_1
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 t_1 = t_0 / ((k * k) + (1.0 + (k * 10.0)));
double tmp;
if (t_1 <= 5e+247) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, k, m): t_0 = a * math.pow(k, m) t_1 = t_0 / ((k * k) + (1.0 + (k * 10.0))) tmp = 0 if t_1 <= 5e+247: tmp = t_1 else: tmp = t_0 return tmp
function code(a, k, m) t_0 = Float64(a * (k ^ m)) t_1 = Float64(t_0 / Float64(Float64(k * k) + Float64(1.0 + Float64(k * 10.0)))) tmp = 0.0 if (t_1 <= 5e+247) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(a, k, m) t_0 = a * (k ^ m); t_1 = t_0 / ((k * k) + (1.0 + (k * 10.0))); tmp = 0.0; if (t_1 <= 5e+247) tmp = t_1; 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]}, Block[{t$95$1 = N[(t$95$0 / N[(N[(k * k), $MachinePrecision] + N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+247], t$95$1, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := a \cdot {k}^{m}\\
t_1 := \frac{t\_0}{k \cdot k + \left(1 + k \cdot 10\right)}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+247}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) < 5.00000000000000023e247Initial program 97.6%
if 5.00000000000000023e247 < (/.f64 (*.f64 a (pow.f64 k m)) (+.f64 (+.f64 #s(literal 1 binary64) (*.f64 #s(literal 10 binary64) k)) (*.f64 k k))) Initial program 55.9%
associate-/l*55.9%
remove-double-neg55.9%
distribute-frac-neg255.9%
distribute-neg-frac255.9%
remove-double-neg55.9%
sqr-neg55.9%
associate-+l+55.9%
sqr-neg55.9%
distribute-rgt-out55.9%
Simplified55.9%
Taylor expanded in k around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification98.1%
(FPCore (a k m) :precision binary64 (if (<= m 1.1e-43) (* 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 <= 1.1e-43) {
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 <= 1.1d-43) 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 <= 1.1e-43) {
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 <= 1.1e-43: 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 <= 1.1e-43) 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 <= 1.1e-43) 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, 1.1e-43], 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 1.1 \cdot 10^{-43}:\\
\;\;\;\;a \cdot \frac{{k}^{m}}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a \cdot {k}^{m}\\
\end{array}
\end{array}
if m < 1.09999999999999999e-43Initial program 96.9%
associate-/l*96.9%
remove-double-neg96.9%
distribute-frac-neg296.9%
distribute-neg-frac296.9%
remove-double-neg96.9%
sqr-neg96.9%
associate-+l+96.9%
sqr-neg96.9%
distribute-rgt-out96.9%
Simplified96.9%
if 1.09999999999999999e-43 < m Initial program 74.5%
associate-/l*74.5%
remove-double-neg74.5%
distribute-frac-neg274.5%
distribute-neg-frac274.5%
remove-double-neg74.5%
sqr-neg74.5%
associate-+l+74.5%
sqr-neg74.5%
distribute-rgt-out74.5%
Simplified74.5%
Taylor expanded in k around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification98.1%
(FPCore (a k m) :precision binary64 (if (or (<= m -0.0019) (not (<= m 1.1e-43))) (* a (pow k m)) (/ a (+ 1.0 (* k (+ k 10.0))))))
double code(double a, double k, double m) {
double tmp;
if ((m <= -0.0019) || !(m <= 1.1e-43)) {
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 <= (-0.0019d0)) .or. (.not. (m <= 1.1d-43))) 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 <= -0.0019) || !(m <= 1.1e-43)) {
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 <= -0.0019) or not (m <= 1.1e-43): 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 <= -0.0019) || !(m <= 1.1e-43)) 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 <= -0.0019) || ~((m <= 1.1e-43))) 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, -0.0019], N[Not[LessEqual[m, 1.1e-43]], $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 -0.0019 \lor \neg \left(m \leq 1.1 \cdot 10^{-43}\right):\\
\;\;\;\;a \cdot {k}^{m}\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\end{array}
\end{array}
if m < -0.0019 or 1.09999999999999999e-43 < m Initial program 85.2%
associate-/l*85.2%
remove-double-neg85.2%
distribute-frac-neg285.2%
distribute-neg-frac285.2%
remove-double-neg85.2%
sqr-neg85.2%
associate-+l+85.2%
sqr-neg85.2%
distribute-rgt-out85.2%
Simplified85.2%
Taylor expanded in k around 0 100.0%
*-commutative100.0%
Simplified100.0%
if -0.0019 < m < 1.09999999999999999e-43Initial program 94.0%
associate-/l*94.0%
remove-double-neg94.0%
distribute-frac-neg294.0%
distribute-neg-frac294.0%
remove-double-neg94.0%
sqr-neg94.0%
associate-+l+94.0%
sqr-neg94.0%
distribute-rgt-out94.0%
Simplified94.0%
Taylor expanded in m around 0 94.0%
Final simplification98.1%
(FPCore (a k m)
:precision binary64
(if (<= m -0.04)
(/ 0.1 (/ k a))
(if (<= m 380000000.0)
(/ a (+ 1.0 (* k 10.0)))
(+ a (* k (* 100.0 (* a k)))))))
double code(double a, double k, double m) {
double tmp;
if (m <= -0.04) {
tmp = 0.1 / (k / a);
} else if (m <= 380000000.0) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = a + (k * (100.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 <= (-0.04d0)) then
tmp = 0.1d0 / (k / a)
else if (m <= 380000000.0d0) then
tmp = a / (1.0d0 + (k * 10.0d0))
else
tmp = a + (k * (100.0d0 * (a * k)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -0.04) {
tmp = 0.1 / (k / a);
} else if (m <= 380000000.0) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = a + (k * (100.0 * (a * k)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -0.04: tmp = 0.1 / (k / a) elif m <= 380000000.0: tmp = a / (1.0 + (k * 10.0)) else: tmp = a + (k * (100.0 * (a * k))) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -0.04) tmp = Float64(0.1 / Float64(k / a)); elseif (m <= 380000000.0) tmp = Float64(a / Float64(1.0 + Float64(k * 10.0))); else tmp = Float64(a + Float64(k * Float64(100.0 * Float64(a * k)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -0.04) tmp = 0.1 / (k / a); elseif (m <= 380000000.0) tmp = a / (1.0 + (k * 10.0)); else tmp = a + (k * (100.0 * (a * k))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -0.04], N[(0.1 / N[(k / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 380000000.0], N[(a / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(k * N[(100.0 * N[(a * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -0.04:\\
\;\;\;\;\frac{0.1}{\frac{k}{a}}\\
\mathbf{elif}\;m \leq 380000000:\\
\;\;\;\;\frac{a}{1 + k \cdot 10}\\
\mathbf{else}:\\
\;\;\;\;a + k \cdot \left(100 \cdot \left(a \cdot k\right)\right)\\
\end{array}
\end{array}
if m < -0.0400000000000000008Initial 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 m around 0 39.3%
Taylor expanded in k around 0 18.4%
*-commutative100.0%
Simplified18.4%
Taylor expanded in k around inf 25.6%
clear-num25.7%
un-div-inv25.7%
Applied egg-rr25.7%
if -0.0400000000000000008 < m < 3.8e8Initial program 94.4%
associate-/l*94.4%
remove-double-neg94.4%
distribute-frac-neg294.4%
distribute-neg-frac294.4%
remove-double-neg94.4%
sqr-neg94.4%
associate-+l+94.4%
sqr-neg94.4%
distribute-rgt-out94.4%
Simplified94.4%
Taylor expanded in m around 0 92.8%
Taylor expanded in k around 0 63.2%
*-commutative64.9%
Simplified63.2%
if 3.8e8 < m Initial program 73.2%
associate-/l*73.2%
remove-double-neg73.2%
distribute-frac-neg273.2%
distribute-neg-frac273.2%
remove-double-neg73.2%
sqr-neg73.2%
associate-+l+73.2%
sqr-neg73.2%
distribute-rgt-out73.2%
Simplified73.2%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 2.7%
*-commutative71.1%
Simplified2.7%
Taylor expanded in k around 0 28.7%
Taylor expanded in k around inf 28.7%
(FPCore (a k m) :precision binary64 (if (<= m -0.47) (/ 0.1 (/ k a)) (if (<= m 1.12e+16) (/ a (+ 1.0 (* k 10.0))) (* a (+ 1.0 (* k -10.0))))))
double code(double a, double k, double m) {
double tmp;
if (m <= -0.47) {
tmp = 0.1 / (k / a);
} else if (m <= 1.12e+16) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = a * (1.0 + (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 <= (-0.47d0)) then
tmp = 0.1d0 / (k / a)
else if (m <= 1.12d+16) then
tmp = a / (1.0d0 + (k * 10.0d0))
else
tmp = a * (1.0d0 + (k * (-10.0d0)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -0.47) {
tmp = 0.1 / (k / a);
} else if (m <= 1.12e+16) {
tmp = a / (1.0 + (k * 10.0));
} else {
tmp = a * (1.0 + (k * -10.0));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -0.47: tmp = 0.1 / (k / a) elif m <= 1.12e+16: tmp = a / (1.0 + (k * 10.0)) else: tmp = a * (1.0 + (k * -10.0)) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -0.47) tmp = Float64(0.1 / Float64(k / a)); elseif (m <= 1.12e+16) tmp = Float64(a / Float64(1.0 + Float64(k * 10.0))); else tmp = Float64(a * Float64(1.0 + Float64(k * -10.0))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -0.47) tmp = 0.1 / (k / a); elseif (m <= 1.12e+16) tmp = a / (1.0 + (k * 10.0)); else tmp = a * (1.0 + (k * -10.0)); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -0.47], N[(0.1 / N[(k / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[m, 1.12e+16], N[(a / N[(1.0 + N[(k * 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 + N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -0.47:\\
\;\;\;\;\frac{0.1}{\frac{k}{a}}\\
\mathbf{elif}\;m \leq 1.12 \cdot 10^{+16}:\\
\;\;\;\;\frac{a}{1 + k \cdot 10}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + k \cdot -10\right)\\
\end{array}
\end{array}
if m < -0.46999999999999997Initial 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 m around 0 39.3%
Taylor expanded in k around 0 18.4%
*-commutative100.0%
Simplified18.4%
Taylor expanded in k around inf 25.6%
clear-num25.7%
un-div-inv25.7%
Applied egg-rr25.7%
if -0.46999999999999997 < m < 1.12e16Initial program 93.4%
associate-/l*93.4%
remove-double-neg93.4%
distribute-frac-neg293.4%
distribute-neg-frac293.4%
remove-double-neg93.4%
sqr-neg93.4%
associate-+l+93.4%
sqr-neg93.4%
distribute-rgt-out93.4%
Simplified93.4%
Taylor expanded in m around 0 89.7%
Taylor expanded in k around 0 61.2%
*-commutative64.9%
Simplified61.2%
if 1.12e16 < m Initial program 73.4%
associate-/l*73.4%
remove-double-neg73.4%
distribute-frac-neg273.4%
distribute-neg-frac273.4%
remove-double-neg73.4%
sqr-neg73.4%
associate-+l+73.4%
sqr-neg73.4%
distribute-rgt-out73.4%
Simplified73.4%
Taylor expanded in m around 0 2.9%
Taylor expanded in k around 0 12.2%
Final simplification32.9%
(FPCore (a k m) :precision binary64 (if (<= m 2.2) (/ a (+ 1.0 (* k (+ k 10.0)))) (+ a (* a (* k (- (* k 100.0) 10.0))))))
double code(double a, double k, double m) {
double tmp;
if (m <= 2.2) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a + (a * (k * ((k * 100.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 <= 2.2d0) then
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
else
tmp = a + (a * (k * ((k * 100.0d0) - 10.0d0)))
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 + 10.0)));
} else {
tmp = a + (a * (k * ((k * 100.0) - 10.0)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 2.2: tmp = a / (1.0 + (k * (k + 10.0))) else: tmp = a + (a * (k * ((k * 100.0) - 10.0))) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 2.2) tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); else tmp = Float64(a + Float64(a * Float64(k * Float64(Float64(k * 100.0) - 10.0)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 2.2) tmp = a / (1.0 + (k * (k + 10.0))); else tmp = a + (a * (k * ((k * 100.0) - 10.0))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 2.2], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(a * N[(k * N[(N[(k * 100.0), $MachinePrecision] - 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 2.2:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a + a \cdot \left(k \cdot \left(k \cdot 100 - 10\right)\right)\\
\end{array}
\end{array}
if m < 2.2000000000000002Initial program 97.0%
associate-/l*97.0%
remove-double-neg97.0%
distribute-frac-neg297.0%
distribute-neg-frac297.0%
remove-double-neg97.0%
sqr-neg97.0%
associate-+l+97.0%
sqr-neg97.0%
distribute-rgt-out97.0%
Simplified97.0%
Taylor expanded in m around 0 68.3%
if 2.2000000000000002 < m Initial program 73.5%
associate-/l*73.5%
remove-double-neg73.5%
distribute-frac-neg273.5%
distribute-neg-frac273.5%
remove-double-neg73.5%
sqr-neg73.5%
associate-+l+73.5%
sqr-neg73.5%
distribute-rgt-out73.5%
Simplified73.5%
Taylor expanded in m around 0 2.8%
Taylor expanded in k around 0 2.7%
*-commutative71.4%
Simplified2.7%
Taylor expanded in k around 0 28.5%
Taylor expanded in a around 0 33.3%
Final simplification54.9%
(FPCore (a k m) :precision binary64 (if (<= m 1.1e-43) (/ a (+ 1.0 (* k (+ k 10.0)))) (* a (+ 1.0 (* k (- (* k 99.0) 10.0))))))
double code(double a, double k, double m) {
double tmp;
if (m <= 1.1e-43) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a * (1.0 + (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.1d-43) then
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
else
tmp = a * (1.0d0 + (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.1e-43) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a * (1.0 + (k * ((k * 99.0) - 10.0)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 1.1e-43: tmp = a / (1.0 + (k * (k + 10.0))) else: tmp = a * (1.0 + (k * ((k * 99.0) - 10.0))) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 1.1e-43) tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); else tmp = Float64(a * Float64(1.0 + 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.1e-43) tmp = a / (1.0 + (k * (k + 10.0))); else tmp = a * (1.0 + (k * ((k * 99.0) - 10.0))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 1.1e-43], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 + 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.1 \cdot 10^{-43}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + k \cdot \left(k \cdot 99 - 10\right)\right)\\
\end{array}
\end{array}
if m < 1.09999999999999999e-43Initial program 96.9%
associate-/l*96.9%
remove-double-neg96.9%
distribute-frac-neg296.9%
distribute-neg-frac296.9%
remove-double-neg96.9%
sqr-neg96.9%
associate-+l+96.9%
sqr-neg96.9%
distribute-rgt-out96.9%
Simplified96.9%
Taylor expanded in m around 0 67.7%
if 1.09999999999999999e-43 < m Initial program 74.5%
associate-/l*74.5%
remove-double-neg74.5%
distribute-frac-neg274.5%
distribute-neg-frac274.5%
remove-double-neg74.5%
sqr-neg74.5%
associate-+l+74.5%
sqr-neg74.5%
distribute-rgt-out74.5%
Simplified74.5%
Taylor expanded in m around 0 6.2%
Taylor expanded in k around 0 35.5%
Final simplification54.9%
(FPCore (a k m) :precision binary64 (if (<= m 1.1e-43) (/ a (+ 1.0 (* k (+ k 10.0)))) (+ a (* k (* 100.0 (* a k))))))
double code(double a, double k, double m) {
double tmp;
if (m <= 1.1e-43) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a + (k * (100.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.1d-43) then
tmp = a / (1.0d0 + (k * (k + 10.0d0)))
else
tmp = a + (k * (100.0d0 * (a * k)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= 1.1e-43) {
tmp = a / (1.0 + (k * (k + 10.0)));
} else {
tmp = a + (k * (100.0 * (a * k)));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= 1.1e-43: tmp = a / (1.0 + (k * (k + 10.0))) else: tmp = a + (k * (100.0 * (a * k))) return tmp
function code(a, k, m) tmp = 0.0 if (m <= 1.1e-43) tmp = Float64(a / Float64(1.0 + Float64(k * Float64(k + 10.0)))); else tmp = Float64(a + Float64(k * Float64(100.0 * Float64(a * k)))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= 1.1e-43) tmp = a / (1.0 + (k * (k + 10.0))); else tmp = a + (k * (100.0 * (a * k))); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, 1.1e-43], N[(a / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(k * N[(100.0 * N[(a * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq 1.1 \cdot 10^{-43}:\\
\;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\
\mathbf{else}:\\
\;\;\;\;a + k \cdot \left(100 \cdot \left(a \cdot k\right)\right)\\
\end{array}
\end{array}
if m < 1.09999999999999999e-43Initial program 96.9%
associate-/l*96.9%
remove-double-neg96.9%
distribute-frac-neg296.9%
distribute-neg-frac296.9%
remove-double-neg96.9%
sqr-neg96.9%
associate-+l+96.9%
sqr-neg96.9%
distribute-rgt-out96.9%
Simplified96.9%
Taylor expanded in m around 0 67.7%
if 1.09999999999999999e-43 < m Initial program 74.5%
associate-/l*74.5%
remove-double-neg74.5%
distribute-frac-neg274.5%
distribute-neg-frac274.5%
remove-double-neg74.5%
sqr-neg74.5%
associate-+l+74.5%
sqr-neg74.5%
distribute-rgt-out74.5%
Simplified74.5%
Taylor expanded in m around 0 6.2%
Taylor expanded in k around 0 6.2%
*-commutative72.5%
Simplified6.2%
Taylor expanded in k around 0 30.9%
Taylor expanded in k around inf 30.9%
Final simplification53.1%
(FPCore (a k m) :precision binary64 (if (<= k 0.076) (* a (+ 1.0 (* k -10.0))) (/ 1.0 (/ k (* a 0.1)))))
double code(double a, double k, double m) {
double tmp;
if (k <= 0.076) {
tmp = a * (1.0 + (k * -10.0));
} else {
tmp = 1.0 / (k / (a * 0.1));
}
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 <= 0.076d0) then
tmp = a * (1.0d0 + (k * (-10.0d0)))
else
tmp = 1.0d0 / (k / (a * 0.1d0))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (k <= 0.076) {
tmp = a * (1.0 + (k * -10.0));
} else {
tmp = 1.0 / (k / (a * 0.1));
}
return tmp;
}
def code(a, k, m): tmp = 0 if k <= 0.076: tmp = a * (1.0 + (k * -10.0)) else: tmp = 1.0 / (k / (a * 0.1)) return tmp
function code(a, k, m) tmp = 0.0 if (k <= 0.076) tmp = Float64(a * Float64(1.0 + Float64(k * -10.0))); else tmp = Float64(1.0 / Float64(k / Float64(a * 0.1))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (k <= 0.076) tmp = a * (1.0 + (k * -10.0)); else tmp = 1.0 / (k / (a * 0.1)); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[k, 0.076], N[(a * N[(1.0 + N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(k / N[(a * 0.1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 0.076:\\
\;\;\;\;a \cdot \left(1 + k \cdot -10\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{k}{a \cdot 0.1}}\\
\end{array}
\end{array}
if k < 0.0759999999999999981Initial program 91.2%
associate-/l*91.2%
remove-double-neg91.2%
distribute-frac-neg291.2%
distribute-neg-frac291.2%
remove-double-neg91.2%
sqr-neg91.2%
associate-+l+91.2%
sqr-neg91.2%
distribute-rgt-out91.2%
Simplified91.2%
Taylor expanded in m around 0 34.3%
Taylor expanded in k around 0 32.5%
if 0.0759999999999999981 < k Initial program 81.5%
associate-/l*81.5%
remove-double-neg81.5%
distribute-frac-neg281.5%
distribute-neg-frac281.5%
remove-double-neg81.5%
sqr-neg81.5%
associate-+l+81.5%
sqr-neg81.5%
distribute-rgt-out81.5%
Simplified81.5%
Taylor expanded in m around 0 61.2%
Taylor expanded in k around 0 23.1%
*-commutative65.2%
Simplified23.1%
Taylor expanded in k around inf 23.1%
associate-*r/23.1%
clear-num24.0%
Applied egg-rr24.0%
Final simplification29.6%
(FPCore (a k m) :precision binary64 (if (<= m -2.4e-32) (/ 0.1 (/ k a)) (* a (+ 1.0 (* k -10.0)))))
double code(double a, double k, double m) {
double tmp;
if (m <= -2.4e-32) {
tmp = 0.1 / (k / a);
} else {
tmp = a * (1.0 + (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.4d-32)) then
tmp = 0.1d0 / (k / a)
else
tmp = a * (1.0d0 + (k * (-10.0d0)))
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -2.4e-32) {
tmp = 0.1 / (k / a);
} else {
tmp = a * (1.0 + (k * -10.0));
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -2.4e-32: tmp = 0.1 / (k / a) else: tmp = a * (1.0 + (k * -10.0)) return tmp
function code(a, k, m) tmp = 0.0 if (m <= -2.4e-32) tmp = Float64(0.1 / Float64(k / a)); else tmp = Float64(a * Float64(1.0 + Float64(k * -10.0))); end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -2.4e-32) tmp = 0.1 / (k / a); else tmp = a * (1.0 + (k * -10.0)); end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -2.4e-32], N[(0.1 / N[(k / a), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 + N[(k * -10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -2.4 \cdot 10^{-32}:\\
\;\;\;\;\frac{0.1}{\frac{k}{a}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + k \cdot -10\right)\\
\end{array}
\end{array}
if m < -2.4000000000000001e-32Initial program 97.5%
associate-/l*97.5%
remove-double-neg97.5%
distribute-frac-neg297.5%
distribute-neg-frac297.5%
remove-double-neg97.5%
sqr-neg97.5%
associate-+l+97.5%
sqr-neg97.5%
distribute-rgt-out97.5%
Simplified97.5%
Taylor expanded in m around 0 40.0%
Taylor expanded in k around 0 20.2%
*-commutative97.5%
Simplified20.2%
Taylor expanded in k around inf 26.9%
clear-num27.1%
un-div-inv27.1%
Applied egg-rr27.1%
if -2.4000000000000001e-32 < m Initial program 83.8%
associate-/l*83.8%
remove-double-neg83.8%
distribute-frac-neg283.8%
distribute-neg-frac283.8%
remove-double-neg83.8%
sqr-neg83.8%
associate-+l+83.8%
sqr-neg83.8%
distribute-rgt-out83.8%
Simplified83.8%
Taylor expanded in m around 0 44.7%
Taylor expanded in k around 0 30.7%
Final simplification29.6%
(FPCore (a k m) :precision binary64 (if (<= m -2.2e-32) (/ 0.1 (/ k a)) a))
double code(double a, double k, double m) {
double tmp;
if (m <= -2.2e-32) {
tmp = 0.1 / (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 (m <= (-2.2d-32)) then
tmp = 0.1d0 / (k / a)
else
tmp = a
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -2.2e-32) {
tmp = 0.1 / (k / a);
} else {
tmp = a;
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -2.2e-32: tmp = 0.1 / (k / a) else: tmp = a return tmp
function code(a, k, m) tmp = 0.0 if (m <= -2.2e-32) tmp = Float64(0.1 / Float64(k / a)); else tmp = a; end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -2.2e-32) tmp = 0.1 / (k / a); else tmp = a; end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -2.2e-32], N[(0.1 / N[(k / a), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -2.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{0.1}{\frac{k}{a}}\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if m < -2.2e-32Initial program 97.5%
associate-/l*97.5%
remove-double-neg97.5%
distribute-frac-neg297.5%
distribute-neg-frac297.5%
remove-double-neg97.5%
sqr-neg97.5%
associate-+l+97.5%
sqr-neg97.5%
distribute-rgt-out97.5%
Simplified97.5%
Taylor expanded in m around 0 40.0%
Taylor expanded in k around 0 20.2%
*-commutative97.5%
Simplified20.2%
Taylor expanded in k around inf 26.9%
clear-num27.1%
un-div-inv27.1%
Applied egg-rr27.1%
if -2.2e-32 < m Initial program 83.8%
associate-/l*83.8%
remove-double-neg83.8%
distribute-frac-neg283.8%
distribute-neg-frac283.8%
remove-double-neg83.8%
sqr-neg83.8%
associate-+l+83.8%
sqr-neg83.8%
distribute-rgt-out83.8%
Simplified83.8%
Taylor expanded in m around 0 44.7%
Taylor expanded in k around 0 26.6%
(FPCore (a k m) :precision binary64 (if (<= m -2.2e-32) (* 0.1 (/ a k)) a))
double code(double a, double k, double m) {
double tmp;
if (m <= -2.2e-32) {
tmp = 0.1 * (a / 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 (m <= (-2.2d-32)) then
tmp = 0.1d0 * (a / k)
else
tmp = a
end if
code = tmp
end function
public static double code(double a, double k, double m) {
double tmp;
if (m <= -2.2e-32) {
tmp = 0.1 * (a / k);
} else {
tmp = a;
}
return tmp;
}
def code(a, k, m): tmp = 0 if m <= -2.2e-32: tmp = 0.1 * (a / k) else: tmp = a return tmp
function code(a, k, m) tmp = 0.0 if (m <= -2.2e-32) tmp = Float64(0.1 * Float64(a / k)); else tmp = a; end return tmp end
function tmp_2 = code(a, k, m) tmp = 0.0; if (m <= -2.2e-32) tmp = 0.1 * (a / k); else tmp = a; end tmp_2 = tmp; end
code[a_, k_, m_] := If[LessEqual[m, -2.2e-32], N[(0.1 * N[(a / k), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;m \leq -2.2 \cdot 10^{-32}:\\
\;\;\;\;0.1 \cdot \frac{a}{k}\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if m < -2.2e-32Initial program 97.5%
associate-/l*97.5%
remove-double-neg97.5%
distribute-frac-neg297.5%
distribute-neg-frac297.5%
remove-double-neg97.5%
sqr-neg97.5%
associate-+l+97.5%
sqr-neg97.5%
distribute-rgt-out97.5%
Simplified97.5%
Taylor expanded in m around 0 40.0%
Taylor expanded in k around 0 20.2%
*-commutative97.5%
Simplified20.2%
Taylor expanded in k around inf 26.9%
if -2.2e-32 < m Initial program 83.8%
associate-/l*83.8%
remove-double-neg83.8%
distribute-frac-neg283.8%
distribute-neg-frac283.8%
remove-double-neg83.8%
sqr-neg83.8%
associate-+l+83.8%
sqr-neg83.8%
distribute-rgt-out83.8%
Simplified83.8%
Taylor expanded in m around 0 44.7%
Taylor expanded in k around 0 26.6%
(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.0%
associate-/l*88.0%
remove-double-neg88.0%
distribute-frac-neg288.0%
distribute-neg-frac288.0%
remove-double-neg88.0%
sqr-neg88.0%
associate-+l+88.0%
sqr-neg88.0%
distribute-rgt-out88.0%
Simplified88.0%
Taylor expanded in m around 0 43.2%
Taylor expanded in k around 0 19.7%
herbie shell --seed 2024087
(FPCore (a k m)
:name "Falkner and Boettcher, Appendix A"
:precision binary64
(/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))