?

Average Error: 2.2 → 2.2
Time: 13.6s
Precision: binary64
Cost: 7168

?

\[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
\[\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)} \]
(FPCore (a k m)
 :precision binary64
 (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))
(FPCore (a k m)
 :precision binary64
 (/ (* a (pow k m)) (+ 1.0 (* k (+ k 10.0)))))
double code(double a, double k, double m) {
	return (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 + (k * (k + 10.0)));
}
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
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 + (k * (k + 10.0d0)))
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));
}
public static double code(double a, double k, double m) {
	return (a * Math.pow(k, m)) / (1.0 + (k * (k + 10.0)));
}
def code(a, k, 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 + (k * (k + 10.0)))
function code(a, k, m)
	return Float64(Float64(a * (k ^ m)) / Float64(Float64(1.0 + Float64(10.0 * k)) + Float64(k * k)))
end
function code(a, k, m)
	return Float64(Float64(a * (k ^ m)) / Float64(1.0 + Float64(k * Float64(k + 10.0))))
end
function tmp = code(a, k, m)
	tmp = (a * (k ^ m)) / ((1.0 + (10.0 * k)) + (k * k));
end
function tmp = code(a, k, m)
	tmp = (a * (k ^ m)) / (1.0 + (k * (k + 10.0)));
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]
code[a_, k_, m_] := N[(N[(a * N[Power[k, m], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(k * N[(k + 10.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 2.2

    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]
  2. Simplified2.2

    \[\leadsto \color{blue}{\frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)}} \]
    Proof

    [Start]2.2

    \[ \frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k} \]

    rational_best_oopsla_all_46_json_45_simplify-35 [=>]2.2

    \[ \frac{a \cdot {k}^{m}}{\color{blue}{k \cdot k + \left(1 + 10 \cdot k\right)}} \]

    rational_best_oopsla_all_46_json_45_simplify-82 [=>]2.2

    \[ \frac{a \cdot {k}^{m}}{\color{blue}{1 + \left(k \cdot k + 10 \cdot k\right)}} \]

    rational_best_oopsla_all_46_json_45_simplify-74 [=>]2.2

    \[ \frac{a \cdot {k}^{m}}{1 + \left(k \cdot k + \color{blue}{k \cdot 10}\right)} \]

    rational_best_oopsla_all_46_json_45_simplify-23 [=>]2.2

    \[ \frac{a \cdot {k}^{m}}{1 + \color{blue}{k \cdot \left(k + 10\right)}} \]
  3. Final simplification2.2

    \[\leadsto \frac{a \cdot {k}^{m}}{1 + k \cdot \left(k + 10\right)} \]

Alternatives

Alternative 1
Error3.0
Cost7304
\[\begin{array}{l} t_0 := a \cdot {k}^{m}\\ \mathbf{if}\;m \leq -7.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{t_0}{1}\\ \mathbf{elif}\;m \leq 1.5 \cdot 10^{-29}:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{1 + k \cdot 10}\\ \end{array} \]
Alternative 2
Error2.7
Cost7048
\[\begin{array}{l} t_0 := \frac{a \cdot {k}^{m}}{1}\\ \mathbf{if}\;m \leq -7.8 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;m \leq 1.8 \cdot 10^{-6}:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error16.8
Cost1988
\[\begin{array}{l} t_0 := -10 \cdot \left(k \cdot a\right)\\ t_1 := \frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{if}\;m \leq -2:\\ \;\;\;\;t_1 \cdot \left(t_1 \cdot \frac{1}{a + t_0}\right)\\ \mathbf{elif}\;m \leq 0.5:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error16.8
Cost1732
\[\begin{array}{l} t_0 := \frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{if}\;m \leq -1.45:\\ \;\;\;\;t_0 \cdot \left(t_0 \cdot \frac{-0.1}{k \cdot a}\right)\\ \mathbf{elif}\;m \leq 0.5:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;-10 \cdot \left(k \cdot a\right)\\ \end{array} \]
Alternative 5
Error18.2
Cost1348
\[\begin{array}{l} t_0 := 1 + k \cdot \left(k + 10\right)\\ t_1 := \frac{a}{t_0}\\ \mathbf{if}\;m \leq -0.88:\\ \;\;\;\;t_1 \cdot \frac{1}{t_0}\\ \mathbf{elif}\;m \leq 4.5:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-10 \cdot \left(k \cdot a\right)\\ \end{array} \]
Alternative 6
Error37.6
Cost844
\[\begin{array}{l} t_0 := 0.1 \cdot \frac{a}{k}\\ \mathbf{if}\;k \leq -0.1:\\ \;\;\;\;t_0\\ \mathbf{elif}\;k \leq 3.6 \cdot 10^{-307}:\\ \;\;\;\;-10 \cdot \left(k \cdot a\right)\\ \mathbf{elif}\;k \leq 0.075:\\ \;\;\;\;\left(1 - k \cdot 10\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error37.8
Cost716
\[\begin{array}{l} t_0 := 0.1 \cdot \frac{a}{k}\\ \mathbf{if}\;k \leq -0.1:\\ \;\;\;\;t_0\\ \mathbf{elif}\;k \leq 6.5 \cdot 10^{-307}:\\ \;\;\;\;-10 \cdot \left(k \cdot a\right)\\ \mathbf{elif}\;k \leq 0.1:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error20.2
Cost708
\[\begin{array}{l} \mathbf{if}\;m \leq 0.88:\\ \;\;\;\;\frac{a}{1 + k \cdot \left(k + 10\right)}\\ \mathbf{else}:\\ \;\;\;\;-10 \cdot \left(k \cdot a\right)\\ \end{array} \]
Alternative 9
Error35.7
Cost580
\[\begin{array}{l} \mathbf{if}\;m \leq 1.4:\\ \;\;\;\;\frac{a}{1 + k \cdot 10}\\ \mathbf{else}:\\ \;\;\;\;-10 \cdot \left(k \cdot a\right)\\ \end{array} \]
Alternative 10
Error43.6
Cost452
\[\begin{array}{l} \mathbf{if}\;m \leq 0.085:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;-10 \cdot \left(k \cdot a\right)\\ \end{array} \]
Alternative 11
Error47.2
Cost64
\[a \]

Error

Reproduce?

herbie shell --seed 2023090 
(FPCore (a k m)
  :name "Falkner and Boettcher, Appendix A"
  :precision binary64
  (/ (* a (pow k m)) (+ (+ 1.0 (* 10.0 k)) (* k k))))