Average Error: 0.0 → 0.0
Time: 9.8s
Precision: 64
\[A + \alpha \cdot \left(B - A\right)\]
\[A + \alpha \cdot \left(B - A\right)\]
A + \alpha \cdot \left(B - A\right)
A + \alpha \cdot \left(B - A\right)
double f(double A, double alpha, double B) {
        double r1725967 = A;
        double r1725968 = alpha;
        double r1725969 = B;
        double r1725970 = r1725969 - r1725967;
        double r1725971 = r1725968 * r1725970;
        double r1725972 = r1725967 + r1725971;
        return r1725972;
}

double f(double A, double alpha, double B) {
        double r1725973 = A;
        double r1725974 = alpha;
        double r1725975 = B;
        double r1725976 = r1725975 - r1725973;
        double r1725977 = r1725974 * r1725976;
        double r1725978 = r1725973 + r1725977;
        return r1725978;
}

Error

Bits error versus A

Bits error versus alpha

Bits error versus B

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[A + \alpha \cdot \left(B - A\right)\]
  2. Final simplification0.0

    \[\leadsto A + \alpha \cdot \left(B - A\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (A alpha B)
  :name "A + (alpha * (B-A))"
  :precision binary64
  (+ A (* alpha (- B A))))