Average Error: 0.1 → 0.1
Time: 2.0s
Precision: 64
\[0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[0.95492965855137202 \cdot x - 1 \cdot \left(0.129006137732797982 \cdot {x}^{3}\right)\]
0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.95492965855137202 \cdot x - 1 \cdot \left(0.129006137732797982 \cdot {x}^{3}\right)
double f(double x) {
        double r24353 = 0.954929658551372;
        double r24354 = x;
        double r24355 = r24353 * r24354;
        double r24356 = 0.12900613773279798;
        double r24357 = r24354 * r24354;
        double r24358 = r24357 * r24354;
        double r24359 = r24356 * r24358;
        double r24360 = r24355 - r24359;
        return r24360;
}

double f(double x) {
        double r24361 = 0.954929658551372;
        double r24362 = x;
        double r24363 = r24361 * r24362;
        double r24364 = 1.0;
        double r24365 = 0.12900613773279798;
        double r24366 = 3.0;
        double r24367 = pow(r24362, r24366);
        double r24368 = r24365 * r24367;
        double r24369 = r24364 * r24368;
        double r24370 = r24363 - r24369;
        return r24370;
}

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.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.1

    \[\leadsto 0.95492965855137202 \cdot x - \color{blue}{\left(1 \cdot 0.129006137732797982\right)} \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  4. Applied associate-*l*0.1

    \[\leadsto 0.95492965855137202 \cdot x - \color{blue}{1 \cdot \left(0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\right)}\]
  5. Simplified0.1

    \[\leadsto 0.95492965855137202 \cdot x - 1 \cdot \color{blue}{\left(0.129006137732797982 \cdot {x}^{3}\right)}\]
  6. Final simplification0.1

    \[\leadsto 0.95492965855137202 \cdot x - 1 \cdot \left(0.129006137732797982 \cdot {x}^{3}\right)\]

Reproduce

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