Average Error: 0.1 → 0.1
Time: 1.5s
Precision: binary64
\[\frac{x \cdot x - 3}{6}\]
\[x \cdot \left(x \cdot 0.16666666666666666\right) - 0.5\]
\frac{x \cdot x - 3}{6}
x \cdot \left(x \cdot 0.16666666666666666\right) - 0.5
(FPCore (x) :precision binary64 (/ (- (* x x) 3.0) 6.0))
(FPCore (x) :precision binary64 (- (* x (* x 0.16666666666666666)) 0.5))
double code(double x) {
	return (((double) (((double) (x * x)) - 3.0)) / 6.0);
}
double code(double x) {
	return ((double) (((double) (x * ((double) (x * 0.16666666666666666)))) - 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 Error: 0.1 bits

    \[\frac{x \cdot x - 3}{6}\]
  2. Taylor expanded around 0 Error: 0.2 bits

    \[\leadsto \color{blue}{0.16666666666666666 \cdot {x}^{2} - 0.5}\]
  3. SimplifiedError: 0.1 bits

    \[\leadsto \color{blue}{x \cdot \left(x \cdot 0.16666666666666666\right) - 0.5}\]
  4. Final simplificationError: 0.1 bits

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

Reproduce

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