
(FPCore (x y z) :precision binary64 (/ (* x y) z))
double code(double x, double y, double z) {
return (x * 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 * y) / z
end function
public static double code(double x, double y, double z) {
return (x * y) / z;
}
def code(x, y, z): return (x * y) / z
function code(x, y, z) return Float64(Float64(x * y) / z) end
function tmp = code(x, y, z) tmp = (x * y) / z; end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 6 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* x y) z))
double code(double x, double y, double z) {
return (x * 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 * y) / z
end function
public static double code(double x, double y, double z) {
return (x * y) / z;
}
def code(x, y, z): return (x * y) / z
function code(x, y, z) return Float64(Float64(x * y) / z) end
function tmp = code(x, y, z) tmp = (x * y) / z; end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{z}
\end{array}
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (* x y) z)))
(if (<= (* x y) -2e+221)
(/ (/ y z) (/ 1.0 x))
(if (<= (* x y) -2e-205)
t_0
(if (<= (* x y) 1e-169)
(/ x (/ z y))
(if (<= (* x y) 1e+230) t_0 (* x (/ y z))))))))assert(x < y);
double code(double x, double y, double z) {
double t_0 = (x * y) / z;
double tmp;
if ((x * y) <= -2e+221) {
tmp = (y / z) / (1.0 / x);
} else if ((x * y) <= -2e-205) {
tmp = t_0;
} else if ((x * y) <= 1e-169) {
tmp = x / (z / y);
} else if ((x * y) <= 1e+230) {
tmp = t_0;
} else {
tmp = x * (y / z);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 ((x * y) <= (-2d+221)) then
tmp = (y / z) / (1.0d0 / x)
else if ((x * y) <= (-2d-205)) then
tmp = t_0
else if ((x * y) <= 1d-169) then
tmp = x / (z / y)
else if ((x * y) <= 1d+230) then
tmp = t_0
else
tmp = x * (y / z)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z) {
double t_0 = (x * y) / z;
double tmp;
if ((x * y) <= -2e+221) {
tmp = (y / z) / (1.0 / x);
} else if ((x * y) <= -2e-205) {
tmp = t_0;
} else if ((x * y) <= 1e-169) {
tmp = x / (z / y);
} else if ((x * y) <= 1e+230) {
tmp = t_0;
} else {
tmp = x * (y / z);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z): t_0 = (x * y) / z tmp = 0 if (x * y) <= -2e+221: tmp = (y / z) / (1.0 / x) elif (x * y) <= -2e-205: tmp = t_0 elif (x * y) <= 1e-169: tmp = x / (z / y) elif (x * y) <= 1e+230: tmp = t_0 else: tmp = x * (y / z) return tmp
x, y = sort([x, y]) function code(x, y, z) t_0 = Float64(Float64(x * y) / z) tmp = 0.0 if (Float64(x * y) <= -2e+221) tmp = Float64(Float64(y / z) / Float64(1.0 / x)); elseif (Float64(x * y) <= -2e-205) tmp = t_0; elseif (Float64(x * y) <= 1e-169) tmp = Float64(x / Float64(z / y)); elseif (Float64(x * y) <= 1e+230) tmp = t_0; else tmp = Float64(x * Float64(y / z)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
t_0 = (x * y) / z;
tmp = 0.0;
if ((x * y) <= -2e+221)
tmp = (y / z) / (1.0 / x);
elseif ((x * y) <= -2e-205)
tmp = t_0;
elseif ((x * y) <= 1e-169)
tmp = x / (z / y);
elseif ((x * y) <= 1e+230)
tmp = t_0;
else
tmp = x * (y / z);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e+221], N[(N[(y / z), $MachinePrecision] / N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e-205], t$95$0, If[LessEqual[N[(x * y), $MachinePrecision], 1e-169], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+230], t$95$0, N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x \cdot y}{z}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+221}:\\
\;\;\;\;\frac{\frac{y}{z}}{\frac{1}{x}}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-205}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \cdot y \leq 10^{-169}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;x \cdot y \leq 10^{+230}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 x y) < -2.0000000000000001e221Initial program 84.0%
associate-/l*99.8%
Simplified99.8%
*-un-lft-identity99.8%
div-inv99.8%
times-frac84.1%
Applied egg-rr84.1%
frac-times99.8%
*-un-lft-identity99.8%
un-div-inv99.8%
associate-/l*84.0%
*-commutative84.0%
associate-*l/99.8%
associate-/r/99.8%
div-inv99.7%
associate-/r*99.8%
Applied egg-rr99.8%
if -2.0000000000000001e221 < (*.f64 x y) < -2e-205 or 1.00000000000000002e-169 < (*.f64 x y) < 1.0000000000000001e230Initial program 99.6%
if -2e-205 < (*.f64 x y) < 1.00000000000000002e-169Initial program 86.1%
associate-/l*99.9%
Simplified99.9%
if 1.0000000000000001e230 < (*.f64 x y) Initial program 73.7%
associate-*r/99.8%
Simplified99.8%
Final simplification99.7%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ x (/ z y))) (t_1 (/ (* x y) z)))
(if (<= (* x y) -1e+125)
t_0
(if (<= (* x y) -2e-205)
t_1
(if (<= (* x y) 1e-169)
t_0
(if (<= (* x y) 1e+230) t_1 (* x (/ y z))))))))assert(x < y);
double code(double x, double y, double z) {
double t_0 = x / (z / y);
double t_1 = (x * y) / z;
double tmp;
if ((x * y) <= -1e+125) {
tmp = t_0;
} else if ((x * y) <= -2e-205) {
tmp = t_1;
} else if ((x * y) <= 1e-169) {
tmp = t_0;
} else if ((x * y) <= 1e+230) {
tmp = t_1;
} else {
tmp = x * (y / z);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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) :: t_1
real(8) :: tmp
t_0 = x / (z / y)
t_1 = (x * y) / z
if ((x * y) <= (-1d+125)) then
tmp = t_0
else if ((x * y) <= (-2d-205)) then
tmp = t_1
else if ((x * y) <= 1d-169) then
tmp = t_0
else if ((x * y) <= 1d+230) then
tmp = t_1
else
tmp = x * (y / z)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z) {
double t_0 = x / (z / y);
double t_1 = (x * y) / z;
double tmp;
if ((x * y) <= -1e+125) {
tmp = t_0;
} else if ((x * y) <= -2e-205) {
tmp = t_1;
} else if ((x * y) <= 1e-169) {
tmp = t_0;
} else if ((x * y) <= 1e+230) {
tmp = t_1;
} else {
tmp = x * (y / z);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z): t_0 = x / (z / y) t_1 = (x * y) / z tmp = 0 if (x * y) <= -1e+125: tmp = t_0 elif (x * y) <= -2e-205: tmp = t_1 elif (x * y) <= 1e-169: tmp = t_0 elif (x * y) <= 1e+230: tmp = t_1 else: tmp = x * (y / z) return tmp
x, y = sort([x, y]) function code(x, y, z) t_0 = Float64(x / Float64(z / y)) t_1 = Float64(Float64(x * y) / z) tmp = 0.0 if (Float64(x * y) <= -1e+125) tmp = t_0; elseif (Float64(x * y) <= -2e-205) tmp = t_1; elseif (Float64(x * y) <= 1e-169) tmp = t_0; elseif (Float64(x * y) <= 1e+230) tmp = t_1; else tmp = Float64(x * Float64(y / z)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
t_0 = x / (z / y);
t_1 = (x * y) / z;
tmp = 0.0;
if ((x * y) <= -1e+125)
tmp = t_0;
elseif ((x * y) <= -2e-205)
tmp = t_1;
elseif ((x * y) <= 1e-169)
tmp = t_0;
elseif ((x * y) <= 1e+230)
tmp = t_1;
else
tmp = x * (y / z);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_] := Block[{t$95$0 = N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e+125], t$95$0, If[LessEqual[N[(x * y), $MachinePrecision], -2e-205], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e-169], t$95$0, If[LessEqual[N[(x * y), $MachinePrecision], 1e+230], t$95$1, N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := \frac{x}{\frac{z}{y}}\\
t_1 := \frac{x \cdot y}{z}\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+125}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 10^{-169}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \cdot y \leq 10^{+230}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 x y) < -9.9999999999999992e124 or -2e-205 < (*.f64 x y) < 1.00000000000000002e-169Initial program 87.4%
associate-/l*99.7%
Simplified99.7%
if -9.9999999999999992e124 < (*.f64 x y) < -2e-205 or 1.00000000000000002e-169 < (*.f64 x y) < 1.0000000000000001e230Initial program 99.6%
if 1.0000000000000001e230 < (*.f64 x y) Initial program 73.7%
associate-*r/99.8%
Simplified99.8%
Final simplification99.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= x -1.7e+205) (* x (/ y z)) (* y (/ x z))))
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if (x <= -1.7e+205) {
tmp = x * (y / z);
} else {
tmp = y * (x / z);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 (x <= (-1.7d+205)) then
tmp = x * (y / z)
else
tmp = y * (x / z)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.7e+205) {
tmp = x * (y / z);
} else {
tmp = y * (x / z);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if x <= -1.7e+205: tmp = x * (y / z) else: tmp = y * (x / z) return tmp
x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (x <= -1.7e+205) tmp = Float64(x * Float64(y / z)); else tmp = Float64(y * Float64(x / z)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (x <= -1.7e+205)
tmp = x * (y / z);
else
tmp = y * (x / z);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[x, -1.7e+205], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+205}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -1.7e205Initial program 85.2%
associate-*r/99.9%
Simplified99.9%
if -1.7e205 < x Initial program 92.8%
associate-*l/89.4%
Simplified89.4%
Final simplification90.2%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= x -5.2e+203) (/ x (/ z y)) (* y (/ x z))))
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if (x <= -5.2e+203) {
tmp = x / (z / y);
} else {
tmp = y * (x / z);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 (x <= (-5.2d+203)) then
tmp = x / (z / y)
else
tmp = y * (x / z)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if (x <= -5.2e+203) {
tmp = x / (z / y);
} else {
tmp = y * (x / z);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if x <= -5.2e+203: tmp = x / (z / y) else: tmp = y * (x / z) return tmp
x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (x <= -5.2e+203) tmp = Float64(x / Float64(z / y)); else tmp = Float64(y * Float64(x / z)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (x <= -5.2e+203)
tmp = x / (z / y);
else
tmp = y * (x / z);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[x, -5.2e+203], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+203}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -5.1999999999999997e203Initial program 86.0%
associate-/l*99.8%
Simplified99.8%
if -5.1999999999999997e203 < x Initial program 92.7%
associate-*l/89.4%
Simplified89.4%
Final simplification90.2%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= x -3.4e+204) (* x (/ y z)) (/ y (/ z x))))
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if (x <= -3.4e+204) {
tmp = x * (y / z);
} else {
tmp = y / (z / x);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 (x <= (-3.4d+204)) then
tmp = x * (y / z)
else
tmp = y / (z / x)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3.4e+204) {
tmp = x * (y / z);
} else {
tmp = y / (z / x);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if x <= -3.4e+204: tmp = x * (y / z) else: tmp = y / (z / x) return tmp
x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (x <= -3.4e+204) tmp = Float64(x * Float64(y / z)); else tmp = Float64(y / Float64(z / x)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (x <= -3.4e+204)
tmp = x * (y / z);
else
tmp = y / (z / x);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[x, -3.4e+204], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{+204}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\end{array}
\end{array}
if x < -3.4000000000000001e204Initial program 85.2%
associate-*r/99.9%
Simplified99.9%
if -3.4000000000000001e204 < x Initial program 92.8%
associate-*r/91.0%
Simplified91.0%
*-commutative91.0%
associate-*l/92.8%
associate-/l*90.3%
Applied egg-rr90.3%
Final simplification91.0%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (* x (/ y z)))
assert(x < y);
double code(double x, double y, double z) {
return x * (y / z);
}
NOTE: x and y should be sorted in increasing order before calling this function.
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)
end function
assert x < y;
public static double code(double x, double y, double z) {
return x * (y / z);
}
[x, y] = sort([x, y]) def code(x, y, z): return x * (y / z)
x, y = sort([x, y]) function code(x, y, z) return Float64(x * Float64(y / z)) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z)
tmp = x * (y / z);
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
x \cdot \frac{y}{z}
\end{array}
Initial program 92.2%
associate-*r/91.7%
Simplified91.7%
Final simplification91.7%
(FPCore (x y z) :precision binary64 (if (< z -4.262230790519429e-138) (/ (* x y) z) (if (< z 1.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y))))
double code(double x, double y, double z) {
double tmp;
if (z < -4.262230790519429e-138) {
tmp = (x * y) / z;
} else if (z < 1.7042130660650472e-164) {
tmp = x / (z / y);
} else {
tmp = (x / z) * 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 (z < (-4.262230790519429d-138)) then
tmp = (x * y) / z
else if (z < 1.7042130660650472d-164) then
tmp = x / (z / y)
else
tmp = (x / z) * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z < -4.262230790519429e-138) {
tmp = (x * y) / z;
} else if (z < 1.7042130660650472e-164) {
tmp = x / (z / y);
} else {
tmp = (x / z) * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z < -4.262230790519429e-138: tmp = (x * y) / z elif z < 1.7042130660650472e-164: tmp = x / (z / y) else: tmp = (x / z) * y return tmp
function code(x, y, z) tmp = 0.0 if (z < -4.262230790519429e-138) tmp = Float64(Float64(x * y) / z); elseif (z < 1.7042130660650472e-164) tmp = Float64(x / Float64(z / y)); else tmp = Float64(Float64(x / z) * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z < -4.262230790519429e-138) tmp = (x * y) / z; elseif (z < 1.7042130660650472e-164) tmp = x / (z / y); else tmp = (x / z) * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Less[z, -4.262230790519429e-138], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[Less[z, 1.7042130660650472e-164], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z < -4.262230790519429 \cdot 10^{-138}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;z < 1.7042130660650472 \cdot 10^{-164}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}
\end{array}
herbie shell --seed 2023230
(FPCore (x y z)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< z -4.262230790519429e-138) (/ (* x y) z) (if (< z 1.7042130660650472e-164) (/ x (/ z y)) (* (/ x z) y)))
(/ (* x y) z))