Average Error: 0.2 → 0.1
Time: 15.2s
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 r776296 = 0.954929658551372;
        double r776297 = x;
        double r776298 = r776296 * r776297;
        double r776299 = 0.12900613773279798;
        double r776300 = r776297 * r776297;
        double r776301 = r776300 * r776297;
        double r776302 = r776299 * r776301;
        double r776303 = r776298 - r776302;
        return r776303;
}

double f(double x) {
        double r776304 = 0.12900613773279798;
        double r776305 = x;
        double r776306 = r776304 * r776305;
        double r776307 = r776306 * r776305;
        double r776308 = -r776305;
        double r776309 = r776307 * r776308;
        double r776310 = 0.954929658551372;
        double r776311 = r776305 * r776310;
        double r776312 = r776309 + r776311;
        return r776312;
}

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))))