Average Error: 0.1 → 0.1
Time: 18.0s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(0.954929658551372 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot x\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(0.954929658551372 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot x
double f(double x) {
        double r990534 = 0.954929658551372;
        double r990535 = x;
        double r990536 = r990534 * r990535;
        double r990537 = 0.12900613773279798;
        double r990538 = r990535 * r990535;
        double r990539 = r990538 * r990535;
        double r990540 = r990537 * r990539;
        double r990541 = r990536 - r990540;
        return r990541;
}

double f(double x) {
        double r990542 = 0.954929658551372;
        double r990543 = 0.12900613773279798;
        double r990544 = x;
        double r990545 = r990544 * r990544;
        double r990546 = r990543 * r990545;
        double r990547 = r990542 - r990546;
        double r990548 = r990547 * r990544;
        return r990548;
}

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 - \left(0.12900613773279798 \cdot x\right) \cdot x\right)}\]
  3. Using strategy rm
  4. Applied associate-*l*0.1

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

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

Reproduce

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