Average Error: 0.2 → 0.1
Time: 21.1s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{3}\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{3}
double f(double x) {
        double r951795 = 0.954929658551372;
        double r951796 = x;
        double r951797 = r951795 * r951796;
        double r951798 = 0.12900613773279798;
        double r951799 = r951796 * r951796;
        double r951800 = r951799 * r951796;
        double r951801 = r951798 * r951800;
        double r951802 = r951797 - r951801;
        return r951802;
}

double f(double x) {
        double r951803 = 0.954929658551372;
        double r951804 = x;
        double r951805 = r951803 * r951804;
        double r951806 = 0.12900613773279798;
        double r951807 = 3.0;
        double r951808 = pow(r951804, r951807);
        double r951809 = r951806 * r951808;
        double r951810 = r951805 - r951809;
        return r951810;
}

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. Using strategy rm
  3. Applied pow10.2

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

    \[\leadsto 0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\color{blue}{{x}^{2}} \cdot {x}^{1}\right)\]
  5. Applied pow-prod-up0.1

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

    \[\leadsto 0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{\color{blue}{3}}\]
  7. Final simplification0.1

    \[\leadsto 0.954929658551372 \cdot x - 0.12900613773279798 \cdot {x}^{3}\]

Reproduce

herbie shell --seed 2019124 
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))