Average Error: 0.0 → 0.0
Time: 10.4s
Precision: 64
\[0.0 \le a \le 1\]
\[b + a \cdot \left(c - b\right)\]
\[b + a \cdot \left(c - b\right)\]
b + a \cdot \left(c - b\right)
b + a \cdot \left(c - b\right)
double f(double b, double a, double c) {
        double r1195307 = b;
        double r1195308 = a;
        double r1195309 = c;
        double r1195310 = r1195309 - r1195307;
        double r1195311 = r1195308 * r1195310;
        double r1195312 = r1195307 + r1195311;
        return r1195312;
}

double f(double b, double a, double c) {
        double r1195313 = b;
        double r1195314 = a;
        double r1195315 = c;
        double r1195316 = r1195315 - r1195313;
        double r1195317 = r1195314 * r1195316;
        double r1195318 = r1195313 + r1195317;
        return r1195318;
}

Error

Bits error versus b

Bits error versus a

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

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

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

Reproduce

herbie shell --seed 1 
(FPCore (b a c)
  :name "b + a * (c - b) "
  :precision binary64
  :pre (<= 0.0 a 1)
  (+ b (* a (- c b))))