Average Error: 0.1 → 0.1
Time: 2.5s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\mathsf{fma}\left(0.9549296585513720181381813745247200131416, x, \left(-0.1290061377327979819096270830414141528308\right) \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, \left(-0.1290061377327979819096270830414141528308\right) \cdot {x}^{3}\right)
double f(double x) {
        double r24035 = 0.954929658551372;
        double r24036 = x;
        double r24037 = r24035 * r24036;
        double r24038 = 0.12900613773279798;
        double r24039 = r24036 * r24036;
        double r24040 = r24039 * r24036;
        double r24041 = r24038 * r24040;
        double r24042 = r24037 - r24041;
        return r24042;
}

double f(double x) {
        double r24043 = 0.954929658551372;
        double r24044 = x;
        double r24045 = 0.12900613773279798;
        double r24046 = -r24045;
        double r24047 = 3.0;
        double r24048 = pow(r24044, r24047);
        double r24049 = r24046 * r24048;
        double r24050 = fma(r24043, r24044, r24049);
        return r24050;
}

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

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

Reproduce

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