Average Error: 0.1 → 0.1
Time: 19.3s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[0.954929658551372 \cdot x - \left(\left(x \cdot x\right) \cdot 0.12900613773279798\right) \cdot x\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.954929658551372 \cdot x - \left(\left(x \cdot x\right) \cdot 0.12900613773279798\right) \cdot x
double f(double x) {
        double r603617 = 0.954929658551372;
        double r603618 = x;
        double r603619 = r603617 * r603618;
        double r603620 = 0.12900613773279798;
        double r603621 = r603618 * r603618;
        double r603622 = r603621 * r603618;
        double r603623 = r603620 * r603622;
        double r603624 = r603619 - r603623;
        return r603624;
}

double f(double x) {
        double r603625 = 0.954929658551372;
        double r603626 = x;
        double r603627 = r603625 * r603626;
        double r603628 = r603626 * r603626;
        double r603629 = 0.12900613773279798;
        double r603630 = r603628 * r603629;
        double r603631 = r603630 * r603626;
        double r603632 = r603627 - r603631;
        return r603632;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Taylor expanded around inf 0.1

    \[\leadsto 0.954929658551372 \cdot x - \color{blue}{0.12900613773279798 \cdot {x}^{3}}\]
  3. Simplified0.1

    \[\leadsto 0.954929658551372 \cdot x - \color{blue}{x \cdot \left(\left(x \cdot x\right) \cdot 0.12900613773279798\right)}\]
  4. Final simplification0.1

    \[\leadsto 0.954929658551372 \cdot x - \left(\left(x \cdot x\right) \cdot 0.12900613773279798\right) \cdot x\]

Reproduce

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