Average Error: 0.1 → 0.1
Time: 13.2s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(0.954929658551372 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot x\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(0.954929658551372 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right) \cdot x
double f(double x) {
        double r385869 = 0.954929658551372;
        double r385870 = x;
        double r385871 = r385869 * r385870;
        double r385872 = 0.12900613773279798;
        double r385873 = r385870 * r385870;
        double r385874 = r385873 * r385870;
        double r385875 = r385872 * r385874;
        double r385876 = r385871 - r385875;
        return r385876;
}

double f(double x) {
        double r385877 = 0.954929658551372;
        double r385878 = 0.12900613773279798;
        double r385879 = x;
        double r385880 = r385879 * r385879;
        double r385881 = r385878 * r385880;
        double r385882 = r385877 - r385881;
        double r385883 = r385882 * r385879;
        return r385883;
}

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

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

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

Reproduce

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