Average Error: 0.0 → 0.0
Time: 15.1s
Precision: 64
\[x + y \cdot \left(z - x\right)\]
\[x + \left(y \cdot z + \left(-x\right) \cdot y\right)\]
x + y \cdot \left(z - x\right)
x + \left(y \cdot z + \left(-x\right) \cdot y\right)
double f(double x, double y, double z) {
        double r1036800 = x;
        double r1036801 = y;
        double r1036802 = z;
        double r1036803 = r1036802 - r1036800;
        double r1036804 = r1036801 * r1036803;
        double r1036805 = r1036800 + r1036804;
        return r1036805;
}

double f(double x, double y, double z) {
        double r1036806 = x;
        double r1036807 = y;
        double r1036808 = z;
        double r1036809 = r1036807 * r1036808;
        double r1036810 = -r1036806;
        double r1036811 = r1036810 * r1036807;
        double r1036812 = r1036809 + r1036811;
        double r1036813 = r1036806 + r1036812;
        return r1036813;
}

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 sub-neg0.0

    \[\leadsto x + y \cdot \color{blue}{\left(z + \left(-x\right)\right)}\]
  4. Applied distribute-rgt-in0.0

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

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

Reproduce

herbie shell --seed 2019171 
(FPCore (x y z)
  :name "SynthBasics:oscSampleBasedAux from YampaSynth-0.2"
  (+ x (* y (- z x))))