
(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 16 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.4%
+-commutative89.4%
fma-define89.4%
sub-neg89.4%
metadata-eval89.4%
sub-neg89.4%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(-
(+
(*
(* y (+ -1.0 (* y (- (* y (- (* y -0.25) 0.3333333333333333)) 0.5))))
(+ z -1.0))
(* (log y) (+ -1.0 x)))
t))
double code(double x, double y, double z, double t) {
return (((y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))) * (z + -1.0)) + (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 = (((y * ((-1.0d0) + (y * ((y * ((y * (-0.25d0)) - 0.3333333333333333d0)) - 0.5d0)))) * (z + (-1.0d0))) + (log(y) * ((-1.0d0) + x))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))) * (z + -1.0)) + (Math.log(y) * (-1.0 + x))) - t;
}
def code(x, y, z, t): return (((y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))) * (z + -1.0)) + (math.log(y) * (-1.0 + x))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(y * Float64(-1.0 + Float64(y * Float64(Float64(y * Float64(Float64(y * -0.25) - 0.3333333333333333)) - 0.5)))) * Float64(z + -1.0)) + Float64(log(y) * Float64(-1.0 + x))) - t) end
function tmp = code(x, y, z, t) tmp = (((y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))) * (z + -1.0)) + (log(y) * (-1.0 + x))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(y * N[(-1.0 + N[(y * N[(N[(y * N[(N[(y * -0.25), $MachinePrecision] - 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y \cdot \left(-1 + y \cdot \left(y \cdot \left(y \cdot -0.25 - 0.3333333333333333\right) - 0.5\right)\right)\right) \cdot \left(z + -1\right) + \log y \cdot \left(-1 + x\right)\right) - t
\end{array}
Initial program 89.4%
Taylor expanded in y around 0 99.3%
Final simplification99.3%
(FPCore (x y z t) :precision binary64 (if (or (<= (+ -1.0 x) -5e+26) (not (<= (+ -1.0 x) -1.0))) (- (- (* x (log y)) (* z y)) t) (- (- (* y (- 1.0 z)) t) (log y))))
double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -5e+26) || !((-1.0 + x) <= -1.0)) {
tmp = ((x * log(y)) - (z * y)) - t;
} else {
tmp = ((y * (1.0 - z)) - t) - 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 ((((-1.0d0) + x) <= (-5d+26)) .or. (.not. (((-1.0d0) + x) <= (-1.0d0)))) then
tmp = ((x * log(y)) - (z * y)) - t
else
tmp = ((y * (1.0d0 - z)) - t) - log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -5e+26) || !((-1.0 + x) <= -1.0)) {
tmp = ((x * Math.log(y)) - (z * y)) - t;
} else {
tmp = ((y * (1.0 - z)) - t) - Math.log(y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((-1.0 + x) <= -5e+26) or not ((-1.0 + x) <= -1.0): tmp = ((x * math.log(y)) - (z * y)) - t else: tmp = ((y * (1.0 - z)) - t) - math.log(y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(-1.0 + x) <= -5e+26) || !(Float64(-1.0 + x) <= -1.0)) tmp = Float64(Float64(Float64(x * log(y)) - Float64(z * y)) - t); else tmp = Float64(Float64(Float64(y * Float64(1.0 - z)) - t) - log(y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((-1.0 + x) <= -5e+26) || ~(((-1.0 + x) <= -1.0))) tmp = ((x * log(y)) - (z * y)) - t; else tmp = ((y * (1.0 - z)) - t) - log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(-1.0 + x), $MachinePrecision], -5e+26], N[Not[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.0]], $MachinePrecision]], N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + x \leq -5 \cdot 10^{+26} \lor \neg \left(-1 + x \leq -1\right):\\
\;\;\;\;\left(x \cdot \log y - z \cdot y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - t\right) - \log y\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -5.0000000000000001e26 or -1 < (-.f64 x #s(literal 1 binary64)) Initial program 93.0%
+-commutative93.0%
fma-define93.0%
sub-neg93.0%
metadata-eval93.0%
sub-neg93.0%
log1p-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.5%
+-commutative99.5%
sub-neg99.5%
metadata-eval99.5%
*-commutative99.5%
mul-1-neg99.5%
unsub-neg99.5%
*-commutative99.5%
+-commutative99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in z around inf 99.5%
Taylor expanded in x around inf 98.7%
*-commutative98.7%
Simplified98.7%
if -5.0000000000000001e26 < (-.f64 x #s(literal 1 binary64)) < -1Initial program 86.2%
+-commutative86.2%
fma-define86.2%
sub-neg86.2%
metadata-eval86.2%
sub-neg86.2%
log1p-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 85.7%
+-commutative85.7%
mul-1-neg85.7%
unsub-neg85.7%
sub-neg85.7%
log1p-define99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in y around 0 97.8%
associate--r+97.8%
sub-neg97.8%
metadata-eval97.8%
+-commutative97.8%
neg-mul-197.8%
distribute-rgt-neg-in97.8%
distribute-neg-in97.8%
metadata-eval97.8%
sub-neg97.8%
Simplified97.8%
Final simplification98.3%
(FPCore (x y z t)
:precision binary64
(if (<= (+ -1.0 x) -1.000005)
(- (* (log y) (+ -1.0 x)) t)
(if (<= (+ -1.0 x) 5e+33)
(- (- (* y (- 1.0 z)) t) (log y))
(* x (- (log y) (/ t x))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((-1.0 + x) <= -1.000005) {
tmp = (log(y) * (-1.0 + x)) - t;
} else if ((-1.0 + x) <= 5e+33) {
tmp = ((y * (1.0 - z)) - t) - log(y);
} else {
tmp = x * (log(y) - (t / x));
}
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.000005d0)) then
tmp = (log(y) * ((-1.0d0) + x)) - t
else if (((-1.0d0) + x) <= 5d+33) then
tmp = ((y * (1.0d0 - z)) - t) - log(y)
else
tmp = x * (log(y) - (t / x))
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.000005) {
tmp = (Math.log(y) * (-1.0 + x)) - t;
} else if ((-1.0 + x) <= 5e+33) {
tmp = ((y * (1.0 - z)) - t) - Math.log(y);
} else {
tmp = x * (Math.log(y) - (t / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (-1.0 + x) <= -1.000005: tmp = (math.log(y) * (-1.0 + x)) - t elif (-1.0 + x) <= 5e+33: tmp = ((y * (1.0 - z)) - t) - math.log(y) else: tmp = x * (math.log(y) - (t / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(-1.0 + x) <= -1.000005) tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); elseif (Float64(-1.0 + x) <= 5e+33) tmp = Float64(Float64(Float64(y * Float64(1.0 - z)) - t) - log(y)); else tmp = Float64(x * Float64(log(y) - Float64(t / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((-1.0 + x) <= -1.000005) tmp = (log(y) * (-1.0 + x)) - t; elseif ((-1.0 + x) <= 5e+33) tmp = ((y * (1.0 - z)) - t) - log(y); else tmp = x * (log(y) - (t / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.000005], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[N[(-1.0 + x), $MachinePrecision], 5e+33], N[(N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[y], $MachinePrecision] - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + x \leq -1.000005:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\mathbf{elif}\;-1 + x \leq 5 \cdot 10^{+33}:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - t\right) - \log y\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y - \frac{t}{x}\right)\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -1.00000500000000003Initial program 94.2%
+-commutative94.2%
fma-define94.2%
sub-neg94.2%
metadata-eval94.2%
sub-neg94.2%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 94.2%
if -1.00000500000000003 < (-.f64 x #s(literal 1 binary64)) < 4.99999999999999973e33Initial program 84.5%
+-commutative84.5%
fma-define84.5%
sub-neg84.5%
metadata-eval84.5%
sub-neg84.5%
log1p-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 83.2%
+-commutative83.2%
mul-1-neg83.2%
unsub-neg83.2%
sub-neg83.2%
log1p-define98.3%
sub-neg98.3%
metadata-eval98.3%
+-commutative98.3%
Simplified98.3%
Taylor expanded in y around 0 96.5%
associate--r+96.5%
sub-neg96.5%
metadata-eval96.5%
+-commutative96.5%
neg-mul-196.5%
distribute-rgt-neg-in96.5%
distribute-neg-in96.5%
metadata-eval96.5%
sub-neg96.5%
Simplified96.5%
if 4.99999999999999973e33 < (-.f64 x #s(literal 1 binary64)) Initial program 97.5%
+-commutative97.5%
fma-define97.5%
sub-neg97.5%
metadata-eval97.5%
sub-neg97.5%
log1p-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around -inf 97.5%
associate-*r*97.5%
*-commutative97.5%
distribute-lft-out97.5%
associate-*r*97.5%
*-commutative97.5%
neg-mul-197.5%
distribute-rgt-neg-in97.5%
metadata-eval97.5%
*-rgt-identity97.5%
Simplified99.5%
Taylor expanded in t around inf 97.5%
associate-*r/97.5%
neg-mul-197.5%
Simplified97.5%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 (- (+ (* (* y (+ -1.0 (* y (- (* y -0.3333333333333333) 0.5)))) (+ z -1.0)) (* (log y) (+ -1.0 x))) t))
double code(double x, double y, double z, double t) {
return (((y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))) * (z + -1.0)) + (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 = (((y * ((-1.0d0) + (y * ((y * (-0.3333333333333333d0)) - 0.5d0)))) * (z + (-1.0d0))) + (log(y) * ((-1.0d0) + x))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))) * (z + -1.0)) + (Math.log(y) * (-1.0 + x))) - t;
}
def code(x, y, z, t): return (((y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))) * (z + -1.0)) + (math.log(y) * (-1.0 + x))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(y * Float64(-1.0 + Float64(y * Float64(Float64(y * -0.3333333333333333) - 0.5)))) * Float64(z + -1.0)) + Float64(log(y) * Float64(-1.0 + x))) - t) end
function tmp = code(x, y, z, t) tmp = (((y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))) * (z + -1.0)) + (log(y) * (-1.0 + x))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(y * N[(-1.0 + N[(y * N[(N[(y * -0.3333333333333333), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y \cdot \left(-1 + y \cdot \left(y \cdot -0.3333333333333333 - 0.5\right)\right)\right) \cdot \left(z + -1\right) + \log y \cdot \left(-1 + x\right)\right) - t
\end{array}
Initial program 89.4%
Taylor expanded in y around 0 99.2%
Final simplification99.2%
(FPCore (x y z t)
:precision binary64
(if (<= (+ -1.0 x) -1.000005)
(- (* (log y) (+ -1.0 x)) t)
(if (<= (+ -1.0 x) 5e+33)
(- (- t) (+ (log y) (* z y)))
(* x (- (log y) (/ t x))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((-1.0 + x) <= -1.000005) {
tmp = (log(y) * (-1.0 + x)) - t;
} else if ((-1.0 + x) <= 5e+33) {
tmp = -t - (log(y) + (z * y));
} else {
tmp = x * (log(y) - (t / x));
}
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.000005d0)) then
tmp = (log(y) * ((-1.0d0) + x)) - t
else if (((-1.0d0) + x) <= 5d+33) then
tmp = -t - (log(y) + (z * y))
else
tmp = x * (log(y) - (t / x))
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.000005) {
tmp = (Math.log(y) * (-1.0 + x)) - t;
} else if ((-1.0 + x) <= 5e+33) {
tmp = -t - (Math.log(y) + (z * y));
} else {
tmp = x * (Math.log(y) - (t / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (-1.0 + x) <= -1.000005: tmp = (math.log(y) * (-1.0 + x)) - t elif (-1.0 + x) <= 5e+33: tmp = -t - (math.log(y) + (z * y)) else: tmp = x * (math.log(y) - (t / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(-1.0 + x) <= -1.000005) tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); elseif (Float64(-1.0 + x) <= 5e+33) tmp = Float64(Float64(-t) - Float64(log(y) + Float64(z * y))); else tmp = Float64(x * Float64(log(y) - Float64(t / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((-1.0 + x) <= -1.000005) tmp = (log(y) * (-1.0 + x)) - t; elseif ((-1.0 + x) <= 5e+33) tmp = -t - (log(y) + (z * y)); else tmp = x * (log(y) - (t / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.000005], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[N[(-1.0 + x), $MachinePrecision], 5e+33], N[((-t) - N[(N[Log[y], $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[y], $MachinePrecision] - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + x \leq -1.000005:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\mathbf{elif}\;-1 + x \leq 5 \cdot 10^{+33}:\\
\;\;\;\;\left(-t\right) - \left(\log y + z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y - \frac{t}{x}\right)\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -1.00000500000000003Initial program 94.2%
+-commutative94.2%
fma-define94.2%
sub-neg94.2%
metadata-eval94.2%
sub-neg94.2%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 94.2%
if -1.00000500000000003 < (-.f64 x #s(literal 1 binary64)) < 4.99999999999999973e33Initial program 84.5%
+-commutative84.5%
fma-define84.5%
sub-neg84.5%
metadata-eval84.5%
sub-neg84.5%
log1p-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 98.2%
+-commutative98.2%
sub-neg98.2%
metadata-eval98.2%
*-commutative98.2%
mul-1-neg98.2%
unsub-neg98.2%
*-commutative98.2%
+-commutative98.2%
sub-neg98.2%
metadata-eval98.2%
+-commutative98.2%
Simplified98.2%
Taylor expanded in z around inf 97.6%
Taylor expanded in x around 0 95.9%
mul-1-neg95.9%
Simplified95.9%
if 4.99999999999999973e33 < (-.f64 x #s(literal 1 binary64)) Initial program 97.5%
+-commutative97.5%
fma-define97.5%
sub-neg97.5%
metadata-eval97.5%
sub-neg97.5%
log1p-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around -inf 97.5%
associate-*r*97.5%
*-commutative97.5%
distribute-lft-out97.5%
associate-*r*97.5%
*-commutative97.5%
neg-mul-197.5%
distribute-rgt-neg-in97.5%
metadata-eval97.5%
*-rgt-identity97.5%
Simplified99.5%
Taylor expanded in t around inf 97.5%
associate-*r/97.5%
neg-mul-197.5%
Simplified97.5%
Final simplification95.8%
(FPCore (x y z t) :precision binary64 (- (+ (* (* y (+ -1.0 (* y -0.5))) (+ z -1.0)) (* (log y) (+ -1.0 x))) t))
double code(double x, double y, double z, double t) {
return (((y * (-1.0 + (y * -0.5))) * (z + -1.0)) + (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 = (((y * ((-1.0d0) + (y * (-0.5d0)))) * (z + (-1.0d0))) + (log(y) * ((-1.0d0) + x))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((y * (-1.0 + (y * -0.5))) * (z + -1.0)) + (Math.log(y) * (-1.0 + x))) - t;
}
def code(x, y, z, t): return (((y * (-1.0 + (y * -0.5))) * (z + -1.0)) + (math.log(y) * (-1.0 + x))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(y * Float64(-1.0 + Float64(y * -0.5))) * Float64(z + -1.0)) + Float64(log(y) * Float64(-1.0 + x))) - t) end
function tmp = code(x, y, z, t) tmp = (((y * (-1.0 + (y * -0.5))) * (z + -1.0)) + (log(y) * (-1.0 + x))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(y * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y \cdot \left(-1 + y \cdot -0.5\right)\right) \cdot \left(z + -1\right) + \log y \cdot \left(-1 + x\right)\right) - t
\end{array}
Initial program 89.4%
Taylor expanded in y around 0 99.1%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -4.6e+104)
t_1
(if (<= x 1.2e-14)
(- (- t) (log y))
(if (<= x 1.85e+84) (- (* y (* z (+ -1.0 (* y -0.5)))) t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -4.6e+104) {
tmp = t_1;
} else if (x <= 1.2e-14) {
tmp = -t - log(y);
} else if (x <= 1.85e+84) {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - 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 <= (-4.6d+104)) then
tmp = t_1
else if (x <= 1.2d-14) then
tmp = -t - log(y)
else if (x <= 1.85d+84) then
tmp = (y * (z * ((-1.0d0) + (y * (-0.5d0))))) - 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 <= -4.6e+104) {
tmp = t_1;
} else if (x <= 1.2e-14) {
tmp = -t - Math.log(y);
} else if (x <= 1.85e+84) {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -4.6e+104: tmp = t_1 elif x <= 1.2e-14: tmp = -t - math.log(y) elif x <= 1.85e+84: tmp = (y * (z * (-1.0 + (y * -0.5)))) - t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -4.6e+104) tmp = t_1; elseif (x <= 1.2e-14) tmp = Float64(Float64(-t) - log(y)); elseif (x <= 1.85e+84) tmp = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * -0.5)))) - 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 <= -4.6e+104) tmp = t_1; elseif (x <= 1.2e-14) tmp = -t - log(y); elseif (x <= 1.85e+84) tmp = (y * (z * (-1.0 + (y * -0.5)))) - 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, -4.6e+104], t$95$1, If[LessEqual[x, 1.2e-14], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+84], N[(N[(y * N[(z * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -4.6 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-14}:\\
\;\;\;\;\left(-t\right) - \log y\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+84}:\\
\;\;\;\;y \cdot \left(z \cdot \left(-1 + y \cdot -0.5\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.59999999999999969e104 or 1.85e84 < x Initial program 99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
sub-neg99.6%
log1p-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around -inf 99.6%
associate-*r*99.6%
*-commutative99.6%
distribute-lft-out99.6%
associate-*r*99.6%
*-commutative99.6%
neg-mul-199.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in x around inf 81.3%
if -4.59999999999999969e104 < x < 1.2e-14Initial program 85.8%
+-commutative85.8%
fma-define85.8%
sub-neg85.8%
metadata-eval85.8%
sub-neg85.8%
log1p-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 80.1%
+-commutative80.1%
mul-1-neg80.1%
unsub-neg80.1%
sub-neg80.1%
log1p-define93.8%
sub-neg93.8%
metadata-eval93.8%
+-commutative93.8%
Simplified93.8%
Taylor expanded in y around 0 78.0%
mul-1-neg78.0%
distribute-neg-in78.0%
unsub-neg78.0%
Simplified78.0%
if 1.2e-14 < x < 1.85e84Initial program 76.4%
Taylor expanded in y around 0 99.7%
Taylor expanded in z around inf 72.3%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -5.4e+108) (not (<= x 1.55e+84))) (* x (log y)) (- (* y (- 1.0 z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.4e+108) || !(x <= 1.55e+84)) {
tmp = x * 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 ((x <= (-5.4d+108)) .or. (.not. (x <= 1.55d+84))) then
tmp = x * 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 ((x <= -5.4e+108) || !(x <= 1.55e+84)) {
tmp = x * Math.log(y);
} else {
tmp = (y * (1.0 - z)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5.4e+108) or not (x <= 1.55e+84): tmp = x * math.log(y) else: tmp = (y * (1.0 - z)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -5.4e+108) || !(x <= 1.55e+84)) tmp = Float64(x * 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 ((x <= -5.4e+108) || ~((x <= 1.55e+84))) tmp = x * log(y); else tmp = (y * (1.0 - z)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5.4e+108], N[Not[LessEqual[x, 1.55e+84]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+108} \lor \neg \left(x \leq 1.55 \cdot 10^{+84}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right) - t\\
\end{array}
\end{array}
if x < -5.4e108 or 1.55000000000000001e84 < x Initial program 99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
sub-neg99.6%
log1p-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around -inf 99.6%
associate-*r*99.6%
*-commutative99.6%
distribute-lft-out99.6%
associate-*r*99.6%
*-commutative99.6%
neg-mul-199.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in x around inf 81.3%
if -5.4e108 < x < 1.55000000000000001e84Initial program 84.8%
+-commutative84.8%
fma-define84.8%
sub-neg84.8%
metadata-eval84.8%
sub-neg84.8%
log1p-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 98.5%
+-commutative98.5%
sub-neg98.5%
metadata-eval98.5%
*-commutative98.5%
mul-1-neg98.5%
unsub-neg98.5%
*-commutative98.5%
+-commutative98.5%
sub-neg98.5%
metadata-eval98.5%
+-commutative98.5%
Simplified98.5%
add-cbrt-cube98.3%
pow398.3%
Applied egg-rr98.3%
Taylor expanded in y around inf 66.9%
Final simplification71.4%
(FPCore (x y z t) :precision binary64 (- (- (* (log y) (+ -1.0 x)) (* y (+ z -1.0))) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (-1.0 + x)) - (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 = ((log(y) * ((-1.0d0) + x)) - (y * (z + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (-1.0 + x)) - (y * (z + -1.0))) - t;
}
def code(x, y, z, t): return ((math.log(y) * (-1.0 + x)) - (y * (z + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(-1.0 + x)) - Float64(y * Float64(z + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (-1.0 + x)) - (y * (z + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(-1 + x\right) - y \cdot \left(z + -1\right)\right) - t
\end{array}
Initial program 89.4%
+-commutative89.4%
fma-define89.4%
sub-neg89.4%
metadata-eval89.4%
sub-neg89.4%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 98.8%
+-commutative98.8%
sub-neg98.8%
metadata-eval98.8%
*-commutative98.8%
mul-1-neg98.8%
unsub-neg98.8%
*-commutative98.8%
+-commutative98.8%
sub-neg98.8%
metadata-eval98.8%
+-commutative98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t) :precision binary64 (if (<= z -6.8e+180) (- (- t) (* z y)) (- (* (log y) (+ -1.0 x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+180) {
tmp = -t - (z * y);
} else {
tmp = (log(y) * (-1.0 + x)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-6.8d+180)) then
tmp = -t - (z * y)
else
tmp = (log(y) * ((-1.0d0) + x)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.8e+180) {
tmp = -t - (z * y);
} else {
tmp = (Math.log(y) * (-1.0 + x)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.8e+180: tmp = -t - (z * y) else: tmp = (math.log(y) * (-1.0 + x)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.8e+180) tmp = Float64(Float64(-t) - Float64(z * y)); else tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.8e+180) tmp = -t - (z * y); else tmp = (log(y) * (-1.0 + x)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.8e+180], N[((-t) - N[(z * y), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+180}:\\
\;\;\;\;\left(-t\right) - z \cdot y\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\end{array}
\end{array}
if z < -6.79999999999999969e180Initial program 46.8%
+-commutative46.8%
fma-define46.8%
sub-neg46.8%
metadata-eval46.8%
sub-neg46.8%
log1p-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
*-commutative99.9%
mul-1-neg99.9%
unsub-neg99.9%
*-commutative99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 70.6%
associate-*r*70.6%
neg-mul-170.6%
Simplified70.6%
if -6.79999999999999969e180 < z Initial program 93.2%
+-commutative93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
sub-neg93.2%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 91.7%
Final simplification89.9%
(FPCore (x y z t) :precision binary64 (- (- (* (log y) (+ -1.0 x)) (* z y)) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (-1.0 + x)) - (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 = ((log(y) * ((-1.0d0) + x)) - (z * y)) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (-1.0 + x)) - (z * y)) - t;
}
def code(x, y, z, t): return ((math.log(y) * (-1.0 + x)) - (z * y)) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(-1.0 + x)) - Float64(z * y)) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (-1.0 + x)) - (z * y)) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(-1 + x\right) - z \cdot y\right) - t
\end{array}
Initial program 89.4%
+-commutative89.4%
fma-define89.4%
sub-neg89.4%
metadata-eval89.4%
sub-neg89.4%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 98.8%
+-commutative98.8%
sub-neg98.8%
metadata-eval98.8%
*-commutative98.8%
mul-1-neg98.8%
unsub-neg98.8%
*-commutative98.8%
+-commutative98.8%
sub-neg98.8%
metadata-eval98.8%
+-commutative98.8%
Simplified98.8%
Taylor expanded in z around inf 98.5%
Final simplification98.5%
(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.4%
+-commutative89.4%
fma-define89.4%
sub-neg89.4%
metadata-eval89.4%
sub-neg89.4%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 98.8%
+-commutative98.8%
sub-neg98.8%
metadata-eval98.8%
*-commutative98.8%
mul-1-neg98.8%
unsub-neg98.8%
*-commutative98.8%
+-commutative98.8%
sub-neg98.8%
metadata-eval98.8%
+-commutative98.8%
Simplified98.8%
add-cbrt-cube98.6%
pow398.6%
Applied egg-rr98.6%
Taylor expanded in y around inf 52.2%
(FPCore (x y z t) :precision binary64 (- (- t) (* z y)))
double code(double x, double y, double z, double t) {
return -t - (z * 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 = -t - (z * y)
end function
public static double code(double x, double y, double z, double t) {
return -t - (z * y);
}
def code(x, y, z, t): return -t - (z * y)
function code(x, y, z, t) return Float64(Float64(-t) - Float64(z * y)) end
function tmp = code(x, y, z, t) tmp = -t - (z * y); end
code[x_, y_, z_, t_] := N[((-t) - N[(z * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-t\right) - z \cdot y
\end{array}
Initial program 89.4%
+-commutative89.4%
fma-define89.4%
sub-neg89.4%
metadata-eval89.4%
sub-neg89.4%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 98.8%
+-commutative98.8%
sub-neg98.8%
metadata-eval98.8%
*-commutative98.8%
mul-1-neg98.8%
unsub-neg98.8%
*-commutative98.8%
+-commutative98.8%
sub-neg98.8%
metadata-eval98.8%
+-commutative98.8%
Simplified98.8%
Taylor expanded in z around inf 52.0%
associate-*r*52.0%
neg-mul-152.0%
Simplified52.0%
Final simplification52.0%
(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.4%
+-commutative89.4%
fma-define89.4%
sub-neg89.4%
metadata-eval89.4%
sub-neg89.4%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 42.6%
neg-mul-142.6%
Simplified42.6%
(FPCore (x y z t) :precision binary64 0.0)
double code(double x, double y, double z, double t) {
return 0.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 0.0d0
end function
public static double code(double x, double y, double z, double t) {
return 0.0;
}
def code(x, y, z, t): return 0.0
function code(x, y, z, t) return 0.0 end
function tmp = code(x, y, z, t) tmp = 0.0; end
code[x_, y_, z_, t_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 89.4%
+-commutative89.4%
fma-define89.4%
sub-neg89.4%
metadata-eval89.4%
sub-neg89.4%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 42.6%
neg-mul-142.6%
Simplified42.6%
expm1-log1p-u19.3%
expm1-undefine19.1%
Applied egg-rr19.1%
sub-neg19.1%
log1p-undefine19.1%
rem-exp-log42.4%
unsub-neg42.4%
metadata-eval42.4%
Simplified42.4%
Taylor expanded in t around 0 2.3%
metadata-eval2.3%
Applied egg-rr2.3%
herbie shell --seed 2024145
(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))