Average Error: 3.1 → 3.1
Time: 1.7s
Precision: binary64
\[\mathsf{erf}\left(\left(t \cdot \left(c2 - p\right)\right)\right) - \mathsf{erf}\left(\left(t \cdot \left(c1 - p\right)\right)\right)\]
\[\mathsf{erf}\left(\left(t \cdot \left(c2 - p\right)\right)\right) - \mathsf{erf}\left(\left(t \cdot \left(c1 - p\right)\right)\right)\]
\mathsf{erf}\left(\left(t \cdot \left(c2 - p\right)\right)\right) - \mathsf{erf}\left(\left(t \cdot \left(c1 - p\right)\right)\right)
\mathsf{erf}\left(\left(t \cdot \left(c2 - p\right)\right)\right) - \mathsf{erf}\left(\left(t \cdot \left(c1 - p\right)\right)\right)
double code(double t, double c2, double p, double c1) {
	return ((double) (((double) erf(((double) (t * ((double) (c2 - p)))))) - ((double) erf(((double) (t * ((double) (c1 - p))))))));
}
double code(double t, double c2, double p, double c1) {
	return ((double) (((double) erf(((double) (t * ((double) (c2 - p)))))) - ((double) erf(((double) (t * ((double) (c1 - p))))))));
}

Error

Bits error versus t

Bits error versus c2

Bits error versus p

Bits error versus c1

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 3.1

    \[\mathsf{erf}\left(\left(t \cdot \left(c2 - p\right)\right)\right) - \mathsf{erf}\left(\left(t \cdot \left(c1 - p\right)\right)\right)\]
  2. Final simplification3.1

    \[\leadsto \mathsf{erf}\left(\left(t \cdot \left(c2 - p\right)\right)\right) - \mathsf{erf}\left(\left(t \cdot \left(c1 - p\right)\right)\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (t c2 p c1)
  :name "(- (erf (* t (- c2 p))) (erf (* t (- c1 p))))"
  :precision binary64
  (- (erf (* t (- c2 p))) (erf (* t (- c1 p)))))