Average Error: 0.1 → 0.1
Time: 23.7s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(0.954929658551372 - \left(x \cdot 0.12900613773279798\right) \cdot x\right) \cdot x\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(0.954929658551372 - \left(x \cdot 0.12900613773279798\right) \cdot x\right) \cdot x
double f(double x) {
        double r923534 = 0.954929658551372;
        double r923535 = x;
        double r923536 = r923534 * r923535;
        double r923537 = 0.12900613773279798;
        double r923538 = r923535 * r923535;
        double r923539 = r923538 * r923535;
        double r923540 = r923537 * r923539;
        double r923541 = r923536 - r923540;
        return r923541;
}

double f(double x) {
        double r923542 = 0.954929658551372;
        double r923543 = x;
        double r923544 = 0.12900613773279798;
        double r923545 = r923543 * r923544;
        double r923546 = r923545 * r923543;
        double r923547 = r923542 - r923546;
        double r923548 = r923547 * r923543;
        return r923548;
}

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 associate-*r*0.1

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

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

Reproduce

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