Average Error: 20.1 → 0.0
Time: 2.7s
Precision: binary64
\[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z \]
\[\left(y \cdot \sqrt[3]{-1}\right) \cdot \left(z - x\right) \]
\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z
\left(y \cdot \sqrt[3]{-1}\right) \cdot \left(z - x\right)
(FPCore (x y z)
 :precision binary64
 (- (+ (- (* x y) (* y y)) (* y y)) (* y z)))
(FPCore (x y z) :precision binary64 (* (* y (cbrt -1.0)) (- z x)))
double code(double x, double y, double z) {
	return (((x * y) - (y * y)) + (y * y)) - (y * z);
}
double code(double x, double y, double z) {
	return (y * cbrt(-1.0)) * (z - x);
}

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

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

Derivation

  1. Initial program 20.1

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

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

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

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

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

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

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

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

Reproduce

herbie shell --seed 2022088 
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, D"
  :precision binary64

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

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