Average Error: 0.1 → 0.1
Time: 55.4s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot \left(0.954929658551372 - x \cdot \left(x \cdot 0.12900613773279798\right)\right)\]
double f(double x) {
        double r3233585 = 0.954929658551372;
        double r3233586 = x;
        double r3233587 = r3233585 * r3233586;
        double r3233588 = 0.12900613773279798;
        double r3233589 = r3233586 * r3233586;
        double r3233590 = r3233589 * r3233586;
        double r3233591 = r3233588 * r3233590;
        double r3233592 = r3233587 - r3233591;
        return r3233592;
}

double f(double x) {
        double r3233593 = x;
        double r3233594 = 0.954929658551372;
        double r3233595 = 0.12900613773279798;
        double r3233596 = r3233593 * r3233595;
        double r3233597 = r3233593 * r3233596;
        double r3233598 = r3233594 - r3233597;
        double r3233599 = r3233593 * r3233598;
        return r3233599;
}

0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot \left(0.954929658551372 - x \cdot \left(x \cdot 0.12900613773279798\right)\right)

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\left(0.954929658551372 - \left(0.12900613773279798 \cdot x\right) \cdot x\right) \cdot x}\]
  3. Final simplification0.1

    \[\leadsto x \cdot \left(0.954929658551372 - x \cdot \left(x \cdot 0.12900613773279798\right)\right)\]

Reproduce

herbie shell --seed 2019101 +o rules:numerics
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))