Average Error: 0.2 → 0.1
Time: 15.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 r20603 = 0.954929658551372;
        double r20604 = x;
        double r20605 = r20603 * r20604;
        double r20606 = 0.12900613773279798;
        double r20607 = r20604 * r20604;
        double r20608 = r20607 * r20604;
        double r20609 = r20606 * r20608;
        double r20610 = r20605 - r20609;
        return r20610;
}

double f(double x) {
        double r20611 = 0.954929658551372;
        double r20612 = x;
        double r20613 = 0.12900613773279798;
        double r20614 = r20612 * r20613;
        double r20615 = r20614 * r20612;
        double r20616 = r20611 - r20615;
        double r20617 = r20616 * r20612;
        return r20617;
}

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. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot {x}^{3}}\]
  3. Simplified0.1

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

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

Reproduce

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