Average Error: 0.1 → 0.1
Time: 23.4s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot 0.9549296585513720181381813745247200131416 - \left(0.1290061377327979819096270830414141528308 \cdot x\right) \cdot \left(x \cdot x\right)\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot 0.9549296585513720181381813745247200131416 - \left(0.1290061377327979819096270830414141528308 \cdot x\right) \cdot \left(x \cdot x\right)
double f(double x) {
        double r18505 = 0.954929658551372;
        double r18506 = x;
        double r18507 = r18505 * r18506;
        double r18508 = 0.12900613773279798;
        double r18509 = r18506 * r18506;
        double r18510 = r18509 * r18506;
        double r18511 = r18508 * r18510;
        double r18512 = r18507 - r18511;
        return r18512;
}

double f(double x) {
        double r18513 = x;
        double r18514 = 0.954929658551372;
        double r18515 = r18513 * r18514;
        double r18516 = 0.12900613773279798;
        double r18517 = r18516 * r18513;
        double r18518 = r18513 * r18513;
        double r18519 = r18517 * r18518;
        double r18520 = r18515 - r18519;
        return r18520;
}

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.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Simplified0.1

    \[\leadsto \color{blue}{x \cdot \left(0.9549296585513720181381813745247200131416 - 0.1290061377327979819096270830414141528308 \cdot \left(x \cdot x\right)\right)}\]
  3. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot {x}^{3}}\]
  4. Simplified0.1

    \[\leadsto \color{blue}{x \cdot 0.9549296585513720181381813745247200131416 - 0.1290061377327979819096270830414141528308 \cdot {x}^{3}}\]
  5. Using strategy rm
  6. Applied cube-mult0.1

    \[\leadsto x \cdot 0.9549296585513720181381813745247200131416 - 0.1290061377327979819096270830414141528308 \cdot \color{blue}{\left(x \cdot \left(x \cdot x\right)\right)}\]
  7. Applied associate-*r*0.1

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

    \[\leadsto x \cdot 0.9549296585513720181381813745247200131416 - \left(0.1290061377327979819096270830414141528308 \cdot x\right) \cdot \left(x \cdot x\right)\]

Reproduce

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