Average Error: 0.0 → 0.0
Time: 2.1s
Precision: 64
\[x + y \cdot \left(z + x\right)\]
\[\left(x + z \cdot y\right) + x \cdot y\]
x + y \cdot \left(z + x\right)
\left(x + z \cdot y\right) + x \cdot y
double f(double x, double y, double z) {
        double r135960 = x;
        double r135961 = y;
        double r135962 = z;
        double r135963 = r135962 + r135960;
        double r135964 = r135961 * r135963;
        double r135965 = r135960 + r135964;
        return r135965;
}

double f(double x, double y, double z) {
        double r135966 = x;
        double r135967 = z;
        double r135968 = y;
        double r135969 = r135967 * r135968;
        double r135970 = r135966 + r135969;
        double r135971 = r135966 * r135968;
        double r135972 = r135970 + r135971;
        return r135972;
}

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-rgt-in0.0

    \[\leadsto x + \color{blue}{\left(z \cdot y + x \cdot y\right)}\]
  4. Applied associate-+r+0.0

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

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

Reproduce

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