
(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 18 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)) (- (* (+ x -1.0) (log y)) t)))
double code(double x, double y, double z, double t) {
return fma((z + -1.0), log1p(-y), (((x + -1.0) * log(y)) - t));
}
function code(x, y, z, t) return fma(Float64(z + -1.0), log1p(Float64(-y)), Float64(Float64(Float64(x + -1.0) * log(y)) - t)) end
code[x_, y_, z_, t_] := N[(N[(z + -1.0), $MachinePrecision] * N[Log[1 + (-y)], $MachinePrecision] + N[(N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \left(x + -1\right) \cdot \log y - t\right)
\end{array}
Initial program 88.7%
+-commutative88.7%
associate--l+88.7%
fma-def88.7%
sub-neg88.7%
log1p-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (+ (* (log1p (- y)) (+ z -1.0)) (- (* (+ x -1.0) (log y)) t)))
double code(double x, double y, double z, double t) {
return (log1p(-y) * (z + -1.0)) + (((x + -1.0) * log(y)) - t);
}
public static double code(double x, double y, double z, double t) {
return (Math.log1p(-y) * (z + -1.0)) + (((x + -1.0) * Math.log(y)) - t);
}
def code(x, y, z, t): return (math.log1p(-y) * (z + -1.0)) + (((x + -1.0) * math.log(y)) - t)
function code(x, y, z, t) return Float64(Float64(log1p(Float64(-y)) * Float64(z + -1.0)) + Float64(Float64(Float64(x + -1.0) * log(y)) - t)) end
code[x_, y_, z_, t_] := N[(N[(N[Log[1 + (-y)], $MachinePrecision] * N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(-y\right) \cdot \left(z + -1\right) + \left(\left(x + -1\right) \cdot \log y - t\right)
\end{array}
Initial program 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around 0 99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (+ (- (* (* y y) (* (+ z -1.0) -0.5)) (* y (+ z -1.0))) (- (* (+ x -1.0) (log y)) t)))
double code(double x, double y, double z, double t) {
return (((y * y) * ((z + -1.0) * -0.5)) - (y * (z + -1.0))) + (((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 = (((y * y) * ((z + (-1.0d0)) * (-0.5d0))) - (y * (z + (-1.0d0)))) + (((x + (-1.0d0)) * log(y)) - t)
end function
public static double code(double x, double y, double z, double t) {
return (((y * y) * ((z + -1.0) * -0.5)) - (y * (z + -1.0))) + (((x + -1.0) * Math.log(y)) - t);
}
def code(x, y, z, t): return (((y * y) * ((z + -1.0) * -0.5)) - (y * (z + -1.0))) + (((x + -1.0) * math.log(y)) - t)
function code(x, y, z, t) return Float64(Float64(Float64(Float64(y * y) * Float64(Float64(z + -1.0) * -0.5)) - Float64(y * Float64(z + -1.0))) + Float64(Float64(Float64(x + -1.0) * log(y)) - t)) end
function tmp = code(x, y, z, t) tmp = (((y * y) * ((z + -1.0) * -0.5)) - (y * (z + -1.0))) + (((x + -1.0) * log(y)) - t); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(y * y), $MachinePrecision] * N[(N[(z + -1.0), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y \cdot y\right) \cdot \left(\left(z + -1\right) \cdot -0.5\right) - y \cdot \left(z + -1\right)\right) + \left(\left(x + -1\right) \cdot \log y - t\right)
\end{array}
Initial program 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around 0 99.8%
Taylor expanded in y around 0 99.3%
mul-1-neg99.3%
unsub-neg99.3%
*-commutative99.3%
*-commutative99.3%
associate-*l*99.3%
unpow299.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
Simplified99.3%
Final simplification99.3%
(FPCore (x y z t) :precision binary64 (+ (- (* -0.5 (* z (* y y))) (* y (+ z -1.0))) (- (* (+ x -1.0) (log y)) t)))
double code(double x, double y, double z, double t) {
return ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) + (((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 = (((-0.5d0) * (z * (y * y))) - (y * (z + (-1.0d0)))) + (((x + (-1.0d0)) * log(y)) - t)
end function
public static double code(double x, double y, double z, double t) {
return ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) + (((x + -1.0) * Math.log(y)) - t);
}
def code(x, y, z, t): return ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) + (((x + -1.0) * math.log(y)) - t)
function code(x, y, z, t) return Float64(Float64(Float64(-0.5 * Float64(z * Float64(y * y))) - Float64(y * Float64(z + -1.0))) + Float64(Float64(Float64(x + -1.0) * log(y)) - t)) end
function tmp = code(x, y, z, t) tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) + (((x + -1.0) * log(y)) - t); end
code[x_, y_, z_, t_] := N[(N[(N[(-0.5 * N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.5 \cdot \left(z \cdot \left(y \cdot y\right)\right) - y \cdot \left(z + -1\right)\right) + \left(\left(x + -1\right) \cdot \log y - t\right)
\end{array}
Initial program 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around 0 99.8%
Taylor expanded in y around 0 99.3%
mul-1-neg99.3%
unsub-neg99.3%
*-commutative99.3%
*-commutative99.3%
associate-*l*99.3%
unpow299.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
Simplified99.3%
Taylor expanded in z around inf 99.3%
*-commutative99.3%
unpow299.3%
Simplified99.3%
Final simplification99.3%
(FPCore (x y z t) :precision binary64 (if (or (<= (+ x -1.0) -1.4) (not (<= (+ x -1.0) -1.0))) (- (* (+ x -1.0) (log y)) t) (- (* y (- (- -1.0) z)) (+ (log y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x + -1.0) <= -1.4) || !((x + -1.0) <= -1.0)) {
tmp = ((x + -1.0) * log(y)) - t;
} else {
tmp = (y * (-(-1.0) - z)) - (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)) <= (-1.4d0)) .or. (.not. ((x + (-1.0d0)) <= (-1.0d0)))) then
tmp = ((x + (-1.0d0)) * log(y)) - t
else
tmp = (y * (-(-1.0d0) - z)) - (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) <= -1.4) || !((x + -1.0) <= -1.0)) {
tmp = ((x + -1.0) * Math.log(y)) - t;
} else {
tmp = (y * (-(-1.0) - z)) - (Math.log(y) + t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x + -1.0) <= -1.4) or not ((x + -1.0) <= -1.0): tmp = ((x + -1.0) * math.log(y)) - t else: tmp = (y * (-(-1.0) - z)) - (math.log(y) + t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x + -1.0) <= -1.4) || !(Float64(x + -1.0) <= -1.0)) tmp = Float64(Float64(Float64(x + -1.0) * log(y)) - t); else tmp = Float64(Float64(y * Float64(Float64(-(-1.0)) - z)) - Float64(log(y) + t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x + -1.0) <= -1.4) || ~(((x + -1.0) <= -1.0))) tmp = ((x + -1.0) * log(y)) - t; else tmp = (y * (-(-1.0) - z)) - (log(y) + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x + -1.0), $MachinePrecision], -1.4], N[Not[LessEqual[N[(x + -1.0), $MachinePrecision], -1.0]], $MachinePrecision]], N[(N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(y * N[((--1.0) - z), $MachinePrecision]), $MachinePrecision] - N[(N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + -1 \leq -1.4 \lor \neg \left(x + -1 \leq -1\right):\\
\;\;\;\;\left(x + -1\right) \cdot \log y - t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(--1\right) - z\right) - \left(\log y + t\right)\\
\end{array}
\end{array}
if (-.f64 x 1) < -1.3999999999999999 or -1 < (-.f64 x 1) Initial program 91.5%
Taylor expanded in y around 0 90.6%
if -1.3999999999999999 < (-.f64 x 1) < -1Initial program 86.2%
+-commutative86.2%
associate--l+86.2%
fma-def86.2%
sub-neg86.2%
log1p-def100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 98.4%
distribute-lft-out98.4%
sub-neg98.4%
metadata-eval98.4%
*-commutative98.4%
+-commutative98.4%
+-commutative98.4%
Simplified98.4%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (- (- (* (+ x -1.0) (log y)) (* y (+ z -1.0))) t))
double code(double x, double y, double z, double t) {
return (((x + -1.0) * log(y)) - (y * (z + -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)) * log(y)) - (y * (z + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((x + -1.0) * Math.log(y)) - (y * (z + -1.0))) - t;
}
def code(x, y, z, t): return (((x + -1.0) * math.log(y)) - (y * (z + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x + -1.0) * log(y)) - Float64(y * Float64(z + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = (((x + -1.0) * log(y)) - (y * (z + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + -1\right) \cdot \log y - y \cdot \left(z + -1\right)\right) - t
\end{array}
Initial program 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around 0 98.7%
Simplified98.7%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (<= (+ z -1.0) -1e+186) (- (* (log1p (- y)) (+ z -1.0)) t) (- (* (+ x -1.0) (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z + -1.0) <= -1e+186) {
tmp = (log1p(-y) * (z + -1.0)) - t;
} else {
tmp = ((x + -1.0) * log(y)) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z + -1.0) <= -1e+186) {
tmp = (Math.log1p(-y) * (z + -1.0)) - t;
} else {
tmp = ((x + -1.0) * Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z + -1.0) <= -1e+186: tmp = (math.log1p(-y) * (z + -1.0)) - t else: tmp = ((x + -1.0) * math.log(y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z + -1.0) <= -1e+186) tmp = Float64(Float64(log1p(Float64(-y)) * Float64(z + -1.0)) - t); else tmp = Float64(Float64(Float64(x + -1.0) * log(y)) - t); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(z + -1.0), $MachinePrecision], -1e+186], N[(N[(N[Log[1 + (-y)], $MachinePrecision] * N[(z + -1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z + -1 \leq -1 \cdot 10^{+186}:\\
\;\;\;\;\mathsf{log1p}\left(-y\right) \cdot \left(z + -1\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(x + -1\right) \cdot \log y - t\\
\end{array}
\end{array}
if (-.f64 z 1) < -9.9999999999999998e185Initial program 42.9%
associate--l+42.9%
+-commutative42.9%
associate-+l-42.9%
*-commutative42.9%
*-commutative42.9%
sub-neg42.9%
metadata-eval42.9%
sub-neg42.9%
log1p-def99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
neg-sub099.7%
associate--r-99.7%
neg-sub099.7%
+-commutative99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in t around inf 75.8%
if -9.9999999999999998e185 < (-.f64 z 1) Initial program 93.6%
Taylor expanded in y around 0 92.3%
Final simplification90.7%
(FPCore (x y z t) :precision binary64 (if (<= (+ z -1.0) -1e+186) (- (- (* -0.5 (* z (* y y))) (* y (+ z -1.0))) t) (- (* (+ x -1.0) (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z + -1.0) <= -1e+186) {
tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t;
} else {
tmp = ((x + -1.0) * 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 + (-1.0d0)) <= (-1d+186)) then
tmp = (((-0.5d0) * (z * (y * y))) - (y * (z + (-1.0d0)))) - t
else
tmp = ((x + (-1.0d0)) * 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 + -1.0) <= -1e+186) {
tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t;
} else {
tmp = ((x + -1.0) * Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z + -1.0) <= -1e+186: tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t else: tmp = ((x + -1.0) * math.log(y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z + -1.0) <= -1e+186) tmp = Float64(Float64(Float64(-0.5 * Float64(z * Float64(y * y))) - Float64(y * Float64(z + -1.0))) - t); else tmp = Float64(Float64(Float64(x + -1.0) * log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z + -1.0) <= -1e+186) tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t; else tmp = ((x + -1.0) * log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z + -1.0), $MachinePrecision], -1e+186], N[(N[(N[(-0.5 * N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z + -1 \leq -1 \cdot 10^{+186}:\\
\;\;\;\;\left(-0.5 \cdot \left(z \cdot \left(y \cdot y\right)\right) - y \cdot \left(z + -1\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(x + -1\right) \cdot \log y - t\\
\end{array}
\end{array}
if (-.f64 z 1) < -9.9999999999999998e185Initial program 42.9%
associate--l+42.9%
+-commutative42.9%
associate-+l-42.9%
*-commutative42.9%
*-commutative42.9%
sub-neg42.9%
metadata-eval42.9%
sub-neg42.9%
log1p-def99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
neg-sub099.7%
associate--r-99.7%
neg-sub099.7%
+-commutative99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in y around 0 99.7%
Taylor expanded in y around 0 98.3%
mul-1-neg98.3%
unsub-neg98.3%
*-commutative98.3%
*-commutative98.3%
associate-*l*98.3%
unpow298.3%
sub-neg98.3%
metadata-eval98.3%
+-commutative98.3%
*-commutative98.3%
sub-neg98.3%
metadata-eval98.3%
+-commutative98.3%
Simplified98.3%
Taylor expanded in z around inf 98.3%
*-commutative98.3%
unpow298.3%
Simplified98.3%
Taylor expanded in t around inf 75.8%
if -9.9999999999999998e185 < (-.f64 z 1) Initial program 93.6%
Taylor expanded in y around 0 92.3%
Final simplification90.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.75e+26)
t_1
(if (<= x 3.5e-120)
(- (- (log y)) t)
(if (<= x 1.14e+173)
(- (- (* (* y y) (+ 0.5 (* z -0.5))) (* y (+ z -1.0))) t)
t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -1.75e+26) {
tmp = t_1;
} else if (x <= 3.5e-120) {
tmp = -log(y) - t;
} else if (x <= 1.14e+173) {
tmp = (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t;
} else {
tmp = t_1;
}
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 = x * log(y)
if (x <= (-1.75d+26)) then
tmp = t_1
else if (x <= 3.5d-120) then
tmp = -log(y) - t
else if (x <= 1.14d+173) then
tmp = (((y * y) * (0.5d0 + (z * (-0.5d0)))) - (y * (z + (-1.0d0)))) - t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * Math.log(y);
double tmp;
if (x <= -1.75e+26) {
tmp = t_1;
} else if (x <= 3.5e-120) {
tmp = -Math.log(y) - t;
} else if (x <= 1.14e+173) {
tmp = (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -1.75e+26: tmp = t_1 elif x <= 3.5e-120: tmp = -math.log(y) - t elif x <= 1.14e+173: tmp = (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.75e+26) tmp = t_1; elseif (x <= 3.5e-120) tmp = Float64(Float64(-log(y)) - t); elseif (x <= 1.14e+173) tmp = Float64(Float64(Float64(Float64(y * y) * Float64(0.5 + Float64(z * -0.5))) - Float64(y * Float64(z + -1.0))) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); tmp = 0.0; if (x <= -1.75e+26) tmp = t_1; elseif (x <= 3.5e-120) tmp = -log(y) - t; elseif (x <= 1.14e+173) tmp = (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.75e+26], t$95$1, If[LessEqual[x, 3.5e-120], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision], If[LessEqual[x, 1.14e+173], N[(N[(N[(N[(y * y), $MachinePrecision] * N[(0.5 + N[(z * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.75 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-120}:\\
\;\;\;\;\left(-\log y\right) - t\\
\mathbf{elif}\;x \leq 1.14 \cdot 10^{+173}:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot \left(0.5 + z \cdot -0.5\right) - y \cdot \left(z + -1\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.75e26 or 1.14e173 < x Initial program 91.6%
associate--l+91.6%
+-commutative91.6%
associate-+l-91.6%
*-commutative91.6%
*-commutative91.6%
sub-neg91.6%
metadata-eval91.6%
sub-neg91.6%
log1p-def99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-def99.6%
neg-sub099.6%
associate--r-99.6%
neg-sub099.6%
+-commutative99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in x around inf 79.0%
if -1.75e26 < x < 3.5e-120Initial program 87.6%
+-commutative87.6%
associate--l+87.6%
fma-def87.6%
sub-neg87.6%
log1p-def99.9%
Simplified99.9%
Taylor expanded in x around 0 98.5%
mul-1-neg98.5%
Simplified98.5%
Taylor expanded in y around 0 84.1%
mul-1-neg84.1%
+-commutative84.1%
distribute-neg-in84.1%
log-rec84.1%
unsub-neg84.1%
log-rec84.1%
Simplified84.1%
if 3.5e-120 < x < 1.14e173Initial program 85.5%
associate--l+85.5%
+-commutative85.5%
associate-+l-85.5%
*-commutative85.5%
*-commutative85.5%
sub-neg85.5%
metadata-eval85.5%
sub-neg85.5%
log1p-def99.9%
sub-neg99.9%
+-commutative99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-def99.9%
neg-sub099.9%
associate--r-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t around inf 73.8%
Taylor expanded in y around 0 73.8%
neg-mul-173.8%
+-commutative73.8%
unsub-neg73.8%
Simplified73.8%
Final simplification80.3%
(FPCore (x y z t) :precision binary64 (if (or (<= x -4.2e+45) (not (<= x 6.3e+171))) (* x (log y)) (- (- (* (* y y) (+ 0.5 (* z -0.5))) (* y (+ z -1.0))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -4.2e+45) || !(x <= 6.3e+171)) {
tmp = x * log(y);
} else {
tmp = (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - 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 <= (-4.2d+45)) .or. (.not. (x <= 6.3d+171))) then
tmp = x * log(y)
else
tmp = (((y * y) * (0.5d0 + (z * (-0.5d0)))) - (y * (z + (-1.0d0)))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -4.2e+45) || !(x <= 6.3e+171)) {
tmp = x * Math.log(y);
} else {
tmp = (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -4.2e+45) or not (x <= 6.3e+171): tmp = x * math.log(y) else: tmp = (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -4.2e+45) || !(x <= 6.3e+171)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(Float64(Float64(y * y) * Float64(0.5 + Float64(z * -0.5))) - Float64(y * Float64(z + -1.0))) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -4.2e+45) || ~((x <= 6.3e+171))) tmp = x * log(y); else tmp = (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -4.2e+45], N[Not[LessEqual[x, 6.3e+171]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y * y), $MachinePrecision] * N[(0.5 + N[(z * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+45} \lor \neg \left(x \leq 6.3 \cdot 10^{+171}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(\left(y \cdot y\right) \cdot \left(0.5 + z \cdot -0.5\right) - y \cdot \left(z + -1\right)\right) - t\\
\end{array}
\end{array}
if x < -4.1999999999999999e45 or 6.3000000000000004e171 < x Initial program 92.5%
associate--l+92.5%
+-commutative92.5%
associate-+l-92.5%
*-commutative92.5%
*-commutative92.5%
sub-neg92.5%
metadata-eval92.5%
sub-neg92.5%
log1p-def99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-def99.6%
neg-sub099.6%
associate--r-99.6%
neg-sub099.6%
+-commutative99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in x around inf 79.6%
if -4.1999999999999999e45 < x < 6.3000000000000004e171Initial program 86.6%
associate--l+86.6%
+-commutative86.6%
associate-+l-86.6%
*-commutative86.6%
*-commutative86.6%
sub-neg86.6%
metadata-eval86.6%
sub-neg86.6%
log1p-def99.9%
sub-neg99.9%
+-commutative99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-def99.9%
neg-sub099.9%
associate--r-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t around inf 65.2%
Taylor expanded in y around 0 65.1%
neg-mul-165.1%
+-commutative65.1%
unsub-neg65.1%
Simplified65.1%
Final simplification70.2%
(FPCore (x y z t) :precision binary64 (if (or (<= t -4.3e-35) (not (<= t 6.5e-64))) (- (- (* -0.5 (* z (* y y))) (* y (+ z -1.0))) t) (- (log y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.3e-35) || !(t <= 6.5e-64)) {
tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t;
} else {
tmp = -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 <= (-4.3d-35)) .or. (.not. (t <= 6.5d-64))) then
tmp = (((-0.5d0) * (z * (y * y))) - (y * (z + (-1.0d0)))) - t
else
tmp = -log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.3e-35) || !(t <= 6.5e-64)) {
tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t;
} else {
tmp = -Math.log(y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -4.3e-35) or not (t <= 6.5e-64): tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t else: tmp = -math.log(y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -4.3e-35) || !(t <= 6.5e-64)) tmp = Float64(Float64(Float64(-0.5 * Float64(z * Float64(y * y))) - Float64(y * Float64(z + -1.0))) - t); else tmp = Float64(-log(y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -4.3e-35) || ~((t <= 6.5e-64))) tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t; else tmp = -log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -4.3e-35], N[Not[LessEqual[t, 6.5e-64]], $MachinePrecision]], N[(N[(N[(-0.5 * N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], (-N[Log[y], $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{-35} \lor \neg \left(t \leq 6.5 \cdot 10^{-64}\right):\\
\;\;\;\;\left(-0.5 \cdot \left(z \cdot \left(y \cdot y\right)\right) - y \cdot \left(z + -1\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;-\log y\\
\end{array}
\end{array}
if t < -4.3000000000000002e-35 or 6.5000000000000004e-64 < t Initial program 89.9%
associate--l+89.9%
+-commutative89.9%
associate-+l-89.9%
*-commutative89.9%
*-commutative89.9%
sub-neg89.9%
metadata-eval89.9%
sub-neg89.9%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around 0 99.8%
Taylor expanded in y around 0 99.5%
mul-1-neg99.5%
unsub-neg99.5%
*-commutative99.5%
*-commutative99.5%
associate-*l*99.5%
unpow299.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
*-commutative99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in z around inf 99.5%
*-commutative99.5%
unpow299.5%
Simplified99.5%
Taylor expanded in t around inf 70.5%
if -4.3000000000000002e-35 < t < 6.5000000000000004e-64Initial program 86.9%
+-commutative86.9%
associate--l+86.9%
fma-def86.9%
sub-neg86.9%
log1p-def99.8%
Simplified99.8%
Taylor expanded in x around 0 56.1%
mul-1-neg56.1%
Simplified56.1%
Taylor expanded in t around 0 43.7%
sub-neg43.7%
metadata-eval43.7%
*-commutative43.7%
sub-neg43.7%
log1p-def56.1%
+-commutative56.1%
Simplified56.1%
Taylor expanded in y around 0 41.9%
neg-mul-141.9%
Simplified41.9%
Final simplification58.8%
(FPCore (x y z t) :precision binary64 (- (- (* (* y y) (+ 0.5 (* z -0.5))) (* y (+ z -1.0))) t))
double code(double x, double y, double z, double t) {
return (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -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 = (((y * y) * (0.5d0 + (z * (-0.5d0)))) - (y * (z + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t;
}
def code(x, y, z, t): return (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(y * y) * Float64(0.5 + Float64(z * -0.5))) - Float64(y * Float64(z + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = (((y * y) * (0.5 + (z * -0.5))) - (y * (z + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(y * y), $MachinePrecision] * N[(0.5 + N[(z * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y \cdot y\right) \cdot \left(0.5 + z \cdot -0.5\right) - y \cdot \left(z + -1\right)\right) - t
\end{array}
Initial program 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t around inf 48.7%
Taylor expanded in y around 0 48.7%
neg-mul-148.7%
+-commutative48.7%
unsub-neg48.7%
Simplified48.7%
Final simplification48.7%
(FPCore (x y z t) :precision binary64 (- (- (* -0.5 (* z (* y y))) (* y (+ z -1.0))) t))
double code(double x, double y, double z, double t) {
return ((-0.5 * (z * (y * y))) - (y * (z + -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 = (((-0.5d0) * (z * (y * y))) - (y * (z + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t;
}
def code(x, y, z, t): return ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(-0.5 * Float64(z * Float64(y * y))) - Float64(y * Float64(z + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = ((-0.5 * (z * (y * y))) - (y * (z + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(-0.5 * N[(z * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.5 \cdot \left(z \cdot \left(y \cdot y\right)\right) - y \cdot \left(z + -1\right)\right) - t
\end{array}
Initial program 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around 0 99.8%
Taylor expanded in y around 0 99.3%
mul-1-neg99.3%
unsub-neg99.3%
*-commutative99.3%
*-commutative99.3%
associate-*l*99.3%
unpow299.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
*-commutative99.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
Simplified99.3%
Taylor expanded in z around inf 99.3%
*-commutative99.3%
unpow299.3%
Simplified99.3%
Taylor expanded in t around inf 48.7%
Final simplification48.7%
(FPCore (x y z t) :precision binary64 (if (<= t -0.17) (- t) (if (<= t 12000000000000.0) (* z (- y)) (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -0.17) {
tmp = -t;
} else if (t <= 12000000000000.0) {
tmp = z * -y;
} else {
tmp = -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 <= (-0.17d0)) then
tmp = -t
else if (t <= 12000000000000.0d0) then
tmp = z * -y
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -0.17) {
tmp = -t;
} else if (t <= 12000000000000.0) {
tmp = z * -y;
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -0.17: tmp = -t elif t <= 12000000000000.0: tmp = z * -y else: tmp = -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -0.17) tmp = Float64(-t); elseif (t <= 12000000000000.0) tmp = Float64(z * Float64(-y)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -0.17) tmp = -t; elseif (t <= 12000000000000.0) tmp = z * -y; else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -0.17], (-t), If[LessEqual[t, 12000000000000.0], N[(z * (-y)), $MachinePrecision], (-t)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.17:\\
\;\;\;\;-t\\
\mathbf{elif}\;t \leq 12000000000000:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < -0.170000000000000012 or 1.2e13 < t Initial program 95.2%
associate--l+95.2%
+-commutative95.2%
associate-+l-95.2%
*-commutative95.2%
*-commutative95.2%
sub-neg95.2%
metadata-eval95.2%
sub-neg95.2%
log1p-def99.9%
sub-neg99.9%
+-commutative99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-def99.9%
neg-sub099.9%
associate--r-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t around inf 72.1%
neg-mul-172.1%
Simplified72.1%
if -0.170000000000000012 < t < 1.2e13Initial program 82.6%
+-commutative82.6%
associate--l+82.6%
fma-def82.6%
sub-neg82.6%
log1p-def99.7%
Simplified99.7%
Taylor expanded in x around 0 55.5%
mul-1-neg55.5%
Simplified55.5%
Taylor expanded in y around 0 54.0%
distribute-lft-out54.0%
sub-neg54.0%
metadata-eval54.0%
*-commutative54.0%
+-commutative54.0%
+-commutative54.0%
Simplified54.0%
Taylor expanded in z around inf 19.9%
*-commutative19.9%
Simplified19.9%
Final simplification45.2%
(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}
Initial program 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t around inf 48.7%
Taylor expanded in y around 0 48.2%
mul-1-neg48.2%
*-commutative48.2%
distribute-rgt-neg-in48.2%
mul-1-neg48.2%
sub-neg48.2%
metadata-eval48.2%
+-commutative48.2%
distribute-lft-in48.2%
metadata-eval48.2%
neg-mul-148.2%
Simplified48.2%
Final simplification48.2%
(FPCore (x y z t) :precision binary64 (- (* z (- y)) t))
double code(double x, double y, double z, double t) {
return (z * -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 = (z * -y) - t
end function
public static double code(double x, double y, double z, double t) {
return (z * -y) - t;
}
def code(x, y, z, t): return (z * -y) - t
function code(x, y, z, t) return Float64(Float64(z * Float64(-y)) - t) end
function tmp = code(x, y, z, t) tmp = (z * -y) - t; end
code[x_, y_, z_, t_] := N[(N[(z * (-y)), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(-y\right) - t
\end{array}
Initial program 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t around inf 48.7%
Taylor expanded in y around 0 48.2%
mul-1-neg48.2%
*-commutative48.2%
distribute-rgt-neg-in48.2%
mul-1-neg48.2%
sub-neg48.2%
metadata-eval48.2%
+-commutative48.2%
distribute-lft-in48.2%
metadata-eval48.2%
neg-mul-148.2%
Simplified48.2%
Taylor expanded in z around inf 47.9%
mul-1-neg47.9%
*-commutative47.9%
distribute-rgt-neg-in47.9%
Simplified47.9%
Final simplification47.9%
(FPCore (x y z t) :precision binary64 (- y t))
double code(double x, double y, double z, double t) {
return 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 = y - t
end function
public static double code(double x, double y, double z, double t) {
return y - t;
}
def code(x, y, z, t): return y - t
function code(x, y, z, t) return Float64(y - t) end
function tmp = code(x, y, z, t) tmp = y - t; end
code[x_, y_, z_, t_] := N[(y - t), $MachinePrecision]
\begin{array}{l}
\\
y - t
\end{array}
Initial program 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t around inf 48.7%
Taylor expanded in y around 0 48.2%
mul-1-neg48.2%
*-commutative48.2%
distribute-rgt-neg-in48.2%
mul-1-neg48.2%
sub-neg48.2%
metadata-eval48.2%
+-commutative48.2%
distribute-lft-in48.2%
metadata-eval48.2%
neg-mul-148.2%
Simplified48.2%
Taylor expanded in z around 0 36.8%
Final simplification36.8%
(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 88.7%
associate--l+88.7%
+-commutative88.7%
associate-+l-88.7%
*-commutative88.7%
*-commutative88.7%
sub-neg88.7%
metadata-eval88.7%
sub-neg88.7%
log1p-def99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in t around inf 36.5%
neg-mul-136.5%
Simplified36.5%
Final simplification36.5%
herbie shell --seed 2023199
(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))