Average Error: 0.1 → 0.1
Time: 13.8s
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 r481735 = 0.954929658551372;
        double r481736 = x;
        double r481737 = r481735 * r481736;
        double r481738 = 0.12900613773279798;
        double r481739 = r481736 * r481736;
        double r481740 = r481739 * r481736;
        double r481741 = r481738 * r481740;
        double r481742 = r481737 - r481741;
        return r481742;
}

double f(double x) {
        double r481743 = 0.954929658551372;
        double r481744 = 0.12900613773279798;
        double r481745 = x;
        double r481746 = r481745 * r481745;
        double r481747 = r481744 * r481746;
        double r481748 = r481743 - r481747;
        double r481749 = r481748 * r481745;
        return r481749;
}

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