Average Error: 21.6 → 0.1
Time: 3.5s
Precision: 64
\[\frac{\left(x \cdot x\right) \cdot x}{1 - x \cdot x} + 3 \cdot x\]
\[\left(3 + \frac{x}{\frac{1}{x} - x}\right) \cdot x\]
\frac{\left(x \cdot x\right) \cdot x}{1 - x \cdot x} + 3 \cdot x
\left(3 + \frac{x}{\frac{1}{x} - x}\right) \cdot x
double f(double x) {
        double r1870590 = x;
        double r1870591 = r1870590 * r1870590;
        double r1870592 = r1870591 * r1870590;
        double r1870593 = 1.0;
        double r1870594 = r1870593 - r1870591;
        double r1870595 = r1870592 / r1870594;
        double r1870596 = 3.0;
        double r1870597 = r1870596 * r1870590;
        double r1870598 = r1870595 + r1870597;
        return r1870598;
}

double f(double x) {
        double r1870599 = 3.0;
        double r1870600 = x;
        double r1870601 = 1.0;
        double r1870602 = r1870601 / r1870600;
        double r1870603 = r1870602 - r1870600;
        double r1870604 = r1870600 / r1870603;
        double r1870605 = r1870599 + r1870604;
        double r1870606 = r1870605 * r1870600;
        return r1870606;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 21.6

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

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

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "x*x*x/(1 - x*x) + 3*x"
  :precision binary64
  (+ (/ (* (* x x) x) (- 1 (* x x))) (* 3 x)))