Average Error: 0.1 → 0.1
Time: 21.2s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(0.954929658551372 - \left(x \cdot 0.12900613773279798\right) \cdot x\right) \cdot x\]
double f(double x) {
        double r920877 = 0.954929658551372;
        double r920878 = x;
        double r920879 = r920877 * r920878;
        double r920880 = 0.12900613773279798;
        double r920881 = r920878 * r920878;
        double r920882 = r920881 * r920878;
        double r920883 = r920880 * r920882;
        double r920884 = r920879 - r920883;
        return r920884;
}

double f(double x) {
        double r920885 = 0.954929658551372;
        double r920886 = x;
        double r920887 = 0.12900613773279798;
        double r920888 = r920886 * r920887;
        double r920889 = r920888 * r920886;
        double r920890 = r920885 - r920889;
        double r920891 = r920890 * r920886;
        return r920891;
}

0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(0.954929658551372 - \left(x \cdot 0.12900613773279798\right) \cdot x\right) \cdot x

Error

Bits error versus x

Derivation

  1. Initial program 0.1

    \[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Simplified0.1

    \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right)}\]
  3. Taylor expanded around inf 0.1

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

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

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

Reproduce

herbie shell --seed 2019101 
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))