Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2

Percentage Accurate: 89.1% → 89.1%
Time: 3.5s
Alternatives: 8
Speedup: 1.0×

Specification

?
\[\mathsf{TRUE}\left(\right)\]
\[\begin{array}{l} \\ \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
	return (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t):
	return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 8 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 89.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
	return (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t):
	return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}

Alternative 1: 89.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
	return (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
	return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t):
	return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t)
end
function tmp = code(x, y, z, t)
	tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}
Derivation
  1. Initial program 88.9%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 74.8% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{+79}:\\ \;\;\;\;\log y - t\\ \mathbf{elif}\;t \leq 8 \cdot 10^{+68}:\\ \;\;\;\;\left(x - 1\right) \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;\log \left(1 - y\right) - t\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= t -2.3e+79)
   (- (log y) t)
   (if (<= t 8e+68) (* (- x 1.0) (log y)) (- (log (- 1.0 y)) t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -2.3e+79) {
		tmp = log(y) - t;
	} else if (t <= 8e+68) {
		tmp = (x - 1.0) * log(y);
	} else {
		tmp = log((1.0 - y)) - t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (t <= (-2.3d+79)) then
        tmp = log(y) - t
    else if (t <= 8d+68) then
        tmp = (x - 1.0d0) * log(y)
    else
        tmp = log((1.0d0 - y)) - t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (t <= -2.3e+79) {
		tmp = Math.log(y) - t;
	} else if (t <= 8e+68) {
		tmp = (x - 1.0) * Math.log(y);
	} else {
		tmp = Math.log((1.0 - y)) - t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if t <= -2.3e+79:
		tmp = math.log(y) - t
	elif t <= 8e+68:
		tmp = (x - 1.0) * math.log(y)
	else:
		tmp = math.log((1.0 - y)) - t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (t <= -2.3e+79)
		tmp = Float64(log(y) - t);
	elseif (t <= 8e+68)
		tmp = Float64(Float64(x - 1.0) * log(y));
	else
		tmp = Float64(log(Float64(1.0 - y)) - t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (t <= -2.3e+79)
		tmp = log(y) - t;
	elseif (t <= 8e+68)
		tmp = (x - 1.0) * log(y);
	else
		tmp = log((1.0 - y)) - t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.3e+79], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t, 8e+68], N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+79}:\\
\;\;\;\;\log y - t\\

\mathbf{elif}\;t \leq 8 \cdot 10^{+68}:\\
\;\;\;\;\left(x - 1\right) \cdot \log y\\

\mathbf{else}:\\
\;\;\;\;\log \left(1 - y\right) - t\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.3e79

    1. Initial program 95.8%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\left(-1 \cdot \log y + \left(x \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)\right)} - t \]
    4. Applied rewrites72.1%

      \[\leadsto \color{blue}{\left(x - 1\right)} - t \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(1 - \frac{1}{x}\right)} - t \]
    6. Applied rewrites72.5%

      \[\leadsto \log y - t \]

    if -2.3e79 < t < 7.99999999999999962e68

    1. Initial program 82.9%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\left(-1 \cdot \log y + \left(x \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)\right) - t} \]
    4. Applied rewrites78.1%

      \[\leadsto \color{blue}{\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto -1 \cdot \log y + \color{blue}{\log \left(1 - y\right) \cdot \left(z - 1\right)} \]
    6. Applied rewrites76.4%

      \[\leadsto \left(x - 1\right) \cdot \color{blue}{\log y} \]

    if 7.99999999999999962e68 < t

    1. Initial program 100.0%

      \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\left(-1 \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)} - t \]
    4. Applied rewrites100.0%

      \[\leadsto \color{blue}{\left(x - 1\right) \cdot \log y} - t \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(\log y + -1 \cdot \frac{\log y}{x}\right)} - t \]
    6. Applied rewrites84.8%

      \[\leadsto \log \left(1 - y\right) - t \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 87.9% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \left(x - 1\right) \cdot \log y - t \end{array} \]
