Average Error: 0.0 → 0.0
Time: 20.4s
Precision: 64
\[\left(\left(x - \frac{1}{2} \cdot {x}^{2}\right) - \frac{1}{3} \cdot {x}^{3}\right) - \frac{1}{4} \cdot {x}^{4}\]
\[x - \left(1 \cdot \left(\frac{{x}^{3}}{3} + \frac{{x}^{2}}{2}\right) + {x}^{4} \cdot \frac{1}{4}\right)\]
\left(\left(x - \frac{1}{2} \cdot {x}^{2}\right) - \frac{1}{3} \cdot {x}^{3}\right) - \frac{1}{4} \cdot {x}^{4}
x - \left(1 \cdot \left(\frac{{x}^{3}}{3} + \frac{{x}^{2}}{2}\right) + {x}^{4} \cdot \frac{1}{4}\right)
double f(double x) {
        double r733582 = x;
        double r733583 = 1.0;
        double r733584 = 2.0;
        double r733585 = r733583 / r733584;
        double r733586 = pow(r733582, r733584);
        double r733587 = r733585 * r733586;
        double r733588 = r733582 - r733587;
        double r733589 = 3.0;
        double r733590 = r733583 / r733589;
        double r733591 = pow(r733582, r733589);
        double r733592 = r733590 * r733591;
        double r733593 = r733588 - r733592;
        double r733594 = 4.0;
        double r733595 = r733583 / r733594;
        double r733596 = pow(r733582, r733594);
        double r733597 = r733595 * r733596;
        double r733598 = r733593 - r733597;
        return r733598;
}

double f(double x) {
        double r733599 = x;
        double r733600 = 1.0;
        double r733601 = 3.0;
        double r733602 = pow(r733599, r733601);
        double r733603 = r733602 / r733601;
        double r733604 = 2.0;
        double r733605 = pow(r733599, r733604);
        double r733606 = r733605 / r733604;
        double r733607 = r733603 + r733606;
        double r733608 = r733600 * r733607;
        double r733609 = 4.0;
        double r733610 = pow(r733599, r733609);
        double r733611 = r733600 / r733609;
        double r733612 = r733610 * r733611;
        double r733613 = r733608 + r733612;
        double r733614 = r733599 - r733613;
        return r733614;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(\left(x - \frac{1}{2} \cdot {x}^{2}\right) - \frac{1}{3} \cdot {x}^{3}\right) - \frac{1}{4} \cdot {x}^{4}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{x - \left(1 \cdot \left(\frac{{x}^{3}}{3} + \frac{{x}^{2}}{2}\right) + {x}^{4} \cdot \frac{1}{4}\right)}\]
  3. Final simplification0.0

    \[\leadsto x - \left(1 \cdot \left(\frac{{x}^{3}}{3} + \frac{{x}^{2}}{2}\right) + {x}^{4} \cdot \frac{1}{4}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "x - (1/2)pow(x,2) - (1/3)pow(x,3) - (1/4)pow(x,4)"
  :precision binary64
  (- (- (- x (* (/ 1 2) (pow x 2))) (* (/ 1 3) (pow x 3))) (* (/ 1 4) (pow x 4))))