Average Error: 0.2 → 0.1
Time: 21.0s
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 r20733 = 0.954929658551372;
        double r20734 = x;
        double r20735 = r20733 * r20734;
        double r20736 = 0.12900613773279798;
        double r20737 = r20734 * r20734;
        double r20738 = r20737 * r20734;
        double r20739 = r20736 * r20738;
        double r20740 = r20735 - r20739;
        return r20740;
}

double f(double x) {
        double r20741 = x;
        double r20742 = 0.954929658551372;
        double r20743 = r20741 * r20742;
        double r20744 = 0.12900613773279798;
        double r20745 = 3.0;
        double r20746 = pow(r20741, r20745);
        double r20747 = r20744 * r20746;
        double r20748 = -r20747;
        double r20749 = r20743 + r20748;
        return r20749;
}

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 2019303 
(FPCore (x)
  :name "Rosa's Benchmark"
  :precision binary64
  (- (* 0.95492965855137202 x) (* 0.129006137732797982 (* (* x x) x))))