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

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-inv_binary640.2

    \[\leadsto \color{blue}{\left(x \cdot x - 3\right) \cdot \frac{1}{6}}\]
  4. Simplified0.2

    \[\leadsto \left(x \cdot x - 3\right) \cdot \color{blue}{0.16666666666666666}\]
  5. Final simplification0.2

    \[\leadsto \left(x \cdot x - 3\right) \cdot 0.16666666666666666\]

Reproduce

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