Average Error: 0.0 → 0.0
Time: 1.6s
Precision: binary64
\[\left(x \cdot ptx + y \cdot pty\right) + z \cdot ptz\]
\[\left(x \cdot ptx + y \cdot pty\right) + z \cdot ptz\]
\left(x \cdot ptx + y \cdot pty\right) + z \cdot ptz
\left(x \cdot ptx + y \cdot pty\right) + z \cdot ptz
double code(double x, double ptx, double y, double pty, double z, double ptz) {
	return ((double) (((double) (((double) (x * ptx)) + ((double) (y * pty)))) + ((double) (z * ptz))));
}
double code(double x, double ptx, double y, double pty, double z, double ptz) {
	return ((double) (((double) (((double) (x * ptx)) + ((double) (y * pty)))) + ((double) (z * ptz))));
}

Error

Bits error versus x

Bits error versus ptx

Bits error versus y

Bits error versus pty

Bits error versus z

Bits error versus ptz

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(x \cdot ptx + y \cdot pty\right) + z \cdot ptz\]
  2. Final simplification0.0

    \[\leadsto \left(x \cdot ptx + y \cdot pty\right) + z \cdot ptz\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x ptx y pty z ptz)
  :name "(+ (+ (* x ptx) (* y pty)) (* z ptz))"
  :precision binary64
  (+ (+ (* x ptx) (* y pty)) (* z ptz)))