Average Error: 0.1 → 0.1
Time: 21.2s
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 r17899 = 0.954929658551372;
        double r17900 = x;
        double r17901 = r17899 * r17900;
        double r17902 = 0.12900613773279798;
        double r17903 = r17900 * r17900;
        double r17904 = r17903 * r17900;
        double r17905 = r17902 * r17904;
        double r17906 = r17901 - r17905;
        return r17906;
}

double f(double x) {
        double r17907 = 0.954929658551372;
        double r17908 = x;
        double r17909 = 0.12900613773279798;
        double r17910 = 3.0;
        double r17911 = pow(r17908, r17910);
        double r17912 = r17909 * r17911;
        double r17913 = -r17912;
        double r17914 = fma(r17907, r17908, r17913);
        return r17914;
}

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. Final simplification0.1

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

Reproduce

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