
(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 22 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)) (fma (+ -1.0 x) (log y) (- t))))
double code(double x, double y, double z, double t) {
return fma((z + -1.0), log1p(-y), fma((-1.0 + x), log(y), -t));
}
function code(x, y, z, t) return fma(Float64(z + -1.0), log1p(Float64(-y)), fma(Float64(-1.0 + x), log(y), Float64(-t))) end
code[x_, y_, z_, t_] := N[(N[(z + -1.0), $MachinePrecision] * N[Log[1 + (-y)], $MachinePrecision] + N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + (-t)), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \mathsf{fma}\left(-1 + x, \log y, -t\right)\right)
\end{array}
Initial program 89.8%
sub-neg89.8%
+-commutative89.8%
associate-+l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (- (fma (+ -1.0 x) (log y) (* (log1p (- y)) (+ z -1.0))) t))
double code(double x, double y, double z, double t) {
return fma((-1.0 + x), log(y), (log1p(-y) * (z + -1.0))) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(-1.0 + x), log(y), Float64(log1p(Float64(-y)) * Float64(z + -1.0))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[(N[Log[1 + (-y)], $MachinePrecision] * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-1 + x, \log y, \mathsf{log1p}\left(-y\right) \cdot \left(z + -1\right)\right) - t
\end{array}
Initial program 89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (- (fma (+ -1.0 x) (log y) (* z (log1p (- y)))) t))
double code(double x, double y, double z, double t) {
return fma((-1.0 + x), log(y), (z * log1p(-y))) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(-1.0 + x), log(y), Float64(z * log1p(Float64(-y)))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[(z * N[Log[1 + (-y)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-1 + x, \log y, z \cdot \mathsf{log1p}\left(-y\right)\right) - t
\end{array}
Initial program 89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
Simplified99.8%
Taylor expanded in z around inf 99.5%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (- (+ (* (+ -1.0 x) (log y)) (* z (log1p (- y)))) t))
double code(double x, double y, double z, double t) {
return (((-1.0 + x) * log(y)) + (z * log1p(-y))) - t;
}
public static double code(double x, double y, double z, double t) {
return (((-1.0 + x) * Math.log(y)) + (z * Math.log1p(-y))) - t;
}
def code(x, y, z, t): return (((-1.0 + x) * math.log(y)) + (z * math.log1p(-y))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(-1.0 + x) * log(y)) + Float64(z * log1p(Float64(-y)))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Log[1 + (-y)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(-1 + x\right) \cdot \log y + z \cdot \mathsf{log1p}\left(-y\right)\right) - t
\end{array}
Initial program 89.8%
Taylor expanded in z around inf 89.5%
*-commutative89.5%
sub-neg89.5%
log1p-define99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(-
(+
(* (+ -1.0 x) (log y))
(*
y
(+
(- 1.0 z)
(*
y
(+
(* (+ z -1.0) -0.5)
(*
y
(+ (* (+ z -1.0) -0.3333333333333333) (* -0.25 (* y (+ z -1.0))))))))))
t))
double code(double x, double y, double z, double t) {
return (((-1.0 + x) * log(y)) + (y * ((1.0 - z) + (y * (((z + -1.0) * -0.5) + (y * (((z + -1.0) * -0.3333333333333333) + (-0.25 * (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 = ((((-1.0d0) + x) * log(y)) + (y * ((1.0d0 - z) + (y * (((z + (-1.0d0)) * (-0.5d0)) + (y * (((z + (-1.0d0)) * (-0.3333333333333333d0)) + ((-0.25d0) * (y * (z + (-1.0d0))))))))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((-1.0 + x) * Math.log(y)) + (y * ((1.0 - z) + (y * (((z + -1.0) * -0.5) + (y * (((z + -1.0) * -0.3333333333333333) + (-0.25 * (y * (z + -1.0)))))))))) - t;
}
def code(x, y, z, t): return (((-1.0 + x) * math.log(y)) + (y * ((1.0 - z) + (y * (((z + -1.0) * -0.5) + (y * (((z + -1.0) * -0.3333333333333333) + (-0.25 * (y * (z + -1.0)))))))))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(-1.0 + x) * log(y)) + Float64(y * Float64(Float64(1.0 - z) + Float64(y * Float64(Float64(Float64(z + -1.0) * -0.5) + Float64(y * Float64(Float64(Float64(z + -1.0) * -0.3333333333333333) + Float64(-0.25 * Float64(y * Float64(z + -1.0)))))))))) - t) end
function tmp = code(x, y, z, t) tmp = (((-1.0 + x) * log(y)) + (y * ((1.0 - z) + (y * (((z + -1.0) * -0.5) + (y * (((z + -1.0) * -0.3333333333333333) + (-0.25 * (y * (z + -1.0)))))))))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(1.0 - z), $MachinePrecision] + N[(y * N[(N[(N[(z + -1.0), $MachinePrecision] * -0.5), $MachinePrecision] + N[(y * N[(N[(N[(z + -1.0), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] + N[(-0.25 * N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(-1 + x\right) \cdot \log y + y \cdot \left(\left(1 - z\right) + y \cdot \left(\left(z + -1\right) \cdot -0.5 + y \cdot \left(\left(z + -1\right) \cdot -0.3333333333333333 + -0.25 \cdot \left(y \cdot \left(z + -1\right)\right)\right)\right)\right)\right) - t
\end{array}
Initial program 89.8%
Taylor expanded in y around 0 99.3%
Final simplification99.3%
(FPCore (x y z t)
:precision binary64
(-
(+
(* (+ -1.0 x) (log y))
(*
(+ z -1.0)
(* y (+ -1.0 (* y (- (* y (- (* y -0.25) 0.3333333333333333)) 0.5))))))
t))
double code(double x, double y, double z, double t) {
return (((-1.0 + x) * log(y)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))))) - 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 = ((((-1.0d0) + x) * log(y)) + ((z + (-1.0d0)) * (y * ((-1.0d0) + (y * ((y * ((y * (-0.25d0)) - 0.3333333333333333d0)) - 0.5d0)))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((-1.0 + x) * Math.log(y)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))))) - t;
}
def code(x, y, z, t): return (((-1.0 + x) * math.log(y)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(-1.0 + x) * log(y)) + Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * Float64(Float64(y * Float64(Float64(y * -0.25) - 0.3333333333333333)) - 0.5)))))) - t) end
function tmp = code(x, y, z, t) tmp = (((-1.0 + x) * log(y)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * 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]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(-1 + x\right) \cdot \log y + \left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot \left(y \cdot -0.25 - 0.3333333333333333\right) - 0.5\right)\right)\right)\right) - t
\end{array}
Initial program 89.8%
Taylor expanded in y around 0 99.3%
Final simplification99.3%
(FPCore (x y z t) :precision binary64 (if (or (<= (+ -1.0 x) -2.0) (not (<= (+ -1.0 x) -1.0))) (- (* (+ -1.0 x) (log y)) t) (- (* y (- 1.0 z)) (+ (log y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -2.0) || !((-1.0 + x) <= -1.0)) {
tmp = ((-1.0 + x) * 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 ((((-1.0d0) + x) <= (-2.0d0)) .or. (.not. (((-1.0d0) + x) <= (-1.0d0)))) then
tmp = (((-1.0d0) + x) * 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 (((-1.0 + x) <= -2.0) || !((-1.0 + x) <= -1.0)) {
tmp = ((-1.0 + x) * 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 ((-1.0 + x) <= -2.0) or not ((-1.0 + x) <= -1.0): tmp = ((-1.0 + x) * 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(-1.0 + x) <= -2.0) || !(Float64(-1.0 + x) <= -1.0)) tmp = Float64(Float64(Float64(-1.0 + x) * log(y)) - t); else tmp = Float64(Float64(y * Float64(1.0 - z)) - Float64(log(y) + t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((-1.0 + x) <= -2.0) || ~(((-1.0 + x) <= -1.0))) tmp = ((-1.0 + x) * 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[(-1.0 + x), $MachinePrecision], -2.0], N[Not[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.0]], $MachinePrecision]], N[(N[(N[(-1.0 + x), $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}\;-1 + x \leq -2 \lor \neg \left(-1 + x \leq -1\right):\\
\;\;\;\;\left(-1 + x\right) \cdot \log y - t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right) - \left(\log y + t\right)\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -2 or -1 < (-.f64 x #s(literal 1 binary64)) Initial program 95.9%
fma-define95.9%
sub-neg95.9%
metadata-eval95.9%
sub-neg95.9%
metadata-eval95.9%
sub-neg95.9%
log1p-define99.7%
Simplified99.7%
Taylor expanded in y around 0 94.6%
if -2 < (-.f64 x #s(literal 1 binary64)) < -1Initial program 82.9%
sub-neg82.9%
+-commutative82.9%
associate-+l+82.9%
fma-define82.9%
sub-neg82.9%
metadata-eval82.9%
sub-neg82.9%
log1p-define99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 99.9%
mul-1-neg99.9%
Simplified99.9%
Taylor expanded in y around 0 98.0%
associate-*r*98.0%
mul-1-neg98.0%
sub-neg98.0%
metadata-eval98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
Final simplification96.2%
(FPCore (x y z t) :precision binary64 (- (+ (* (+ -1.0 x) (log y)) (* (+ z -1.0) (* y (+ -1.0 (* y (- (* y -0.3333333333333333) 0.5)))))) t))
double code(double x, double y, double z, double t) {
return (((-1.0 + x) * log(y)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))))) - 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 = ((((-1.0d0) + x) * log(y)) + ((z + (-1.0d0)) * (y * ((-1.0d0) + (y * ((y * (-0.3333333333333333d0)) - 0.5d0)))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((-1.0 + x) * Math.log(y)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))))) - t;
}
def code(x, y, z, t): return (((-1.0 + x) * math.log(y)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(-1.0 + x) * log(y)) + Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * Float64(Float64(y * -0.3333333333333333) - 0.5)))))) - t) end
function tmp = code(x, y, z, t) tmp = (((-1.0 + x) * log(y)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * N[(N[(y * -0.3333333333333333), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(-1 + x\right) \cdot \log y + \left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot -0.3333333333333333 - 0.5\right)\right)\right)\right) - t
\end{array}
Initial program 89.8%
Taylor expanded in y around 0 99.2%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (- (+ (* (+ -1.0 x) (log y)) (* (+ z -1.0) (* y (+ -1.0 (* y -0.5))))) t))
double code(double x, double y, double z, double t) {
return (((-1.0 + x) * log(y)) + ((z + -1.0) * (y * (-1.0 + (y * -0.5))))) - 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 = ((((-1.0d0) + x) * log(y)) + ((z + (-1.0d0)) * (y * ((-1.0d0) + (y * (-0.5d0)))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((-1.0 + x) * Math.log(y)) + ((z + -1.0) * (y * (-1.0 + (y * -0.5))))) - t;
}
def code(x, y, z, t): return (((-1.0 + x) * math.log(y)) + ((z + -1.0) * (y * (-1.0 + (y * -0.5))))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(-1.0 + x) * log(y)) + Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * -0.5))))) - t) end
function tmp = code(x, y, z, t) tmp = (((-1.0 + x) * log(y)) + ((z + -1.0) * (y * (-1.0 + (y * -0.5))))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(-1 + x\right) \cdot \log y + \left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot -0.5\right)\right)\right) - t
\end{array}
Initial program 89.8%
Taylor expanded in y around 0 99.1%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (if (or (<= x -9.5e+62) (not (<= x 3.9e+39))) (* x (log y)) (- (- y t) (log y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -9.5e+62) || !(x <= 3.9e+39)) {
tmp = x * log(y);
} else {
tmp = (y - 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 ((x <= (-9.5d+62)) .or. (.not. (x <= 3.9d+39))) then
tmp = x * log(y)
else
tmp = (y - t) - log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -9.5e+62) || !(x <= 3.9e+39)) {
tmp = x * Math.log(y);
} else {
tmp = (y - t) - Math.log(y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -9.5e+62) or not (x <= 3.9e+39): tmp = x * math.log(y) else: tmp = (y - t) - math.log(y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -9.5e+62) || !(x <= 3.9e+39)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y - t) - log(y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -9.5e+62) || ~((x <= 3.9e+39))) tmp = x * log(y); else tmp = (y - t) - log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -9.5e+62], N[Not[LessEqual[x, 3.9e+39]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y - t), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+62} \lor \neg \left(x \leq 3.9 \cdot 10^{+39}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(y - t\right) - \log y\\
\end{array}
\end{array}
if x < -9.5000000000000003e62 or 3.9000000000000001e39 < x Initial program 97.0%
fma-define97.0%
sub-neg97.0%
metadata-eval97.0%
sub-neg97.0%
metadata-eval97.0%
sub-neg97.0%
log1p-define99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in x around inf 76.1%
*-commutative76.1%
Simplified76.1%
if -9.5000000000000003e62 < x < 3.9000000000000001e39Initial program 84.3%
sub-neg84.3%
+-commutative84.3%
associate-+l+84.3%
fma-define84.3%
sub-neg84.3%
metadata-eval84.3%
sub-neg84.3%
log1p-define99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 95.1%
mul-1-neg95.1%
Simplified95.1%
Taylor expanded in y around 0 93.0%
associate-*r*93.0%
mul-1-neg93.0%
sub-neg93.0%
metadata-eval93.0%
+-commutative93.0%
+-commutative93.0%
Simplified93.0%
Taylor expanded in z around 0 76.8%
associate--r+76.8%
Simplified76.8%
Final simplification76.5%
(FPCore (x y z t) :precision binary64 (if (or (<= x -7e+67) (not (<= x 1.22e+42))) (* x (log y)) (- (- t) (log y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -7e+67) || !(x <= 1.22e+42)) {
tmp = x * log(y);
} else {
tmp = -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 ((x <= (-7d+67)) .or. (.not. (x <= 1.22d+42))) then
tmp = x * log(y)
else
tmp = -t - log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -7e+67) || !(x <= 1.22e+42)) {
tmp = x * Math.log(y);
} else {
tmp = -t - Math.log(y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -7e+67) or not (x <= 1.22e+42): tmp = x * math.log(y) else: tmp = -t - math.log(y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -7e+67) || !(x <= 1.22e+42)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(-t) - log(y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -7e+67) || ~((x <= 1.22e+42))) tmp = x * log(y); else tmp = -t - log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -7e+67], N[Not[LessEqual[x, 1.22e+42]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+67} \lor \neg \left(x \leq 1.22 \cdot 10^{+42}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) - \log y\\
\end{array}
\end{array}
if x < -7e67 or 1.22e42 < x Initial program 97.0%
fma-define97.0%
sub-neg97.0%
metadata-eval97.0%
sub-neg97.0%
metadata-eval97.0%
sub-neg97.0%
log1p-define99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in x around inf 76.1%
*-commutative76.1%
Simplified76.1%
if -7e67 < x < 1.22e42Initial program 84.3%
sub-neg84.3%
+-commutative84.3%
associate-+l+84.3%
fma-define84.3%
sub-neg84.3%
metadata-eval84.3%
sub-neg84.3%
log1p-define99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 95.1%
mul-1-neg95.1%
Simplified95.1%
Taylor expanded in y around 0 76.3%
mul-1-neg76.3%
distribute-neg-in76.3%
sub-neg76.3%
Simplified76.3%
Final simplification76.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.05e+64) (not (<= x 7.8e+41))) (* x (log y)) (- (* y (- 1.0 z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.05e+64) || !(x <= 7.8e+41)) {
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 <= (-1.05d+64)) .or. (.not. (x <= 7.8d+41))) 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 <= -1.05e+64) || !(x <= 7.8e+41)) {
tmp = x * Math.log(y);
} else {
tmp = (y * (1.0 - z)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.05e+64) or not (x <= 7.8e+41): 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 <= -1.05e+64) || !(x <= 7.8e+41)) 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 <= -1.05e+64) || ~((x <= 7.8e+41))) 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, -1.05e+64], N[Not[LessEqual[x, 7.8e+41]], $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 -1.05 \cdot 10^{+64} \lor \neg \left(x \leq 7.8 \cdot 10^{+41}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right) - t\\
\end{array}
\end{array}
if x < -1.05e64 or 7.7999999999999994e41 < x Initial program 97.0%
fma-define97.0%
sub-neg97.0%
metadata-eval97.0%
sub-neg97.0%
metadata-eval97.0%
sub-neg97.0%
log1p-define99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
Taylor expanded in x around inf 76.1%
*-commutative76.1%
Simplified76.1%
if -1.05e64 < x < 7.7999999999999994e41Initial program 84.3%
sub-neg84.3%
+-commutative84.3%
associate-+l+84.3%
fma-define84.3%
sub-neg84.3%
metadata-eval84.3%
sub-neg84.3%
log1p-define99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 95.1%
mul-1-neg95.1%
Simplified95.1%
Taylor expanded in y around 0 93.0%
associate-*r*93.0%
mul-1-neg93.0%
sub-neg93.0%
metadata-eval93.0%
+-commutative93.0%
+-commutative93.0%
Simplified93.0%
Taylor expanded in t around inf 64.4%
Final simplification69.5%
(FPCore (x y z t) :precision binary64 (if (<= z -2.1e+245) (* z (- (log1p (- y)) (/ t z))) (- (* (+ -1.0 x) (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e+245) {
tmp = z * (log1p(-y) - (t / z));
} else {
tmp = ((-1.0 + x) * log(y)) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e+245) {
tmp = z * (Math.log1p(-y) - (t / z));
} else {
tmp = ((-1.0 + x) * Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.1e+245: tmp = z * (math.log1p(-y) - (t / z)) else: tmp = ((-1.0 + x) * math.log(y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.1e+245) tmp = Float64(z * Float64(log1p(Float64(-y)) - Float64(t / z))); else tmp = Float64(Float64(Float64(-1.0 + x) * log(y)) - t); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.1e+245], N[(z * N[(N[Log[1 + (-y)], $MachinePrecision] - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+245}:\\
\;\;\;\;z \cdot \left(\mathsf{log1p}\left(-y\right) - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-1 + x\right) \cdot \log y - t\\
\end{array}
\end{array}
if z < -2.09999999999999996e245Initial program 30.7%
fma-define30.7%
sub-neg30.7%
metadata-eval30.7%
sub-neg30.7%
metadata-eval30.7%
sub-neg30.7%
log1p-define99.9%
Simplified99.9%
Taylor expanded in z around inf 99.9%
Taylor expanded in z around inf 30.7%
associate--l+30.7%
div-sub30.7%
sub-neg30.7%
log1p-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in t around inf 85.8%
associate-*r/85.8%
neg-mul-185.8%
Simplified85.8%
if -2.09999999999999996e245 < z Initial program 93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
sub-neg93.2%
metadata-eval93.2%
sub-neg93.2%
log1p-define99.8%
Simplified99.8%
Taylor expanded in y around 0 91.2%
Final simplification90.9%
(FPCore (x y z t) :precision binary64 (- (+ (* (+ -1.0 x) (log y)) (* y (- 1.0 z))) t))
double code(double x, double y, double z, double t) {
return (((-1.0 + x) * log(y)) + (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 = ((((-1.0d0) + x) * log(y)) + (y * (1.0d0 - z))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((-1.0 + x) * Math.log(y)) + (y * (1.0 - z))) - t;
}
def code(x, y, z, t): return (((-1.0 + x) * math.log(y)) + (y * (1.0 - z))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(-1.0 + x) * log(y)) + Float64(y * Float64(1.0 - z))) - t) end
function tmp = code(x, y, z, t) tmp = (((-1.0 + x) * log(y)) + (y * (1.0 - z))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(-1 + x\right) \cdot \log y + y \cdot \left(1 - z\right)\right) - t
\end{array}
Initial program 89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
Simplified99.8%
Taylor expanded in y around 0 98.5%
+-commutative98.5%
sub-neg98.5%
metadata-eval98.5%
mul-1-neg98.5%
unsub-neg98.5%
+-commutative98.5%
sub-neg98.5%
metadata-eval98.5%
+-commutative98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x y z t) :precision binary64 (if (<= z -1.52e+246) (- (- t) (* z y)) (- (* (+ -1.0 x) (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.52e+246) {
tmp = -t - (z * y);
} else {
tmp = ((-1.0 + x) * 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.52d+246)) then
tmp = -t - (z * y)
else
tmp = (((-1.0d0) + x) * 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.52e+246) {
tmp = -t - (z * y);
} else {
tmp = ((-1.0 + x) * Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.52e+246: tmp = -t - (z * y) else: tmp = ((-1.0 + x) * math.log(y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.52e+246) tmp = Float64(Float64(-t) - Float64(z * y)); else tmp = Float64(Float64(Float64(-1.0 + x) * log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.52e+246) tmp = -t - (z * y); else tmp = ((-1.0 + x) * log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.52e+246], N[((-t) - N[(z * y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.52 \cdot 10^{+246}:\\
\;\;\;\;\left(-t\right) - z \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(-1 + x\right) \cdot \log y - t\\
\end{array}
\end{array}
if z < -1.52e246Initial program 30.7%
sub-neg30.7%
+-commutative30.7%
associate-+l+30.7%
fma-define30.7%
sub-neg30.7%
metadata-eval30.7%
sub-neg30.7%
log1p-define99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 85.8%
mul-1-neg85.8%
Simplified85.8%
Taylor expanded in y around 0 82.6%
associate-*r*82.6%
mul-1-neg82.6%
sub-neg82.6%
metadata-eval82.6%
+-commutative82.6%
+-commutative82.6%
Simplified82.6%
Taylor expanded in t around inf 82.6%
Taylor expanded in z around inf 82.6%
if -1.52e246 < z Initial program 93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
sub-neg93.2%
metadata-eval93.2%
sub-neg93.2%
log1p-define99.8%
Simplified99.8%
Taylor expanded in y around 0 91.2%
Final simplification90.8%
(FPCore (x y z t) :precision binary64 (- (- (* (+ -1.0 x) (log y)) (* z y)) t))
double code(double x, double y, double z, double t) {
return (((-1.0 + x) * log(y)) - (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 = ((((-1.0d0) + x) * log(y)) - (z * y)) - t
end function
public static double code(double x, double y, double z, double t) {
return (((-1.0 + x) * Math.log(y)) - (z * y)) - t;
}
def code(x, y, z, t): return (((-1.0 + x) * math.log(y)) - (z * y)) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(-1.0 + x) * log(y)) - Float64(z * y)) - t) end
function tmp = code(x, y, z, t) tmp = (((-1.0 + x) * log(y)) - (z * y)) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(-1 + x\right) \cdot \log y - z \cdot y\right) - t
\end{array}
Initial program 89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
Simplified99.8%
Taylor expanded in z around inf 99.5%
Taylor expanded in y around 0 98.2%
+-commutative98.2%
sub-neg98.2%
metadata-eval98.2%
mul-1-neg98.2%
unsub-neg98.2%
+-commutative98.2%
Simplified98.2%
Final simplification98.2%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.42e-11) (not (<= t 3100.0))) (- t) (* z (- y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.42e-11) || !(t <= 3100.0)) {
tmp = -t;
} else {
tmp = z * -y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.42d-11)) .or. (.not. (t <= 3100.0d0))) then
tmp = -t
else
tmp = z * -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.42e-11) || !(t <= 3100.0)) {
tmp = -t;
} else {
tmp = z * -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.42e-11) or not (t <= 3100.0): tmp = -t else: tmp = z * -y return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.42e-11) || !(t <= 3100.0)) tmp = Float64(-t); else tmp = Float64(z * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.42e-11) || ~((t <= 3100.0))) tmp = -t; else tmp = z * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.42e-11], N[Not[LessEqual[t, 3100.0]], $MachinePrecision]], (-t), N[(z * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{-11} \lor \neg \left(t \leq 3100\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < -1.42e-11 or 3100 < t Initial program 94.5%
fma-define94.5%
sub-neg94.5%
metadata-eval94.5%
sub-neg94.5%
metadata-eval94.5%
sub-neg94.5%
log1p-define99.9%
Simplified99.9%
Taylor expanded in t around inf 70.9%
mul-1-neg70.9%
Simplified70.9%
if -1.42e-11 < t < 3100Initial program 85.5%
sub-neg85.5%
+-commutative85.5%
associate-+l+85.5%
fma-define85.5%
sub-neg85.5%
metadata-eval85.5%
sub-neg85.5%
log1p-define99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 48.9%
mul-1-neg48.9%
Simplified48.9%
Taylor expanded in y around 0 47.6%
associate-*r*47.6%
mul-1-neg47.6%
sub-neg47.6%
metadata-eval47.6%
+-commutative47.6%
+-commutative47.6%
Simplified47.6%
Taylor expanded in t around inf 18.1%
Taylor expanded in z around inf 17.6%
neg-mul-117.6%
distribute-rgt-neg-in17.6%
Simplified17.6%
Final simplification43.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.8%
sub-neg89.8%
+-commutative89.8%
associate-+l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 64.1%
mul-1-neg64.1%
Simplified64.1%
Taylor expanded in y around 0 62.8%
associate-*r*62.8%
mul-1-neg62.8%
sub-neg62.8%
metadata-eval62.8%
+-commutative62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in t around inf 46.6%
Final simplification46.6%
(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.8%
sub-neg89.8%
+-commutative89.8%
associate-+l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 64.1%
mul-1-neg64.1%
Simplified64.1%
Taylor expanded in y around 0 62.8%
associate-*r*62.8%
mul-1-neg62.8%
sub-neg62.8%
metadata-eval62.8%
+-commutative62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in t around inf 46.6%
Taylor expanded in z around inf 46.4%
Final simplification46.4%
(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.8%
sub-neg89.8%
+-commutative89.8%
associate-+l+89.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 64.1%
mul-1-neg64.1%
Simplified64.1%
Taylor expanded in y around 0 62.8%
associate-*r*62.8%
mul-1-neg62.8%
sub-neg62.8%
metadata-eval62.8%
+-commutative62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in t around inf 46.6%
Taylor expanded in z around 0 36.2%
(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.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
Simplified99.8%
Taylor expanded in t around inf 35.8%
mul-1-neg35.8%
Simplified35.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 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.8%
fma-define89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
metadata-eval89.8%
sub-neg89.8%
log1p-define99.8%
Simplified99.8%
Taylor expanded in t around inf 35.8%
mul-1-neg35.8%
Simplified35.8%
add-sqr-sqrt18.1%
sqrt-unprod11.0%
sqr-neg11.0%
sqrt-unprod1.3%
add-sqr-sqrt2.1%
*-un-lft-identity2.1%
Applied egg-rr2.1%
*-lft-identity2.1%
Simplified2.1%
herbie shell --seed 2024144
(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))