
(FPCore (x y z) :precision binary64 (/ (+ x (* y (- z x))) z))
double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
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 - x))) / z
end function
public static double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
def code(x, y, z): return (x + (y * (z - x))) / z
function code(x, y, z) return Float64(Float64(x + Float64(y * Float64(z - x))) / z) end
function tmp = code(x, y, z) tmp = (x + (y * (z - x))) / z; end
code[x_, y_, z_] := N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y \cdot \left(z - x\right)}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (+ x (* y (- z x))) z))
double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
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 - x))) / z
end function
public static double code(double x, double y, double z) {
return (x + (y * (z - x))) / z;
}
def code(x, y, z): return (x + (y * (z - x))) / z
function code(x, y, z) return Float64(Float64(x + Float64(y * Float64(z - x))) / z) end
function tmp = code(x, y, z) tmp = (x + (y * (z - x))) / z; end
code[x_, y_, z_] := N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y \cdot \left(z - x\right)}{z}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= y -3.3e+50) (not (<= y 420000000000.0))) (* (/ y z) (- z x)) (/ (+ x (* y (- z x))) z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -3.3e+50) || !(y <= 420000000000.0)) {
tmp = (y / z) * (z - x);
} else {
tmp = (x + (y * (z - 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.3d+50)) .or. (.not. (y <= 420000000000.0d0))) then
tmp = (y / z) * (z - x)
else
tmp = (x + (y * (z - x))) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -3.3e+50) || !(y <= 420000000000.0)) {
tmp = (y / z) * (z - x);
} else {
tmp = (x + (y * (z - x))) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -3.3e+50) or not (y <= 420000000000.0): tmp = (y / z) * (z - x) else: tmp = (x + (y * (z - x))) / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -3.3e+50) || !(y <= 420000000000.0)) tmp = Float64(Float64(y / z) * Float64(z - x)); else tmp = Float64(Float64(x + Float64(y * Float64(z - x))) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -3.3e+50) || ~((y <= 420000000000.0))) tmp = (y / z) * (z - x); else tmp = (x + (y * (z - x))) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -3.3e+50], N[Not[LessEqual[y, 420000000000.0]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+50} \lor \neg \left(y \leq 420000000000\right):\\
\;\;\;\;\frac{y}{z} \cdot \left(z - x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \left(z - x\right)}{z}\\
\end{array}
\end{array}
if y < -3.3e50 or 4.2e11 < y Initial program 70.0%
Taylor expanded in y around inf 70.0%
associate-/l*99.9%
associate-/r/93.9%
Simplified93.9%
if -3.3e50 < y < 4.2e11Initial program 100.0%
Final simplification97.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (/ (- x) z))))
(if (<= y -1.08e+63)
(/ z (/ z y))
(if (<= y -1550000000.0)
t_0
(if (<= y -8.6e-45)
y
(if (<= y 1.0) (/ x z) (if (<= y 1.95e+229) t_0 y)))))))
double code(double x, double y, double z) {
double t_0 = y * (-x / z);
double tmp;
if (y <= -1.08e+63) {
tmp = z / (z / y);
} else if (y <= -1550000000.0) {
tmp = t_0;
} else if (y <= -8.6e-45) {
tmp = y;
} else if (y <= 1.0) {
tmp = x / z;
} else if (y <= 1.95e+229) {
tmp = t_0;
} else {
tmp = 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) :: t_0
real(8) :: tmp
t_0 = y * (-x / z)
if (y <= (-1.08d+63)) then
tmp = z / (z / y)
else if (y <= (-1550000000.0d0)) then
tmp = t_0
else if (y <= (-8.6d-45)) then
tmp = y
else if (y <= 1.0d0) then
tmp = x / z
else if (y <= 1.95d+229) then
tmp = t_0
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * (-x / z);
double tmp;
if (y <= -1.08e+63) {
tmp = z / (z / y);
} else if (y <= -1550000000.0) {
tmp = t_0;
} else if (y <= -8.6e-45) {
tmp = y;
} else if (y <= 1.0) {
tmp = x / z;
} else if (y <= 1.95e+229) {
tmp = t_0;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): t_0 = y * (-x / z) tmp = 0 if y <= -1.08e+63: tmp = z / (z / y) elif y <= -1550000000.0: tmp = t_0 elif y <= -8.6e-45: tmp = y elif y <= 1.0: tmp = x / z elif y <= 1.95e+229: tmp = t_0 else: tmp = y return tmp
function code(x, y, z) t_0 = Float64(y * Float64(Float64(-x) / z)) tmp = 0.0 if (y <= -1.08e+63) tmp = Float64(z / Float64(z / y)); elseif (y <= -1550000000.0) tmp = t_0; elseif (y <= -8.6e-45) tmp = y; elseif (y <= 1.0) tmp = Float64(x / z); elseif (y <= 1.95e+229) tmp = t_0; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (-x / z); tmp = 0.0; if (y <= -1.08e+63) tmp = z / (z / y); elseif (y <= -1550000000.0) tmp = t_0; elseif (y <= -8.6e-45) tmp = y; elseif (y <= 1.0) tmp = x / z; elseif (y <= 1.95e+229) tmp = t_0; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[((-x) / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.08e+63], N[(z / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1550000000.0], t$95$0, If[LessEqual[y, -8.6e-45], y, If[LessEqual[y, 1.0], N[(x / z), $MachinePrecision], If[LessEqual[y, 1.95e+229], t$95$0, y]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \frac{-x}{z}\\
\mathbf{if}\;y \leq -1.08 \cdot 10^{+63}:\\
\;\;\;\;\frac{z}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq -1550000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -8.6 \cdot 10^{-45}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+229}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.08e63Initial program 60.7%
Taylor expanded in x around 0 20.3%
associate-/l*52.1%
associate-/r/67.1%
Applied egg-rr67.1%
*-commutative67.1%
clear-num66.8%
un-div-inv67.4%
Applied egg-rr67.4%
if -1.08e63 < y < -1.55e9 or 1 < y < 1.9499999999999999e229Initial program 83.5%
Taylor expanded in x around inf 56.3%
associate-/l*62.3%
mul-1-neg62.3%
unsub-neg62.3%
Simplified62.3%
Taylor expanded in y around inf 55.4%
mul-1-neg55.4%
associate-*r/61.4%
*-commutative61.4%
distribute-rgt-neg-out61.4%
Simplified61.4%
if -1.55e9 < y < -8.5999999999999998e-45 or 1.9499999999999999e229 < y Initial program 69.0%
Taylor expanded in x around 0 68.0%
if -8.5999999999999998e-45 < y < 1Initial program 100.0%
Taylor expanded in y around 0 72.6%
Final simplification67.9%
(FPCore (x y z)
:precision binary64
(if (<= y -5.5e+66)
(/ z (/ z y))
(if (<= y -0.0122)
(/ (* y (- x)) z)
(if (<= y -7.5e-45)
y
(if (<= y 1.0) (/ x z) (if (<= y 6.5e+230) (* y (/ (- x) z)) y))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -5.5e+66) {
tmp = z / (z / y);
} else if (y <= -0.0122) {
tmp = (y * -x) / z;
} else if (y <= -7.5e-45) {
tmp = y;
} else if (y <= 1.0) {
tmp = x / z;
} else if (y <= 6.5e+230) {
tmp = y * (-x / z);
} else {
tmp = 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 <= (-5.5d+66)) then
tmp = z / (z / y)
else if (y <= (-0.0122d0)) then
tmp = (y * -x) / z
else if (y <= (-7.5d-45)) then
tmp = y
else if (y <= 1.0d0) then
tmp = x / z
else if (y <= 6.5d+230) then
tmp = y * (-x / z)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -5.5e+66) {
tmp = z / (z / y);
} else if (y <= -0.0122) {
tmp = (y * -x) / z;
} else if (y <= -7.5e-45) {
tmp = y;
} else if (y <= 1.0) {
tmp = x / z;
} else if (y <= 6.5e+230) {
tmp = y * (-x / z);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -5.5e+66: tmp = z / (z / y) elif y <= -0.0122: tmp = (y * -x) / z elif y <= -7.5e-45: tmp = y elif y <= 1.0: tmp = x / z elif y <= 6.5e+230: tmp = y * (-x / z) else: tmp = y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -5.5e+66) tmp = Float64(z / Float64(z / y)); elseif (y <= -0.0122) tmp = Float64(Float64(y * Float64(-x)) / z); elseif (y <= -7.5e-45) tmp = y; elseif (y <= 1.0) tmp = Float64(x / z); elseif (y <= 6.5e+230) tmp = Float64(y * Float64(Float64(-x) / z)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -5.5e+66) tmp = z / (z / y); elseif (y <= -0.0122) tmp = (y * -x) / z; elseif (y <= -7.5e-45) tmp = y; elseif (y <= 1.0) tmp = x / z; elseif (y <= 6.5e+230) tmp = y * (-x / z); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -5.5e+66], N[(z / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.0122], N[(N[(y * (-x)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -7.5e-45], y, If[LessEqual[y, 1.0], N[(x / z), $MachinePrecision], If[LessEqual[y, 6.5e+230], N[(y * N[((-x) / z), $MachinePrecision]), $MachinePrecision], y]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+66}:\\
\;\;\;\;\frac{z}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq -0.0122:\\
\;\;\;\;\frac{y \cdot \left(-x\right)}{z}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+230}:\\
\;\;\;\;y \cdot \frac{-x}{z}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -5.5e66Initial program 60.7%
Taylor expanded in x around 0 20.3%
associate-/l*52.1%
associate-/r/67.1%
Applied egg-rr67.1%
*-commutative67.1%
clear-num66.8%
un-div-inv67.4%
Applied egg-rr67.4%
if -5.5e66 < y < -0.0122000000000000008Initial program 91.1%
Taylor expanded in x around inf 73.0%
+-commutative73.0%
distribute-rgt1-in73.0%
mul-1-neg73.0%
cancel-sign-sub-inv73.0%
Simplified73.0%
Taylor expanded in y around inf 68.9%
mul-1-neg68.9%
distribute-rgt-neg-in68.9%
Simplified68.9%
if -0.0122000000000000008 < y < -7.5000000000000006e-45 or 6.4999999999999997e230 < y Initial program 69.0%
Taylor expanded in x around 0 68.0%
if -7.5000000000000006e-45 < y < 1Initial program 100.0%
Taylor expanded in y around 0 72.6%
if 1 < y < 6.4999999999999997e230Initial program 82.2%
Taylor expanded in x around inf 53.5%
associate-/l*60.5%
mul-1-neg60.5%
unsub-neg60.5%
Simplified60.5%
Taylor expanded in y around inf 53.1%
mul-1-neg53.1%
associate-*r/60.1%
*-commutative60.1%
distribute-rgt-neg-out60.1%
Simplified60.1%
Final simplification68.0%
(FPCore (x y z) :precision binary64 (if (or (<= y -1e-44) (not (<= y 3.4e-64))) (* (/ y z) (- z x)) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1e-44) || !(y <= 3.4e-64)) {
tmp = (y / z) * (z - x);
} 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 <= (-1d-44)) .or. (.not. (y <= 3.4d-64))) then
tmp = (y / z) * (z - x)
else
tmp = x / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1e-44) || !(y <= 3.4e-64)) {
tmp = (y / z) * (z - x);
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1e-44) or not (y <= 3.4e-64): tmp = (y / z) * (z - x) else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1e-44) || !(y <= 3.4e-64)) tmp = Float64(Float64(y / z) * Float64(z - x)); else tmp = Float64(x / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1e-44) || ~((y <= 3.4e-64))) tmp = (y / z) * (z - x); else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1e-44], N[Not[LessEqual[y, 3.4e-64]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision], N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-44} \lor \neg \left(y \leq 3.4 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{y}{z} \cdot \left(z - x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if y < -9.99999999999999953e-45 or 3.40000000000000012e-64 < y Initial program 76.1%
Taylor expanded in y around inf 71.1%
associate-/l*94.9%
associate-/r/88.3%
Simplified88.3%
if -9.99999999999999953e-45 < y < 3.40000000000000012e-64Initial program 100.0%
Taylor expanded in y around 0 76.7%
Final simplification83.8%
(FPCore (x y z) :precision binary64 (if (<= y -1e-44) y (if (<= y 3.1e-72) (/ x z) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= -1e-44) {
tmp = y;
} else if (y <= 3.1e-72) {
tmp = x / z;
} else {
tmp = 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 <= (-1d-44)) then
tmp = y
else if (y <= 3.1d-72) then
tmp = x / z
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1e-44) {
tmp = y;
} else if (y <= 3.1e-72) {
tmp = x / z;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1e-44: tmp = y elif y <= 3.1e-72: tmp = x / z else: tmp = y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1e-44) tmp = y; elseif (y <= 3.1e-72) tmp = Float64(x / z); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1e-44) tmp = y; elseif (y <= 3.1e-72) tmp = x / z; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1e-44], y, If[LessEqual[y, 3.1e-72], N[(x / z), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-44}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-72}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -9.99999999999999953e-45 or 3.0999999999999998e-72 < y Initial program 76.5%
Taylor expanded in x around 0 49.8%
if -9.99999999999999953e-45 < y < 3.0999999999999998e-72Initial program 100.0%
Taylor expanded in y around 0 78.0%
Final simplification60.4%
(FPCore (x y z) :precision binary64 (if (<= y -2.7e-45) (* z (/ y z)) (if (<= y 1.9e-72) (/ x z) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= -2.7e-45) {
tmp = z * (y / z);
} else if (y <= 1.9e-72) {
tmp = x / z;
} else {
tmp = 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 <= (-2.7d-45)) then
tmp = z * (y / z)
else if (y <= 1.9d-72) then
tmp = x / z
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -2.7e-45) {
tmp = z * (y / z);
} else if (y <= 1.9e-72) {
tmp = x / z;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -2.7e-45: tmp = z * (y / z) elif y <= 1.9e-72: tmp = x / z else: tmp = y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -2.7e-45) tmp = Float64(z * Float64(y / z)); elseif (y <= 1.9e-72) tmp = Float64(x / z); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -2.7e-45) tmp = z * (y / z); elseif (y <= 1.9e-72) tmp = x / z; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -2.7e-45], N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-72], N[(x / z), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-45}:\\
\;\;\;\;z \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-72}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -2.69999999999999985e-45Initial program 71.6%
Taylor expanded in x around 0 28.3%
associate-/l*51.6%
associate-/r/60.1%
Applied egg-rr60.1%
if -2.69999999999999985e-45 < y < 1.90000000000000001e-72Initial program 100.0%
Taylor expanded in y around 0 78.0%
if 1.90000000000000001e-72 < y Initial program 79.7%
Taylor expanded in x around 0 48.7%
Final simplification62.5%
(FPCore (x y z) :precision binary64 y)
double code(double x, double y, double z) {
return y;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y
end function
public static double code(double x, double y, double z) {
return y;
}
def code(x, y, z): return y
function code(x, y, z) return y end
function tmp = code(x, y, z) tmp = y; end
code[x_, y_, z_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 85.3%
Taylor expanded in x around 0 40.2%
Final simplification40.2%
(FPCore (x y z) :precision binary64 (- (+ y (/ x z)) (/ y (/ z x))))
double code(double x, double y, double z) {
return (y + (x / z)) - (y / (z / x));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (y + (x / z)) - (y / (z / x))
end function
public static double code(double x, double y, double z) {
return (y + (x / z)) - (y / (z / x));
}
def code(x, y, z): return (y + (x / z)) - (y / (z / x))
function code(x, y, z) return Float64(Float64(y + Float64(x / z)) - Float64(y / Float64(z / x))) end
function tmp = code(x, y, z) tmp = (y + (x / z)) - (y / (z / x)); end
code[x_, y_, z_] := N[(N[(y + N[(x / z), $MachinePrecision]), $MachinePrecision] - N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + \frac{x}{z}\right) - \frac{y}{\frac{z}{x}}
\end{array}
herbie shell --seed 2023257
(FPCore (x y z)
:name "Diagrams.Backend.Rasterific:rasterificRadialGradient from diagrams-rasterific-1.3.1.3"
:precision binary64
:herbie-target
(- (+ y (/ x z)) (/ y (/ z x)))
(/ (+ x (* y (- z x))) z))