
(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:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (x y z t) :precision binary64 (- (fma (- y) (+ -1.0 z) (fma (* -0.5 (pow y 2.0)) (+ -1.0 z) (* (log y) (+ -1.0 x)))) t))
double code(double x, double y, double z, double t) {
return fma(-y, (-1.0 + z), fma((-0.5 * pow(y, 2.0)), (-1.0 + z), (log(y) * (-1.0 + x)))) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(-y), Float64(-1.0 + z), fma(Float64(-0.5 * (y ^ 2.0)), Float64(-1.0 + z), Float64(log(y) * Float64(-1.0 + x)))) - t) end
code[x_, y_, z_, t_] := N[(N[((-y) * N[(-1.0 + z), $MachinePrecision] + N[(N[(-0.5 * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-y, -1 + z, \mathsf{fma}\left(-0.5 \cdot {y}^{2}, -1 + z, \log y \cdot \left(-1 + x\right)\right)\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (- (- (+ (* -0.5 (* (pow y 2.0) (+ -1.0 z))) (* (log y) (+ -1.0 x))) (* y (+ -1.0 z))) t))
double code(double x, double y, double z, double t) {
return (((-0.5 * (pow(y, 2.0) * (-1.0 + z))) + (log(y) * (-1.0 + x))) - (y * (-1.0 + z))) - 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 = ((((-0.5d0) * ((y ** 2.0d0) * ((-1.0d0) + z))) + (log(y) * ((-1.0d0) + x))) - (y * ((-1.0d0) + z))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((-0.5 * (Math.pow(y, 2.0) * (-1.0 + z))) + (Math.log(y) * (-1.0 + x))) - (y * (-1.0 + z))) - t;
}
def code(x, y, z, t): return (((-0.5 * (math.pow(y, 2.0) * (-1.0 + z))) + (math.log(y) * (-1.0 + x))) - (y * (-1.0 + z))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(-0.5 * Float64((y ^ 2.0) * Float64(-1.0 + z))) + Float64(log(y) * Float64(-1.0 + x))) - Float64(y * Float64(-1.0 + z))) - t) end
function tmp = code(x, y, z, t) tmp = (((-0.5 * ((y ^ 2.0) * (-1.0 + z))) + (log(y) * (-1.0 + x))) - (y * (-1.0 + z))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-0.5 * N[(N[Power[y, 2.0], $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(-0.5 \cdot \left({y}^{2} \cdot \left(-1 + z\right)\right) + \log y \cdot \left(-1 + x\right)\right) - y \cdot \left(-1 + z\right)\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (- (fma (log y) (+ -1.0 x) (* y (- (- z) -1.0))) t))
double code(double x, double y, double z, double t) {
return fma(log(y), (-1.0 + x), (y * (-z - -1.0))) - t;
}
function code(x, y, z, t) return Float64(fma(log(y), Float64(-1.0 + x), Float64(y * Float64(Float64(-z) - -1.0))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision] + N[(y * N[((-z) - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\log y, -1 + x, y \cdot \left(\left(-z\right) - -1\right)\right) - t
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (<= (+ -1.0 x) -1.0)))
(if (or t_1 (not t_1))
(- (* (log y) (+ -1.0 x)) t)
(- (- (- (log y)) (* y (+ -1.0 z))) t))))
double code(double x, double y, double z, double t) {
int t_1 = (-1.0 + x) <= -1.0;
double tmp;
if (t_1 || !t_1) {
tmp = (log(y) * (-1.0 + x)) - t;
} else {
tmp = (-log(y) - (y * (-1.0 + z))) - 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
logical :: t_1
real(8) :: tmp
t_1 = ((-1.0d0) + x) <= (-1.0d0)
if (t_1 .or. (.not. t_1)) then
tmp = (log(y) * ((-1.0d0) + x)) - t
else
tmp = (-log(y) - (y * ((-1.0d0) + z))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
boolean t_1 = (-1.0 + x) <= -1.0;
double tmp;
if (t_1 || !t_1) {
tmp = (Math.log(y) * (-1.0 + x)) - t;
} else {
tmp = (-Math.log(y) - (y * (-1.0 + z))) - t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (-1.0 + x) <= -1.0 tmp = 0 if t_1 or not t_1: tmp = (math.log(y) * (-1.0 + x)) - t else: tmp = (-math.log(y) - (y * (-1.0 + z))) - t return tmp
function code(x, y, z, t) t_1 = Float64(-1.0 + x) <= -1.0 tmp = 0.0 if (t_1 || !t_1) tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); else tmp = Float64(Float64(Float64(-log(y)) - Float64(y * Float64(-1.0 + z))) - t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (-1.0 + x) <= -1.0; tmp = 0.0; if (t_1 || ~(t_1)) tmp = (log(y) * (-1.0 + x)) - t; else tmp = (-log(y) - (y * (-1.0 + z))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = LessEqual[N[(-1.0 + x), $MachinePrecision], -1.0]}, If[Or[t$95$1, N[Not[t$95$1], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[((-N[Log[y], $MachinePrecision]) - N[(y * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 + x \leq -1\\
\mathbf{if}\;t_1 \lor \neg t_1:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-\log y\right) - y \cdot \left(-1 + z\right)\right) - t\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (log y) (+ -1.0 x))))
(if (<= t -2.8e-9)
(- t_1 t)
(if (<= t 1.08e+15) (- t_1 (* y (+ -1.0 z))) (- (* (log y) x) t)))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * (-1.0 + x);
double tmp;
if (t <= -2.8e-9) {
tmp = t_1 - t;
} else if (t <= 1.08e+15) {
tmp = t_1 - (y * (-1.0 + z));
} else {
tmp = (log(y) * x) - 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) :: t_1
real(8) :: tmp
t_1 = log(y) * ((-1.0d0) + x)
if (t <= (-2.8d-9)) then
tmp = t_1 - t
else if (t <= 1.08d+15) then
tmp = t_1 - (y * ((-1.0d0) + z))
else
tmp = (log(y) * x) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.log(y) * (-1.0 + x);
double tmp;
if (t <= -2.8e-9) {
tmp = t_1 - t;
} else if (t <= 1.08e+15) {
tmp = t_1 - (y * (-1.0 + z));
} else {
tmp = (Math.log(y) * x) - t;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * (-1.0 + x) tmp = 0 if t <= -2.8e-9: tmp = t_1 - t elif t <= 1.08e+15: tmp = t_1 - (y * (-1.0 + z)) else: tmp = (math.log(y) * x) - t return tmp
function code(x, y, z, t) t_1 = Float64(log(y) * Float64(-1.0 + x)) tmp = 0.0 if (t <= -2.8e-9) tmp = Float64(t_1 - t); elseif (t <= 1.08e+15) tmp = Float64(t_1 - Float64(y * Float64(-1.0 + z))); else tmp = Float64(Float64(log(y) * x) - t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(y) * (-1.0 + x); tmp = 0.0; if (t <= -2.8e-9) tmp = t_1 - t; elseif (t <= 1.08e+15) tmp = t_1 - (y * (-1.0 + z)); else tmp = (log(y) * x) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e-9], N[(t$95$1 - t), $MachinePrecision], If[LessEqual[t, 1.08e+15], N[(t$95$1 - N[(y * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot \left(-1 + x\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{-9}:\\
\;\;\;\;t_1 - t\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{+15}:\\
\;\;\;\;t_1 - y \cdot \left(-1 + z\right)\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x - t\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (- (- (* (log y) (+ -1.0 x)) (* y (+ -1.0 z))) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (-1.0 + x)) - (y * (-1.0 + z))) - 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) * ((-1.0d0) + x)) - (y * ((-1.0d0) + z))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (-1.0 + x)) - (y * (-1.0 + z))) - t;
}
def code(x, y, z, t): return ((math.log(y) * (-1.0 + x)) - (y * (-1.0 + z))) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(-1.0 + x)) - Float64(y * Float64(-1.0 + z))) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (-1.0 + x)) - (y * (-1.0 + z))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - N[(y * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(-1 + x\right) - y \cdot \left(-1 + z\right)\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.0) (not (<= x 1.0))) (- (* (log y) x) t) (- (- (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.0) || !(x <= 1.0)) {
tmp = (log(y) * x) - t;
} else {
tmp = -log(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 ((x <= (-1.0d0)) .or. (.not. (x <= 1.0d0))) then
tmp = (log(y) * x) - t
else
tmp = -log(y) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.0) || !(x <= 1.0)) {
tmp = (Math.log(y) * x) - t;
} else {
tmp = -Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.0) or not (x <= 1.0): tmp = (math.log(y) * x) - t else: tmp = -math.log(y) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.0) || !(x <= 1.0)) tmp = Float64(Float64(log(y) * x) - t); else tmp = Float64(Float64(-log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.0) || ~((x <= 1.0))) tmp = (log(y) * x) - t; else tmp = -log(y) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.0], N[Not[LessEqual[x, 1.0]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - t), $MachinePrecision], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \lor \neg \left(x \leq 1\right):\\
\;\;\;\;\log y \cdot x - t\\
\mathbf{else}:\\
\;\;\;\;\left(-\log y\right) - t\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= z -8.5e+114) (not (<= z 1.25e+164))) (- (* y (- z)) t) (- (- (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+114) || !(z <= 1.25e+164)) {
tmp = (y * -z) - t;
} else {
tmp = -log(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 ((z <= (-8.5d+114)) .or. (.not. (z <= 1.25d+164))) then
tmp = (y * -z) - t
else
tmp = -log(y) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+114) || !(z <= 1.25e+164)) {
tmp = (y * -z) - t;
} else {
tmp = -Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8.5e+114) or not (z <= 1.25e+164): tmp = (y * -z) - t else: tmp = -math.log(y) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8.5e+114) || !(z <= 1.25e+164)) tmp = Float64(Float64(y * Float64(-z)) - t); else tmp = Float64(Float64(-log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8.5e+114) || ~((z <= 1.25e+164))) tmp = (y * -z) - t; else tmp = -log(y) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.5e+114], N[Not[LessEqual[z, 1.25e+164]], $MachinePrecision]], N[(N[(y * (-z)), $MachinePrecision] - t), $MachinePrecision], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+114} \lor \neg \left(z \leq 1.25 \cdot 10^{+164}\right):\\
\;\;\;\;y \cdot \left(-z\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(-\log y\right) - t\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (- (* (log y) (+ -1.0 x)) t))
double code(double x, double y, double z, double t) {
return (log(y) * (-1.0 + x)) - 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) * ((-1.0d0) + x)) - t
end function
public static double code(double x, double y, double z, double t) {
return (Math.log(y) * (-1.0 + x)) - t;
}
def code(x, y, z, t): return (math.log(y) * (-1.0 + x)) - t
function code(x, y, z, t) return Float64(Float64(log(y) * Float64(-1.0 + x)) - t) end
function tmp = code(x, y, z, t) tmp = (log(y) * (-1.0 + x)) - t; end
code[x_, y_, z_, t_] := N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\log y \cdot \left(-1 + x\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.1e-9) (not (<= t 2.4e+33))) (- t) (* y (- 1.0 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.1e-9) || !(t <= 2.4e+33)) {
tmp = -t;
} else {
tmp = y * (1.0 - z);
}
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 <= (-1.1d-9)) .or. (.not. (t <= 2.4d+33))) then
tmp = -t
else
tmp = y * (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.1e-9) || !(t <= 2.4e+33)) {
tmp = -t;
} else {
tmp = y * (1.0 - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.1e-9) or not (t <= 2.4e+33): tmp = -t else: tmp = y * (1.0 - z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.1e-9) || !(t <= 2.4e+33)) tmp = Float64(-t); else tmp = Float64(y * Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.1e-9) || ~((t <= 2.4e+33))) tmp = -t; else tmp = y * (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.1e-9], N[Not[LessEqual[t, 2.4e+33]], $MachinePrecision]], (-t), N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-9} \lor \neg \left(t \leq 2.4 \cdot 10^{+33}\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.1e-9) (not (<= t 6e+28))) (- t) (* y (- z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.1e-9) || !(t <= 6e+28)) {
tmp = -t;
} else {
tmp = y * -z;
}
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 <= (-1.1d-9)) .or. (.not. (t <= 6d+28))) then
tmp = -t
else
tmp = y * -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.1e-9) || !(t <= 6e+28)) {
tmp = -t;
} else {
tmp = y * -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.1e-9) or not (t <= 6e+28): tmp = -t else: tmp = y * -z return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.1e-9) || !(t <= 6e+28)) tmp = Float64(-t); else tmp = Float64(y * Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.1e-9) || ~((t <= 6e+28))) tmp = -t; else tmp = y * -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.1e-9], N[Not[LessEqual[t, 6e+28]], $MachinePrecision]], (-t), N[(y * (-z)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-9} \lor \neg \left(t \leq 6 \cdot 10^{+28}\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (- (* y (- 1.0 z)) t))
double code(double x, double y, double z, double t) {
return (y * (1.0 - z)) - 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 = (y * (1.0d0 - z)) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * (1.0 - z)) - t;
}
def code(x, y, z, t): return (y * (1.0 - z)) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(1.0 - z)) - t) end
function tmp = code(x, y, z, t) tmp = (y * (1.0 - z)) - t; end
code[x_, y_, z_, t_] := N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(1 - z\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (- (* y (- z)) t))
double code(double x, double y, double z, double t) {
return (y * -z) - 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 = (y * -z) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * -z) - t;
}
def code(x, y, z, t): return (y * -z) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(-z)) - t) end
function tmp = code(x, y, z, t) tmp = (y * -z) - t; end
code[x_, y_, z_, t_] := N[(N[(y * (-z)), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(-z\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (- t))
double code(double x, double y, double z, double t) {
return -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 = -t
end function
public static double code(double x, double y, double z, double t) {
return -t;
}
def code(x, y, z, t): return -t
function code(x, y, z, t) return Float64(-t) end
function tmp = code(x, y, z, t) tmp = -t; end
code[x_, y_, z_, t_] := (-t)
\begin{array}{l}
\\
-t
\end{array}
herbie shell --seed 2024008
(FPCore (x y z t)
:name "Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2"
:precision binary64
(- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))