
(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 (if (or (<= y -4.3e-79) (not (<= y 1e-78))) (- 1.0 (/ x y)) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -4.3e-79) || !(y <= 1e-78)) {
tmp = 1.0 - (x / y);
} 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 <= (-4.3d-79)) .or. (.not. (y <= 1d-78))) then
tmp = 1.0d0 - (x / y)
else
tmp = x / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -4.3e-79) || !(y <= 1e-78)) {
tmp = 1.0 - (x / y);
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -4.3e-79) or not (y <= 1e-78): tmp = 1.0 - (x / y) else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -4.3e-79) || !(y <= 1e-78)) tmp = Float64(1.0 - Float64(x / y)); else tmp = Float64(x / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -4.3e-79) || ~((y <= 1e-78))) tmp = 1.0 - (x / y); else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -4.3e-79], N[Not[LessEqual[y, 1e-78]], $MachinePrecision]], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{-79} \lor \neg \left(y \leq 10^{-78}\right):\\
\;\;\;\;1 - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if y < -4.29999999999999982e-79 or 9.99999999999999999e-79 < y Initial program 100.0%
sub-neg100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
+-commutative100.0%
sub-neg100.0%
neg-mul-1100.0%
associate-/r*100.0%
div-sub100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.9%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.8%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
unsub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 68.5%
div-sub68.5%
*-inverses68.5%
Simplified68.5%
if -4.29999999999999982e-79 < y < 9.99999999999999999e-79Initial program 99.9%
sub-neg99.9%
remove-double-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
sub-neg99.9%
neg-mul-199.9%
associate-/r*99.9%
div-sub99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.7%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
unsub-neg99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 72.9%
Final simplification70.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -6.5e-52) (not (<= y 3.1e+52))) (- 1.0 (/ x y)) (/ x (- z y))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -6.5e-52) || !(y <= 3.1e+52)) {
tmp = 1.0 - (x / y);
} else {
tmp = x / (z - y);
}
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 <= (-6.5d-52)) .or. (.not. (y <= 3.1d+52))) then
tmp = 1.0d0 - (x / y)
else
tmp = x / (z - y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -6.5e-52) || !(y <= 3.1e+52)) {
tmp = 1.0 - (x / y);
} else {
tmp = x / (z - y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -6.5e-52) or not (y <= 3.1e+52): tmp = 1.0 - (x / y) else: tmp = x / (z - y) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -6.5e-52) || !(y <= 3.1e+52)) tmp = Float64(1.0 - Float64(x / y)); else tmp = Float64(x / Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -6.5e-52) || ~((y <= 3.1e+52))) tmp = 1.0 - (x / y); else tmp = x / (z - y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -6.5e-52], N[Not[LessEqual[y, 3.1e+52]], $MachinePrecision]], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-52} \lor \neg \left(y \leq 3.1 \cdot 10^{+52}\right):\\
\;\;\;\;1 - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z - y}\\
\end{array}
\end{array}
if y < -6.5e-52 or 3.1e52 < y Initial program 100.0%
sub-neg100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
+-commutative100.0%
sub-neg100.0%
neg-mul-1100.0%
associate-/r*100.0%
div-sub100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.9%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.8%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
unsub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 76.9%
div-sub76.9%
*-inverses76.9%
Simplified76.9%
if -6.5e-52 < y < 3.1e52Initial program 99.9%
sub-neg99.9%
remove-double-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
sub-neg99.9%
neg-mul-199.9%
associate-/r*99.9%
div-sub99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.7%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
unsub-neg99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in x around inf 77.5%
neg-mul-177.5%
distribute-neg-frac77.5%
Simplified77.5%
frac-2neg77.5%
div-inv77.1%
remove-double-neg77.1%
Applied egg-rr77.1%
Taylor expanded in x around 0 77.5%
Final simplification77.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -7.6e-61) (not (<= y 6.5e+22))) (/ y (- y z)) (/ x (- z y))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -7.6e-61) || !(y <= 6.5e+22)) {
tmp = y / (y - z);
} else {
tmp = x / (z - y);
}
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 <= (-7.6d-61)) .or. (.not. (y <= 6.5d+22))) then
tmp = y / (y - z)
else
tmp = x / (z - y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -7.6e-61) || !(y <= 6.5e+22)) {
tmp = y / (y - z);
} else {
tmp = x / (z - y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -7.6e-61) or not (y <= 6.5e+22): tmp = y / (y - z) else: tmp = x / (z - y) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -7.6e-61) || !(y <= 6.5e+22)) tmp = Float64(y / Float64(y - z)); else tmp = Float64(x / Float64(z - y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -7.6e-61) || ~((y <= 6.5e+22))) tmp = y / (y - z); else tmp = x / (z - y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -7.6e-61], N[Not[LessEqual[y, 6.5e+22]], $MachinePrecision]], N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{-61} \lor \neg \left(y \leq 6.5 \cdot 10^{+22}\right):\\
\;\;\;\;\frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z - y}\\
\end{array}
\end{array}
if y < -7.59999999999999961e-61 or 6.49999999999999979e22 < y Initial program 100.0%
sub-neg100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
+-commutative100.0%
sub-neg100.0%
neg-mul-1100.0%
associate-/r*100.0%
div-sub100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.9%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.8%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
unsub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 81.4%
if -7.59999999999999961e-61 < y < 6.49999999999999979e22Initial program 99.9%
sub-neg99.9%
remove-double-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
sub-neg99.9%
neg-mul-199.9%
associate-/r*99.9%
div-sub99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.7%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
unsub-neg99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in x around inf 81.7%
neg-mul-181.7%
distribute-neg-frac81.7%
Simplified81.7%
frac-2neg81.7%
div-inv81.3%
remove-double-neg81.3%
Applied egg-rr81.3%
Taylor expanded in x around 0 81.7%
Final simplification81.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.2e+64) (not (<= z 5e-69))) (/ (- x y) z) (- 1.0 (/ x y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.2e+64) || !(z <= 5e-69)) {
tmp = (x - y) / z;
} else {
tmp = 1.0 - (x / y);
}
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 ((z <= (-5.2d+64)) .or. (.not. (z <= 5d-69))) then
tmp = (x - y) / z
else
tmp = 1.0d0 - (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.2e+64) || !(z <= 5e-69)) {
tmp = (x - y) / z;
} else {
tmp = 1.0 - (x / y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.2e+64) or not (z <= 5e-69): tmp = (x - y) / z else: tmp = 1.0 - (x / y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.2e+64) || !(z <= 5e-69)) tmp = Float64(Float64(x - y) / z); else tmp = Float64(1.0 - Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.2e+64) || ~((z <= 5e-69))) tmp = (x - y) / z; else tmp = 1.0 - (x / y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.2e+64], N[Not[LessEqual[z, 5e-69]], $MachinePrecision]], N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+64} \lor \neg \left(z \leq 5 \cdot 10^{-69}\right):\\
\;\;\;\;\frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{y}\\
\end{array}
\end{array}
if z < -5.19999999999999994e64 or 5.00000000000000033e-69 < z Initial program 100.0%
sub-neg100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
+-commutative100.0%
sub-neg100.0%
neg-mul-1100.0%
associate-/r*100.0%
div-sub100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.8%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.9%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
unsub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
clear-num99.4%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 80.6%
associate-*r/80.6%
sub-neg80.6%
mul-1-neg80.6%
distribute-lft-in80.6%
neg-mul-180.6%
neg-mul-180.6%
mul-1-neg80.6%
remove-double-neg80.6%
+-commutative80.6%
unsub-neg80.6%
Simplified80.6%
if -5.19999999999999994e64 < z < 5.00000000000000033e-69Initial program 99.9%
sub-neg99.9%
remove-double-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
sub-neg99.9%
neg-mul-199.9%
associate-/r*99.9%
div-sub99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.8%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.8%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
unsub-neg99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 83.1%
div-sub83.2%
*-inverses83.2%
Simplified83.2%
Final simplification81.8%
(FPCore (x y z) :precision binary64 (if (<= y -7.5e-45) 1.0 (if (<= y 2.3e+23) (/ x z) 1.0)))
double code(double x, double y, double z) {
double tmp;
if (y <= -7.5e-45) {
tmp = 1.0;
} else if (y <= 2.3e+23) {
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 <= (-7.5d-45)) then
tmp = 1.0d0
else if (y <= 2.3d+23) 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 <= -7.5e-45) {
tmp = 1.0;
} else if (y <= 2.3e+23) {
tmp = x / z;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -7.5e-45: tmp = 1.0 elif y <= 2.3e+23: tmp = x / z else: tmp = 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -7.5e-45) tmp = 1.0; elseif (y <= 2.3e+23) tmp = Float64(x / z); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -7.5e-45) tmp = 1.0; elseif (y <= 2.3e+23) tmp = x / z; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -7.5e-45], 1.0, If[LessEqual[y, 2.3e+23], N[(x / z), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+23}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -7.5000000000000006e-45 or 2.3e23 < y Initial program 100.0%
sub-neg100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
+-commutative100.0%
sub-neg100.0%
neg-mul-1100.0%
associate-/r*100.0%
div-sub100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.9%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.8%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
unsub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 62.1%
if -7.5000000000000006e-45 < y < 2.3e23Initial program 99.9%
sub-neg99.9%
remove-double-neg99.9%
distribute-neg-in99.9%
+-commutative99.9%
sub-neg99.9%
neg-mul-199.9%
associate-/r*99.9%
div-sub99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.7%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
remove-double-neg99.9%
neg-mul-199.9%
associate-/l*99.9%
associate-/r/99.9%
metadata-eval99.9%
*-lft-identity99.9%
unsub-neg99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 64.6%
Final simplification63.4%
(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%
sub-neg100.0%
remove-double-neg100.0%
distribute-neg-in100.0%
+-commutative100.0%
sub-neg100.0%
neg-mul-1100.0%
associate-/r*100.0%
div-sub100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.8%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
remove-double-neg100.0%
neg-mul-1100.0%
associate-/l*99.8%
associate-/r/100.0%
metadata-eval100.0%
*-lft-identity100.0%
unsub-neg100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 35.3%
Final simplification35.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 2024031
(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)))