
(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 19 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 (+ x -1.0) (log y) (* (log1p (- y)) (+ -1.0 z))) t))
double code(double x, double y, double z, double t) {
return fma((x + -1.0), log(y), (log1p(-y) * (-1.0 + z))) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(x + -1.0), log(y), Float64(log1p(Float64(-y)) * Float64(-1.0 + z))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[(N[Log[1 + (-y)], $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x + -1, \log y, \mathsf{log1p}\left(-y\right) \cdot \left(-1 + z\right)\right) - t
\end{array}
Initial program 89.3%
fma-define89.3%
sub-neg89.3%
metadata-eval89.3%
sub-neg89.3%
metadata-eval89.3%
sub-neg89.3%
log1p-define99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= (+ x -1.0) -20.0) (not (<= (+ x -1.0) -0.5))) (- (- (* x (log y)) (* y (+ -1.0 z))) t) (- (- (* y (- 1.0 z)) (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (((x + -1.0) <= -20.0) || !((x + -1.0) <= -0.5)) {
tmp = ((x * log(y)) - (y * (-1.0 + z))) - 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)) <= (-20.0d0)) .or. (.not. ((x + (-1.0d0)) <= (-0.5d0)))) then
tmp = ((x * log(y)) - (y * ((-1.0d0) + z))) - 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) <= -20.0) || !((x + -1.0) <= -0.5)) {
tmp = ((x * Math.log(y)) - (y * (-1.0 + z))) - 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) <= -20.0) or not ((x + -1.0) <= -0.5): tmp = ((x * math.log(y)) - (y * (-1.0 + z))) - 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) <= -20.0) || !(Float64(x + -1.0) <= -0.5)) tmp = Float64(Float64(Float64(x * log(y)) - Float64(y * Float64(-1.0 + z))) - t); else tmp = Float64(Float64(Float64(y * Float64(1.0 - z)) - log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x + -1.0) <= -20.0) || ~(((x + -1.0) <= -0.5))) tmp = ((x * log(y)) - (y * (-1.0 + z))) - 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], -20.0], N[Not[LessEqual[N[(x + -1.0), $MachinePrecision], -0.5]], $MachinePrecision]], N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(y * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + -1 \leq -20 \lor \neg \left(x + -1 \leq -0.5\right):\\
\;\;\;\;\left(x \cdot \log y - y \cdot \left(-1 + z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - \log y\right) - t\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -20 or -0.5 < (-.f64 x #s(literal 1 binary64)) Initial program 92.4%
Taylor expanded in y around 0 99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
fma-define99.6%
mul-1-neg99.6%
fmm-def99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 99.0%
*-commutative99.0%
Simplified99.0%
if -20 < (-.f64 x #s(literal 1 binary64)) < -0.5Initial program 86.4%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
fma-define100.0%
+-commutative100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 98.0%
+-commutative98.0%
mul-1-neg98.0%
unsub-neg98.0%
Simplified98.0%
Final simplification98.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -2.5e+61)
t_1
(if (<= x 2.25e-20)
(- (* y (* (+ -1.0 (* y -0.5)) (+ -1.0 z))) t)
(if (<= x 0.0195)
(- (log y))
(if (<= x 75000000000000.0) (- t) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -2.5e+61) {
tmp = t_1;
} else if (x <= 2.25e-20) {
tmp = (y * ((-1.0 + (y * -0.5)) * (-1.0 + z))) - t;
} else if (x <= 0.0195) {
tmp = -log(y);
} else if (x <= 75000000000000.0) {
tmp = -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 <= (-2.5d+61)) then
tmp = t_1
else if (x <= 2.25d-20) then
tmp = (y * (((-1.0d0) + (y * (-0.5d0))) * ((-1.0d0) + z))) - t
else if (x <= 0.0195d0) then
tmp = -log(y)
else if (x <= 75000000000000.0d0) then
tmp = -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 <= -2.5e+61) {
tmp = t_1;
} else if (x <= 2.25e-20) {
tmp = (y * ((-1.0 + (y * -0.5)) * (-1.0 + z))) - t;
} else if (x <= 0.0195) {
tmp = -Math.log(y);
} else if (x <= 75000000000000.0) {
tmp = -t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -2.5e+61: tmp = t_1 elif x <= 2.25e-20: tmp = (y * ((-1.0 + (y * -0.5)) * (-1.0 + z))) - t elif x <= 0.0195: tmp = -math.log(y) elif x <= 75000000000000.0: tmp = -t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -2.5e+61) tmp = t_1; elseif (x <= 2.25e-20) tmp = Float64(Float64(y * Float64(Float64(-1.0 + Float64(y * -0.5)) * Float64(-1.0 + z))) - t); elseif (x <= 0.0195) tmp = Float64(-log(y)); elseif (x <= 75000000000000.0) tmp = Float64(-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 <= -2.5e+61) tmp = t_1; elseif (x <= 2.25e-20) tmp = (y * ((-1.0 + (y * -0.5)) * (-1.0 + z))) - t; elseif (x <= 0.0195) tmp = -log(y); elseif (x <= 75000000000000.0) tmp = -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, -2.5e+61], t$95$1, If[LessEqual[x, 2.25e-20], N[(N[(y * N[(N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[x, 0.0195], (-N[Log[y], $MachinePrecision]), If[LessEqual[x, 75000000000000.0], (-t), t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{-20}:\\
\;\;\;\;y \cdot \left(\left(-1 + y \cdot -0.5\right) \cdot \left(-1 + z\right)\right) - t\\
\mathbf{elif}\;x \leq 0.0195:\\
\;\;\;\;-\log y\\
\mathbf{elif}\;x \leq 75000000000000:\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.50000000000000009e61 or 7.5e13 < x Initial program 92.9%
Taylor expanded in y around 0 99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
+-commutative99.7%
mul-1-neg99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in z around 0 92.9%
+-commutative92.9%
sub-neg92.9%
metadata-eval92.9%
fma-define92.9%
+-commutative92.9%
Simplified92.9%
fma-undefine92.9%
Applied egg-rr92.9%
Taylor expanded in x around inf 78.6%
*-commutative78.6%
Simplified78.6%
if -2.50000000000000009e61 < x < 2.2500000000000001e-20Initial program 85.8%
Taylor expanded in y around 0 100.0%
Taylor expanded in x around inf 74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in x around 0 71.7%
if 2.2500000000000001e-20 < x < 0.0195Initial program 99.6%
Taylor expanded in t around inf 99.3%
Taylor expanded in y around 0 96.6%
sub-neg96.6%
metadata-eval96.6%
associate-*r/96.4%
+-commutative96.4%
Simplified96.4%
Taylor expanded in x around 0 74.1%
associate-*r/74.1%
neg-mul-174.1%
Simplified74.1%
Taylor expanded in t around 0 74.1%
mul-1-neg74.1%
Simplified74.1%
if 0.0195 < x < 7.5e13Initial program 100.0%
Taylor expanded in t around inf 100.0%
neg-mul-1100.0%
Simplified100.0%
Final simplification74.9%
(FPCore (x y z t)
:precision binary64
(if (<= (+ x -1.0) -5e+17)
(- (* x (log y)) t)
(if (<= (+ x -1.0) -1.0)
(- (- (* y (- 1.0 z)) (log y)) t)
(- (+ y (* (log y) (+ x -1.0))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x + -1.0) <= -5e+17) {
tmp = (x * log(y)) - t;
} else if ((x + -1.0) <= -1.0) {
tmp = ((y * (1.0 - z)) - log(y)) - t;
} else {
tmp = (y + (log(y) * (x + -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 + (-1.0d0)) <= (-5d+17)) then
tmp = (x * log(y)) - t
else if ((x + (-1.0d0)) <= (-1.0d0)) then
tmp = ((y * (1.0d0 - z)) - log(y)) - t
else
tmp = (y + (log(y) * (x + (-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 + -1.0) <= -5e+17) {
tmp = (x * Math.log(y)) - t;
} else if ((x + -1.0) <= -1.0) {
tmp = ((y * (1.0 - z)) - Math.log(y)) - t;
} else {
tmp = (y + (Math.log(y) * (x + -1.0))) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x + -1.0) <= -5e+17: tmp = (x * math.log(y)) - t elif (x + -1.0) <= -1.0: tmp = ((y * (1.0 - z)) - math.log(y)) - t else: tmp = (y + (math.log(y) * (x + -1.0))) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x + -1.0) <= -5e+17) tmp = Float64(Float64(x * log(y)) - t); elseif (Float64(x + -1.0) <= -1.0) tmp = Float64(Float64(Float64(y * Float64(1.0 - z)) - log(y)) - t); else tmp = Float64(Float64(y + Float64(log(y) * Float64(x + -1.0))) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x + -1.0) <= -5e+17) tmp = (x * log(y)) - t; elseif ((x + -1.0) <= -1.0) tmp = ((y * (1.0 - z)) - log(y)) - t; else tmp = (y + (log(y) * (x + -1.0))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x + -1.0), $MachinePrecision], -5e+17], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[N[(x + -1.0), $MachinePrecision], -1.0], N[(N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(y + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + -1 \leq -5 \cdot 10^{+17}:\\
\;\;\;\;x \cdot \log y - t\\
\mathbf{elif}\;x + -1 \leq -1:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(y + \log y \cdot \left(x + -1\right)\right) - t\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -5e17Initial program 95.7%
Taylor expanded in y around 0 99.8%
Taylor expanded in x around inf 95.2%
*-commutative95.2%
Simplified95.2%
if -5e17 < (-.f64 x #s(literal 1 binary64)) < -1Initial program 85.4%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
fma-define100.0%
+-commutative100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 98.8%
+-commutative98.8%
mul-1-neg98.8%
unsub-neg98.8%
Simplified98.8%
if -1 < (-.f64 x #s(literal 1 binary64)) Initial program 91.1%
Taylor expanded in y around 0 99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
+-commutative99.7%
mul-1-neg99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in z around 0 91.1%
Final simplification95.9%
(FPCore (x y z t) :precision binary64 (if (<= (+ x -1.0) -2e+66) (* x (log y)) (if (<= (+ x -1.0) -1.0) (- (- (log y)) t) (* (log y) (+ x -1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x + -1.0) <= -2e+66) {
tmp = x * log(y);
} else if ((x + -1.0) <= -1.0) {
tmp = -log(y) - t;
} else {
tmp = log(y) * (x + -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 ((x + (-1.0d0)) <= (-2d+66)) then
tmp = x * log(y)
else if ((x + (-1.0d0)) <= (-1.0d0)) then
tmp = -log(y) - t
else
tmp = log(y) * (x + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x + -1.0) <= -2e+66) {
tmp = x * Math.log(y);
} else if ((x + -1.0) <= -1.0) {
tmp = -Math.log(y) - t;
} else {
tmp = Math.log(y) * (x + -1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x + -1.0) <= -2e+66: tmp = x * math.log(y) elif (x + -1.0) <= -1.0: tmp = -math.log(y) - t else: tmp = math.log(y) * (x + -1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x + -1.0) <= -2e+66) tmp = Float64(x * log(y)); elseif (Float64(x + -1.0) <= -1.0) tmp = Float64(Float64(-log(y)) - t); else tmp = Float64(log(y) * Float64(x + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x + -1.0) <= -2e+66) tmp = x * log(y); elseif ((x + -1.0) <= -1.0) tmp = -log(y) - t; else tmp = log(y) * (x + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x + -1.0), $MachinePrecision], -2e+66], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + -1.0), $MachinePrecision], -1.0], N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + -1 \leq -2 \cdot 10^{+66}:\\
\;\;\;\;x \cdot \log y\\
\mathbf{elif}\;x + -1 \leq -1:\\
\;\;\;\;\left(-\log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot \left(x + -1\right)\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -1.99999999999999989e66Initial program 96.0%
Taylor expanded in y around 0 99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
+-commutative99.7%
mul-1-neg99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in z around 0 96.0%
+-commutative96.0%
sub-neg96.0%
metadata-eval96.0%
fma-define96.0%
+-commutative96.0%
Simplified96.0%
fma-undefine96.0%
Applied egg-rr96.0%
Taylor expanded in x around inf 85.6%
*-commutative85.6%
Simplified85.6%
if -1.99999999999999989e66 < (-.f64 x #s(literal 1 binary64)) < -1Initial program 86.0%
Taylor expanded in y around 0 85.8%
Taylor expanded in x around 0 82.6%
mul-1-neg82.6%
Simplified82.6%
if -1 < (-.f64 x #s(literal 1 binary64)) Initial program 91.1%
Taylor expanded in t around inf 74.2%
Taylor expanded in y around 0 74.0%
sub-neg74.0%
metadata-eval74.0%
associate-*r/73.8%
+-commutative73.8%
Simplified73.8%
clear-num73.8%
un-div-inv73.8%
Applied egg-rr73.8%
Taylor expanded in t around 0 73.2%
Final simplification80.8%
(FPCore (x y z t) :precision binary64 (- (+ (* (* y (+ -1.0 (* y -0.5))) (+ -1.0 z)) (* (log y) (+ x -1.0))) t))
double code(double x, double y, double z, double t) {
return (((y * (-1.0 + (y * -0.5))) * (-1.0 + z)) + (log(y) * (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 = (((y * ((-1.0d0) + (y * (-0.5d0)))) * ((-1.0d0) + z)) + (log(y) * (x + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((y * (-1.0 + (y * -0.5))) * (-1.0 + z)) + (Math.log(y) * (x + -1.0))) - t;
}
def code(x, y, z, t): return (((y * (-1.0 + (y * -0.5))) * (-1.0 + z)) + (math.log(y) * (x + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(y * Float64(-1.0 + Float64(y * -0.5))) * Float64(-1.0 + z)) + Float64(log(y) * Float64(x + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = (((y * (-1.0 + (y * -0.5))) * (-1.0 + z)) + (log(y) * (x + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(y * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y \cdot \left(-1 + y \cdot -0.5\right)\right) \cdot \left(-1 + z\right) + \log y \cdot \left(x + -1\right)\right) - t
\end{array}
Initial program 89.3%
Taylor expanded in y around 0 99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1650.0) (not (<= t 35.0))) (- (* x (log y)) t) (+ y (* (log y) (+ x -1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1650.0) || !(t <= 35.0)) {
tmp = (x * log(y)) - t;
} else {
tmp = y + (log(y) * (x + -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 ((t <= (-1650.0d0)) .or. (.not. (t <= 35.0d0))) then
tmp = (x * log(y)) - t
else
tmp = y + (log(y) * (x + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1650.0) || !(t <= 35.0)) {
tmp = (x * Math.log(y)) - t;
} else {
tmp = y + (Math.log(y) * (x + -1.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1650.0) or not (t <= 35.0): tmp = (x * math.log(y)) - t else: tmp = y + (math.log(y) * (x + -1.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1650.0) || !(t <= 35.0)) tmp = Float64(Float64(x * log(y)) - t); else tmp = Float64(y + Float64(log(y) * Float64(x + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1650.0) || ~((t <= 35.0))) tmp = (x * log(y)) - t; else tmp = y + (log(y) * (x + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1650.0], N[Not[LessEqual[t, 35.0]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(y + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1650 \lor \neg \left(t \leq 35\right):\\
\;\;\;\;x \cdot \log y - t\\
\mathbf{else}:\\
\;\;\;\;y + \log y \cdot \left(x + -1\right)\\
\end{array}
\end{array}
if t < -1650 or 35 < t Initial program 96.8%
Taylor expanded in y around 0 100.0%
Taylor expanded in x around inf 95.7%
*-commutative95.7%
Simplified95.7%
if -1650 < t < 35Initial program 82.0%
Taylor expanded in y around 0 99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
fma-define99.7%
+-commutative99.7%
mul-1-neg99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in z around 0 81.8%
+-commutative81.8%
sub-neg81.8%
metadata-eval81.8%
fma-define81.8%
+-commutative81.8%
Simplified81.8%
fma-undefine81.8%
Applied egg-rr81.8%
Taylor expanded in t around 0 81.1%
Final simplification88.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1650.0) (not (<= t 35.0))) (- (* x (log y)) t) (* (log y) (+ x -1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1650.0) || !(t <= 35.0)) {
tmp = (x * log(y)) - t;
} else {
tmp = log(y) * (x + -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 ((t <= (-1650.0d0)) .or. (.not. (t <= 35.0d0))) then
tmp = (x * log(y)) - t
else
tmp = log(y) * (x + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1650.0) || !(t <= 35.0)) {
tmp = (x * Math.log(y)) - t;
} else {
tmp = Math.log(y) * (x + -1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1650.0) or not (t <= 35.0): tmp = (x * math.log(y)) - t else: tmp = math.log(y) * (x + -1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1650.0) || !(t <= 35.0)) tmp = Float64(Float64(x * log(y)) - t); else tmp = Float64(log(y) * Float64(x + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1650.0) || ~((t <= 35.0))) tmp = (x * log(y)) - t; else tmp = log(y) * (x + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1650.0], N[Not[LessEqual[t, 35.0]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1650 \lor \neg \left(t \leq 35\right):\\
\;\;\;\;x \cdot \log y - t\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot \left(x + -1\right)\\
\end{array}
\end{array}
if t < -1650 or 35 < t Initial program 96.8%
Taylor expanded in y around 0 100.0%
Taylor expanded in x around inf 95.7%
*-commutative95.7%
Simplified95.7%
if -1650 < t < 35Initial program 82.0%
Taylor expanded in t around inf 59.7%
Taylor expanded in y around 0 59.3%
sub-neg59.3%
metadata-eval59.3%
associate-*r/59.2%
+-commutative59.2%
Simplified59.2%
clear-num59.2%
un-div-inv59.2%
Applied egg-rr59.2%
Taylor expanded in t around 0 81.0%
Final simplification88.3%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.85e+58) (not (<= x 6.2e+14))) (* x (log y)) (- (- (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.85e+58) || !(x <= 6.2e+14)) {
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 <= (-1.85d+58)) .or. (.not. (x <= 6.2d+14))) 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 <= -1.85e+58) || !(x <= 6.2e+14)) {
tmp = x * Math.log(y);
} else {
tmp = -Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.85e+58) or not (x <= 6.2e+14): tmp = x * math.log(y) else: tmp = -math.log(y) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.85e+58) || !(x <= 6.2e+14)) 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 <= -1.85e+58) || ~((x <= 6.2e+14))) tmp = x * log(y); else tmp = -log(y) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.85e+58], N[Not[LessEqual[x, 6.2e+14]], $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 -1.85 \cdot 10^{+58} \lor \neg \left(x \leq 6.2 \cdot 10^{+14}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(-\log y\right) - t\\
\end{array}
\end{array}
if x < -1.8500000000000001e58 or 6.2e14 < x Initial program 92.9%
Taylor expanded in y around 0 99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
+-commutative99.7%
mul-1-neg99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in z around 0 92.9%
+-commutative92.9%
sub-neg92.9%
metadata-eval92.9%
fma-define92.9%
+-commutative92.9%
Simplified92.9%
fma-undefine92.9%
Applied egg-rr92.9%
Taylor expanded in x around inf 78.6%
*-commutative78.6%
Simplified78.6%
if -1.8500000000000001e58 < x < 6.2e14Initial program 86.5%
Taylor expanded in y around 0 86.2%
Taylor expanded in x around 0 82.1%
mul-1-neg82.1%
Simplified82.1%
Final simplification80.6%
(FPCore (x y z t) :precision binary64 (- (- (* (log y) (+ x -1.0)) (* y (+ -1.0 z))) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (x + -1.0)) - (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) * (x + (-1.0d0))) - (y * ((-1.0d0) + z))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (x + -1.0)) - (y * (-1.0 + z))) - t;
}
def code(x, y, z, t): return ((math.log(y) * (x + -1.0)) - (y * (-1.0 + z))) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(x + -1.0)) - Float64(y * Float64(-1.0 + z))) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (x + -1.0)) - (y * (-1.0 + z))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(x + -1\right) - y \cdot \left(-1 + z\right)\right) - t
\end{array}
Initial program 89.3%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
mul-1-neg99.8%
fmm-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (<= t -3.5e-15) (- (* y (* z (+ -1.0 (* y -0.5)))) t) (if (<= t -1.32e-275) (- (log y)) (- (* y (- 1.0 z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.5e-15) {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - t;
} else if (t <= -1.32e-275) {
tmp = -log(y);
} else {
tmp = (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
real(8) :: tmp
if (t <= (-3.5d-15)) then
tmp = (y * (z * ((-1.0d0) + (y * (-0.5d0))))) - t
else if (t <= (-1.32d-275)) then
tmp = -log(y)
else
tmp = (y * (1.0d0 - z)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.5e-15) {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - t;
} else if (t <= -1.32e-275) {
tmp = -Math.log(y);
} else {
tmp = (y * (1.0 - z)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -3.5e-15: tmp = (y * (z * (-1.0 + (y * -0.5)))) - t elif t <= -1.32e-275: tmp = -math.log(y) else: tmp = (y * (1.0 - z)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -3.5e-15) tmp = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * -0.5)))) - t); elseif (t <= -1.32e-275) tmp = Float64(-log(y)); else tmp = Float64(Float64(y * Float64(1.0 - z)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -3.5e-15) tmp = (y * (z * (-1.0 + (y * -0.5)))) - t; elseif (t <= -1.32e-275) tmp = -log(y); else tmp = (y * (1.0 - z)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -3.5e-15], N[(N[(y * N[(z * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t, -1.32e-275], (-N[Log[y], $MachinePrecision]), N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-15}:\\
\;\;\;\;y \cdot \left(z \cdot \left(-1 + y \cdot -0.5\right)\right) - t\\
\mathbf{elif}\;t \leq -1.32 \cdot 10^{-275}:\\
\;\;\;\;-\log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right) - t\\
\end{array}
\end{array}
if t < -3.5000000000000001e-15Initial program 95.6%
Taylor expanded in y around 0 99.9%
Taylor expanded in z around inf 69.6%
if -3.5000000000000001e-15 < t < -1.31999999999999996e-275Initial program 90.7%
Taylor expanded in t around inf 66.6%
Taylor expanded in y around 0 66.3%
sub-neg66.3%
metadata-eval66.3%
associate-*r/66.2%
+-commutative66.2%
Simplified66.2%
Taylor expanded in x around 0 39.0%
associate-*r/39.0%
neg-mul-139.0%
Simplified39.0%
Taylor expanded in t around 0 39.0%
mul-1-neg39.0%
Simplified39.0%
if -1.31999999999999996e-275 < t Initial program 85.2%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.9%
+-commutative99.9%
mul-1-neg99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in y around inf 55.7%
Final simplification55.1%
(FPCore (x y z t) :precision binary64 (- (+ y (* (log y) (+ x -1.0))) t))
double code(double x, double y, double z, double t) {
return (y + (log(y) * (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 = (y + (log(y) * (x + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (y + (Math.log(y) * (x + -1.0))) - t;
}
def code(x, y, z, t): return (y + (math.log(y) * (x + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(y + Float64(log(y) * Float64(x + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = (y + (log(y) * (x + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(y + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(y + \log y \cdot \left(x + -1\right)\right) - t
\end{array}
Initial program 89.3%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
+-commutative99.8%
mul-1-neg99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 89.2%
Final simplification89.2%
(FPCore (x y z t) :precision binary64 (- (* (log y) (+ x -1.0)) t))
double code(double x, double y, double z, double t) {
return (log(y) * (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 = (log(y) * (x + (-1.0d0))) - t
end function
public static double code(double x, double y, double z, double t) {
return (Math.log(y) * (x + -1.0)) - t;
}
def code(x, y, z, t): return (math.log(y) * (x + -1.0)) - t
function code(x, y, z, t) return Float64(Float64(log(y) * Float64(x + -1.0)) - t) end
function tmp = code(x, y, z, t) tmp = (log(y) * (x + -1.0)) - t; end
code[x_, y_, z_, t_] := N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\log y \cdot \left(x + -1\right) - t
\end{array}
Initial program 89.3%
Taylor expanded in y around 0 89.1%
Final simplification89.1%
(FPCore (x y z t) :precision binary64 (- (* y (* (+ -1.0 (* y -0.5)) (+ -1.0 z))) t))
double code(double x, double y, double z, double t) {
return (y * ((-1.0 + (y * -0.5)) * (-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) + (y * (-0.5d0))) * ((-1.0d0) + z))) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * ((-1.0 + (y * -0.5)) * (-1.0 + z))) - t;
}
def code(x, y, z, t): return (y * ((-1.0 + (y * -0.5)) * (-1.0 + z))) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(Float64(-1.0 + Float64(y * -0.5)) * Float64(-1.0 + z))) - t) end
function tmp = code(x, y, z, t) tmp = (y * ((-1.0 + (y * -0.5)) * (-1.0 + z))) - t; end
code[x_, y_, z_, t_] := N[(N[(y * N[(N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision] * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(\left(-1 + y \cdot -0.5\right) \cdot \left(-1 + z\right)\right) - t
\end{array}
Initial program 89.3%
Taylor expanded in y around 0 99.9%
Taylor expanded in x around inf 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in x around 0 48.4%
Final simplification48.4%
(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 89.3%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
+-commutative99.8%
mul-1-neg99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around inf 48.4%
Final simplification48.4%
(FPCore (x y z t) :precision binary64 (- (- t) (* y z)))
double code(double x, double y, double z, double t) {
return -t - (y * z);
}
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 - (y * z)
end function
public static double code(double x, double y, double z, double t) {
return -t - (y * z);
}
def code(x, y, z, t): return -t - (y * z)
function code(x, y, z, t) return Float64(Float64(-t) - Float64(y * z)) end
function tmp = code(x, y, z, t) tmp = -t - (y * z); end
code[x_, y_, z_, t_] := N[((-t) - N[(y * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-t\right) - y \cdot z
\end{array}
Initial program 89.3%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
+-commutative99.8%
mul-1-neg99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in z around inf 48.3%
associate-*r*48.3%
neg-mul-148.3%
Simplified48.3%
Final simplification48.3%
(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 89.3%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
+-commutative99.8%
mul-1-neg99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 89.2%
+-commutative89.2%
sub-neg89.2%
metadata-eval89.2%
fma-define89.2%
+-commutative89.2%
Simplified89.2%
Taylor expanded in y around inf 37.9%
Final simplification37.9%
(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 37.8%
neg-mul-137.8%
Simplified37.8%
Final simplification37.8%
(FPCore (x y z t) :precision binary64 y)
double code(double x, double y, double z, double t) {
return 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 = y
end function
public static double code(double x, double y, double z, double t) {
return y;
}
def code(x, y, z, t): return y
function code(x, y, z, t) return y end
function tmp = code(x, y, z, t) tmp = y; end
code[x_, y_, z_, t_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 89.3%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
+-commutative99.8%
mul-1-neg99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 89.2%
+-commutative89.2%
sub-neg89.2%
metadata-eval89.2%
fma-define89.2%
+-commutative89.2%
Simplified89.2%
fma-undefine89.2%
Applied egg-rr89.2%
Taylor expanded in y around inf 2.7%
Final simplification2.7%
herbie shell --seed 2024095
(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))