Average Error: 0.1 → 0.1
Time: 11.5s
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 r366877 = 0.954929658551372;
        double r366878 = x;
        double r366879 = r366877 * r366878;
        double r366880 = 0.12900613773279798;
        double r366881 = r366878 * r366878;
        double r366882 = r366881 * r366878;
        double r366883 = r366880 * r366882;
        double r366884 = r366879 - r366883;
        return r366884;
}

double f(double x) {
        double r366885 = 0.954929658551372;
        double r366886 = x;
        double r366887 = r366886 * r366886;
        double r366888 = 0.12900613773279798;
        double r366889 = r366887 * r366888;
        double r366890 = r366885 - r366889;
        double r366891 = r366890 * r366886;
        return r366891;
}

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}{x \cdot \left(0.954929658551372 - \left(0.12900613773279798 \cdot x\right) \cdot x\right)}\]
  3. Taylor expanded around 0 0.1

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

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

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

Reproduce

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