Average Error: 0.1 → 0.1
Time: 20.3s
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 r847833 = 0.954929658551372;
        double r847834 = x;
        double r847835 = r847833 * r847834;
        double r847836 = 0.12900613773279798;
        double r847837 = r847834 * r847834;
        double r847838 = r847837 * r847834;
        double r847839 = r847836 * r847838;
        double r847840 = r847835 - r847839;
        return r847840;
}

double f(double x) {
        double r847841 = 0.954929658551372;
        double r847842 = x;
        double r847843 = r847841 * r847842;
        double r847844 = 0.12900613773279798;
        double r847845 = r847844 * r847842;
        double r847846 = r847842 * r847845;
        double r847847 = r847846 * r847842;
        double r847848 = r847843 - r847847;
        return r847848;
}

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 
(FPCore (x)
  :name "Rosa's Benchmark"
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))