Average Error: 0.2 → 0.1
Time: 24.6s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[0.9549296585513720181381813745247200131416 \cdot x - \left(\left(0.1290061377327979819096270830414141528308 \cdot x\right) \cdot x\right) \cdot x\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.9549296585513720181381813745247200131416 \cdot x - \left(\left(0.1290061377327979819096270830414141528308 \cdot x\right) \cdot x\right) \cdot x
double f(double x) {
        double r19124 = 0.954929658551372;
        double r19125 = x;
        double r19126 = r19124 * r19125;
        double r19127 = 0.12900613773279798;
        double r19128 = r19125 * r19125;
        double r19129 = r19128 * r19125;
        double r19130 = r19127 * r19129;
        double r19131 = r19126 - r19130;
        return r19131;
}

double f(double x) {
        double r19132 = 0.954929658551372;
        double r19133 = x;
        double r19134 = r19132 * r19133;
        double r19135 = 0.12900613773279798;
        double r19136 = r19135 * r19133;
        double r19137 = r19136 * r19133;
        double r19138 = r19137 * r19133;
        double r19139 = r19134 - r19138;
        return r19139;
}

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.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Using strategy rm
  3. Applied associate-*r*0.1

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x - \color{blue}{\left(0.1290061377327979819096270830414141528308 \cdot \left(x \cdot x\right)\right) \cdot x}\]
  4. Using strategy rm
  5. Applied pow10.1

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x - \left(0.1290061377327979819096270830414141528308 \cdot \left(x \cdot \color{blue}{{x}^{1}}\right)\right) \cdot x\]
  6. Applied pow10.1

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x - \left(0.1290061377327979819096270830414141528308 \cdot \left(\color{blue}{{x}^{1}} \cdot {x}^{1}\right)\right) \cdot x\]
  7. Applied pow-prod-down0.1

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

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x - \left(\color{blue}{{0.1290061377327979819096270830414141528308}^{1}} \cdot {\left(x \cdot x\right)}^{1}\right) \cdot x\]
  9. Applied pow-prod-down0.1

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x - \color{blue}{{\left(0.1290061377327979819096270830414141528308 \cdot \left(x \cdot x\right)\right)}^{1}} \cdot x\]
  10. Simplified0.1

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

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

Reproduce

herbie shell --seed 2019304 +o rules:numerics
(FPCore (x)
  :name "Rosa's Benchmark"
  :precision binary64
  (- (* 0.95492965855137202 x) (* 0.129006137732797982 (* (* x x) x))))