Average Error: 0.1 → 0.1
Time: 19.5s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[(0.954929658551372 \cdot x + \left({x}^{3} \cdot \left(-0.12900613773279798\right)\right))_*\]
double f(double x) {
        double r779591 = 0.954929658551372;
        double r779592 = x;
        double r779593 = r779591 * r779592;
        double r779594 = 0.12900613773279798;
        double r779595 = r779592 * r779592;
        double r779596 = r779595 * r779592;
        double r779597 = r779594 * r779596;
        double r779598 = r779593 - r779597;
        return r779598;
}

double f(double x) {
        double r779599 = 0.954929658551372;
        double r779600 = x;
        double r779601 = 3.0;
        double r779602 = pow(r779600, r779601);
        double r779603 = 0.12900613773279798;
        double r779604 = -r779603;
        double r779605 = r779602 * r779604;
        double r779606 = fma(r779599, r779600, r779605);
        return r779606;
}

0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
(0.954929658551372 \cdot x + \left({x}^{3} \cdot \left(-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. Using strategy rm
  3. Applied pow10.1

    \[\leadsto 0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot \color{blue}{{x}^{1}}\right)\]
  4. Applied pow20.1

    \[\leadsto 0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\color{blue}{{x}^{2}} \cdot {x}^{1}\right)\]
  5. Applied pow-prod-up0.1

    \[\leadsto 0.954929658551372 \cdot x - 0.12900613773279798 \cdot \color{blue}{{x}^{\left(2 + 1\right)}}\]
  6. Simplified0.1

    \[\leadsto 0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{\color{blue}{3}}\]
  7. Using strategy rm
  8. Applied fma-neg0.1

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

    \[\leadsto (0.954929658551372 \cdot x + \left({x}^{3} \cdot \left(-0.12900613773279798\right)\right))_*\]

Reproduce

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