Average Error: 0.1 → 0.1
Time: 20.6s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot \left(0.954929658551372 - x \cdot \left(x \cdot 0.12900613773279798\right)\right)\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot \left(0.954929658551372 - x \cdot \left(x \cdot 0.12900613773279798\right)\right)
double f(double x) {
        double r849344 = 0.954929658551372;
        double r849345 = x;
        double r849346 = r849344 * r849345;
        double r849347 = 0.12900613773279798;
        double r849348 = r849345 * r849345;
        double r849349 = r849348 * r849345;
        double r849350 = r849347 * r849349;
        double r849351 = r849346 - r849350;
        return r849351;
}

double f(double x) {
        double r849352 = x;
        double r849353 = 0.954929658551372;
        double r849354 = 0.12900613773279798;
        double r849355 = r849352 * r849354;
        double r849356 = r849352 * r849355;
        double r849357 = r849353 - r849356;
        double r849358 = r849352 * r849357;
        return r849358;
}

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 *-commutative0.1

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

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

Reproduce

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