Average Error: 0.2 → 0.1
Time: 14.0s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot 0.9549296585513720181381813745247200131416 + \left(-{x}^{3} \cdot 0.1290061377327979819096270830414141528308\right)\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot 0.9549296585513720181381813745247200131416 + \left(-{x}^{3} \cdot 0.1290061377327979819096270830414141528308\right)
double f(double x) {
        double r22586 = 0.954929658551372;
        double r22587 = x;
        double r22588 = r22586 * r22587;
        double r22589 = 0.12900613773279798;
        double r22590 = r22587 * r22587;
        double r22591 = r22590 * r22587;
        double r22592 = r22589 * r22591;
        double r22593 = r22588 - r22592;
        return r22593;
}

double f(double x) {
        double r22594 = x;
        double r22595 = 0.954929658551372;
        double r22596 = r22594 * r22595;
        double r22597 = 3.0;
        double r22598 = pow(r22594, r22597);
        double r22599 = 0.12900613773279798;
        double r22600 = r22598 * r22599;
        double r22601 = -r22600;
        double r22602 = r22596 + r22601;
        return r22602;
}

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 sub-neg0.1

    \[\leadsto x \cdot \color{blue}{\left(0.9549296585513720181381813745247200131416 + \left(-0.1290061377327979819096270830414141528308 \cdot \left(x \cdot x\right)\right)\right)}\]
  5. Applied distribute-lft-in0.1

    \[\leadsto \color{blue}{x \cdot 0.9549296585513720181381813745247200131416 + x \cdot \left(-0.1290061377327979819096270830414141528308 \cdot \left(x \cdot x\right)\right)}\]
  6. Simplified0.1

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

    \[\leadsto x \cdot 0.9549296585513720181381813745247200131416 + \left(-{x}^{3} \cdot 0.1290061377327979819096270830414141528308\right)\]

Reproduce

herbie shell --seed 2019209 +o rules:numerics
(FPCore (x)
  :name "Rosa's Benchmark"
  :precision binary64
  (- (* 0.95492965855137202 x) (* 0.129006137732797982 (* (* x x) x))))