
(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 6 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 (* x (- (/ y z) -1.0)))
double code(double x, double y, double z) {
return x * ((y / z) - -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 = x * ((y / z) - (-1.0d0))
end function
public static double code(double x, double y, double z) {
return x * ((y / z) - -1.0);
}
def code(x, y, z): return x * ((y / z) - -1.0)
function code(x, y, z) return Float64(x * Float64(Float64(y / z) - -1.0)) end
function tmp = code(x, y, z) tmp = x * ((y / z) - -1.0); end
code[x_, y_, z_] := N[(x * N[(N[(y / z), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - -1\right)
\end{array}
Initial program 85.0%
associate-/l*96.6%
remove-double-neg96.6%
distribute-frac-neg296.6%
neg-sub096.6%
remove-double-neg96.6%
unsub-neg96.6%
div-sub96.6%
*-inverses96.6%
metadata-eval96.6%
associate--r-96.6%
neg-sub096.6%
distribute-frac-neg296.6%
remove-double-neg96.6%
sub-neg96.6%
Simplified96.6%
(FPCore (x y z)
:precision binary64
(if (or (<= y -1.72e-93)
(and (not (<= y 2.8e-139)) (or (<= y 5.5e-123) (not (<= y 3.2e-53)))))
(* x (/ y z))
x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.72e-93) || (!(y <= 2.8e-139) && ((y <= 5.5e-123) || !(y <= 3.2e-53)))) {
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 ((y <= (-1.72d-93)) .or. (.not. (y <= 2.8d-139)) .and. (y <= 5.5d-123) .or. (.not. (y <= 3.2d-53))) 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 ((y <= -1.72e-93) || (!(y <= 2.8e-139) && ((y <= 5.5e-123) || !(y <= 3.2e-53)))) {
tmp = x * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.72e-93) or (not (y <= 2.8e-139) and ((y <= 5.5e-123) or not (y <= 3.2e-53))): tmp = x * (y / z) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.72e-93) || (!(y <= 2.8e-139) && ((y <= 5.5e-123) || !(y <= 3.2e-53)))) tmp = Float64(x * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.72e-93) || (~((y <= 2.8e-139)) && ((y <= 5.5e-123) || ~((y <= 3.2e-53))))) tmp = x * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.72e-93], And[N[Not[LessEqual[y, 2.8e-139]], $MachinePrecision], Or[LessEqual[y, 5.5e-123], N[Not[LessEqual[y, 3.2e-53]], $MachinePrecision]]]], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.72 \cdot 10^{-93} \lor \neg \left(y \leq 2.8 \cdot 10^{-139}\right) \land \left(y \leq 5.5 \cdot 10^{-123} \lor \neg \left(y \leq 3.2 \cdot 10^{-53}\right)\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.7199999999999999e-93 or 2.7999999999999999e-139 < y < 5.5e-123 or 3.2000000000000001e-53 < y Initial program 86.4%
associate-/l*94.3%
remove-double-neg94.3%
distribute-frac-neg294.3%
neg-sub094.3%
remove-double-neg94.3%
unsub-neg94.3%
div-sub94.3%
*-inverses94.3%
metadata-eval94.3%
associate--r-94.3%
neg-sub094.3%
distribute-frac-neg294.3%
remove-double-neg94.3%
sub-neg94.3%
Simplified94.3%
Taylor expanded in y around inf 71.5%
if -1.7199999999999999e-93 < y < 2.7999999999999999e-139 or 5.5e-123 < y < 3.2000000000000001e-53Initial program 82.9%
associate-/l*100.0%
remove-double-neg100.0%
distribute-frac-neg2100.0%
neg-sub0100.0%
remove-double-neg100.0%
unsub-neg100.0%
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 90.6%
Final simplification79.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (/ y z))))
(if (<= y -1.75e-91)
t_0
(if (<= y 2.8e-139)
x
(if (<= y 5.5e-123) t_0 (if (<= y 6e-55) x (/ (* x y) z)))))))
double code(double x, double y, double z) {
double t_0 = x * (y / z);
double tmp;
if (y <= -1.75e-91) {
tmp = t_0;
} else if (y <= 2.8e-139) {
tmp = x;
} else if (y <= 5.5e-123) {
tmp = t_0;
} else if (y <= 6e-55) {
tmp = x;
} else {
tmp = (x * y) / 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) :: t_0
real(8) :: tmp
t_0 = x * (y / z)
if (y <= (-1.75d-91)) then
tmp = t_0
else if (y <= 2.8d-139) then
tmp = x
else if (y <= 5.5d-123) then
tmp = t_0
else if (y <= 6d-55) then
tmp = x
else
tmp = (x * y) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (y / z);
double tmp;
if (y <= -1.75e-91) {
tmp = t_0;
} else if (y <= 2.8e-139) {
tmp = x;
} else if (y <= 5.5e-123) {
tmp = t_0;
} else if (y <= 6e-55) {
tmp = x;
} else {
tmp = (x * y) / z;
}
return tmp;
}
def code(x, y, z): t_0 = x * (y / z) tmp = 0 if y <= -1.75e-91: tmp = t_0 elif y <= 2.8e-139: tmp = x elif y <= 5.5e-123: tmp = t_0 elif y <= 6e-55: tmp = x else: tmp = (x * y) / z return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y / z)) tmp = 0.0 if (y <= -1.75e-91) tmp = t_0; elseif (y <= 2.8e-139) tmp = x; elseif (y <= 5.5e-123) tmp = t_0; elseif (y <= 6e-55) tmp = x; else tmp = Float64(Float64(x * y) / z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y / z); tmp = 0.0; if (y <= -1.75e-91) tmp = t_0; elseif (y <= 2.8e-139) tmp = x; elseif (y <= 5.5e-123) tmp = t_0; elseif (y <= 6e-55) tmp = x; else tmp = (x * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e-91], t$95$0, If[LessEqual[y, 2.8e-139], x, If[LessEqual[y, 5.5e-123], t$95$0, If[LessEqual[y, 6e-55], x, N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{-91}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-139}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-123}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-55}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}
\end{array}
if y < -1.7499999999999999e-91 or 2.7999999999999999e-139 < y < 5.5e-123Initial program 84.5%
associate-/l*96.3%
remove-double-neg96.3%
distribute-frac-neg296.3%
neg-sub096.3%
remove-double-neg96.3%
unsub-neg96.3%
div-sub96.3%
*-inverses96.3%
metadata-eval96.3%
associate--r-96.3%
neg-sub096.3%
distribute-frac-neg296.3%
remove-double-neg96.3%
sub-neg96.3%
Simplified96.3%
Taylor expanded in y around inf 73.9%
if -1.7499999999999999e-91 < y < 2.7999999999999999e-139 or 5.5e-123 < y < 6.00000000000000033e-55Initial program 82.9%
associate-/l*100.0%
remove-double-neg100.0%
distribute-frac-neg2100.0%
neg-sub0100.0%
remove-double-neg100.0%
unsub-neg100.0%
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 90.6%
if 6.00000000000000033e-55 < y Initial program 88.4%
associate-/l*92.3%
remove-double-neg92.3%
distribute-frac-neg292.3%
neg-sub092.3%
remove-double-neg92.3%
unsub-neg92.3%
div-sub92.3%
*-inverses92.3%
metadata-eval92.3%
associate--r-92.3%
neg-sub092.3%
distribute-frac-neg292.3%
remove-double-neg92.3%
sub-neg92.3%
Simplified92.3%
Taylor expanded in y around inf 74.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (/ y z))))
(if (<= y -1.75e-91)
t_0
(if (<= y 2.8e-139)
x
(if (<= y 5.5e-123) t_0 (if (<= y 2.9e-53) x (/ y (/ z x))))))))
double code(double x, double y, double z) {
double t_0 = x * (y / z);
double tmp;
if (y <= -1.75e-91) {
tmp = t_0;
} else if (y <= 2.8e-139) {
tmp = x;
} else if (y <= 5.5e-123) {
tmp = t_0;
} else if (y <= 2.9e-53) {
tmp = x;
} else {
tmp = y / (z / 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) :: t_0
real(8) :: tmp
t_0 = x * (y / z)
if (y <= (-1.75d-91)) then
tmp = t_0
else if (y <= 2.8d-139) then
tmp = x
else if (y <= 5.5d-123) then
tmp = t_0
else if (y <= 2.9d-53) then
tmp = x
else
tmp = y / (z / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (y / z);
double tmp;
if (y <= -1.75e-91) {
tmp = t_0;
} else if (y <= 2.8e-139) {
tmp = x;
} else if (y <= 5.5e-123) {
tmp = t_0;
} else if (y <= 2.9e-53) {
tmp = x;
} else {
tmp = y / (z / x);
}
return tmp;
}
def code(x, y, z): t_0 = x * (y / z) tmp = 0 if y <= -1.75e-91: tmp = t_0 elif y <= 2.8e-139: tmp = x elif y <= 5.5e-123: tmp = t_0 elif y <= 2.9e-53: tmp = x else: tmp = y / (z / x) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y / z)) tmp = 0.0 if (y <= -1.75e-91) tmp = t_0; elseif (y <= 2.8e-139) tmp = x; elseif (y <= 5.5e-123) tmp = t_0; elseif (y <= 2.9e-53) tmp = x; else tmp = Float64(y / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y / z); tmp = 0.0; if (y <= -1.75e-91) tmp = t_0; elseif (y <= 2.8e-139) tmp = x; elseif (y <= 5.5e-123) tmp = t_0; elseif (y <= 2.9e-53) tmp = x; else tmp = y / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e-91], t$95$0, If[LessEqual[y, 2.8e-139], x, If[LessEqual[y, 5.5e-123], t$95$0, If[LessEqual[y, 2.9e-53], x, N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{-91}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-139}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-123}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-53}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\end{array}
\end{array}
if y < -1.7499999999999999e-91 or 2.7999999999999999e-139 < y < 5.5e-123Initial program 84.5%
associate-/l*96.3%
remove-double-neg96.3%
distribute-frac-neg296.3%
neg-sub096.3%
remove-double-neg96.3%
unsub-neg96.3%
div-sub96.3%
*-inverses96.3%
metadata-eval96.3%
associate--r-96.3%
neg-sub096.3%
distribute-frac-neg296.3%
remove-double-neg96.3%
sub-neg96.3%
Simplified96.3%
Taylor expanded in y around inf 73.9%
if -1.7499999999999999e-91 < y < 2.7999999999999999e-139 or 5.5e-123 < y < 2.8999999999999998e-53Initial program 82.9%
associate-/l*100.0%
remove-double-neg100.0%
distribute-frac-neg2100.0%
neg-sub0100.0%
remove-double-neg100.0%
unsub-neg100.0%
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 90.6%
if 2.8999999999999998e-53 < y Initial program 88.4%
associate-/l*92.3%
remove-double-neg92.3%
distribute-frac-neg292.3%
neg-sub092.3%
remove-double-neg92.3%
unsub-neg92.3%
div-sub92.3%
*-inverses92.3%
metadata-eval92.3%
associate--r-92.3%
neg-sub092.3%
distribute-frac-neg292.3%
remove-double-neg92.3%
sub-neg92.3%
Simplified92.3%
Taylor expanded in y around inf 69.0%
associate-*r/74.0%
*-commutative74.0%
associate-*r/70.3%
clear-num70.2%
un-div-inv70.9%
Applied egg-rr70.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (/ y z))))
(if (<= y -8.2e-92)
t_0
(if (<= y 2.8e-139)
x
(if (<= y 6.2e-123) t_0 (if (<= y 3.25e-53) x (* y (/ x z))))))))
double code(double x, double y, double z) {
double t_0 = x * (y / z);
double tmp;
if (y <= -8.2e-92) {
tmp = t_0;
} else if (y <= 2.8e-139) {
tmp = x;
} else if (y <= 6.2e-123) {
tmp = t_0;
} else if (y <= 3.25e-53) {
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) :: t_0
real(8) :: tmp
t_0 = x * (y / z)
if (y <= (-8.2d-92)) then
tmp = t_0
else if (y <= 2.8d-139) then
tmp = x
else if (y <= 6.2d-123) then
tmp = t_0
else if (y <= 3.25d-53) 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 t_0 = x * (y / z);
double tmp;
if (y <= -8.2e-92) {
tmp = t_0;
} else if (y <= 2.8e-139) {
tmp = x;
} else if (y <= 6.2e-123) {
tmp = t_0;
} else if (y <= 3.25e-53) {
tmp = x;
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z): t_0 = x * (y / z) tmp = 0 if y <= -8.2e-92: tmp = t_0 elif y <= 2.8e-139: tmp = x elif y <= 6.2e-123: tmp = t_0 elif y <= 3.25e-53: tmp = x else: tmp = y * (x / z) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y / z)) tmp = 0.0 if (y <= -8.2e-92) tmp = t_0; elseif (y <= 2.8e-139) tmp = x; elseif (y <= 6.2e-123) tmp = t_0; elseif (y <= 3.25e-53) tmp = x; else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y / z); tmp = 0.0; if (y <= -8.2e-92) tmp = t_0; elseif (y <= 2.8e-139) tmp = x; elseif (y <= 6.2e-123) tmp = t_0; elseif (y <= 3.25e-53) tmp = x; else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.2e-92], t$95$0, If[LessEqual[y, 2.8e-139], x, If[LessEqual[y, 6.2e-123], t$95$0, If[LessEqual[y, 3.25e-53], x, N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{-92}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-139}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-123}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.25 \cdot 10^{-53}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -8.2000000000000005e-92 or 2.7999999999999999e-139 < y < 6.19999999999999996e-123Initial program 84.5%
associate-/l*96.3%
remove-double-neg96.3%
distribute-frac-neg296.3%
neg-sub096.3%
remove-double-neg96.3%
unsub-neg96.3%
div-sub96.3%
*-inverses96.3%
metadata-eval96.3%
associate--r-96.3%
neg-sub096.3%
distribute-frac-neg296.3%
remove-double-neg96.3%
sub-neg96.3%
Simplified96.3%
Taylor expanded in y around inf 73.9%
if -8.2000000000000005e-92 < y < 2.7999999999999999e-139 or 6.19999999999999996e-123 < y < 3.2499999999999998e-53Initial program 82.9%
associate-/l*100.0%
remove-double-neg100.0%
distribute-frac-neg2100.0%
neg-sub0100.0%
remove-double-neg100.0%
unsub-neg100.0%
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 90.6%
if 3.2499999999999998e-53 < y Initial program 88.4%
associate-/l*92.3%
remove-double-neg92.3%
distribute-frac-neg292.3%
neg-sub092.3%
remove-double-neg92.3%
unsub-neg92.3%
div-sub92.3%
*-inverses92.3%
metadata-eval92.3%
associate--r-92.3%
neg-sub092.3%
distribute-frac-neg292.3%
remove-double-neg92.3%
sub-neg92.3%
Simplified92.3%
Taylor expanded in y around inf 74.0%
associate-*l/70.3%
*-commutative70.3%
Simplified70.3%
(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 85.0%
associate-/l*96.6%
remove-double-neg96.6%
distribute-frac-neg296.6%
neg-sub096.6%
remove-double-neg96.6%
unsub-neg96.6%
div-sub96.6%
*-inverses96.6%
metadata-eval96.6%
associate--r-96.6%
neg-sub096.6%
distribute-frac-neg296.6%
remove-double-neg96.6%
sub-neg96.6%
Simplified96.6%
Taylor expanded in y around 0 50.9%
(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 2024086
(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))