Average Error: 0.1 → 0.1
Time: 12.7s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[0.9549296585513720181381813745247200131416 \cdot x - \left(0.1290061377327979819096270830414141528308 \cdot \left(x \cdot x\right)\right) \cdot x\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.9549296585513720181381813745247200131416 \cdot x - \left(0.1290061377327979819096270830414141528308 \cdot \left(x \cdot x\right)\right) \cdot x
double f(double x) {
        double r22217 = 0.954929658551372;
        double r22218 = x;
        double r22219 = r22217 * r22218;
        double r22220 = 0.12900613773279798;
        double r22221 = r22218 * r22218;
        double r22222 = r22221 * r22218;
        double r22223 = r22220 * r22222;
        double r22224 = r22219 - r22223;
        return r22224;
}

double f(double x) {
        double r22225 = 0.954929658551372;
        double r22226 = x;
        double r22227 = r22225 * r22226;
        double r22228 = 0.12900613773279798;
        double r22229 = r22226 * r22226;
        double r22230 = r22228 * r22229;
        double r22231 = r22230 * r22226;
        double r22232 = r22227 - r22231;
        return r22232;
}

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. 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. Final simplification0.1

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

Reproduce

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