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

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

Original0.0
Target0.0
Herbie0.0
\[\frac{x}{z - y} - \frac{y}{z - y}\]

Derivation

  1. Initial program 0.0

    \[\frac{x - y}{z - y}\]
  2. Using strategy rm
  3. Applied add-cbrt-cube_binary6419.3

    \[\leadsto \color{blue}{\sqrt[3]{\left(\frac{x - y}{z - y} \cdot \frac{x - y}{z - y}\right) \cdot \frac{x - y}{z - y}}}\]
  4. Simplified19.3

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

    \[\leadsto \color{blue}{\frac{y \cdot \sqrt[3]{-1}}{z - y} - \frac{x \cdot \sqrt[3]{-1}}{z - y}}\]
  6. Simplified0.0

    \[\leadsto \color{blue}{\frac{y}{z - y} \cdot \sqrt[3]{-1} - \frac{x}{z - y} \cdot \sqrt[3]{-1}}\]
  7. Final simplification0.0

    \[\leadsto \frac{y}{z - y} \cdot \sqrt[3]{-1} - \sqrt[3]{-1} \cdot \frac{x}{z - y}\]

Alternatives

Reproduce

herbie shell --seed 2021118 
(FPCore (x y z)
  :name "Graphics.Rasterific.Shading:$sgradientColorAt from Rasterific-0.6.1"
  :precision binary64

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

  (/ (- x y) (- z y)))