Average Error: 17.8 → 0.0
Time: 13.1s
Precision: 64
\[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
\[\left(\sqrt[3]{-1} \cdot y\right) \cdot z - x \cdot \left(\sqrt[3]{-1} \cdot y\right)\]
\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
\left(\sqrt[3]{-1} \cdot y\right) \cdot z - x \cdot \left(\sqrt[3]{-1} \cdot y\right)
double f(double x, double y, double z) {
        double r397122 = x;
        double r397123 = y;
        double r397124 = r397122 * r397123;
        double r397125 = r397123 * r397123;
        double r397126 = r397124 + r397125;
        double r397127 = z;
        double r397128 = r397123 * r397127;
        double r397129 = r397126 - r397128;
        double r397130 = r397129 - r397125;
        return r397130;
}

double f(double x, double y, double z) {
        double r397131 = -1.0;
        double r397132 = cbrt(r397131);
        double r397133 = y;
        double r397134 = r397132 * r397133;
        double r397135 = z;
        double r397136 = r397134 * r397135;
        double r397137 = x;
        double r397138 = r397137 * r397134;
        double r397139 = r397136 - r397138;
        return r397139;
}

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

Target

Original17.8
Target0.0
Herbie0.0
\[\left(x - z\right) \cdot y\]

Derivation

  1. Initial program 17.8

    \[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\left(x - z\right) \cdot y}\]
  3. Using strategy rm
  4. Applied add-cbrt-cube34.6

    \[\leadsto \left(x - z\right) \cdot \color{blue}{\sqrt[3]{\left(y \cdot y\right) \cdot y}}\]
  5. Applied add-cbrt-cube50.6

    \[\leadsto \color{blue}{\sqrt[3]{\left(\left(x - z\right) \cdot \left(x - z\right)\right) \cdot \left(x - z\right)}} \cdot \sqrt[3]{\left(y \cdot y\right) \cdot y}\]
  6. Applied cbrt-unprod52.8

    \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(x - z\right) \cdot \left(x - z\right)\right) \cdot \left(x - z\right)\right) \cdot \left(\left(y \cdot y\right) \cdot y\right)}}\]
  7. Simplified34.8

    \[\leadsto \sqrt[3]{\color{blue}{{\left(\left(x - z\right) \cdot y\right)}^{3}}}\]
  8. Taylor expanded around -inf 0.0

    \[\leadsto \color{blue}{\sqrt[3]{-1} \cdot \left(y \cdot z\right) - x \cdot \left(\sqrt[3]{-1} \cdot y\right)}\]
  9. Simplified0.0

    \[\leadsto \color{blue}{z \cdot \left(y \cdot \sqrt[3]{-1}\right) - x \cdot \left(\sqrt[3]{-1} \cdot y\right)}\]
  10. Final simplification0.0

    \[\leadsto \left(\sqrt[3]{-1} \cdot y\right) \cdot z - x \cdot \left(\sqrt[3]{-1} \cdot y\right)\]

Reproduce

herbie shell --seed 2019196 
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, C"

  :herbie-target
  (* (- x z) y)

  (- (- (+ (* x y) (* y y)) (* y z)) (* y y)))