Average Error: 0.1 → 0.1
Time: 22.9s
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 r18501 = 0.954929658551372;
        double r18502 = x;
        double r18503 = r18501 * r18502;
        double r18504 = 0.12900613773279798;
        double r18505 = r18502 * r18502;
        double r18506 = r18505 * r18502;
        double r18507 = r18504 * r18506;
        double r18508 = r18503 - r18507;
        return r18508;
}

double f(double x) {
        double r18509 = x;
        double r18510 = 0.954929658551372;
        double r18511 = r18509 * r18510;
        double r18512 = 0.12900613773279798;
        double r18513 = r18512 * r18509;
        double r18514 = r18509 * r18509;
        double r18515 = r18513 * r18514;
        double r18516 = r18511 - r18515;
        return r18516;
}

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