Average Error: 0.1 → 0.1
Time: 2.2s
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 r19855 = 0.954929658551372;
        double r19856 = x;
        double r19857 = r19855 * r19856;
        double r19858 = 0.12900613773279798;
        double r19859 = r19856 * r19856;
        double r19860 = r19859 * r19856;
        double r19861 = r19858 * r19860;
        double r19862 = r19857 - r19861;
        return r19862;
}

double f(double x) {
        double r19863 = x;
        double r19864 = 0.954929658551372;
        double r19865 = r19863 * r19864;
        double r19866 = 0.12900613773279798;
        double r19867 = 3.0;
        double r19868 = pow(r19863, r19867);
        double r19869 = r19866 * r19868;
        double r19870 = -r19869;
        double r19871 = r19865 + r19870;
        return r19871;
}

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 2020065 
(FPCore (x)
  :name "Rosa's Benchmark"
  :precision binary64
  (- (* 0.954929658551372 x) (* 0.12900613773279798 (* (* x x) x))))