Average Error: 0.1 → 0.1
Time: 21.8s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[0.954929658551372 \cdot x - \left(x \cdot \left(0.12900613773279798 \cdot x\right)\right) \cdot x\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.954929658551372 \cdot x - \left(x \cdot \left(0.12900613773279798 \cdot x\right)\right) \cdot x
double f(double x) {
        double r921559 = 0.954929658551372;
        double r921560 = x;
        double r921561 = r921559 * r921560;
        double r921562 = 0.12900613773279798;
        double r921563 = r921560 * r921560;
        double r921564 = r921563 * r921560;
        double r921565 = r921562 * r921564;
        double r921566 = r921561 - r921565;
        return r921566;
}

double f(double x) {
        double r921567 = 0.954929658551372;
        double r921568 = x;
        double r921569 = r921567 * r921568;
        double r921570 = 0.12900613773279798;
        double r921571 = r921570 * r921568;
        double r921572 = r921568 * r921571;
        double r921573 = r921572 * r921568;
        double r921574 = r921569 - r921573;
        return r921574;
}

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. Using strategy rm
  3. Applied associate-*r*0.1

    \[\leadsto 0.954929658551372 \cdot x - \color{blue}{\left(0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot x}\]
  4. Using strategy rm
  5. Applied associate-*r*0.1

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

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

Reproduce

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