Average Error: 0.2 → 0.1
Time: 14.5s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(0.954929658551372 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot x\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(0.954929658551372 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot x
double f(double x) {
        double r576040 = 0.954929658551372;
        double r576041 = x;
        double r576042 = r576040 * r576041;
        double r576043 = 0.12900613773279798;
        double r576044 = r576041 * r576041;
        double r576045 = r576044 * r576041;
        double r576046 = r576043 * r576045;
        double r576047 = r576042 - r576046;
        return r576047;
}

double f(double x) {
        double r576048 = 0.954929658551372;
        double r576049 = 0.12900613773279798;
        double r576050 = x;
        double r576051 = r576050 * r576050;
        double r576052 = r576049 * r576051;
        double r576053 = r576048 - r576052;
        double r576054 = r576053 * r576050;
        return r576054;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[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. Using strategy rm
  4. Applied associate-*l*0.1

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

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

Reproduce

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