Average Error: 0.1 → 0.1
Time: 12.0s
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)\]
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)
double f(double x) {
        double r47463 = 0.954929658551372;
        double r47464 = x;
        double r47465 = r47463 * r47464;
        double r47466 = 0.12900613773279798;
        double r47467 = r47464 * r47464;
        double r47468 = r47467 * r47464;
        double r47469 = r47466 * r47468;
        double r47470 = r47465 - r47469;
        return r47470;
}

double f(double x) {
        double r47471 = 0.954929658551372;
        double r47472 = x;
        double r47473 = 0.12900613773279798;
        double r47474 = 3.0;
        double r47475 = pow(r47472, r47474);
        double r47476 = r47473 * r47475;
        double r47477 = -r47476;
        double r47478 = fma(r47471, r47472, r47477);
        return r47478;
}

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. Using strategy rm
  3. Applied fma-neg0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(0.9549296585513720181381813745247200131416, x, -0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)}\]
  4. Simplified0.1

    \[\leadsto \mathsf{fma}\left(0.9549296585513720181381813745247200131416, x, \color{blue}{-0.1290061377327979819096270830414141528308 \cdot {x}^{3}}\right)\]
  5. Using strategy rm
  6. Applied pow10.1

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

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

Reproduce

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