Average Error: 0.2 → 0.1
Time: 4.8s
Precision: 64
\[0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\frac{2150310427208497}{2251799813685248} \cdot x - \frac{4647935950575487}{36028797018963968} \cdot {x}^{3}\]
0.9549296585513720181381813745247200131416 \cdot x - 0.1290061377327979819096270830414141528308 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\frac{2150310427208497}{2251799813685248} \cdot x - \frac{4647935950575487}{36028797018963968} \cdot {x}^{3}
double f(double x) {
        double r19459 = 0.954929658551372;
        double r19460 = x;
        double r19461 = r19459 * r19460;
        double r19462 = 0.12900613773279798;
        double r19463 = r19460 * r19460;
        double r19464 = r19463 * r19460;
        double r19465 = r19462 * r19464;
        double r19466 = r19461 - r19465;
        return r19466;
}

double f(double x) {
        double r19467 = 2150310427208497.0;
        double r19468 = 2251799813685248.0;
        double r19469 = r19467 / r19468;
        double r19470 = x;
        double r19471 = r19469 * r19470;
        double r19472 = 4647935950575487.0;
        double r19473 = 3.602879701896397e+16;
        double r19474 = r19472 / r19473;
        double r19475 = 3.0;
        double r19476 = pow(r19470, r19475);
        double r19477 = r19474 * r19476;
        double r19478 = r19471 - r19477;
        return r19478;
}

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 sub-neg0.2

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

    \[\leadsto 0.9549296585513720181381813745247200131416 \cdot x + \color{blue}{\left(-\frac{4647935950575487}{36028797018963968}\right) \cdot {x}^{3}}\]
  5. Final simplification0.1

    \[\leadsto \frac{2150310427208497}{2251799813685248} \cdot x - \frac{4647935950575487}{36028797018963968} \cdot {x}^{3}\]

Reproduce

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