Average Error: 0.2 → 0.1
Time: 20.4s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(0.9549296585513720181381813745247200131416 - \left(x \cdot 0.1290061377327979819096270830414141528308\right) \cdot x\right) \cdot x\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(0.9549296585513720181381813745247200131416 - \left(x \cdot 0.1290061377327979819096270830414141528308\right) \cdot x\right) \cdot x
double f(double x) {
        double r1000515 = 0.954929658551372;
        double r1000516 = x;
        double r1000517 = r1000515 * r1000516;
        double r1000518 = 0.12900613773279798;
        double r1000519 = r1000516 * r1000516;
        double r1000520 = r1000519 * r1000516;
        double r1000521 = r1000518 * r1000520;
        double r1000522 = r1000517 - r1000521;
        return r1000522;
}

double f(double x) {
        double r1000523 = 0.954929658551372;
        double r1000524 = x;
        double r1000525 = 0.12900613773279798;
        double r1000526 = r1000524 * r1000525;
        double r1000527 = r1000526 * r1000524;
        double r1000528 = r1000523 - r1000527;
        double r1000529 = r1000528 * r1000524;
        return r1000529;
}

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.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Simplified0.1

    \[\leadsto \color{blue}{x \cdot \left(0.9549296585513720181381813745247200131416 - 0.1290061377327979819096270830414141528308 \cdot \left(x \cdot x\right)\right)}\]
  3. Using strategy rm
  4. Applied associate-*r*0.1

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

    \[\leadsto \left(0.9549296585513720181381813745247200131416 - \left(x \cdot 0.1290061377327979819096270830414141528308\right) \cdot x\right) \cdot x\]

Reproduce

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