Average Error: 0.1 → 0.1
Time: 13.6s
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 r17324 = 0.954929658551372;
        double r17325 = x;
        double r17326 = r17324 * r17325;
        double r17327 = 0.12900613773279798;
        double r17328 = r17325 * r17325;
        double r17329 = r17328 * r17325;
        double r17330 = r17327 * r17329;
        double r17331 = r17326 - r17330;
        return r17331;
}

double f(double x) {
        double r17332 = 0.954929658551372;
        double r17333 = x;
        double r17334 = 3.0;
        double r17335 = pow(r17333, r17334);
        double r17336 = 0.12900613773279798;
        double r17337 = -r17336;
        double r17338 = r17335 * r17337;
        double r17339 = fma(r17332, r17333, r17338);
        return r17339;
}

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 2019196 +o rules:numerics
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))