Average Error: 0.1 → 0.1
Time: 21.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 r18718 = 0.954929658551372;
        double r18719 = x;
        double r18720 = r18718 * r18719;
        double r18721 = 0.12900613773279798;
        double r18722 = r18719 * r18719;
        double r18723 = r18722 * r18719;
        double r18724 = r18721 * r18723;
        double r18725 = r18720 - r18724;
        return r18725;
}

double f(double x) {
        double r18726 = 0.954929658551372;
        double r18727 = x;
        double r18728 = 0.12900613773279798;
        double r18729 = 3.0;
        double r18730 = pow(r18727, r18729);
        double r18731 = r18728 * r18730;
        double r18732 = -r18731;
        double r18733 = fma(r18726, r18727, r18732);
        return r18733;
}

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