Average Error: 0.0 → 0.0
Time: 907.0ms
Precision: binary64
\[a \cdot x + \left(1 - a\right) \cdot y\]
\[a \cdot x + \left(1 - a\right) \cdot y\]
a \cdot x + \left(1 - a\right) \cdot y
a \cdot x + \left(1 - a\right) \cdot y
double code(double a, double x, double y) {
	return ((double) (((double) (a * x)) + ((double) (((double) (1.0 - a)) * y))));
}
double code(double a, double x, double y) {
	return ((double) (((double) (a * x)) + ((double) (((double) (1.0 - a)) * y))));
}

Error

Bits error versus a

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 0.0

    \[a \cdot x + \left(1 - a\right) \cdot y\]
  2. Final simplification0.0

    \[\leadsto a \cdot x + \left(1 - a\right) \cdot y\]

Reproduce

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