Average Error: 0.0 → 0.0
Time: 6.3s
Precision: 64
\[x + y \cdot \left(z + x\right)\]
\[x + \left(y \cdot z + x \cdot y\right)\]
x + y \cdot \left(z + x\right)
x + \left(y \cdot z + x \cdot y\right)
double f(double x, double y, double z) {
        double r19850 = x;
        double r19851 = y;
        double r19852 = z;
        double r19853 = r19852 + r19850;
        double r19854 = r19851 * r19853;
        double r19855 = r19850 + r19854;
        return r19855;
}

double f(double x, double y, double z) {
        double r19856 = x;
        double r19857 = y;
        double r19858 = z;
        double r19859 = r19857 * r19858;
        double r19860 = r19856 * r19857;
        double r19861 = r19859 + r19860;
        double r19862 = r19856 + r19861;
        return r19862;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[x + y \cdot \left(z + x\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in0.0

    \[\leadsto x + \color{blue}{\left(y \cdot z + y \cdot x\right)}\]
  4. Simplified0.0

    \[\leadsto x + \left(y \cdot z + \color{blue}{x \cdot y}\right)\]
  5. Final simplification0.0

    \[\leadsto x + \left(y \cdot z + x \cdot y\right)\]

Reproduce

herbie shell --seed 2020045 
(FPCore (x y z)
  :name "Main:bigenough2 from A"
  :precision binary64
  (+ x (* y (+ z x))))