Average Error: 32.0 → 32.0
Time: 1.3s
Precision: binary64
\[\frac{x - y}{\sqrt{p \cdot x + {\left(x - y\right)}^{2}}}\]
\[\frac{x - y}{\sqrt{p \cdot x + {\left(x - y\right)}^{2}}}\]
\frac{x - y}{\sqrt{p \cdot x + {\left(x - y\right)}^{2}}}
\frac{x - y}{\sqrt{p \cdot x + {\left(x - y\right)}^{2}}}
double code(double x, double y, double p) {
	return ((double) (((double) (x - y)) / ((double) sqrt(((double) (((double) (p * x)) + ((double) pow(((double) (x - y)), 2.0))))))));
}
double code(double x, double y, double p) {
	return ((double) (((double) (x - y)) / ((double) sqrt(((double) (((double) (p * x)) + ((double) pow(((double) (x - y)), 2.0))))))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus p

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 32.0

    \[\frac{x - y}{\sqrt{p \cdot x + {\left(x - y\right)}^{2}}}\]
  2. Final simplification32.0

    \[\leadsto \frac{x - y}{\sqrt{p \cdot x + {\left(x - y\right)}^{2}}}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x y p)
  :name "(/ (- x y) (sqrt (+ (* p x) (pow (- x y) 2))))"
  :precision binary64
  (/ (- x y) (sqrt (+ (* p x) (pow (- x y) 2.0)))))