Average Error: 0.1 → 0.1
Time: 14.4s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\mathsf{fma}\left(0.9549296585513720181381813745247200131416, x, -0.1290061377327979819096270830414141528308 \cdot {x}^{3}\right) + \mathsf{fma}\left(-0.1290061377327979819096270830414141528308, {x}^{3}, 0.1290061377327979819096270830414141528308 \cdot {x}^{3}\right)\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\mathsf{fma}\left(0.9549296585513720181381813745247200131416, x, -0.1290061377327979819096270830414141528308 \cdot {x}^{3}\right) + \mathsf{fma}\left(-0.1290061377327979819096270830414141528308, {x}^{3}, 0.1290061377327979819096270830414141528308 \cdot {x}^{3}\right)
double f(double x) {
        double r1255255 = 0.954929658551372;
        double r1255256 = x;
        double r1255257 = r1255255 * r1255256;
        double r1255258 = 0.12900613773279798;
        double r1255259 = r1255256 * r1255256;
        double r1255260 = r1255259 * r1255256;
        double r1255261 = r1255258 * r1255260;
        double r1255262 = r1255257 - r1255261;
        return r1255262;
}

double f(double x) {
        double r1255263 = 0.954929658551372;
        double r1255264 = x;
        double r1255265 = 0.12900613773279798;
        double r1255266 = 3.0;
        double r1255267 = pow(r1255264, r1255266);
        double r1255268 = r1255265 * r1255267;
        double r1255269 = -r1255268;
        double r1255270 = fma(r1255263, r1255264, r1255269);
        double r1255271 = -r1255265;
        double r1255272 = fma(r1255271, r1255267, r1255268);
        double r1255273 = r1255270 + r1255272;
        return r1255273;
}

Error

Bits error versus x

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}{0.9549296585513720181381813745247200131416 \cdot x - \left(\left(x \cdot x\right) \cdot x\right) \cdot 0.1290061377327979819096270830414141528308}\]
  5. Using strategy rm
  6. Applied pow10.1

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x - \left(\left(x \cdot x\right) \cdot \color{blue}{{x}^{1}}\right) \cdot 0.1290061377327979819096270830414141528308\]
  7. Applied pow10.1

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

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x - \left(\left(\color{blue}{{x}^{1}} \cdot {x}^{1}\right) \cdot {x}^{1}\right) \cdot 0.1290061377327979819096270830414141528308\]
  9. Applied pow-prod-up0.1

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x - \left(\color{blue}{{x}^{\left(1 + 1\right)}} \cdot {x}^{1}\right) \cdot 0.1290061377327979819096270830414141528308\]
  10. Applied pow-prod-up0.1

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

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x - {x}^{\color{blue}{3}} \cdot 0.1290061377327979819096270830414141528308\]
  12. Using strategy rm
  13. Applied prod-diff0.1

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

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

Reproduce

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