Average Error: 0.1 → 0.1
Time: 13.7s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\mathsf{fma}\left(0.9549296585513720181381813745247200131416, x, {x}^{3} \cdot \left(-0.1290061377327979819096270830414141528308\right)\right)\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\mathsf{fma}\left(0.9549296585513720181381813745247200131416, x, {x}^{3} \cdot \left(-0.1290061377327979819096270830414141528308\right)\right)
double f(double x) {
        double r17366 = 0.954929658551372;
        double r17367 = x;
        double r17368 = r17366 * r17367;
        double r17369 = 0.12900613773279798;
        double r17370 = r17367 * r17367;
        double r17371 = r17370 * r17367;
        double r17372 = r17369 * r17371;
        double r17373 = r17368 - r17372;
        return r17373;
}

double f(double x) {
        double r17374 = 0.954929658551372;
        double r17375 = x;
        double r17376 = 3.0;
        double r17377 = pow(r17375, r17376);
        double r17378 = 0.12900613773279798;
        double r17379 = -r17378;
        double r17380 = r17377 * r17379;
        double r17381 = fma(r17374, r17375, r17380);
        return r17381;
}

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

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

Reproduce

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