Average Error: 0.2 → 0.1
Time: 11.6s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(\left(0.12900613773279798 \cdot x\right) \cdot x\right) \cdot \left(-x\right) + x \cdot 0.954929658551372\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(\left(0.12900613773279798 \cdot x\right) \cdot x\right) \cdot \left(-x\right) + x \cdot 0.954929658551372
double f(double x) {
        double r433455 = 0.954929658551372;
        double r433456 = x;
        double r433457 = r433455 * r433456;
        double r433458 = 0.12900613773279798;
        double r433459 = r433456 * r433456;
        double r433460 = r433459 * r433456;
        double r433461 = r433458 * r433460;
        double r433462 = r433457 - r433461;
        return r433462;
}

double f(double x) {
        double r433463 = 0.12900613773279798;
        double r433464 = x;
        double r433465 = r433463 * r433464;
        double r433466 = r433465 * r433464;
        double r433467 = -r433464;
        double r433468 = r433466 * r433467;
        double r433469 = 0.954929658551372;
        double r433470 = r433464 * r433469;
        double r433471 = r433468 + r433470;
        return r433471;
}

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 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right)}\]
  3. Using strategy rm
  4. Applied sub-neg0.1

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

    \[\leadsto \color{blue}{x \cdot 0.954929658551372 + x \cdot \left(-0.12900613773279798 \cdot \left(x \cdot x\right)\right)}\]
  6. Using strategy rm
  7. Applied associate-*r*0.1

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

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

Reproduce

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