Average Error: 0.0 → 0.0
Time: 895.0ms
Precision: binary64
\[a + \left(b - a\right) \cdot t\]
\[a + \left(b - a\right) \cdot t\]
a + \left(b - a\right) \cdot t
a + \left(b - a\right) \cdot t
double code(double a, double b, double t) {
	return ((double) (a + ((double) (((double) (b - a)) * t))));
}
double code(double a, double b, double t) {
	return ((double) (a + ((double) (((double) (b - a)) * t))));
}

Error

Bits error versus a

Bits error versus b

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[a + \left(b - a\right) \cdot t\]
  2. Final simplification0.0

    \[\leadsto a + \left(b - a\right) \cdot t\]

Reproduce

herbie shell --seed 2020153 
(FPCore (a b t)
  :name "(+ a (* (- b a) t))"
  :precision binary64
  (+ a (* (- b a) t)))