
(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 (<= y -3.3e+49) (/ y (- y z)) (if (<= y 2.5e-29) (/ (- x) (- y z)) (- 1.0 (/ x y)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -3.3e+49) {
tmp = y / (y - z);
} else if (y <= 2.5e-29) {
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 (y <= (-3.3d+49)) then
tmp = y / (y - z)
else if (y <= 2.5d-29) 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 (y <= -3.3e+49) {
tmp = y / (y - z);
} else if (y <= 2.5e-29) {
tmp = -x / (y - z);
} else {
tmp = 1.0 - (x / y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -3.3e+49: tmp = y / (y - z) elif y <= 2.5e-29: tmp = -x / (y - z) else: tmp = 1.0 - (x / y) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -3.3e+49) tmp = Float64(y / Float64(y - z)); elseif (y <= 2.5e-29) tmp = Float64(Float64(-x) / Float64(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 (y <= -3.3e+49) tmp = y / (y - z); elseif (y <= 2.5e-29) tmp = -x / (y - z); else tmp = 1.0 - (x / y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -3.3e+49], N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-29], N[((-x) / N[(y - z), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+49}:\\
\;\;\;\;\frac{y}{y - z}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{-x}{y - z}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{y}\\
\end{array}
\end{array}
if y < -3.2999999999999998e49Initial program 99.9%
*-lft-identity99.9%
metadata-eval99.9%
associate-/r/99.8%
associate-/l*99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
associate-/l*99.9%
neg-mul-199.9%
sub-neg99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 83.2%
if -3.2999999999999998e49 < y < 2.49999999999999993e-29Initial 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%
distribute-neg-out100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in x around inf 84.8%
neg-mul-184.8%
distribute-neg-frac84.8%
Simplified84.8%
if 2.49999999999999993e-29 < y Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/100.0%
associate-/l*99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 83.9%
div-sub83.9%
*-inverses83.9%
Simplified83.9%
Final simplification84.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.15e-47) (not (<= y 1.02e-32))) (- 1.0 (/ x y)) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.15e-47) || !(y <= 1.02e-32)) {
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 <= (-2.15d-47)) .or. (.not. (y <= 1.02d-32))) 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 <= -2.15e-47) || !(y <= 1.02e-32)) {
tmp = 1.0 - (x / y);
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.15e-47) or not (y <= 1.02e-32): tmp = 1.0 - (x / y) else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.15e-47) || !(y <= 1.02e-32)) 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 <= -2.15e-47) || ~((y <= 1.02e-32))) tmp = 1.0 - (x / y); else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.15e-47], N[Not[LessEqual[y, 1.02e-32]], $MachinePrecision]], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{-47} \lor \neg \left(y \leq 1.02 \cdot 10^{-32}\right):\\
\;\;\;\;1 - \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if y < -2.1499999999999999e-47 or 1.02000000000000002e-32 < y Initial program 99.9%
*-lft-identity99.9%
metadata-eval99.9%
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*99.9%
neg-mul-199.9%
sub-neg99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 75.6%
div-sub75.6%
*-inverses75.6%
Simplified75.6%
if -2.1499999999999999e-47 < y < 1.02000000000000002e-32Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/99.6%
associate-/l*99.4%
neg-mul-199.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-out99.4%
remove-double-neg99.4%
sub-neg99.4%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 78.1%
Final simplification76.7%
(FPCore (x y z) :precision binary64 (if (<= y -370000000.0) (/ y (- y z)) (if (<= y 3e-32) (/ x z) (- 1.0 (/ x y)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -370000000.0) {
tmp = y / (y - z);
} else if (y <= 3e-32) {
tmp = x / 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 (y <= (-370000000.0d0)) then
tmp = y / (y - z)
else if (y <= 3d-32) then
tmp = x / 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 (y <= -370000000.0) {
tmp = y / (y - z);
} else if (y <= 3e-32) {
tmp = x / z;
} else {
tmp = 1.0 - (x / y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -370000000.0: tmp = y / (y - z) elif y <= 3e-32: tmp = x / z else: tmp = 1.0 - (x / y) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -370000000.0) tmp = Float64(y / Float64(y - z)); elseif (y <= 3e-32) tmp = Float64(x / z); else tmp = Float64(1.0 - Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -370000000.0) tmp = y / (y - z); elseif (y <= 3e-32) tmp = x / z; else tmp = 1.0 - (x / y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -370000000.0], N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e-32], N[(x / z), $MachinePrecision], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -370000000:\\
\;\;\;\;\frac{y}{y - z}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-32}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{y}\\
\end{array}
\end{array}
if y < -3.7e8Initial program 99.9%
*-lft-identity99.9%
metadata-eval99.9%
associate-/r/99.8%
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*99.9%
neg-mul-199.9%
sub-neg99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 76.6%
if -3.7e8 < y < 3e-32Initial 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%
distribute-neg-out100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 74.5%
if 3e-32 < y Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/100.0%
associate-/l*99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 83.9%
div-sub83.9%
*-inverses83.9%
Simplified83.9%
Final simplification77.8%
(FPCore (x y z) :precision binary64 (if (<= y -1150000000.0) (/ y (- y z)) (if (<= y 4e-31) (/ (- x y) z) (- 1.0 (/ x y)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1150000000.0) {
tmp = y / (y - z);
} else if (y <= 4e-31) {
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 (y <= (-1150000000.0d0)) then
tmp = y / (y - z)
else if (y <= 4d-31) 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 (y <= -1150000000.0) {
tmp = y / (y - z);
} else if (y <= 4e-31) {
tmp = (x - y) / z;
} else {
tmp = 1.0 - (x / y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1150000000.0: tmp = y / (y - z) elif y <= 4e-31: tmp = (x - y) / z else: tmp = 1.0 - (x / y) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1150000000.0) tmp = Float64(y / Float64(y - z)); elseif (y <= 4e-31) 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 (y <= -1150000000.0) tmp = y / (y - z); elseif (y <= 4e-31) tmp = (x - y) / z; else tmp = 1.0 - (x / y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1150000000.0], N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e-31], N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision], N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1150000000:\\
\;\;\;\;\frac{y}{y - z}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-31}:\\
\;\;\;\;\frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{x}{y}\\
\end{array}
\end{array}
if y < -1.15e9Initial program 99.9%
*-lft-identity99.9%
metadata-eval99.9%
associate-/r/99.8%
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*99.9%
neg-mul-199.9%
sub-neg99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 76.6%
if -1.15e9 < y < 4e-31Initial 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%
distribute-neg-out100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 81.5%
associate-*r/81.5%
neg-mul-181.5%
neg-sub081.5%
associate--r-81.5%
neg-sub081.5%
Simplified81.5%
Taylor expanded in y around 0 81.4%
+-commutative81.4%
mul-1-neg81.4%
sub-neg81.4%
div-sub81.5%
Simplified81.5%
if 4e-31 < y Initial program 100.0%
*-lft-identity100.0%
metadata-eval100.0%
associate-/r/100.0%
associate-/l*99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
associate-/l*100.0%
neg-mul-1100.0%
sub-neg100.0%
distribute-neg-out100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around 0 83.9%
div-sub83.9%
*-inverses83.9%
Simplified83.9%
Final simplification81.1%
(FPCore (x y z) :precision binary64 (if (<= y -1250000000.0) 1.0 (if (<= y 3.5e-28) (/ x z) 1.0)))
double code(double x, double y, double z) {
double tmp;
if (y <= -1250000000.0) {
tmp = 1.0;
} else if (y <= 3.5e-28) {
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 <= (-1250000000.0d0)) then
tmp = 1.0d0
else if (y <= 3.5d-28) 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 <= -1250000000.0) {
tmp = 1.0;
} else if (y <= 3.5e-28) {
tmp = x / z;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1250000000.0: tmp = 1.0 elif y <= 3.5e-28: tmp = x / z else: tmp = 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1250000000.0) tmp = 1.0; elseif (y <= 3.5e-28) tmp = Float64(x / z); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1250000000.0) tmp = 1.0; elseif (y <= 3.5e-28) tmp = x / z; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1250000000.0], 1.0, If[LessEqual[y, 3.5e-28], N[(x / z), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1250000000:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y < -1.25e9 or 3.5e-28 < y Initial program 99.9%
*-lft-identity99.9%
metadata-eval99.9%
associate-/r/99.9%
associate-/l*99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
sub-neg99.9%
associate-/l*99.9%
neg-mul-199.9%
sub-neg99.9%
distribute-neg-out99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around inf 63.7%
if -1.25e9 < y < 3.5e-28Initial 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%
distribute-neg-out100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 74.1%
Final simplification68.7%
(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.8%
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%
distribute-neg-out100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 37.1%
Final simplification37.1%
(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 2023274
(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)))