Average Error: 0.1 → 0.1
Time: 19.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 r860321 = 0.954929658551372;
        double r860322 = x;
        double r860323 = r860321 * r860322;
        double r860324 = 0.12900613773279798;
        double r860325 = r860322 * r860322;
        double r860326 = r860325 * r860322;
        double r860327 = r860324 * r860326;
        double r860328 = r860323 - r860327;
        return r860328;
}

double f(double x) {
        double r860329 = x;
        double r860330 = 0.954929658551372;
        double r860331 = 0.12900613773279798;
        double r860332 = r860329 * r860331;
        double r860333 = r860329 * r860332;
        double r860334 = r860330 - r860333;
        double r860335 = r860329 * r860334;
        return r860335;
}

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