Average Error: 1.9 → 1.8
Time: 5.1s
Precision: binary64
\[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\]
\[\frac{a}{\left(1 + k \cdot \left(k + 10\right)\right) \cdot {k}^{\left(-m\right)}}\]
\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}
\frac{a}{\left(1 + k \cdot \left(k + 10\right)\right) \cdot {k}^{\left(-m\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 (* (+ 1.0 (* k (+ k 10.0))) (pow k (- m)))))
double code(double a, double k, double m) {
	return (((double) (a * ((double) pow(k, m)))) / ((double) (((double) (1.0 + ((double) (10.0 * k)))) + ((double) (k * k)))));
}
double code(double a, double k, double m) {
	return (a / ((double) (((double) (1.0 + ((double) (k * ((double) (k + 10.0)))))) * ((double) pow(k, ((double) -(m)))))));
}

Error

Bits error versus a

Bits error versus k

Bits error versus m

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program Error: 1.9 bits

    \[\frac{a \cdot {k}^{m}}{\left(1 + 10 \cdot k\right) + k \cdot k}\]
  2. Using strategy rm
  3. Applied associate-/l*Error: 1.9 bits

    \[\leadsto \color{blue}{\frac{a}{\frac{\left(1 + 10 \cdot k\right) + k \cdot k}{{k}^{m}}}}\]
  4. SimplifiedError: 1.8 bits

    \[\leadsto \frac{a}{\color{blue}{\frac{1 + k \cdot \left(k + 10\right)}{{k}^{m}}}}\]
  5. Using strategy rm
  6. Applied div-invError: 1.8 bits

    \[\leadsto \frac{a}{\color{blue}{\left(1 + k \cdot \left(k + 10\right)\right) \cdot \frac{1}{{k}^{m}}}}\]
  7. SimplifiedError: 1.8 bits

    \[\leadsto \frac{a}{\left(1 + k \cdot \left(k + 10\right)\right) \cdot \color{blue}{{k}^{\left(-m\right)}}}\]
  8. Final simplificationError: 1.8 bits

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

Reproduce

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