Average Error: 0.1 → 0.1
Time: 24.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\right) \cdot \left(x \cdot x\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\right) \cdot \left(x \cdot x\right)
double f(double x) {
        double r18543 = 0.954929658551372;
        double r18544 = x;
        double r18545 = r18543 * r18544;
        double r18546 = 0.12900613773279798;
        double r18547 = r18544 * r18544;
        double r18548 = r18547 * r18544;
        double r18549 = r18546 * r18548;
        double r18550 = r18545 - r18549;
        return r18550;
}

double f(double x) {
        double r18551 = x;
        double r18552 = 0.954929658551372;
        double r18553 = r18551 * r18552;
        double r18554 = 0.12900613773279798;
        double r18555 = r18554 * r18551;
        double r18556 = r18551 * r18551;
        double r18557 = r18555 * r18556;
        double r18558 = r18553 - r18557;
        return r18558;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

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

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

    \[\leadsto \color{blue}{x \cdot 0.9549296585513720181381813745247200131416 - 0.1290061377327979819096270830414141528308 \cdot {x}^{3}}\]
  5. Using strategy rm
  6. Applied cube-mult0.1

    \[\leadsto x \cdot 0.9549296585513720181381813745247200131416 - 0.1290061377327979819096270830414141528308 \cdot \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)}\]
  7. Applied associate-*r*0.1

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

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

Reproduce

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