Average Error: 0.1 → 0.1
Time: 15.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 0.12900613773279798\right) \cdot x\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 0.12900613773279798\right) \cdot x\right) \cdot x
double f(double x) {
        double r445316 = 0.954929658551372;
        double r445317 = x;
        double r445318 = r445316 * r445317;
        double r445319 = 0.12900613773279798;
        double r445320 = r445317 * r445317;
        double r445321 = r445320 * r445317;
        double r445322 = r445319 * r445321;
        double r445323 = r445318 - r445322;
        return r445323;
}

double f(double x) {
        double r445324 = 0.954929658551372;
        double r445325 = x;
        double r445326 = 0.12900613773279798;
        double r445327 = r445325 * r445326;
        double r445328 = r445327 * r445325;
        double r445329 = r445324 - r445328;
        double r445330 = r445329 * r445325;
        return r445330;
}

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 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right)}\]
  3. Using strategy rm
  4. Applied associate-*r*0.1

    \[\leadsto x \cdot \left(0.954929658551372 - \color{blue}{\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 2019142 
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))