
(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 5 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}
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z)
:precision binary64
(*
x_s
(if (<= x_m 9000000.0)
(* y (+ (/ x_m y) (/ x_m z)))
(* x_m (- (/ y z) -1.0)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z) {
double tmp;
if (x_m <= 9000000.0) {
tmp = y * ((x_m / y) + (x_m / z));
} else {
tmp = x_m * ((y / z) - -1.0);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x_m <= 9000000.0d0) then
tmp = y * ((x_m / y) + (x_m / z))
else
tmp = x_m * ((y / z) - (-1.0d0))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z) {
double tmp;
if (x_m <= 9000000.0) {
tmp = y * ((x_m / y) + (x_m / z));
} else {
tmp = x_m * ((y / z) - -1.0);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z): tmp = 0 if x_m <= 9000000.0: tmp = y * ((x_m / y) + (x_m / z)) else: tmp = x_m * ((y / z) - -1.0) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z) tmp = 0.0 if (x_m <= 9000000.0) tmp = Float64(y * Float64(Float64(x_m / y) + Float64(x_m / z))); else tmp = Float64(x_m * Float64(Float64(y / z) - -1.0)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z) tmp = 0.0; if (x_m <= 9000000.0) tmp = y * ((x_m / y) + (x_m / z)); else tmp = x_m * ((y / z) - -1.0); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[LessEqual[x$95$m, 9000000.0], N[(y * N[(N[(x$95$m / y), $MachinePrecision] + N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(y / z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 9000000:\\
\;\;\;\;y \cdot \left(\frac{x\_m}{y} + \frac{x\_m}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \left(\frac{y}{z} - -1\right)\\
\end{array}
\end{array}
if x < 9e6Initial program 84.0%
associate-/l*95.3%
remove-double-neg95.3%
distribute-frac-neg295.3%
neg-sub095.3%
remove-double-neg95.3%
unsub-neg95.3%
div-sub95.3%
*-inverses95.3%
metadata-eval95.3%
associate--r-95.3%
neg-sub095.3%
distribute-frac-neg295.3%
remove-double-neg95.3%
sub-neg95.3%
Simplified95.3%
Taylor expanded in y around inf 86.9%
if 9e6 < x Initial program 76.3%
associate-/l*99.9%
remove-double-neg99.9%
distribute-frac-neg299.9%
neg-sub099.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
*-inverses99.9%
metadata-eval99.9%
associate--r-99.9%
neg-sub099.9%
distribute-frac-neg299.9%
remove-double-neg99.9%
sub-neg99.9%
Simplified99.9%
Final simplification89.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z)
:precision binary64
(*
x_s
(if (or (<= y -2.2e+84)
(and (not (<= y -6.4e+75)) (or (<= y -48.0) (not (<= y 7e-59)))))
(* y (/ x_m z))
x_m)))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z) {
double tmp;
if ((y <= -2.2e+84) || (!(y <= -6.4e+75) && ((y <= -48.0) || !(y <= 7e-59)))) {
tmp = y * (x_m / z);
} else {
tmp = x_m;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-2.2d+84)) .or. (.not. (y <= (-6.4d+75))) .and. (y <= (-48.0d0)) .or. (.not. (y <= 7d-59))) then
tmp = y * (x_m / z)
else
tmp = x_m
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z) {
double tmp;
if ((y <= -2.2e+84) || (!(y <= -6.4e+75) && ((y <= -48.0) || !(y <= 7e-59)))) {
tmp = y * (x_m / z);
} else {
tmp = x_m;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z): tmp = 0 if (y <= -2.2e+84) or (not (y <= -6.4e+75) and ((y <= -48.0) or not (y <= 7e-59))): tmp = y * (x_m / z) else: tmp = x_m return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z) tmp = 0.0 if ((y <= -2.2e+84) || (!(y <= -6.4e+75) && ((y <= -48.0) || !(y <= 7e-59)))) tmp = Float64(y * Float64(x_m / z)); else tmp = x_m; end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z) tmp = 0.0; if ((y <= -2.2e+84) || (~((y <= -6.4e+75)) && ((y <= -48.0) || ~((y <= 7e-59))))) tmp = y * (x_m / z); else tmp = x_m; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[Or[LessEqual[y, -2.2e+84], And[N[Not[LessEqual[y, -6.4e+75]], $MachinePrecision], Or[LessEqual[y, -48.0], N[Not[LessEqual[y, 7e-59]], $MachinePrecision]]]], N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], x$95$m]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+84} \lor \neg \left(y \leq -6.4 \cdot 10^{+75}\right) \land \left(y \leq -48 \lor \neg \left(y \leq 7 \cdot 10^{-59}\right)\right):\\
\;\;\;\;y \cdot \frac{x\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if y < -2.1999999999999998e84 or -6.39999999999999969e75 < y < -48 or 7.0000000000000002e-59 < y Initial program 89.5%
associate-/l*93.5%
remove-double-neg93.5%
distribute-frac-neg293.5%
neg-sub093.5%
remove-double-neg93.5%
unsub-neg93.5%
div-sub93.5%
*-inverses93.5%
metadata-eval93.5%
associate--r-93.5%
neg-sub093.5%
distribute-frac-neg293.5%
remove-double-neg93.5%
sub-neg93.5%
Simplified93.5%
Taylor expanded in y around inf 76.2%
associate-*l/78.1%
*-commutative78.1%
Simplified78.1%
if -2.1999999999999998e84 < y < -6.39999999999999969e75 or -48 < y < 7.0000000000000002e-59Initial program 73.1%
associate-/l*99.9%
remove-double-neg99.9%
distribute-frac-neg299.9%
neg-sub099.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
*-inverses99.9%
metadata-eval99.9%
associate--r-99.9%
neg-sub099.9%
distribute-frac-neg299.9%
remove-double-neg99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 82.9%
Final simplification80.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z)
:precision binary64
(*
x_s
(if (or (<= y -7.6e+84)
(not (or (<= y -6.4e+75) (and (not (<= y -100.0)) (<= y 1.25e-57)))))
(/ y (/ z x_m))
x_m)))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z) {
double tmp;
if ((y <= -7.6e+84) || !((y <= -6.4e+75) || (!(y <= -100.0) && (y <= 1.25e-57)))) {
tmp = y / (z / x_m);
} else {
tmp = x_m;
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-7.6d+84)) .or. (.not. (y <= (-6.4d+75)) .or. (.not. (y <= (-100.0d0))) .and. (y <= 1.25d-57))) then
tmp = y / (z / x_m)
else
tmp = x_m
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z) {
double tmp;
if ((y <= -7.6e+84) || !((y <= -6.4e+75) || (!(y <= -100.0) && (y <= 1.25e-57)))) {
tmp = y / (z / x_m);
} else {
tmp = x_m;
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z): tmp = 0 if (y <= -7.6e+84) or not ((y <= -6.4e+75) or (not (y <= -100.0) and (y <= 1.25e-57))): tmp = y / (z / x_m) else: tmp = x_m return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z) tmp = 0.0 if ((y <= -7.6e+84) || !((y <= -6.4e+75) || (!(y <= -100.0) && (y <= 1.25e-57)))) tmp = Float64(y / Float64(z / x_m)); else tmp = x_m; end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z) tmp = 0.0; if ((y <= -7.6e+84) || ~(((y <= -6.4e+75) || (~((y <= -100.0)) && (y <= 1.25e-57))))) tmp = y / (z / x_m); else tmp = x_m; end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[Or[LessEqual[y, -7.6e+84], N[Not[Or[LessEqual[y, -6.4e+75], And[N[Not[LessEqual[y, -100.0]], $MachinePrecision], LessEqual[y, 1.25e-57]]]], $MachinePrecision]], N[(y / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision], x$95$m]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+84} \lor \neg \left(y \leq -6.4 \cdot 10^{+75} \lor \neg \left(y \leq -100\right) \land y \leq 1.25 \cdot 10^{-57}\right):\\
\;\;\;\;\frac{y}{\frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;x\_m\\
\end{array}
\end{array}
if y < -7.6000000000000002e84 or -6.39999999999999969e75 < y < -100 or 1.25e-57 < y Initial program 89.5%
associate-/l*93.5%
remove-double-neg93.5%
distribute-frac-neg293.5%
neg-sub093.5%
remove-double-neg93.5%
unsub-neg93.5%
div-sub93.5%
*-inverses93.5%
metadata-eval93.5%
associate--r-93.5%
neg-sub093.5%
distribute-frac-neg293.5%
remove-double-neg93.5%
sub-neg93.5%
Simplified93.5%
Taylor expanded in y around inf 76.2%
associate-*l/78.1%
*-commutative78.1%
Simplified78.1%
clear-num78.1%
un-div-inv78.2%
Applied egg-rr78.2%
if -7.6000000000000002e84 < y < -6.39999999999999969e75 or -100 < y < 1.25e-57Initial program 73.1%
associate-/l*99.9%
remove-double-neg99.9%
distribute-frac-neg299.9%
neg-sub099.9%
remove-double-neg99.9%
unsub-neg99.9%
div-sub99.9%
*-inverses99.9%
metadata-eval99.9%
associate--r-99.9%
neg-sub099.9%
distribute-frac-neg299.9%
remove-double-neg99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 82.9%
Final simplification80.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 #s(literal 1 binary64) x)
(FPCore (x_s x_m y z)
:precision binary64
(*
x_s
(if (<= (/ (* x_m (+ y z)) z) -1e+108)
(/ y (/ z x_m))
(* x_m (- (/ y z) -1.0)))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z) {
double tmp;
if (((x_m * (y + z)) / z) <= -1e+108) {
tmp = y / (z / x_m);
} else {
tmp = x_m * ((y / z) - -1.0);
}
return x_s * tmp;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (((x_m * (y + z)) / z) <= (-1d+108)) then
tmp = y / (z / x_m)
else
tmp = x_m * ((y / z) - (-1.0d0))
end if
code = x_s * tmp
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z) {
double tmp;
if (((x_m * (y + z)) / z) <= -1e+108) {
tmp = y / (z / x_m);
} else {
tmp = x_m * ((y / z) - -1.0);
}
return x_s * tmp;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z): tmp = 0 if ((x_m * (y + z)) / z) <= -1e+108: tmp = y / (z / x_m) else: tmp = x_m * ((y / z) - -1.0) return x_s * tmp
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z) tmp = 0.0 if (Float64(Float64(x_m * Float64(y + z)) / z) <= -1e+108) tmp = Float64(y / Float64(z / x_m)); else tmp = Float64(x_m * Float64(Float64(y / z) - -1.0)); end return Float64(x_s * tmp) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z) tmp = 0.0; if (((x_m * (y + z)) / z) <= -1e+108) tmp = y / (z / x_m); else tmp = x_m * ((y / z) - -1.0); end tmp_2 = x_s * tmp; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[LessEqual[N[(N[(x$95$m * N[(y + z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], -1e+108], N[(y / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(y / z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{x\_m \cdot \left(y + z\right)}{z} \leq -1 \cdot 10^{+108}:\\
\;\;\;\;\frac{y}{\frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \left(\frac{y}{z} - -1\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 x (+.f64 y z)) z) < -1e108Initial program 74.0%
associate-/l*91.7%
remove-double-neg91.7%
distribute-frac-neg291.7%
neg-sub091.7%
remove-double-neg91.7%
unsub-neg91.7%
div-sub91.7%
*-inverses91.7%
metadata-eval91.7%
associate--r-91.7%
neg-sub091.7%
distribute-frac-neg291.7%
remove-double-neg91.7%
sub-neg91.7%
Simplified91.7%
Taylor expanded in y around inf 59.2%
associate-*l/58.0%
*-commutative58.0%
Simplified58.0%
clear-num58.0%
un-div-inv58.7%
Applied egg-rr58.7%
if -1e108 < (/.f64 (*.f64 x (+.f64 y z)) z) Initial program 86.3%
associate-/l*98.3%
remove-double-neg98.3%
distribute-frac-neg298.3%
neg-sub098.3%
remove-double-neg98.3%
unsub-neg98.3%
div-sub98.3%
*-inverses98.3%
metadata-eval98.3%
associate--r-98.3%
neg-sub098.3%
distribute-frac-neg298.3%
remove-double-neg98.3%
sub-neg98.3%
Simplified98.3%
Final simplification86.0%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 #s(literal 1 binary64) x) (FPCore (x_s x_m y z) :precision binary64 (* x_s x_m))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z) {
return x_s * x_m;
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x_s * x_m
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z) {
return x_s * x_m;
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) def code(x_s, x_m, y, z): return x_s * x_m
x\_m = abs(x) x\_s = copysign(1.0, x) function code(x_s, x_m, y, z) return Float64(x_s * x_m) end
x\_m = abs(x); x\_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z) tmp = x_s * x_m; end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * x$95$m), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot x\_m
\end{array}
Initial program 82.5%
associate-/l*96.2%
remove-double-neg96.2%
distribute-frac-neg296.2%
neg-sub096.2%
remove-double-neg96.2%
unsub-neg96.2%
div-sub96.2%
*-inverses96.2%
metadata-eval96.2%
associate--r-96.2%
neg-sub096.2%
distribute-frac-neg296.2%
remove-double-neg96.2%
sub-neg96.2%
Simplified96.2%
Taylor expanded in y around 0 48.6%
Final simplification48.6%
(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 2024085
(FPCore (x y z)
:name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
:precision binary64
:alt
(/ x (/ z (+ y z)))
(/ (* x (+ y z)) z))