Average Error: 0.2 → 0.1
Time: 14.3s
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 r988475 = 0.954929658551372;
        double r988476 = x;
        double r988477 = r988475 * r988476;
        double r988478 = 0.12900613773279798;
        double r988479 = r988476 * r988476;
        double r988480 = r988479 * r988476;
        double r988481 = r988478 * r988480;
        double r988482 = r988477 - r988481;
        return r988482;
}

double f(double x) {
        double r988483 = 0.954929658551372;
        double r988484 = x;
        double r988485 = 0.12900613773279798;
        double r988486 = r988484 * r988485;
        double r988487 = r988486 * r988484;
        double r988488 = r988483 - r988487;
        double r988489 = r988488 * r988484;
        return r988489;
}

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 +o rules:numerics
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))