
(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 9 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 (+ z -1.0) (log1p (- y)) (* (log y) (+ -1.0 x))) t))
double code(double x, double y, double z, double t) {
return fma((z + -1.0), log1p(-y), (log(y) * (-1.0 + x))) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(z + -1.0), log1p(Float64(-y)), Float64(log(y) * Float64(-1.0 + x))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(z + -1.0), $MachinePrecision] * N[Log[1 + (-y)], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \log y \cdot \left(-1 + x\right)\right) - t
\end{array}
Initial program 89.3%
+-commutative89.3%
fma-def89.3%
sub-neg89.3%
metadata-eval89.3%
sub-neg89.3%
log1p-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t) :precision binary64 (if (or (<= (+ -1.0 x) -1.0) (not (<= (+ -1.0 x) 2000000000.0))) (- (* (log y) (+ -1.0 x)) t) (- (- t) (+ (log y) (* y (+ z -1.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -1.0) || !((-1.0 + x) <= 2000000000.0)) {
tmp = (log(y) * (-1.0 + x)) - t;
} else {
tmp = -t - (log(y) + (y * (z + -1.0)));
}
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 ((((-1.0d0) + x) <= (-1.0d0)) .or. (.not. (((-1.0d0) + x) <= 2000000000.0d0))) then
tmp = (log(y) * ((-1.0d0) + x)) - t
else
tmp = -t - (log(y) + (y * (z + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -1.0) || !((-1.0 + x) <= 2000000000.0)) {
tmp = (Math.log(y) * (-1.0 + x)) - t;
} else {
tmp = -t - (Math.log(y) + (y * (z + -1.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((-1.0 + x) <= -1.0) or not ((-1.0 + x) <= 2000000000.0): tmp = (math.log(y) * (-1.0 + x)) - t else: tmp = -t - (math.log(y) + (y * (z + -1.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(-1.0 + x) <= -1.0) || !(Float64(-1.0 + x) <= 2000000000.0)) tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); else tmp = Float64(Float64(-t) - Float64(log(y) + Float64(y * Float64(z + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((-1.0 + x) <= -1.0) || ~(((-1.0 + x) <= 2000000000.0))) tmp = (log(y) * (-1.0 + x)) - t; else tmp = -t - (log(y) + (y * (z + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.0], N[Not[LessEqual[N[(-1.0 + x), $MachinePrecision], 2000000000.0]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[((-t) - N[(N[Log[y], $MachinePrecision] + N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + x \leq -1 \lor \neg \left(-1 + x \leq 2000000000\right):\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) - \left(\log y + y \cdot \left(z + -1\right)\right)\\
\end{array}
\end{array}
if (-.f64 x 1) < -1 or 2e9 < (-.f64 x 1) Initial program 89.5%
Taylor expanded in y around 0 88.6%
if -1 < (-.f64 x 1) < 2e9Initial program 78.4%
Taylor expanded in x around 0 78.4%
+-commutative78.4%
fma-def78.4%
sub-neg78.4%
mul-1-neg78.4%
log1p-def100.0%
mul-1-neg100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
mul-1-neg100.0%
log-rec100.0%
+-commutative100.0%
log-rec100.0%
unsub-neg100.0%
mul-1-neg100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Final simplification88.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.0) (not (<= x 5.8e-40))) (- (* x (log y)) t) (- (- (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.0) || !(x <= 5.8e-40)) {
tmp = (x * log(y)) - 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 <= 5.8d-40))) then
tmp = (x * log(y)) - 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 <= 5.8e-40)) {
tmp = (x * Math.log(y)) - t;
} else {
tmp = -Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.0) or not (x <= 5.8e-40): tmp = (x * math.log(y)) - t else: tmp = -math.log(y) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.0) || !(x <= 5.8e-40)) tmp = Float64(Float64(x * log(y)) - 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 <= 5.8e-40))) tmp = (x * log(y)) - 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, 5.8e-40]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $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 5.8 \cdot 10^{-40}\right):\\
\;\;\;\;x \cdot \log y - t\\
\mathbf{else}:\\
\;\;\;\;\left(-\log y\right) - t\\
\end{array}
\end{array}
if x < -1 or 5.7999999999999998e-40 < x Initial program 94.5%
Taylor expanded in y around 0 94.0%
*-commutative94.0%
add-cube-cbrt92.9%
pow392.9%
sub-neg92.9%
metadata-eval92.9%
Applied egg-rr92.9%
unpow392.9%
add-cube-cbrt94.0%
*-commutative94.0%
flip-+52.7%
unpow252.7%
metadata-eval52.7%
sub-neg52.7%
metadata-eval52.7%
+-commutative52.7%
clear-num52.6%
div-inv52.7%
clear-num52.7%
unpow252.7%
metadata-eval52.7%
+-commutative52.7%
metadata-eval52.7%
sub-neg52.7%
flip-+94.0%
Applied egg-rr94.0%
Taylor expanded in x around inf 93.9%
*-commutative93.9%
Simplified93.9%
if -1 < x < 5.7999999999999998e-40Initial program 84.1%
Taylor expanded in y around 0 83.0%
Taylor expanded in x around 0 82.4%
mul-1-neg82.4%
Simplified82.4%
Final simplification88.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.25e+55) (not (<= x 4.6e+19))) (* x (log y)) (- (- (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.25e+55) || !(x <= 4.6e+19)) {
tmp = x * log(y);
} 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 <= (-2.25d+55)) .or. (.not. (x <= 4.6d+19))) then
tmp = x * log(y)
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 <= -2.25e+55) || !(x <= 4.6e+19)) {
tmp = x * Math.log(y);
} else {
tmp = -Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.25e+55) or not (x <= 4.6e+19): tmp = x * math.log(y) else: tmp = -math.log(y) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.25e+55) || !(x <= 4.6e+19)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(-log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.25e+55) || ~((x <= 4.6e+19))) tmp = x * log(y); else tmp = -log(y) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.25e+55], N[Not[LessEqual[x, 4.6e+19]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.25 \cdot 10^{+55} \lor \neg \left(x \leq 4.6 \cdot 10^{+19}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(-\log y\right) - t\\
\end{array}
\end{array}
if x < -2.24999999999999999e55 or 4.6e19 < x Initial program 96.5%
flip3--96.5%
log-div96.5%
metadata-eval96.5%
pow396.5%
sub-neg96.5%
distribute-rgt-neg-out96.5%
add-sqr-sqrt0.0%
sqrt-unprod96.5%
sqr-neg96.5%
sqrt-unprod96.5%
add-sqr-sqrt96.5%
log1p-udef96.5%
metadata-eval96.5%
log1p-udef99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 78.4%
*-commutative78.4%
Simplified78.4%
if -2.24999999999999999e55 < x < 4.6e19Initial program 84.5%
Taylor expanded in y around 0 83.5%
Taylor expanded in x around 0 80.8%
mul-1-neg80.8%
Simplified80.8%
Final simplification79.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -4e+41) (not (<= t 1.45e+15))) (- t) (* x (log y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4e+41) || !(t <= 1.45e+15)) {
tmp = -t;
} else {
tmp = x * log(y);
}
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 <= (-4d+41)) .or. (.not. (t <= 1.45d+15))) then
tmp = -t
else
tmp = x * log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4e+41) || !(t <= 1.45e+15)) {
tmp = -t;
} else {
tmp = x * Math.log(y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -4e+41) or not (t <= 1.45e+15): tmp = -t else: tmp = x * math.log(y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -4e+41) || !(t <= 1.45e+15)) tmp = Float64(-t); else tmp = Float64(x * log(y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -4e+41) || ~((t <= 1.45e+15))) tmp = -t; else tmp = x * log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -4e+41], N[Not[LessEqual[t, 1.45e+15]], $MachinePrecision]], (-t), N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{+41} \lor \neg \left(t \leq 1.45 \cdot 10^{+15}\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y\\
\end{array}
\end{array}
if t < -4.00000000000000002e41 or 1.45e15 < t Initial program 98.5%
Taylor expanded in t around inf 81.8%
neg-mul-181.8%
Simplified81.8%
if -4.00000000000000002e41 < t < 1.45e15Initial program 82.1%
flip3--82.1%
log-div82.1%
metadata-eval82.1%
pow382.1%
sub-neg82.1%
distribute-rgt-neg-out82.1%
add-sqr-sqrt0.0%
sqrt-unprod81.7%
sqr-neg81.7%
sqrt-unprod81.7%
add-sqr-sqrt81.7%
log1p-udef81.6%
metadata-eval81.6%
log1p-udef99.2%
*-un-lft-identity99.2%
Applied egg-rr99.2%
Taylor expanded in x around inf 48.0%
*-commutative48.0%
Simplified48.0%
Final simplification62.8%
(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}
Initial program 89.3%
Taylor expanded in y around 0 99.3%
mul-1-neg99.3%
distribute-rgt-neg-in99.3%
mul-1-neg99.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
distribute-lft-in99.3%
metadata-eval99.3%
neg-mul-199.3%
unsub-neg99.3%
Simplified99.3%
Final simplification99.3%
(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}
Initial program 89.3%
Taylor expanded in y around 0 88.4%
Final simplification88.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -7.2e+34) (not (<= t 270.0))) (- t) (* z (- y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -7.2e+34) || !(t <= 270.0)) {
tmp = -t;
} else {
tmp = z * -y;
}
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 <= (-7.2d+34)) .or. (.not. (t <= 270.0d0))) then
tmp = -t
else
tmp = z * -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -7.2e+34) || !(t <= 270.0)) {
tmp = -t;
} else {
tmp = z * -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -7.2e+34) or not (t <= 270.0): tmp = -t else: tmp = z * -y return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -7.2e+34) || !(t <= 270.0)) tmp = Float64(-t); else tmp = Float64(z * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -7.2e+34) || ~((t <= 270.0))) tmp = -t; else tmp = z * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -7.2e+34], N[Not[LessEqual[t, 270.0]], $MachinePrecision]], (-t), N[(z * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+34} \lor \neg \left(t \leq 270\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < -7.2000000000000001e34 or 270 < t Initial program 98.4%
Taylor expanded in t around inf 79.1%
neg-mul-179.1%
Simplified79.1%
if -7.2000000000000001e34 < t < 270Initial program 81.4%
Taylor expanded in z around inf 2.9%
*-commutative2.9%
sub-neg2.9%
mul-1-neg2.9%
log1p-def20.9%
mul-1-neg20.9%
Simplified20.9%
Taylor expanded in y around 0 20.8%
mul-1-neg20.8%
distribute-rgt-neg-in20.8%
Simplified20.8%
Final simplification47.7%
(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}
Initial program 89.3%
Taylor expanded in t around inf 38.4%
neg-mul-138.4%
Simplified38.4%
Final simplification38.4%
herbie shell --seed 2024020
(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))