
(FPCore (x y z) :precision binary64 (/ (* x (+ y z)) z))
double code(double x, double y, double z) {
return (x * (y + z)) / 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)) / z
end function
public static double code(double x, double y, double z) {
return (x * (y + z)) / z;
}
def code(x, y, z): return (x * (y + z)) / z
function code(x, y, z) return Float64(Float64(x * Float64(y + z)) / z) end
function tmp = code(x, y, z) tmp = (x * (y + z)) / z; end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y + z\right)}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* x (+ y z)) z))
double code(double x, double y, double z) {
return (x * (y + z)) / 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)) / z
end function
public static double code(double x, double y, double z) {
return (x * (y + z)) / z;
}
def code(x, y, z): return (x * (y + z)) / z
function code(x, y, z) return Float64(Float64(x * Float64(y + z)) / z) end
function tmp = code(x, y, z) tmp = (x * (y + z)) / z; end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y + z\right)}{z}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= y 1.5e+64) (fma x (/ y z) x) (* (+ y z) (/ x z))))
double code(double x, double y, double z) {
double tmp;
if (y <= 1.5e+64) {
tmp = fma(x, (y / z), x);
} else {
tmp = (y + z) * (x / z);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (y <= 1.5e+64) tmp = fma(x, Float64(y / z), x); else tmp = Float64(Float64(y + z) * Float64(x / z)); end return tmp end
code[x_, y_, z_] := If[LessEqual[y, 1.5e+64], N[(x * N[(y / z), $MachinePrecision] + x), $MachinePrecision], N[(N[(y + z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.5 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{y}{z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + z\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < 1.5000000000000001e64Initial program 82.8%
associate-*l/80.7%
remove-double-neg80.7%
unsub-neg80.7%
distribute-rgt-out--76.4%
associate-*r/73.9%
*-commutative73.9%
associate-*r/74.6%
associate-*r/80.9%
distribute-lft-neg-out80.9%
distribute-frac-neg80.9%
distribute-frac-neg280.9%
fma-neg80.9%
distribute-frac-neg80.9%
distribute-lft-neg-out80.9%
*-commutative80.9%
associate-/l*97.5%
*-inverses97.5%
*-rgt-identity97.5%
Simplified97.5%
if 1.5000000000000001e64 < y Initial program 88.4%
*-commutative88.4%
associate-/l*98.2%
Simplified98.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.02e-13) (not (<= y 1.32e-86))) (* y (/ x z)) x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.02e-13) || !(y <= 1.32e-86)) {
tmp = y * (x / z);
} else {
tmp = x;
}
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-13)) .or. (.not. (y <= 1.32d-86))) then
tmp = y * (x / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.02e-13) || !(y <= 1.32e-86)) {
tmp = y * (x / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.02e-13) or not (y <= 1.32e-86): tmp = y * (x / z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.02e-13) || !(y <= 1.32e-86)) tmp = Float64(y * Float64(x / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.02e-13) || ~((y <= 1.32e-86))) tmp = y * (x / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.02e-13], N[Not[LessEqual[y, 1.32e-86]], $MachinePrecision]], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{-13} \lor \neg \left(y \leq 1.32 \cdot 10^{-86}\right):\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.0199999999999999e-13 or 1.32e-86 < y Initial program 86.4%
associate-/l*92.1%
remove-double-neg92.1%
distribute-frac-neg292.1%
neg-sub092.1%
remove-double-neg92.1%
unsub-neg92.1%
div-sub92.1%
*-inverses92.1%
metadata-eval92.1%
associate--r-92.1%
neg-sub092.1%
distribute-frac-neg292.1%
remove-double-neg92.1%
sub-neg92.1%
Simplified92.1%
Taylor expanded in y around inf 69.6%
associate-*l/71.4%
*-commutative71.4%
Simplified71.4%
if -1.0199999999999999e-13 < y < 1.32e-86Initial program 80.8%
associate-/l*99.9%
remove-double-neg99.9%
distribute-frac-neg299.9%
neg-sub099.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub100.0%
*-inverses100.0%
metadata-eval100.0%
associate--r-100.0%
neg-sub0100.0%
distribute-frac-neg2100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 80.7%
Final simplification75.4%
(FPCore (x y z) :precision binary64 (if (<= z -3.8e+30) x (if (<= z 3e-89) (/ (* y x) z) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.8e+30) {
tmp = x;
} else if (z <= 3e-89) {
tmp = (y * x) / z;
} else {
tmp = x;
}
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 <= (-3.8d+30)) then
tmp = x
else if (z <= 3d-89) then
tmp = (y * x) / z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.8e+30) {
tmp = x;
} else if (z <= 3e-89) {
tmp = (y * x) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.8e+30: tmp = x elif z <= 3e-89: tmp = (y * x) / z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.8e+30) tmp = x; elseif (z <= 3e-89) tmp = Float64(Float64(y * x) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.8e+30) tmp = x; elseif (z <= 3e-89) tmp = (y * x) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.8e+30], x, If[LessEqual[z, 3e-89], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-89}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.8000000000000001e30 or 2.9999999999999999e-89 < z Initial program 74.9%
associate-/l*99.2%
remove-double-neg99.2%
distribute-frac-neg299.2%
neg-sub099.2%
remove-double-neg99.2%
unsub-neg99.2%
div-sub99.2%
*-inverses99.2%
metadata-eval99.2%
associate--r-99.2%
neg-sub099.2%
distribute-frac-neg299.2%
remove-double-neg99.2%
sub-neg99.2%
Simplified99.2%
Taylor expanded in y around 0 76.3%
if -3.8000000000000001e30 < z < 2.9999999999999999e-89Initial program 94.8%
associate-/l*90.9%
remove-double-neg90.9%
distribute-frac-neg290.9%
neg-sub090.9%
remove-double-neg90.9%
unsub-neg90.9%
div-sub91.0%
*-inverses91.0%
metadata-eval91.0%
associate--r-91.0%
neg-sub091.0%
distribute-frac-neg291.0%
remove-double-neg91.0%
sub-neg91.0%
Simplified91.0%
Taylor expanded in y around inf 78.5%
Final simplification77.3%
(FPCore (x y z) :precision binary64 (if (<= y -5e-14) (/ y (/ z x)) (if (<= y 1.18e-86) x (* y (/ x z)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -5e-14) {
tmp = y / (z / x);
} else if (y <= 1.18e-86) {
tmp = x;
} else {
tmp = y * (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 <= (-5d-14)) then
tmp = y / (z / x)
else if (y <= 1.18d-86) then
tmp = x
else
tmp = y * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -5e-14) {
tmp = y / (z / x);
} else if (y <= 1.18e-86) {
tmp = x;
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -5e-14: tmp = y / (z / x) elif y <= 1.18e-86: tmp = x else: tmp = y * (x / z) return tmp
function code(x, y, z) tmp = 0.0 if (y <= -5e-14) tmp = Float64(y / Float64(z / x)); elseif (y <= 1.18e-86) tmp = x; else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -5e-14) tmp = y / (z / x); elseif (y <= 1.18e-86) tmp = x; else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -5e-14], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.18e-86], x, N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-14}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{-86}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -5.0000000000000002e-14Initial program 83.2%
associate-/l*91.4%
remove-double-neg91.4%
distribute-frac-neg291.4%
neg-sub091.4%
remove-double-neg91.4%
unsub-neg91.4%
div-sub91.5%
*-inverses91.5%
metadata-eval91.5%
associate--r-91.5%
neg-sub091.5%
distribute-frac-neg291.5%
remove-double-neg91.5%
sub-neg91.5%
Simplified91.5%
Taylor expanded in y around inf 63.1%
associate-*l/63.0%
*-commutative63.0%
Simplified63.0%
clear-num63.0%
un-div-inv63.2%
Applied egg-rr63.2%
if -5.0000000000000002e-14 < y < 1.1799999999999999e-86Initial program 80.8%
associate-/l*99.9%
remove-double-neg99.9%
distribute-frac-neg299.9%
neg-sub099.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub100.0%
*-inverses100.0%
metadata-eval100.0%
associate--r-100.0%
neg-sub0100.0%
distribute-frac-neg2100.0%
remove-double-neg100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 80.7%
if 1.1799999999999999e-86 < y Initial program 88.5%
associate-/l*92.5%
remove-double-neg92.5%
distribute-frac-neg292.5%
neg-sub092.5%
remove-double-neg92.5%
unsub-neg92.5%
div-sub92.5%
*-inverses92.5%
metadata-eval92.5%
associate--r-92.5%
neg-sub092.5%
distribute-frac-neg292.5%
remove-double-neg92.5%
sub-neg92.5%
Simplified92.5%
Taylor expanded in y around inf 73.7%
associate-*l/76.8%
*-commutative76.8%
Simplified76.8%
(FPCore (x y z) :precision binary64 (if (<= z -3.3e+30) x (if (<= z 2.55e-89) (* x (/ y z)) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.3e+30) {
tmp = x;
} else if (z <= 2.55e-89) {
tmp = x * (y / z);
} else {
tmp = x;
}
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 <= (-3.3d+30)) then
tmp = x
else if (z <= 2.55d-89) then
tmp = x * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.3e+30) {
tmp = x;
} else if (z <= 2.55e-89) {
tmp = x * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.3e+30: tmp = x elif z <= 2.55e-89: tmp = x * (y / z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.3e+30) tmp = x; elseif (z <= 2.55e-89) tmp = Float64(x * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.3e+30) tmp = x; elseif (z <= 2.55e-89) tmp = x * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.3e+30], x, If[LessEqual[z, 2.55e-89], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-89}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.30000000000000026e30 or 2.55000000000000002e-89 < z Initial program 74.9%
associate-/l*99.2%
remove-double-neg99.2%
distribute-frac-neg299.2%
neg-sub099.2%
remove-double-neg99.2%
unsub-neg99.2%
div-sub99.2%
*-inverses99.2%
metadata-eval99.2%
associate--r-99.2%
neg-sub099.2%
distribute-frac-neg299.2%
remove-double-neg99.2%
sub-neg99.2%
Simplified99.2%
Taylor expanded in y around 0 76.3%
if -3.30000000000000026e30 < z < 2.55000000000000002e-89Initial program 94.8%
associate-/l*90.9%
remove-double-neg90.9%
distribute-frac-neg290.9%
neg-sub090.9%
remove-double-neg90.9%
unsub-neg90.9%
div-sub91.0%
*-inverses91.0%
metadata-eval91.0%
associate--r-91.0%
neg-sub091.0%
distribute-frac-neg291.0%
remove-double-neg91.0%
sub-neg91.0%
Simplified91.0%
Taylor expanded in y around inf 70.4%
(FPCore (x y z) :precision binary64 (if (<= y 3.75e+64) (* x (- (/ y z) -1.0)) (* (+ y z) (/ x z))))
double code(double x, double y, double z) {
double tmp;
if (y <= 3.75e+64) {
tmp = x * ((y / z) - -1.0);
} else {
tmp = (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.75d+64) then
tmp = x * ((y / z) - (-1.0d0))
else
tmp = (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.75e+64) {
tmp = x * ((y / z) - -1.0);
} else {
tmp = (y + z) * (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 3.75e+64: tmp = x * ((y / z) - -1.0) else: tmp = (y + z) * (x / z) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 3.75e+64) tmp = Float64(x * Float64(Float64(y / z) - -1.0)); else tmp = Float64(Float64(y + z) * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 3.75e+64) tmp = x * ((y / z) - -1.0); else tmp = (y + z) * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 3.75e+64], N[(x * N[(N[(y / z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(y + z), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.75 \cdot 10^{+64}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - -1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + z\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < 3.7500000000000003e64Initial program 82.8%
associate-/l*97.5%
remove-double-neg97.5%
distribute-frac-neg297.5%
neg-sub097.5%
remove-double-neg97.5%
unsub-neg97.5%
div-sub97.5%
*-inverses97.5%
metadata-eval97.5%
associate--r-97.5%
neg-sub097.5%
distribute-frac-neg297.5%
remove-double-neg97.5%
sub-neg97.5%
Simplified97.5%
if 3.7500000000000003e64 < y Initial program 88.4%
*-commutative88.4%
associate-/l*98.2%
Simplified98.2%
(FPCore (x y z) :precision binary64 (if (<= y 5.9e+175) (* x (- (/ y z) -1.0)) (* y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if (y <= 5.9e+175) {
tmp = x * ((y / z) - -1.0);
} else {
tmp = y * (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 <= 5.9d+175) then
tmp = x * ((y / z) - (-1.0d0))
else
tmp = y * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 5.9e+175) {
tmp = x * ((y / z) - -1.0);
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 5.9e+175: tmp = x * ((y / z) - -1.0) else: tmp = y * (x / z) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 5.9e+175) tmp = Float64(x * Float64(Float64(y / z) - -1.0)); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 5.9e+175) tmp = x * ((y / z) - -1.0); else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 5.9e+175], N[(x * N[(N[(y / z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.9 \cdot 10^{+175}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - -1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < 5.9000000000000003e175Initial program 83.0%
associate-/l*96.8%
remove-double-neg96.8%
distribute-frac-neg296.8%
neg-sub096.8%
remove-double-neg96.8%
unsub-neg96.8%
div-sub96.9%
*-inverses96.9%
metadata-eval96.9%
associate--r-96.9%
neg-sub096.9%
distribute-frac-neg296.9%
remove-double-neg96.9%
sub-neg96.9%
Simplified96.9%
if 5.9000000000000003e175 < y Initial program 89.9%
associate-/l*87.1%
remove-double-neg87.1%
distribute-frac-neg287.1%
neg-sub087.1%
remove-double-neg87.1%
unsub-neg87.1%
div-sub87.1%
*-inverses87.1%
metadata-eval87.1%
associate--r-87.1%
neg-sub087.1%
distribute-frac-neg287.1%
remove-double-neg87.1%
sub-neg87.1%
Simplified87.1%
Taylor expanded in y around inf 89.9%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 84.0%
associate-/l*95.4%
remove-double-neg95.4%
distribute-frac-neg295.4%
neg-sub095.4%
remove-double-neg95.4%
unsub-neg95.4%
div-sub95.5%
*-inverses95.5%
metadata-eval95.5%
associate--r-95.5%
neg-sub095.5%
distribute-frac-neg295.5%
remove-double-neg95.5%
sub-neg95.5%
Simplified95.5%
Taylor expanded in y around 0 51.2%
(FPCore (x y z) :precision binary64 (/ x (/ z (+ y z))))
double code(double x, double y, double z) {
return x / (z / (y + 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 / (z / (y + z))
end function
public static double code(double x, double y, double z) {
return x / (z / (y + z));
}
def code(x, y, z): return x / (z / (y + z))
function code(x, y, z) return Float64(x / Float64(z / Float64(y + z))) end
function tmp = code(x, y, z) tmp = x / (z / (y + z)); end
code[x_, y_, z_] := N[(x / N[(z / N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{z}{y + z}}
\end{array}
herbie shell --seed 2024116
(FPCore (x y z)
:name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
:precision binary64
:alt
(! :herbie-platform default (/ x (/ z (+ y z))))
(/ (* x (+ y z)) z))