Average Error: 7.5 → 7.5
Time: 1.3s
Precision: binary64
\[\mathsf{erf}\left(\left(x + y\right)\right) - \mathsf{erf}\left(\left(x - y\right)\right)\]
\[\mathsf{erf}\left(\left(x + y\right)\right) - \mathsf{erf}\left(\left(x - y\right)\right)\]
\mathsf{erf}\left(\left(x + y\right)\right) - \mathsf{erf}\left(\left(x - y\right)\right)
\mathsf{erf}\left(\left(x + y\right)\right) - \mathsf{erf}\left(\left(x - y\right)\right)
double code(double x, double y) {
	return ((double) (((double) erf(((double) (x + y)))) - ((double) erf(((double) (x - y))))));
}
double code(double x, double y) {
	return ((double) (((double) erf(((double) (x + y)))) - ((double) erf(((double) (x - y))))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 7.5

    \[\mathsf{erf}\left(\left(x + y\right)\right) - \mathsf{erf}\left(\left(x - y\right)\right)\]
  2. Final simplification7.5

    \[\leadsto \mathsf{erf}\left(\left(x + y\right)\right) - \mathsf{erf}\left(\left(x - y\right)\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x y)
  :name "(- (erf (+ x y)) (erf (- x y)))"
  :precision binary64
  (- (erf (+ x y)) (erf (- x y))))