Average Error: 0.0 → 0.0
Time: 11.2s
Precision: 64
\[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 f(double a, double b, double t) {
        double r1507137 = a;
        double r1507138 = b;
        double r1507139 = r1507138 - r1507137;
        double r1507140 = t;
        double r1507141 = r1507139 * r1507140;
        double r1507142 = r1507137 + r1507141;
        return r1507142;
}

double f(double a, double b, double t) {
        double r1507143 = a;
        double r1507144 = b;
        double r1507145 = r1507144 - r1507143;
        double r1507146 = t;
        double r1507147 = r1507145 * r1507146;
        double r1507148 = r1507143 + r1507147;
        return r1507148;
}

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 1 
(FPCore (a b t)
  :name "a + (b - a) * t"
  :precision binary64
  (+ a (* (- b a) t)))