Average Error: 0.0 → 0.0
Time: 3.1s
Precision: binary64
\[{\left(b - a\right)}^{2} + {\left(d - c\right)}^{2}\]
\[{\left(b - a\right)}^{2} + {\left(d - c\right)}^{2}\]
{\left(b - a\right)}^{2} + {\left(d - c\right)}^{2}
{\left(b - a\right)}^{2} + {\left(d - c\right)}^{2}
double code(double b, double a, double d, double c) {
	return ((double) (((double) pow(((double) (b - a)), 2.0)) + ((double) pow(((double) (d - c)), 2.0))));
}
double code(double b, double a, double d, double c) {
	return ((double) (((double) pow(((double) (b - a)), 2.0)) + ((double) pow(((double) (d - c)), 2.0))));
}

Error

Bits error versus b

Bits error versus a

Bits error versus d

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[{\left(b - a\right)}^{2} + {\left(d - c\right)}^{2}\]
  2. Final simplification0.0

    \[\leadsto {\left(b - a\right)}^{2} + {\left(d - c\right)}^{2}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (b a d c)
  :name "(+ (pow (- b a) 2) (pow (- d c) 2))"
  :precision binary64
  (+ (pow (- b a) 2.0) (pow (- d c) 2.0)))