Average Error: 0.1 → 0.1
Time: 2.2s
Precision: 64
\[0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\mathsf{fma}\left(0.95492965855137202, x, \left(-0.129006137732797982\right) \cdot {x}^{3}\right)\]
0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\mathsf{fma}\left(0.95492965855137202, x, \left(-0.129006137732797982\right) \cdot {x}^{3}\right)
double f(double x) {
        double r27157 = 0.954929658551372;
        double r27158 = x;
        double r27159 = r27157 * r27158;
        double r27160 = 0.12900613773279798;
        double r27161 = r27158 * r27158;
        double r27162 = r27161 * r27158;
        double r27163 = r27160 * r27162;
        double r27164 = r27159 - r27163;
        return r27164;
}

double f(double x) {
        double r27165 = 0.954929658551372;
        double r27166 = x;
        double r27167 = 0.12900613773279798;
        double r27168 = -r27167;
        double r27169 = 3.0;
        double r27170 = pow(r27166, r27169);
        double r27171 = r27168 * r27170;
        double r27172 = fma(r27165, r27166, r27171);
        return r27172;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[0.95492965855137202 \cdot x - 0.129006137732797982 \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.95492965855137202, x, -0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)}\]
  4. Simplified0.1

    \[\leadsto \mathsf{fma}\left(0.95492965855137202, x, \color{blue}{\left(-0.129006137732797982\right) \cdot {x}^{3}}\right)\]
  5. Final simplification0.1

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

Reproduce

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