Average Error: 0.2 → 0.1
Time: 2.6s
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({x}^{3} \cdot 0.129006137732797982\right)\]
0.95492965855137202 \cdot x - 0.129006137732797982 \cdot \left(\left(x \cdot x\right) \cdot x\right)
0.95492965855137202 \cdot x - 1 \cdot \left({x}^{3} \cdot 0.129006137732797982\right)
double f(double x) {
        double r23145 = 0.954929658551372;
        double r23146 = x;
        double r23147 = r23145 * r23146;
        double r23148 = 0.12900613773279798;
        double r23149 = r23146 * r23146;
        double r23150 = r23149 * r23146;
        double r23151 = r23148 * r23150;
        double r23152 = r23147 - r23151;
        return r23152;
}

double f(double x) {
        double r23153 = 0.954929658551372;
        double r23154 = x;
        double r23155 = r23153 * r23154;
        double r23156 = 1.0;
        double r23157 = 3.0;
        double r23158 = pow(r23154, r23157);
        double r23159 = 0.12900613773279798;
        double r23160 = r23158 * r23159;
        double r23161 = r23156 * r23160;
        double r23162 = r23155 - r23161;
        return r23162;
}

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

    \[\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.2

    \[\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({x}^{3} \cdot 0.129006137732797982\right)}\]
  6. Final simplification0.1

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

Reproduce

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