Average Error: 0.2 → 0.1
Time: 14.1s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot 0.9549296585513720181381813745247200131416 + \left(-0.1290061377327979819096270830414141528308 \cdot {x}^{3}\right)\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot 0.9549296585513720181381813745247200131416 + \left(-0.1290061377327979819096270830414141528308 \cdot {x}^{3}\right)
double f(double x) {
        double r49634 = 0.954929658551372;
        double r49635 = x;
        double r49636 = r49634 * r49635;
        double r49637 = 0.12900613773279798;
        double r49638 = r49635 * r49635;
        double r49639 = r49638 * r49635;
        double r49640 = r49637 * r49639;
        double r49641 = r49636 - r49640;
        return r49641;
}

double f(double x) {
        double r49642 = x;
        double r49643 = 0.954929658551372;
        double r49644 = r49642 * r49643;
        double r49645 = 0.12900613773279798;
        double r49646 = 3.0;
        double r49647 = pow(r49642, r49646);
        double r49648 = r49645 * r49647;
        double r49649 = -r49648;
        double r49650 = r49644 + r49649;
        return r49650;
}

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(-0.1290061377327979819096270830414141528308 \cdot {x}^{3}\right)}\]
  7. Final simplification0.1

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

Reproduce

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