Average Error: 0.1 → 0.1
Time: 22.8s
Precision: 64
\[0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
\[\left(\left(0.12900613773279798 \cdot x\right) \cdot x\right) \cdot \left(-x\right) + x \cdot 0.954929658551372\]
0.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)
\left(\left(0.12900613773279798 \cdot x\right) \cdot x\right) \cdot \left(-x\right) + x \cdot 0.954929658551372
double f(double x) {
        double r689166 = 0.954929658551372;
        double r689167 = x;
        double r689168 = r689166 * r689167;
        double r689169 = 0.12900613773279798;
        double r689170 = r689167 * r689167;
        double r689171 = r689170 * r689167;
        double r689172 = r689169 * r689171;
        double r689173 = r689168 - r689172;
        return r689173;
}

double f(double x) {
        double r689174 = 0.12900613773279798;
        double r689175 = x;
        double r689176 = r689174 * r689175;
        double r689177 = r689176 * r689175;
        double r689178 = -r689175;
        double r689179 = r689177 * r689178;
        double r689180 = 0.954929658551372;
        double r689181 = r689175 * r689180;
        double r689182 = r689179 + r689181;
        return r689182;
}

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.954929658551372 \cdot x - 0.12900613773279798 \cdot \left(\left(x \cdot x\right) \cdot x\right)\]
  2. Simplified0.1

    \[\leadsto \color{blue}{x \cdot \left(0.954929658551372 - 0.12900613773279798 \cdot \left(x \cdot x\right)\right)}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt0.1

    \[\leadsto x \cdot \left(0.954929658551372 - \color{blue}{\left(\sqrt{0.12900613773279798} \cdot \sqrt{0.12900613773279798}\right)} \cdot \left(x \cdot x\right)\right)\]
  5. Applied unswap-sqr0.2

    \[\leadsto x \cdot \left(0.954929658551372 - \color{blue}{\left(\sqrt{0.12900613773279798} \cdot x\right) \cdot \left(\sqrt{0.12900613773279798} \cdot x\right)}\right)\]
  6. Using strategy rm
  7. Applied sub-neg0.2

    \[\leadsto x \cdot \color{blue}{\left(0.954929658551372 + \left(-\left(\sqrt{0.12900613773279798} \cdot x\right) \cdot \left(\sqrt{0.12900613773279798} \cdot x\right)\right)\right)}\]
  8. Applied distribute-lft-in0.2

    \[\leadsto \color{blue}{x \cdot 0.954929658551372 + x \cdot \left(-\left(\sqrt{0.12900613773279798} \cdot x\right) \cdot \left(\sqrt{0.12900613773279798} \cdot x\right)\right)}\]
  9. Simplified0.1

    \[\leadsto x \cdot 0.954929658551372 + \color{blue}{\left(-\left(x \cdot 0.12900613773279798\right) \cdot \left(x \cdot x\right)\right)}\]
  10. Using strategy rm
  11. Applied associate-*r*0.1

    \[\leadsto x \cdot 0.954929658551372 + \left(-\color{blue}{\left(\left(x \cdot 0.12900613773279798\right) \cdot x\right) \cdot x}\right)\]
  12. Final simplification0.1

    \[\leadsto \left(\left(0.12900613773279798 \cdot x\right) \cdot x\right) \cdot \left(-x\right) + x \cdot 0.954929658551372\]

Reproduce

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