Average Error: 0.1 → 0.1
Time: 2.6s
Precision: 64
\[0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[x \cdot 0.95492965855137202 + \left(-0.129006137732797982 \cdot {x}^{3}\right)\]
0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)
x \cdot 0.95492965855137202 + \left(-0.129006137732797982 \cdot {x}^{3}\right)
double f(double x) {
        double r26249 = 0.954929658551372;
        double r26250 = x;
        double r26251 = r26249 * r26250;
        double r26252 = 0.12900613773279798;
        double r26253 = r26250 * r26250;
        double r26254 = r26253 * r26250;
        double r26255 = r26252 * r26254;
        double r26256 = r26251 - r26255;
        return r26256;
}

double f(double x) {
        double r26257 = x;
        double r26258 = 0.954929658551372;
        double r26259 = r26257 * r26258;
        double r26260 = 0.12900613773279798;
        double r26261 = 3.0;
        double r26262 = pow(r26257, r26261);
        double r26263 = r26260 * r26262;
        double r26264 = -r26263;
        double r26265 = r26259 + r26264;
        return r26265;
}

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

    \[\leadsto \color{blue}{x \cdot \left(0.95492965855137202 - 0.129006137732797982 \cdot \left(x \cdot x\right)\right)}\]
  3. Using strategy rm
  4. Applied sub-neg0.1

    \[\leadsto x \cdot \color{blue}{\left(0.95492965855137202 + \left(-0.129006137732797982 \cdot \left(x \cdot x\right)\right)\right)}\]
  5. Applied distribute-lft-in0.1

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

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

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

Reproduce

herbie shell --seed 2020036 
(FPCore (x)
  :name "Rosa's Benchmark"
  :precision binary64
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))