Average Error: 0.1 → 0.1
Time: 12.1s
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 r22212 = 0.954929658551372;
        double r22213 = x;
        double r22214 = r22212 * r22213;
        double r22215 = 0.12900613773279798;
        double r22216 = r22213 * r22213;
        double r22217 = r22216 * r22213;
        double r22218 = r22215 * r22217;
        double r22219 = r22214 - r22218;
        return r22219;
}

double f(double x) {
        double r22220 = 0.954929658551372;
        double r22221 = x;
        double r22222 = r22220 * r22221;
        double r22223 = 0.12900613773279798;
        double r22224 = r22221 * r22221;
        double r22225 = r22223 * r22224;
        double r22226 = r22225 * r22221;
        double r22227 = r22222 - r22226;
        return r22227;
}

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