Average Error: 0.1 → 0.1
Time: 13.2s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot \left(0.954929658551372 - \left(x \cdot x\right) \cdot 0.12900613773279798\right)\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot \left(0.954929658551372 - \left(x \cdot x\right) \cdot 0.12900613773279798\right)
double f(double x) {
        double r428574 = 0.954929658551372;
        double r428575 = x;
        double r428576 = r428574 * r428575;
        double r428577 = 0.12900613773279798;
        double r428578 = r428575 * r428575;
        double r428579 = r428578 * r428575;
        double r428580 = r428577 * r428579;
        double r428581 = r428576 - r428580;
        return r428581;
}

double f(double x) {
        double r428582 = x;
        double r428583 = 0.954929658551372;
        double r428584 = r428582 * r428582;
        double r428585 = 0.12900613773279798;
        double r428586 = r428584 * r428585;
        double r428587 = r428583 - r428586;
        double r428588 = r428582 * r428587;
        return r428588;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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}{x \cdot \left(0.954929658551372 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right)}\]
  3. Using strategy rm
  4. Applied *-commutative0.1

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

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

Reproduce

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