
(FPCore (x y z) :precision binary64 (+ (* x 0.5) (* y (+ (- 1.0 z) (log z)))))
double code(double x, double y, double z) {
return (x * 0.5) + (y * ((1.0 - z) + log(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 * 0.5d0) + (y * ((1.0d0 - z) + log(z)))
end function
public static double code(double x, double y, double z) {
return (x * 0.5) + (y * ((1.0 - z) + Math.log(z)));
}
def code(x, y, z): return (x * 0.5) + (y * ((1.0 - z) + math.log(z)))
function code(x, y, z) return Float64(Float64(x * 0.5) + Float64(y * Float64(Float64(1.0 - z) + log(z)))) end
function tmp = code(x, y, z) tmp = (x * 0.5) + (y * ((1.0 - z) + log(z))); end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] + N[(y * N[(N[(1.0 - z), $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (* x 0.5) (* y (+ (- 1.0 z) (log z)))))
double code(double x, double y, double z) {
return (x * 0.5) + (y * ((1.0 - z) + log(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 * 0.5d0) + (y * ((1.0d0 - z) + log(z)))
end function
public static double code(double x, double y, double z) {
return (x * 0.5) + (y * ((1.0 - z) + Math.log(z)));
}
def code(x, y, z): return (x * 0.5) + (y * ((1.0 - z) + math.log(z)))
function code(x, y, z) return Float64(Float64(x * 0.5) + Float64(y * Float64(Float64(1.0 - z) + log(z)))) end
function tmp = code(x, y, z) tmp = (x * 0.5) + (y * ((1.0 - z) + log(z))); end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] + N[(y * N[(N[(1.0 - z), $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
\end{array}
(FPCore (x y z) :precision binary64 (fma (- (+ (log z) 1.0) z) y (* x 0.5)))
double code(double x, double y, double z) {
return fma(((log(z) + 1.0) - z), y, (x * 0.5));
}
function code(x, y, z) return fma(Float64(Float64(log(z) + 1.0) - z), y, Float64(x * 0.5)) end
code[x_, y_, z_] := N[(N[(N[(N[Log[z], $MachinePrecision] + 1.0), $MachinePrecision] - z), $MachinePrecision] * y + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\left(\log z + 1\right) - z, y, x \cdot 0.5\right)
\end{array}
Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f6499.9%
Simplified99.9%
+-commutativeN/A
*-commutativeN/A
fma-defineN/A
fma-lowering-fma.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* y (+ (- (log z) z) 1.0)))) (if (<= y -8.8e+43) t_0 (if (<= y 510000000.0) (- (* x 0.5) (* z y)) t_0))))
double code(double x, double y, double z) {
double t_0 = y * ((log(z) - z) + 1.0);
double tmp;
if (y <= -8.8e+43) {
tmp = t_0;
} else if (y <= 510000000.0) {
tmp = (x * 0.5) - (z * y);
} else {
tmp = t_0;
}
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 * ((log(z) - z) + 1.0d0)
if (y <= (-8.8d+43)) then
tmp = t_0
else if (y <= 510000000.0d0) then
tmp = (x * 0.5d0) - (z * y)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * ((Math.log(z) - z) + 1.0);
double tmp;
if (y <= -8.8e+43) {
tmp = t_0;
} else if (y <= 510000000.0) {
tmp = (x * 0.5) - (z * y);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = y * ((math.log(z) - z) + 1.0) tmp = 0 if y <= -8.8e+43: tmp = t_0 elif y <= 510000000.0: tmp = (x * 0.5) - (z * y) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(Float64(log(z) - z) + 1.0)) tmp = 0.0 if (y <= -8.8e+43) tmp = t_0; elseif (y <= 510000000.0) tmp = Float64(Float64(x * 0.5) - Float64(z * y)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * ((log(z) - z) + 1.0); tmp = 0.0; if (y <= -8.8e+43) tmp = t_0; elseif (y <= 510000000.0) tmp = (x * 0.5) - (z * y); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(N[(N[Log[z], $MachinePrecision] - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.8e+43], t$95$0, If[LessEqual[y, 510000000.0], N[(N[(x * 0.5), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(\left(\log z - z\right) + 1\right)\\
\mathbf{if}\;y \leq -8.8 \cdot 10^{+43}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 510000000:\\
\;\;\;\;x \cdot 0.5 - z \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -8.80000000000000002e43 or 5.1e8 < y Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f6499.8%
Simplified99.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
neg-mul-1N/A
--lowering--.f64N/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6493.0%
Simplified93.0%
if -8.80000000000000002e43 < y < 5.1e8Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f6499.9%
Simplified99.9%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6487.4%
Simplified87.4%
Final simplification89.9%
(FPCore (x y z) :precision binary64 (let* ((t_0 (- (* x 0.5) (* z y)))) (if (<= z 7.8e-249) t_0 (if (<= z 8.5e-111) (* (+ (log z) 1.0) y) t_0))))
double code(double x, double y, double z) {
double t_0 = (x * 0.5) - (z * y);
double tmp;
if (z <= 7.8e-249) {
tmp = t_0;
} else if (z <= 8.5e-111) {
tmp = (log(z) + 1.0) * y;
} else {
tmp = t_0;
}
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 * 0.5d0) - (z * y)
if (z <= 7.8d-249) then
tmp = t_0
else if (z <= 8.5d-111) then
tmp = (log(z) + 1.0d0) * y
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * 0.5) - (z * y);
double tmp;
if (z <= 7.8e-249) {
tmp = t_0;
} else if (z <= 8.5e-111) {
tmp = (Math.log(z) + 1.0) * y;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x * 0.5) - (z * y) tmp = 0 if z <= 7.8e-249: tmp = t_0 elif z <= 8.5e-111: tmp = (math.log(z) + 1.0) * y else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * 0.5) - Float64(z * y)) tmp = 0.0 if (z <= 7.8e-249) tmp = t_0; elseif (z <= 8.5e-111) tmp = Float64(Float64(log(z) + 1.0) * y); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * 0.5) - (z * y); tmp = 0.0; if (z <= 7.8e-249) tmp = t_0; elseif (z <= 8.5e-111) tmp = (log(z) + 1.0) * y; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * 0.5), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 7.8e-249], t$95$0, If[LessEqual[z, 8.5e-111], N[(N[(N[Log[z], $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot 0.5 - z \cdot y\\
\mathbf{if}\;z \leq 7.8 \cdot 10^{-249}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-111}:\\
\;\;\;\;\left(\log z + 1\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < 7.7999999999999998e-249 or 8.5000000000000003e-111 < z Initial program 100.0%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f64100.0%
Simplified100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6487.9%
Simplified87.9%
if 7.7999999999999998e-249 < z < 8.5000000000000003e-111Initial program 99.7%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f6499.7%
Simplified99.7%
Taylor expanded in z around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f6499.7%
Simplified99.7%
Taylor expanded in x around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f6463.6%
Simplified63.6%
Final simplification81.9%
(FPCore (x y z) :precision binary64 (if (<= z 0.28) (+ (* x 0.5) (* (+ (log z) 1.0) y)) (- (* x 0.5) (* z y))))
double code(double x, double y, double z) {
double tmp;
if (z <= 0.28) {
tmp = (x * 0.5) + ((log(z) + 1.0) * y);
} else {
tmp = (x * 0.5) - (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 <= 0.28d0) then
tmp = (x * 0.5d0) + ((log(z) + 1.0d0) * y)
else
tmp = (x * 0.5d0) - (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= 0.28) {
tmp = (x * 0.5) + ((Math.log(z) + 1.0) * y);
} else {
tmp = (x * 0.5) - (z * y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= 0.28: tmp = (x * 0.5) + ((math.log(z) + 1.0) * y) else: tmp = (x * 0.5) - (z * y) return tmp
function code(x, y, z) tmp = 0.0 if (z <= 0.28) tmp = Float64(Float64(x * 0.5) + Float64(Float64(log(z) + 1.0) * y)); else tmp = Float64(Float64(x * 0.5) - Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= 0.28) tmp = (x * 0.5) + ((log(z) + 1.0) * y); else tmp = (x * 0.5) - (z * y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, 0.28], N[(N[(x * 0.5), $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] + 1.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[(x * 0.5), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 0.28:\\
\;\;\;\;x \cdot 0.5 + \left(\log z + 1\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot 0.5 - z \cdot y\\
\end{array}
\end{array}
if z < 0.28000000000000003Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f6499.8%
Simplified99.8%
Taylor expanded in z around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f6499.7%
Simplified99.7%
if 0.28000000000000003 < z Initial program 100.0%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f64100.0%
Simplified100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6498.2%
Simplified98.2%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (+ (* x 0.5) (* y (+ (log z) (- 1.0 z)))))
double code(double x, double y, double z) {
return (x * 0.5) + (y * (log(z) + (1.0 - 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 * 0.5d0) + (y * (log(z) + (1.0d0 - z)))
end function
public static double code(double x, double y, double z) {
return (x * 0.5) + (y * (Math.log(z) + (1.0 - z)));
}
def code(x, y, z): return (x * 0.5) + (y * (math.log(z) + (1.0 - z)))
function code(x, y, z) return Float64(Float64(x * 0.5) + Float64(y * Float64(log(z) + Float64(1.0 - z)))) end
function tmp = code(x, y, z) tmp = (x * 0.5) + (y * (log(z) + (1.0 - z))); end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] + N[(y * N[(N[Log[z], $MachinePrecision] + N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5 + y \cdot \left(\log z + \left(1 - z\right)\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (<= z 3.9e+22) (* x 0.5) (- 0.0 (* z y))))
double code(double x, double y, double z) {
double tmp;
if (z <= 3.9e+22) {
tmp = x * 0.5;
} else {
tmp = 0.0 - (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 <= 3.9d+22) then
tmp = x * 0.5d0
else
tmp = 0.0d0 - (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= 3.9e+22) {
tmp = x * 0.5;
} else {
tmp = 0.0 - (z * y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= 3.9e+22: tmp = x * 0.5 else: tmp = 0.0 - (z * y) return tmp
function code(x, y, z) tmp = 0.0 if (z <= 3.9e+22) tmp = Float64(x * 0.5); else tmp = Float64(0.0 - Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= 3.9e+22) tmp = x * 0.5; else tmp = 0.0 - (z * y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, 3.9e+22], N[(x * 0.5), $MachinePrecision], N[(0.0 - N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 3.9 \cdot 10^{+22}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;0 - z \cdot y\\
\end{array}
\end{array}
if z < 3.90000000000000021e22Initial program 99.8%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f6499.8%
Simplified99.8%
Taylor expanded in x around inf
*-lowering-*.f6450.0%
Simplified50.0%
if 3.90000000000000021e22 < z Initial program 100.0%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f64100.0%
Simplified100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6479.5%
Simplified79.5%
sub0-negN/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6479.5%
Applied egg-rr79.5%
Final simplification64.1%
(FPCore (x y z) :precision binary64 (- (* x 0.5) (* z y)))
double code(double x, double y, double z) {
return (x * 0.5) - (z * y);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * 0.5d0) - (z * y)
end function
public static double code(double x, double y, double z) {
return (x * 0.5) - (z * y);
}
def code(x, y, z): return (x * 0.5) - (z * y)
function code(x, y, z) return Float64(Float64(x * 0.5) - Float64(z * y)) end
function tmp = code(x, y, z) tmp = (x * 0.5) - (z * y); end
code[x_, y_, z_] := N[(N[(x * 0.5), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5 - z \cdot y
\end{array}
Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f6499.9%
Simplified99.9%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6474.9%
Simplified74.9%
Final simplification74.9%
(FPCore (x y z) :precision binary64 (* x 0.5))
double code(double x, double y, double z) {
return x * 0.5;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * 0.5d0
end function
public static double code(double x, double y, double z) {
return x * 0.5;
}
def code(x, y, z): return x * 0.5
function code(x, y, z) return Float64(x * 0.5) end
function tmp = code(x, y, z) tmp = x * 0.5; end
code[x_, y_, z_] := N[(x * 0.5), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0.5
\end{array}
Initial program 99.9%
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
log-lowering-log.f6499.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f6436.4%
Simplified36.4%
Final simplification36.4%
(FPCore (x y z) :precision binary64 (- (+ y (* 0.5 x)) (* y (- z (log z)))))
double code(double x, double y, double z) {
return (y + (0.5 * x)) - (y * (z - log(z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (y + (0.5d0 * x)) - (y * (z - log(z)))
end function
public static double code(double x, double y, double z) {
return (y + (0.5 * x)) - (y * (z - Math.log(z)));
}
def code(x, y, z): return (y + (0.5 * x)) - (y * (z - math.log(z)))
function code(x, y, z) return Float64(Float64(y + Float64(0.5 * x)) - Float64(y * Float64(z - log(z)))) end
function tmp = code(x, y, z) tmp = (y + (0.5 * x)) - (y * (z - log(z))); end
code[x_, y_, z_] := N[(N[(y + N[(0.5 * x), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z - N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + 0.5 \cdot x\right) - y \cdot \left(z - \log z\right)
\end{array}
herbie shell --seed 2024155
(FPCore (x y z)
:name "System.Random.MWC.Distributions:gamma from mwc-random-0.13.3.2"
:precision binary64
:alt
(! :herbie-platform default (- (+ y (* 1/2 x)) (* y (- z (log z)))))
(+ (* x 0.5) (* y (+ (- 1.0 z) (log z)))))