(FPCore (x y z t) :precision binary64 (- (* (- x 1.0) (log y)) t))
double code(double x, double y, double z, double t) {
	return ((x - 1.0) * log(y)) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((x - 1.0d0) * log(y)) - t
end function
public static double code(double x, double y, double z, double t) {
	return ((x - 1.0) * Math.log(y)) - t;
}
def code(x, y, z, t):
	return ((x - 1.0) * math.log(y)) - t
function code(x, y, z, t)
	return Float64(Float64(Float64(x - 1.0) * log(y)) - t)
end
function tmp = code(x, y, z, t)
	tmp = ((x - 1.0) * log(y)) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(x - 1\right) \cdot \log y - t
\end{array}
Derivation
  1. Initial program 88.9%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0

    \[\leadsto \color{blue}{\left(-1 \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)} - t \]
  4. Applied rewrites87.5%

    \[\leadsto \color{blue}{\left(x - 1\right) \cdot \log y} - t \]
  5. Add Preprocessing

Alternative 4: 35.1% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \log \left(1 - y\right) - t \end{array} \]
(FPCore (x y z t) :precision binary64 (- (log (- 1.0 y)) t))
double code(double x, double y, double z, double t) {
	return log((1.0 - y)) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = log((1.0d0 - y)) - t
end function
public static double code(double x, double y, double z, double t) {
	return Math.log((1.0 - y)) - t;
}
def code(x, y, z, t):
	return math.log((1.0 - y)) - t
function code(x, y, z, t)
	return Float64(log(Float64(1.0 - y)) - t)
end
function tmp = code(x, y, z, t)
	tmp = log((1.0 - y)) - t;
end
code[x_, y_, z_, t_] := N[(N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\log \left(1 - y\right) - t
\end{array}
Derivation
  1. Initial program 88.9%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0

    \[\leadsto \color{blue}{\left(-1 \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)} - t \]
  4. Applied rewrites87.5%

    \[\leadsto \color{blue}{\left(x - 1\right) \cdot \log y} - t \]
  5. Taylor expanded in x around inf

    \[\leadsto x \cdot \color{blue}{\left(\log y + -1 \cdot \frac{\log y}{x}\right)} - t \]
  6. Applied rewrites35.2%

    \[\leadsto \log \left(1 - y\right) - t \]
  7. Add Preprocessing

Alternative 5: 34.9% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \log y - t \end{array} \]
(FPCore (x y z t) :precision binary64 (- (log y) t))
double code(double x, double y, double z, double t) {
	return log(y) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = log(y) - t
end function
public static double code(double x, double y, double z, double t) {
	return Math.log(y) - t;
}
def code(x, y, z, t):
	return math.log(y) - t
function code(x, y, z, t)
	return Float64(log(y) - t)
end
function tmp = code(x, y, z, t)
	tmp = log(y) - t;
end
code[x_, y_, z_, t_] := N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\log y - t
\end{array}
Derivation
  1. Initial program 88.9%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0

    \[\leadsto \color{blue}{\left(-1 \cdot \log y + \left(x \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)\right)} - t \]
  4. Applied rewrites34.2%

    \[\leadsto \color{blue}{\left(x - 1\right)} - t \]
  5. Taylor expanded in x around inf

    \[\leadsto x \cdot \color{blue}{\left(1 - \frac{1}{x}\right)} - t \]
  6. Applied rewrites35.0%

    \[\leadsto \log y - t \]
  7. Add Preprocessing

Alternative 6: 34.0% accurate, 32.3× speedup?

\[\begin{array}{l} \\ \left(x - 1\right) - t \end{array} \]
(FPCore (x y z t) :precision binary64 (- (- x 1.0) t))
double code(double x, double y, double z, double t) {
	return (x - 1.0) - t;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x - 1.0d0) - t
end function
public static double code(double x, double y, double z, double t) {
	return (x - 1.0) - t;
}
def code(x, y, z, t):
	return (x - 1.0) - t
function code(x, y, z, t)
	return Float64(Float64(x - 1.0) - t)
end
function tmp = code(x, y, z, t)
	tmp = (x - 1.0) - t;
end
code[x_, y_, z_, t_] := N[(N[(x - 1.0), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}

\\
\left(x - 1\right) - t
\end{array}
Derivation
  1. Initial program 88.9%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0

    \[\leadsto \color{blue}{\left(-1 \cdot \log y + \left(x \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)\right)} - t \]
  4. Applied rewrites34.2%

    \[\leadsto \color{blue}{\left(x - 1\right)} - t \]
  5. Add Preprocessing

Alternative 7: 5.1% accurate, 56.5× speedup?

\[\begin{array}{l} \\ 1 - y \end{array} \]
(FPCore (x y z t) :precision binary64 (- 1.0 y))
double code(double x, double y, double z, double t) {
	return 1.0 - y;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = 1.0d0 - y
end function
public static double code(double x, double y, double z, double t) {
	return 1.0 - y;
}
def code(x, y, z, t):
	return 1.0 - y
function code(x, y, z, t)
	return Float64(1.0 - y)
end
function tmp = code(x, y, z, t)
	tmp = 1.0 - y;
end
code[x_, y_, z_, t_] := N[(1.0 - y), $MachinePrecision]
\begin{array}{l}

\\
1 - y
\end{array}
Derivation
  1. Initial program 88.9%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0

    \[\leadsto \color{blue}{\left(-1 \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)} - t \]
  4. Applied rewrites87.5%

    \[\leadsto \color{blue}{\left(x - 1\right) \cdot \log y} - t \]
  5. Taylor expanded in x around 0

    \[\leadsto -1 \cdot \color{blue}{\log y} - t \]
  6. Applied rewrites59.8%

    \[\leadsto \left(\left(x - 1\right) \cdot \log y - \color{blue}{t}\right) - t \]
  7. Taylor expanded in y around 0

    \[\leadsto \color{blue}{\log y \cdot \left(x - 1\right) - t} \]
  8. Applied rewrites5.0%

    \[\leadsto \color{blue}{1 - y} \]
  9. Add Preprocessing

Alternative 8: 2.0% accurate, 56.5× speedup?

\[\begin{array}{l} \\ x - 1 \end{array} \]
(FPCore (x y z t) :precision binary64 (- x 1.0))
double code(double x, double y, double z, double t) {
	return x - 1.0;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = x - 1.0d0
end function
public static double code(double x, double y, double z, double t) {
	return x - 1.0;
}
def code(x, y, z, t):
	return x - 1.0
function code(x, y, z, t)
	return Float64(x - 1.0)
end
function tmp = code(x, y, z, t)
	tmp = x - 1.0;
end
code[x_, y_, z_, t_] := N[(x - 1.0), $MachinePrecision]
\begin{array}{l}

\\
x - 1
\end{array}
Derivation
  1. Initial program 88.9%

    \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0

    \[\leadsto \color{blue}{\left(-1 \cdot \log y + \left(x \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)\right) - t} \]
  4. Applied rewrites55.9%

    \[\leadsto \color{blue}{\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)} \]
  5. Taylor expanded in x around 0

    \[\leadsto -1 \cdot \log y + \color{blue}{\left(x \cdot \log y + \log \left(1 - y\right) \cdot \left(z - 1\right)\right)} \]
  6. Applied rewrites2.0%

    \[\leadsto x - \color{blue}{1} \]
  7. Add Preprocessing

Reproduce

?
herbie shell --seed 2024321 
(FPCore (x y z t)
  :name "Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2"
  :precision binary64
  :pre (TRUE)
  (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))