Average Error: 0.1 → 0.1
Time: 20.3s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(0.954929658551372 - \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)
\left(0.954929658551372 - \left(x \cdot x\right) \cdot 0.12900613773279798\right) \cdot x
double f(double x) {
        double r954723 = 0.954929658551372;
        double r954724 = x;
        double r954725 = r954723 * r954724;
        double r954726 = 0.12900613773279798;
        double r954727 = r954724 * r954724;
        double r954728 = r954727 * r954724;
        double r954729 = r954726 * r954728;
        double r954730 = r954725 - r954729;
        return r954730;
}

double f(double x) {
        double r954731 = 0.954929658551372;
        double r954732 = x;
        double r954733 = r954732 * r954732;
        double r954734 = 0.12900613773279798;
        double r954735 = r954733 * r954734;
        double r954736 = r954731 - r954735;
        double r954737 = r954736 * r954732;
        return r954737;
}

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. Simplified0.1

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

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

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

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

Reproduce

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