Average Error: 0.2 → 0.1
Time: 7.7s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{3}\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{3}
double f(double x) {
        double r471625 = 0.954929658551372;
        double r471626 = x;
        double r471627 = r471625 * r471626;
        double r471628 = 0.12900613773279798;
        double r471629 = r471626 * r471626;
        double r471630 = r471629 * r471626;
        double r471631 = r471628 * r471630;
        double r471632 = r471627 - r471631;
        return r471632;
}

double f(double x) {
        double r471633 = 0.954929658551372;
        double r471634 = x;
        double r471635 = r471633 * r471634;
        double r471636 = 0.12900613773279798;
        double r471637 = 3.0;
        double r471638 = pow(r471634, r471637);
        double r471639 = r471636 * r471638;
        double r471640 = r471635 - r471639;
        return r471640;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Using strategy rm
  3. Applied pow10.2

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

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

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

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

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

    \[\leadsto 0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{\color{blue}{3}}\]
  9. Final simplification0.1

    \[\leadsto 0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{3}\]

Reproduce

herbie shell --seed 2019156 
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))