Average Error: 0.2 → 0.1
Time: 17.2s
Precision: 64
\[\left(1 - 2 \cdot b\right) + \frac{\left(b \cdot b\right) \cdot 5}{4}\]
\[b \cdot \left(b \cdot \frac{5}{4} - 2\right) + 1\]
\left(1 - 2 \cdot b\right) + \frac{\left(b \cdot b\right) \cdot 5}{4}
b \cdot \left(b \cdot \frac{5}{4} - 2\right) + 1
double f(double b) {
        double r2674183 = 1.0;
        double r2674184 = 2.0;
        double r2674185 = b;
        double r2674186 = r2674184 * r2674185;
        double r2674187 = r2674183 - r2674186;
        double r2674188 = r2674185 * r2674185;
        double r2674189 = 5.0;
        double r2674190 = r2674188 * r2674189;
        double r2674191 = 4.0;
        double r2674192 = r2674190 / r2674191;
        double r2674193 = r2674187 + r2674192;
        return r2674193;
}

double f(double b) {
        double r2674194 = b;
        double r2674195 = 5.0;
        double r2674196 = 4.0;
        double r2674197 = r2674195 / r2674196;
        double r2674198 = r2674194 * r2674197;
        double r2674199 = 2.0;
        double r2674200 = r2674198 - r2674199;
        double r2674201 = r2674194 * r2674200;
        double r2674202 = 1.0;
        double r2674203 = r2674201 + r2674202;
        return r2674203;
}

Error

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\left(1 - 2 \cdot b\right) + \frac{\left(b \cdot b\right) \cdot 5}{4}\]
  2. Simplified0.1

    \[\leadsto \color{blue}{1 + b \cdot \left(\frac{5}{4} \cdot b - 2\right)}\]
  3. Final simplification0.1

    \[\leadsto b \cdot \left(b \cdot \frac{5}{4} - 2\right) + 1\]

Reproduce

herbie shell --seed 1 
(FPCore (b)
  :name "1 - (2 * b) + ((b * b) * 5) / 4"
  (+ (- 1.0 (* 2.0 b)) (/ (* (* b b) 5.0) 4.0)))