Average Error: 0.1 → 0.1
Time: 11.0s
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 r346538 = 0.954929658551372;
        double r346539 = x;
        double r346540 = r346538 * r346539;
        double r346541 = 0.12900613773279798;
        double r346542 = r346539 * r346539;
        double r346543 = r346542 * r346539;
        double r346544 = r346541 * r346543;
        double r346545 = r346540 - r346544;
        return r346545;
}

double f(double x) {
        double r346546 = x;
        double r346547 = 0.954929658551372;
        double r346548 = 0.12900613773279798;
        double r346549 = r346546 * r346548;
        double r346550 = r346546 * r346549;
        double r346551 = r346547 - r346550;
        double r346552 = r346546 * r346551;
        return r346552;
}

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. Final simplification0.1

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

Reproduce

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