
(FPCore (x y z) :precision binary64 (/ (- 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
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)
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
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (- 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
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)
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
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y}
\end{array}
(FPCore (x y z) :precision binary64 (/ (- 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
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)
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
code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y}
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (- y x) y)))
(if (<= y -1.1e-48)
t_0
(if (<= y 2e-39) (/ x z) (if (<= y 1.02e+79) t_0 (/ y (- y z)))))))
double code(double x, double y, double z) {
double t_0 = (y - x) / y;
double tmp;
if (y <= -1.1e-48) {
tmp = t_0;
} else if (y <= 2e-39) {
tmp = x / z;
} else if (y <= 1.02e+79) {
tmp = t_0;
} else {
tmp = y / (y - z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (y - x) / y
if (y <= (-1.1d-48)) then
tmp = t_0
else if (y <= 2d-39) then
tmp = x / z
else if (y <= 1.02d+79) then
tmp = t_0
else
tmp = y / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (y - x) / y;
double tmp;
if (y <= -1.1e-48) {
tmp = t_0;
} else if (y <= 2e-39) {
tmp = x / z;
} else if (y <= 1.02e+79) {
tmp = t_0;
} else {
tmp = y / (y - z);
}
return tmp;
}
def code(x, y, z): t_0 = (y - x) / y tmp = 0 if y <= -1.1e-48: tmp = t_0 elif y <= 2e-39: tmp = x / z elif y <= 1.02e+79: tmp = t_0 else: tmp = y / (y - z) return tmp
function code(x, y, z) t_0 = Float64(Float64(y - x) / y) tmp = 0.0 if (y <= -1.1e-48) tmp = t_0; elseif (y <= 2e-39) tmp = Float64(x / z); elseif (y <= 1.02e+79) tmp = t_0; else tmp = Float64(y / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (y - x) / y; tmp = 0.0; if (y <= -1.1e-48) tmp = t_0; elseif (y <= 2e-39) tmp = x / z; elseif (y <= 1.02e+79) tmp = t_0; else tmp = y / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[y, -1.1e-48], t$95$0, If[LessEqual[y, 2e-39], N[(x / z), $MachinePrecision], If[LessEqual[y, 1.02e+79], t$95$0, N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y - x}{y}\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+79}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y - z}\\
\end{array}
\end{array}
if y < -1.10000000000000006e-48 or 1.99999999999999986e-39 < y < 1.02000000000000006e79Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/99.9%
associate-/l*99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 74.1%
if -1.10000000000000006e-48 < y < 1.99999999999999986e-39Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/98.4%
associate-/l*98.2%
neg-mul-198.2%
sub-neg98.2%
+-commutative98.2%
distribute-neg-out98.2%
remove-double-neg98.2%
sub-neg98.2%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 79.1%
if 1.02000000000000006e79 < y Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/99.9%
associate-/l*99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 87.3%
Final simplification78.6%
(FPCore (x y z) :precision binary64 (if (<= y -4.2e-39) 1.0 (if (<= y 3.8e-38) (/ x z) (if (<= y 5.8e+27) (/ (- x) y) 1.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= -4.2e-39) {
tmp = 1.0;
} else if (y <= 3.8e-38) {
tmp = x / z;
} else if (y <= 5.8e+27) {
tmp = -x / y;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-4.2d-39)) then
tmp = 1.0d0
else if (y <= 3.8d-38) then
tmp = x / z
else if (y <= 5.8d+27) then
tmp = -x / y
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -4.2e-39) {
tmp = 1.0;
} else if (y <= 3.8e-38) {
tmp = x / z;
} else if (y <= 5.8e+27) {
tmp = -x / y;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -4.2e-39: tmp = 1.0 elif y <= 3.8e-38: tmp = x / z elif y <= 5.8e+27: tmp = -x / y else: tmp = 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -4.2e-39) tmp = 1.0; elseif (y <= 3.8e-38) tmp = Float64(x / z); elseif (y <= 5.8e+27) tmp = Float64(Float64(-x) / y); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -4.2e-39) tmp = 1.0; elseif (y <= 3.8e-38) tmp = x / z; elseif (y <= 5.8e+27) tmp = -x / y; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -4.2e-39], 1.0, If[LessEqual[y, 3.8e-38], N[(x / z), $MachinePrecision], If[LessEqual[y, 5.8e+27], N[((-x) / y), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-39}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+27}:\\
\;\;\;\;\frac{-x}{y}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -4.19999999999999987e-39 or 5.8000000000000002e27 < y Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/99.9%
associate-/l*99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 55.9%
if -4.19999999999999987e-39 < y < 3.8e-38Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/98.4%
associate-/l*98.3%
neg-mul-198.3%
sub-neg98.3%
+-commutative98.3%
distribute-neg-out98.3%
remove-double-neg98.3%
sub-neg98.3%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 78.4%
if 3.8e-38 < y < 5.8000000000000002e27Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/99.7%
associate-/l*99.7%
neg-mul-199.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-out99.7%
remove-double-neg99.7%
sub-neg99.7%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in x around inf 80.3%
neg-mul-180.3%
distribute-neg-frac80.3%
Simplified80.3%
Taylor expanded in y around inf 70.9%
associate-*r/70.9%
mul-1-neg70.9%
Simplified70.9%
Final simplification65.8%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.02e-38) (not (<= y 1e+59))) (/ y (- y z)) (/ (- x) (- y z))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.02e-38) || !(y <= 1e+59)) {
tmp = y / (y - z);
} else {
tmp = -x / (y - z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-1.02d-38)) .or. (.not. (y <= 1d+59))) then
tmp = y / (y - z)
else
tmp = -x / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.02e-38) || !(y <= 1e+59)) {
tmp = y / (y - z);
} else {
tmp = -x / (y - z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.02e-38) or not (y <= 1e+59): tmp = y / (y - z) else: tmp = -x / (y - z) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.02e-38) || !(y <= 1e+59)) tmp = Float64(y / Float64(y - z)); else tmp = Float64(Float64(-x) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.02e-38) || ~((y <= 1e+59))) tmp = y / (y - z); else tmp = -x / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.02e-38], N[Not[LessEqual[y, 1e+59]], $MachinePrecision]], N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision], N[((-x) / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{-38} \lor \neg \left(y \leq 10^{+59}\right):\\
\;\;\;\;\frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{y - z}\\
\end{array}
\end{array}
if y < -1.01999999999999998e-38 or 9.99999999999999972e58 < y Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/99.9%
associate-/l*99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 77.3%
if -1.01999999999999998e-38 < y < 9.99999999999999972e58Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/98.6%
associate-/l*98.5%
neg-mul-198.5%
sub-neg98.5%
+-commutative98.5%
distribute-neg-out98.5%
remove-double-neg98.5%
sub-neg98.5%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in x around inf 89.3%
neg-mul-189.3%
distribute-neg-frac89.3%
Simplified89.3%
Final simplification83.1%
(FPCore (x y z) :precision binary64 (if (or (<= y -3.1e-43) (not (<= y 2.75e-59))) (/ y (- y z)) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.1e-43) || !(y <= 2.75e-59)) {
tmp = y / (y - z);
} else {
tmp = x / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-3.1d-43)) .or. (.not. (y <= 2.75d-59))) then
tmp = y / (y - z)
else
tmp = x / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -3.1e-43) || !(y <= 2.75e-59)) {
tmp = y / (y - z);
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.1e-43) or not (y <= 2.75e-59): tmp = y / (y - z) else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.1e-43) || !(y <= 2.75e-59)) tmp = Float64(y / Float64(y - z)); else tmp = Float64(x / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -3.1e-43) || ~((y <= 2.75e-59))) tmp = y / (y - z); else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.1e-43], N[Not[LessEqual[y, 2.75e-59]], $MachinePrecision]], N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-43} \lor \neg \left(y \leq 2.75 \cdot 10^{-59}\right):\\
\;\;\;\;\frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if y < -3.0999999999999999e-43 or 2.75000000000000007e-59 < y Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/99.6%
associate-/l*99.5%
neg-mul-199.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-out99.5%
remove-double-neg99.5%
sub-neg99.5%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 71.5%
if -3.0999999999999999e-43 < y < 2.75000000000000007e-59Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/98.8%
associate-/l*98.6%
neg-mul-198.6%
sub-neg98.6%
+-commutative98.6%
distribute-neg-out98.6%
remove-double-neg98.6%
sub-neg98.6%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 80.1%
Final simplification74.9%
(FPCore (x y z) :precision binary64 (if (<= y -9.2e-39) 1.0 (if (<= y 3e-24) (/ x z) 1.0)))
double code(double x, double y, double z) {
double tmp;
if (y <= -9.2e-39) {
tmp = 1.0;
} else if (y <= 3e-24) {
tmp = x / z;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-9.2d-39)) then
tmp = 1.0d0
else if (y <= 3d-24) then
tmp = x / z
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -9.2e-39) {
tmp = 1.0;
} else if (y <= 3e-24) {
tmp = x / z;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -9.2e-39: tmp = 1.0 elif y <= 3e-24: tmp = x / z else: tmp = 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -9.2e-39) tmp = 1.0; elseif (y <= 3e-24) tmp = Float64(x / z); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -9.2e-39) tmp = 1.0; elseif (y <= 3e-24) tmp = x / z; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -9.2e-39], 1.0, If[LessEqual[y, 3e-24], N[(x / z), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-39}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-24}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -9.20000000000000033e-39 or 2.99999999999999995e-24 < y Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/99.9%
associate-/l*99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-out99.8%
remove-double-neg99.8%
sub-neg99.8%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 53.1%
if -9.20000000000000033e-39 < y < 2.99999999999999995e-24Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/98.4%
associate-/l*98.3%
neg-mul-198.3%
sub-neg98.3%
+-commutative98.3%
distribute-neg-out98.3%
remove-double-neg98.3%
sub-neg98.3%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 77.0%
Final simplification63.1%
(FPCore (x y z) :precision binary64 1.0)
double code(double x, double y, double z) {
return 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0
end function
public static double code(double x, double y, double z) {
return 1.0;
}
def code(x, y, z): return 1.0
function code(x, y, z) return 1.0 end
function tmp = code(x, y, z) tmp = 1.0; end
code[x_, y_, z_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/99.3%
associate-/l*99.2%
neg-mul-199.2%
sub-neg99.2%
+-commutative99.2%
distribute-neg-out99.2%
remove-double-neg99.2%
sub-neg99.2%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 32.3%
Final simplification32.3%
(FPCore (x y z) :precision binary64 (- (/ x (- z y)) (/ y (- z y))))
double code(double x, double y, double z) {
return (x / (z - y)) - (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 / (z - y)) - (y / (z - y))
end function
public static double code(double x, double y, double z) {
return (x / (z - y)) - (y / (z - y));
}
def code(x, y, z): return (x / (z - y)) - (y / (z - y))
function code(x, y, z) return Float64(Float64(x / Float64(z - y)) - Float64(y / Float64(z - y))) end
function tmp = code(x, y, z) tmp = (x / (z - y)) - (y / (z - y)); end
code[x_, y_, z_] := N[(N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision] - N[(y / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{z - y} - \frac{y}{z - y}
\end{array}
herbie shell --seed 2023311
(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)))