Average Error: 0.1 → 0.1
Time: 12.4s
Precision: 64
\[0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[0.95492965855137202 \cdot x - \left(x \cdot \left(0.129006137732797982 \cdot x\right)\right) \cdot x\]
0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.95492965855137202 \cdot x - \left(x \cdot \left(0.129006137732797982 \cdot x\right)\right) \cdot x
double f(double x) {
        double r23237 = 0.954929658551372;
        double r23238 = x;
        double r23239 = r23237 * r23238;
        double r23240 = 0.12900613773279798;
        double r23241 = r23238 * r23238;
        double r23242 = r23241 * r23238;
        double r23243 = r23240 * r23242;
        double r23244 = r23239 - r23243;
        return r23244;
}

double f(double x) {
        double r23245 = 0.954929658551372;
        double r23246 = x;
        double r23247 = r23245 * r23246;
        double r23248 = 0.12900613773279798;
        double r23249 = r23248 * r23246;
        double r23250 = r23246 * r23249;
        double r23251 = r23250 * r23246;
        double r23252 = r23247 - r23251;
        return r23252;
}

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}{0.95492965855137202 \cdot x - 0.129006137732797982 \cdot {x}^{3}}\]
  3. Using strategy rm
  4. Applied unpow30.1

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

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

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

    \[\leadsto 0.95492965855137202 \cdot x - \left(x \cdot \left(0.129006137732797982 \cdot x\right)\right) \cdot x\]

Reproduce

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