Average Error: 0.1 → 0.1
Time: 17.4s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot \left(0.954929658551372 - \left(x \cdot x\right) \cdot 0.12900613773279798\right)\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot \left(0.954929658551372 - \left(x \cdot x\right) \cdot 0.12900613773279798\right)
double f(double x) {
        double r650901 = 0.954929658551372;
        double r650902 = x;
        double r650903 = r650901 * r650902;
        double r650904 = 0.12900613773279798;
        double r650905 = r650902 * r650902;
        double r650906 = r650905 * r650902;
        double r650907 = r650904 * r650906;
        double r650908 = r650903 - r650907;
        return r650908;
}

double f(double x) {
        double r650909 = x;
        double r650910 = 0.954929658551372;
        double r650911 = r650909 * r650909;
        double r650912 = 0.12900613773279798;
        double r650913 = r650911 * r650912;
        double r650914 = r650910 - r650913;
        double r650915 = r650909 * r650914;
        return r650915;
}

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

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

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

Reproduce

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