Average Error: 0.1 → 0.1
Time: 1.3s
Precision: binary64
\[\frac{x \cdot x - 3}{6}\]
\[\frac{x}{\frac{6}{x}} - 0.5\]
\frac{x \cdot x - 3}{6}
\frac{x}{\frac{6}{x}} - 0.5
(FPCore (x) :precision binary64 (/ (- (* x x) 3.0) 6.0))
(FPCore (x) :precision binary64 (- (/ x (/ 6.0 x)) 0.5))
double code(double x) {
	return (((double) (((double) (x * x)) - 3.0)) / 6.0);
}
double code(double x) {
	return ((double) ((x / (6.0 / x)) - 0.5));
}

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

    \[\frac{x \cdot x - 3}{6}\]
  2. Using strategy rm
  3. Applied div-sub_binary640.1

    \[\leadsto \color{blue}{\frac{x \cdot x}{6} - \frac{3}{6}}\]
  4. Simplified0.1

    \[\leadsto \frac{x \cdot x}{6} - \color{blue}{0.5}\]
  5. Using strategy rm
  6. Applied associate-/l*_binary640.1

    \[\leadsto \color{blue}{\frac{x}{\frac{6}{x}}} - 0.5\]
  7. Final simplification0.1

    \[\leadsto \frac{x}{\frac{6}{x}} - 0.5\]

Reproduce

herbie shell --seed 2020219 
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"
  :precision binary64
  (/ (- (* x x) 3.0) 6.0))