Average Error: 0.2 → 0.1
Time: 18.9s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(0.9549296585513720181381813745247200131416 - \left(x \cdot 0.1290061377327979819096270830414141528308\right) \cdot x\right) \cdot x\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(0.9549296585513720181381813745247200131416 - \left(x \cdot 0.1290061377327979819096270830414141528308\right) \cdot x\right) \cdot x
double f(double x) {
        double r1082654 = 0.954929658551372;
        double r1082655 = x;
        double r1082656 = r1082654 * r1082655;
        double r1082657 = 0.12900613773279798;
        double r1082658 = r1082655 * r1082655;
        double r1082659 = r1082658 * r1082655;
        double r1082660 = r1082657 * r1082659;
        double r1082661 = r1082656 - r1082660;
        return r1082661;
}

double f(double x) {
        double r1082662 = 0.954929658551372;
        double r1082663 = x;
        double r1082664 = 0.12900613773279798;
        double r1082665 = r1082663 * r1082664;
        double r1082666 = r1082665 * r1082663;
        double r1082667 = r1082662 - r1082666;
        double r1082668 = r1082667 * r1082663;
        return r1082668;
}

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. Simplified0.1

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

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

Reproduce

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