Average Error: 21.8 → 16.2
Time: 692.0ms
Precision: binary64
\[\frac{\left(x \cdot x\right) \cdot x}{1 - x \cdot x} + 3 \cdot x\]
\[x \cdot \left(3 + \frac{x \cdot x}{1 - x \cdot x}\right)\]
\frac{\left(x \cdot x\right) \cdot x}{1 - x \cdot x} + 3 \cdot x
x \cdot \left(3 + \frac{x \cdot x}{1 - x \cdot x}\right)
double code(double x) {
	return ((double) (((double) (((double) (((double) (x * x)) * x)) / ((double) (1.0 - ((double) (x * x)))))) + ((double) (3.0 * x))));
}
double code(double x) {
	return ((double) (x * ((double) (3.0 + ((double) (((double) (x * x)) / ((double) (1.0 - ((double) (x * x))))))))));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 21.8

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

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

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

Reproduce

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