Average Error: 0.0 → 0.0
Time: 2.5s
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 r136840 = x;
        double r136841 = y;
        double r136842 = z;
        double r136843 = r136842 + r136840;
        double r136844 = r136841 * r136843;
        double r136845 = r136840 + r136844;
        return r136845;
}

double f(double x, double y, double z) {
        double r136846 = x;
        double r136847 = z;
        double r136848 = y;
        double r136849 = r136847 * r136848;
        double r136850 = r136846 + r136849;
        double r136851 = r136846 * r136848;
        double r136852 = r136850 + r136851;
        return r136852;
}

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 2020035 
(FPCore (x y z)
  :name "Main:bigenough2 from A"
  :precision binary64
  (+ x (* y (+ z x))))