Average Error: 0.0 → 0.0
Time: 3.3s
Precision: binary64
\[\frac{x - y}{z - y} \]
\[\frac{x - y}{z - y} \]
(FPCore (x y z) :precision binary64 (/ (- x y) (- z y)))
(FPCore (x y z) :precision binary64 (/ (- x y) (- z y)))
double code(double x, double y, double z) {
	return (x - y) / (z - y);
}
double code(double x, double y, double z) {
	return (x - y) / (z - y);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x - y) / (z - y)
end function
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x - y) / (z - y)
end function
public static double code(double x, double y, double z) {
	return (x - y) / (z - y);
}
public static double code(double x, double y, double z) {
	return (x - y) / (z - y);
}
def code(x, y, z):
	return (x - y) / (z - y)
def code(x, y, z):
	return (x - y) / (z - y)
function code(x, y, z)
	return Float64(Float64(x - y) / Float64(z - y))
end
function code(x, y, z)
	return Float64(Float64(x - y) / Float64(z - y))
end
function tmp = code(x, y, z)
	tmp = (x - y) / (z - y);
end
function tmp = code(x, y, z)
	tmp = (x - y) / (z - y);
end
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
\frac{x - y}{z - y}
\frac{x - y}{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. Taylor expanded in x around 0 0.0

    \[\leadsto \color{blue}{\frac{x}{z - y} - \frac{y}{z - y}} \]
  3. Applied egg-rr0.0

    \[\leadsto \color{blue}{\frac{\frac{x - y}{1}}{z - y}} \]
  4. Final simplification0.0

    \[\leadsto \frac{x - y}{z - y} \]

Reproduce

herbie shell --seed 2022150 
(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)))