Average Error: 0.2 → 0.1
Time: 17.0s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(x \cdot \left(0.12900613773279798 \cdot x\right)\right) \cdot \left(-x\right) + 0.954929658551372 \cdot x\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(x \cdot \left(0.12900613773279798 \cdot x\right)\right) \cdot \left(-x\right) + 0.954929658551372 \cdot x
double f(double x) {
        double r729196 = 0.954929658551372;
        double r729197 = x;
        double r729198 = r729196 * r729197;
        double r729199 = 0.12900613773279798;
        double r729200 = r729197 * r729197;
        double r729201 = r729200 * r729197;
        double r729202 = r729199 * r729201;
        double r729203 = r729198 - r729202;
        return r729203;
}

double f(double x) {
        double r729204 = x;
        double r729205 = 0.12900613773279798;
        double r729206 = r729205 * r729204;
        double r729207 = r729204 * r729206;
        double r729208 = -r729204;
        double r729209 = r729207 * r729208;
        double r729210 = 0.954929658551372;
        double r729211 = r729210 * r729204;
        double r729212 = r729209 + r729211;
        return r729212;
}

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. 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 sub-neg0.1

    \[\leadsto x \cdot \color{blue}{\left(0.954929658551372 + \left(-\left(0.12900613773279798 \cdot x\right) \cdot x\right)\right)}\]
  5. Applied distribute-rgt-in0.1

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

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

Reproduce

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