
(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 17 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 (- (+ (* (log1p (- 0.0 y)) (+ z -1.0)) (* (log y) (+ x -1.0))) t))
double code(double x, double y, double z, double t) {
return ((log1p((0.0 - y)) * (z + -1.0)) + (log(y) * (x + -1.0))) - t;
}
public static double code(double x, double y, double z, double t) {
return ((Math.log1p((0.0 - y)) * (z + -1.0)) + (Math.log(y) * (x + -1.0))) - t;
}
def code(x, y, z, t): return ((math.log1p((0.0 - y)) * (z + -1.0)) + (math.log(y) * (x + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(log1p(Float64(0.0 - y)) * Float64(z + -1.0)) + Float64(log(y) * Float64(x + -1.0))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[1 + N[(0.0 - y), $MachinePrecision]], $MachinePrecision] * N[(z + -1.0), $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{log1p}\left(0 - y\right) \cdot \left(z + -1\right) + \log y \cdot \left(x + -1\right)\right) - t
\end{array}
Initial program 89.6%
sub-negN/A
log1p-defineN/A
log1p-lowering-log1p.f64N/A
neg-sub0N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (- (+ (* y (- (* (+ z -1.0) (* y (+ -0.5 (* y -0.3333333333333333)))) (+ z -1.0))) (* (log y) (+ x -1.0))) t))
double code(double x, double y, double z, double t) {
return ((y * (((z + -1.0) * (y * (-0.5 + (y * -0.3333333333333333)))) - (z + -1.0))) + (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 * (((z + (-1.0d0)) * (y * ((-0.5d0) + (y * (-0.3333333333333333d0))))) - (z + (-1.0d0)))) + (log(y) * (x + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((y * (((z + -1.0) * (y * (-0.5 + (y * -0.3333333333333333)))) - (z + -1.0))) + (Math.log(y) * (x + -1.0))) - t;
}
def code(x, y, z, t): return ((y * (((z + -1.0) * (y * (-0.5 + (y * -0.3333333333333333)))) - (z + -1.0))) + (math.log(y) * (x + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(y * Float64(Float64(Float64(z + -1.0) * Float64(y * Float64(-0.5 + Float64(y * -0.3333333333333333)))) - Float64(z + -1.0))) + Float64(log(y) * Float64(x + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = ((y * (((z + -1.0) * (y * (-0.5 + (y * -0.3333333333333333)))) - (z + -1.0))) + (log(y) * (x + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(y * N[(N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(y \cdot \left(\left(z + -1\right) \cdot \left(y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right) - \left(z + -1\right)\right) + \log y \cdot \left(x + -1\right)\right) - t
\end{array}
Initial program 89.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (- (+ (* (+ z -1.0) (* y (+ -1.0 (* y (+ -0.5 (* y -0.3333333333333333)))))) (* (log y) (+ x -1.0))) t))
double code(double x, double y, double z, double t) {
return (((z + -1.0) * (y * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) + (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 = (((z + (-1.0d0)) * (y * ((-1.0d0) + (y * ((-0.5d0) + (y * (-0.3333333333333333d0))))))) + (log(y) * (x + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((z + -1.0) * (y * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) + (Math.log(y) * (x + -1.0))) - t;
}
def code(x, y, z, t): return (((z + -1.0) * (y * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) + (math.log(y) * (x + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * Float64(-0.5 + Float64(y * -0.3333333333333333)))))) + Float64(log(y) * Float64(x + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = (((z + -1.0) * (y * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) + (log(y) * (x + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right)\right) + \log y \cdot \left(x + -1\right)\right) - t
\end{array}
Initial program 89.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* (log y) (+ x -1.0)) t)))
(if (<= x -2.6e-8)
t_1
(if (<= x 3e-8) (- (- (* y (- 1.0 z)) (log y)) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (log(y) * (x + -1.0)) - t;
double tmp;
if (x <= -2.6e-8) {
tmp = t_1;
} else if (x <= 3e-8) {
tmp = ((y * (1.0 - z)) - log(y)) - 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 = (log(y) * (x + (-1.0d0))) - t
if (x <= (-2.6d-8)) then
tmp = t_1
else if (x <= 3d-8) then
tmp = ((y * (1.0d0 - z)) - log(y)) - 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 = (Math.log(y) * (x + -1.0)) - t;
double tmp;
if (x <= -2.6e-8) {
tmp = t_1;
} else if (x <= 3e-8) {
tmp = ((y * (1.0 - z)) - Math.log(y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (math.log(y) * (x + -1.0)) - t tmp = 0 if x <= -2.6e-8: tmp = t_1 elif x <= 3e-8: tmp = ((y * (1.0 - z)) - math.log(y)) - t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(log(y) * Float64(x + -1.0)) - t) tmp = 0.0 if (x <= -2.6e-8) tmp = t_1; elseif (x <= 3e-8) tmp = Float64(Float64(Float64(y * Float64(1.0 - z)) - log(y)) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (log(y) * (x + -1.0)) - t; tmp = 0.0; if (x <= -2.6e-8) tmp = t_1; elseif (x <= 3e-8) tmp = ((y * (1.0 - z)) - log(y)) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[x, -2.6e-8], t$95$1, If[LessEqual[x, 3e-8], N[(N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot \left(x + -1\right) - t\\
\mathbf{if}\;x \leq -2.6 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-8}:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.6000000000000001e-8 or 2.99999999999999973e-8 < x Initial program 96.1%
Taylor expanded in y around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6494.4%
Simplified94.4%
if -2.6000000000000001e-8 < x < 2.99999999999999973e-8Initial program 82.8%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6499.0%
Simplified99.0%
Taylor expanded in x around 0
sub-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6499.0%
Simplified99.0%
Final simplification96.6%
(FPCore (x y z t) :precision binary64 (- (+ (* (+ z -1.0) (* y (+ -1.0 (* y -0.5)))) (* (log y) (+ x -1.0))) t))
double code(double x, double y, double z, double t) {
return (((z + -1.0) * (y * (-1.0 + (y * -0.5)))) + (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 = (((z + (-1.0d0)) * (y * ((-1.0d0) + (y * (-0.5d0))))) + (log(y) * (x + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((z + -1.0) * (y * (-1.0 + (y * -0.5)))) + (Math.log(y) * (x + -1.0))) - t;
}
def code(x, y, z, t): return (((z + -1.0) * (y * (-1.0 + (y * -0.5)))) + (math.log(y) * (x + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * -0.5)))) + Float64(log(y) * Float64(x + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = (((z + -1.0) * (y * (-1.0 + (y * -0.5)))) + (log(y) * (x + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot -0.5\right)\right) + \log y \cdot \left(x + -1\right)\right) - t
\end{array}
Initial program 89.6%
Taylor expanded in y around 0
Simplified99.1%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.5e+271)
(- (* y (- 1.0 z)) t)
(if (<= z 1.3e+248)
(- (* (log y) (+ x -1.0)) t)
(- (* y (* z (+ -1.0 (* y (+ -0.5 (* y -0.3333333333333333)))))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.5e+271) {
tmp = (y * (1.0 - z)) - t;
} else if (z <= 1.3e+248) {
tmp = (log(y) * (x + -1.0)) - t;
} else {
tmp = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - 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.5d+271)) then
tmp = (y * (1.0d0 - z)) - t
else if (z <= 1.3d+248) then
tmp = (log(y) * (x + (-1.0d0))) - t
else
tmp = (y * (z * ((-1.0d0) + (y * ((-0.5d0) + (y * (-0.3333333333333333d0))))))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.5e+271) {
tmp = (y * (1.0 - z)) - t;
} else if (z <= 1.3e+248) {
tmp = (Math.log(y) * (x + -1.0)) - t;
} else {
tmp = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.5e+271: tmp = (y * (1.0 - z)) - t elif z <= 1.3e+248: tmp = (math.log(y) * (x + -1.0)) - t else: tmp = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.5e+271) tmp = Float64(Float64(y * Float64(1.0 - z)) - t); elseif (z <= 1.3e+248) tmp = Float64(Float64(log(y) * Float64(x + -1.0)) - t); else tmp = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * Float64(-0.5 + Float64(y * -0.3333333333333333)))))) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.5e+271) tmp = (y * (1.0 - z)) - t; elseif (z <= 1.3e+248) tmp = (log(y) * (x + -1.0)) - t; else tmp = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.5e+271], N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[z, 1.3e+248], N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(y * N[(z * N[(-1.0 + N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+271}:\\
\;\;\;\;y \cdot \left(1 - z\right) - t\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+248}:\\
\;\;\;\;\log y \cdot \left(x + -1\right) - t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(-1 + y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right)\right) - t\\
\end{array}
\end{array}
if z < -6.49999999999999998e271Initial program 22.7%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64100.0%
Simplified100.0%
Taylor expanded in y around inf
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
--lowering--.f6490.3%
Simplified90.3%
if -6.49999999999999998e271 < z < 1.30000000000000005e248Initial program 93.4%
Taylor expanded in y around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6492.2%
Simplified92.2%
if 1.30000000000000005e248 < z Initial program 61.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6497.4%
Simplified97.4%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.4%
Simplified88.4%
Final simplification91.9%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (* x (log y)) t))) (if (<= x -1.0) t_1 (if (<= x 1.02e-43) (- 0.0 (+ (log y) t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - t;
double tmp;
if (x <= -1.0) {
tmp = t_1;
} else if (x <= 1.02e-43) {
tmp = 0.0 - (log(y) + 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)) - t
if (x <= (-1.0d0)) then
tmp = t_1
else if (x <= 1.02d-43) then
tmp = 0.0d0 - (log(y) + 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)) - t;
double tmp;
if (x <= -1.0) {
tmp = t_1;
} else if (x <= 1.02e-43) {
tmp = 0.0 - (Math.log(y) + t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * math.log(y)) - t tmp = 0 if x <= -1.0: tmp = t_1 elif x <= 1.02e-43: tmp = 0.0 - (math.log(y) + t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - t) tmp = 0.0 if (x <= -1.0) tmp = t_1; elseif (x <= 1.02e-43) tmp = Float64(0.0 - Float64(log(y) + t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * log(y)) - t; tmp = 0.0; if (x <= -1.0) tmp = t_1; elseif (x <= 1.02e-43) tmp = 0.0 - (log(y) + t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[x, -1.0], t$95$1, If[LessEqual[x, 1.02e-43], N[(0.0 - N[(N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y - t\\
\mathbf{if}\;x \leq -1:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{-43}:\\
\;\;\;\;0 - \left(\log y + t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1 or 1.0200000000000001e-43 < x Initial program 95.5%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6492.4%
Simplified92.4%
if -1 < x < 1.0200000000000001e-43Initial program 83.0%
Taylor expanded in y around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6481.3%
Simplified81.3%
Taylor expanded in x around 0
--lowering--.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
log-lowering-log.f6480.3%
Simplified80.3%
Final simplification86.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (* x (log y)) t))) (if (<= t -360.0) t_1 (if (<= t 3.1e-80) (* (log y) (+ x -1.0)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - t;
double tmp;
if (t <= -360.0) {
tmp = t_1;
} else if (t <= 3.1e-80) {
tmp = log(y) * (x + -1.0);
} 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)) - t
if (t <= (-360.0d0)) then
tmp = t_1
else if (t <= 3.1d-80) then
tmp = log(y) * (x + (-1.0d0))
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)) - t;
double tmp;
if (t <= -360.0) {
tmp = t_1;
} else if (t <= 3.1e-80) {
tmp = Math.log(y) * (x + -1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * math.log(y)) - t tmp = 0 if t <= -360.0: tmp = t_1 elif t <= 3.1e-80: tmp = math.log(y) * (x + -1.0) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - t) tmp = 0.0 if (t <= -360.0) tmp = t_1; elseif (t <= 3.1e-80) tmp = Float64(log(y) * Float64(x + -1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * log(y)) - t; tmp = 0.0; if (t <= -360.0) tmp = t_1; elseif (t <= 3.1e-80) tmp = log(y) * (x + -1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t, -360.0], t$95$1, If[LessEqual[t, 3.1e-80], N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y - t\\
\mathbf{if}\;t \leq -360:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-80}:\\
\;\;\;\;\log y \cdot \left(x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -360 or 3.10000000000000016e-80 < t Initial program 92.6%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6489.3%
Simplified89.3%
if -360 < t < 3.10000000000000016e-80Initial program 85.9%
Taylor expanded in y around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6484.0%
Simplified84.0%
Taylor expanded in t around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6483.4%
Simplified83.4%
Final simplification86.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1
(- (* y (* z (+ -1.0 (* y (+ -0.5 (* y -0.3333333333333333)))))) t)))
(if (<= t -85000.0)
t_1
(if (<= t 10000000000000.0) (* (log y) (+ x -1.0)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t;
double tmp;
if (t <= -85000.0) {
tmp = t_1;
} else if (t <= 10000000000000.0) {
tmp = log(y) * (x + -1.0);
} 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 = (y * (z * ((-1.0d0) + (y * ((-0.5d0) + (y * (-0.3333333333333333d0))))))) - t
if (t <= (-85000.0d0)) then
tmp = t_1
else if (t <= 10000000000000.0d0) then
tmp = log(y) * (x + (-1.0d0))
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 = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t;
double tmp;
if (t <= -85000.0) {
tmp = t_1;
} else if (t <= 10000000000000.0) {
tmp = Math.log(y) * (x + -1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t tmp = 0 if t <= -85000.0: tmp = t_1 elif t <= 10000000000000.0: tmp = math.log(y) * (x + -1.0) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * Float64(-0.5 + Float64(y * -0.3333333333333333)))))) - t) tmp = 0.0 if (t <= -85000.0) tmp = t_1; elseif (t <= 10000000000000.0) tmp = Float64(log(y) * Float64(x + -1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t; tmp = 0.0; if (t <= -85000.0) tmp = t_1; elseif (t <= 10000000000000.0) tmp = log(y) * (x + -1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * N[(z * N[(-1.0 + N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t, -85000.0], t$95$1, If[LessEqual[t, 10000000000000.0], N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z \cdot \left(-1 + y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right)\right) - t\\
\mathbf{if}\;t \leq -85000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10000000000000:\\
\;\;\;\;\log y \cdot \left(x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -85000 or 1e13 < t Initial program 92.4%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.3%
Simplified99.3%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6476.8%
Simplified76.8%
if -85000 < t < 1e13Initial program 86.7%
Taylor expanded in y around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6485.0%
Simplified85.0%
Taylor expanded in t around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6483.7%
Simplified83.7%
Final simplification80.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -7.5e+34)
t_1
(if (<= x 1.72e+121)
(- (* y (* z (+ -1.0 (* y (+ -0.5 (* y -0.3333333333333333)))))) t)
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -7.5e+34) {
tmp = t_1;
} else if (x <= 1.72e+121) {
tmp = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - 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 <= (-7.5d+34)) then
tmp = t_1
else if (x <= 1.72d+121) then
tmp = (y * (z * ((-1.0d0) + (y * ((-0.5d0) + (y * (-0.3333333333333333d0))))))) - 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 <= -7.5e+34) {
tmp = t_1;
} else if (x <= 1.72e+121) {
tmp = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -7.5e+34: tmp = t_1 elif x <= 1.72e+121: tmp = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -7.5e+34) tmp = t_1; elseif (x <= 1.72e+121) tmp = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * Float64(-0.5 + Float64(y * -0.3333333333333333)))))) - 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 <= -7.5e+34) tmp = t_1; elseif (x <= 1.72e+121) tmp = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - 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, -7.5e+34], t$95$1, If[LessEqual[x, 1.72e+121], N[(N[(y * N[(z * N[(-1.0 + N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $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 -7.5 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.72 \cdot 10^{+121}:\\
\;\;\;\;y \cdot \left(z \cdot \left(-1 + y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -7.49999999999999976e34 or 1.7200000000000001e121 < x Initial program 96.3%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6478.0%
Simplified78.0%
if -7.49999999999999976e34 < x < 1.7200000000000001e121Initial program 85.4%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.7%
Simplified99.7%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6464.4%
Simplified64.4%
Final simplification69.6%
(FPCore (x y z t) :precision binary64 (- (- (* (log y) (+ x -1.0)) (* y (+ z -1.0))) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (x + -1.0)) - (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) * (x + (-1.0d0))) - (y * (z + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (x + -1.0)) - (y * (z + -1.0))) - t;
}
def code(x, y, z, t): return ((math.log(y) * (x + -1.0)) - (y * (z + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(x + -1.0)) - Float64(y * Float64(z + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (x + -1.0)) - (y * (z + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(x + -1\right) - y \cdot \left(z + -1\right)\right) - t
\end{array}
Initial program 89.6%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6498.7%
Simplified98.7%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (- (- (* (log y) (+ x -1.0)) (* y z)) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (x + -1.0)) - (y * 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 * z)) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (x + -1.0)) - (y * z)) - t;
}
def code(x, y, z, t): return ((math.log(y) * (x + -1.0)) - (y * z)) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(x + -1.0)) - Float64(y * z)) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (x + -1.0)) - (y * z)) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(x + -1\right) - y \cdot z\right) - t
\end{array}
Initial program 89.6%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6498.7%
Simplified98.7%
Taylor expanded in z around inf
*-lowering-*.f6498.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x y z t) :precision binary64 (if (<= t -25500000.0) (- 0.0 t) (if (<= t 54000000000000.0) (* y (- 1.0 z)) (- 0.0 t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -25500000.0) {
tmp = 0.0 - t;
} else if (t <= 54000000000000.0) {
tmp = y * (1.0 - z);
} else {
tmp = 0.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 (t <= (-25500000.0d0)) then
tmp = 0.0d0 - t
else if (t <= 54000000000000.0d0) then
tmp = y * (1.0d0 - z)
else
tmp = 0.0d0 - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -25500000.0) {
tmp = 0.0 - t;
} else if (t <= 54000000000000.0) {
tmp = y * (1.0 - z);
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -25500000.0: tmp = 0.0 - t elif t <= 54000000000000.0: tmp = y * (1.0 - z) else: tmp = 0.0 - t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -25500000.0) tmp = Float64(0.0 - t); elseif (t <= 54000000000000.0) tmp = Float64(y * Float64(1.0 - z)); else tmp = Float64(0.0 - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -25500000.0) tmp = 0.0 - t; elseif (t <= 54000000000000.0) tmp = y * (1.0 - z); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -25500000.0], N[(0.0 - t), $MachinePrecision], If[LessEqual[t, 54000000000000.0], N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(0.0 - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -25500000:\\
\;\;\;\;0 - t\\
\mathbf{elif}\;t \leq 54000000000000:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < -2.55e7 or 5.4e13 < t Initial program 94.3%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6470.0%
Simplified70.0%
sub0-negN/A
neg-lowering-neg.f6470.0%
Applied egg-rr70.0%
if -2.55e7 < t < 5.4e13Initial program 84.9%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6498.9%
Simplified98.9%
Taylor expanded in y around inf
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
--lowering--.f6416.8%
Simplified16.8%
Final simplification43.4%
(FPCore (x y z t) :precision binary64 (- (* y (* z (+ -1.0 (* y (+ -0.5 (* y -0.3333333333333333)))))) t))
double code(double x, double y, double z, double t) {
return (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - 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 * (z * ((-1.0d0) + (y * ((-0.5d0) + (y * (-0.3333333333333333d0))))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t;
}
def code(x, y, z, t): return (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * Float64(-0.5 + Float64(y * -0.3333333333333333)))))) - t) end
function tmp = code(x, y, z, t) tmp = (y * (z * (-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))))) - t; end
code[x_, y_, z_, t_] := N[(N[(y * N[(z * N[(-1.0 + N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(z \cdot \left(-1 + y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right)\right) - t
\end{array}
Initial program 89.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.2%
Simplified99.2%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6447.0%
Simplified47.0%
(FPCore (x y z t) :precision binary64 (- (* y (* z (+ -1.0 (* y -0.5)))) t))
double code(double x, double y, double z, double t) {
return (y * (z * (-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 = (y * (z * ((-1.0d0) + (y * (-0.5d0))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * (z * (-1.0 + (y * -0.5)))) - t;
}
def code(x, y, z, t): return (y * (z * (-1.0 + (y * -0.5)))) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * -0.5)))) - t) end
function tmp = code(x, y, z, t) tmp = (y * (z * (-1.0 + (y * -0.5)))) - t; end
code[x_, y_, z_, t_] := N[(N[(y * N[(z * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(z \cdot \left(-1 + y \cdot -0.5\right)\right) - t
\end{array}
Initial program 89.6%
Taylor expanded in y around 0
Simplified99.1%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.9%
Simplified46.9%
Final simplification46.9%
(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.6%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6498.7%
Simplified98.7%
Taylor expanded in y around inf
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
associate-+l-N/A
neg-sub0N/A
+-commutativeN/A
sub-negN/A
--lowering--.f6446.6%
Simplified46.6%
(FPCore (x y z t) :precision binary64 (- 0.0 t))
double code(double x, double y, double z, double t) {
return 0.0 - t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 0.0d0 - t
end function
public static double code(double x, double y, double z, double t) {
return 0.0 - t;
}
def code(x, y, z, t): return 0.0 - t
function code(x, y, z, t) return Float64(0.0 - t) end
function tmp = code(x, y, z, t) tmp = 0.0 - t; end
code[x_, y_, z_, t_] := N[(0.0 - t), $MachinePrecision]
\begin{array}{l}
\\
0 - t
\end{array}
Initial program 89.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6436.8%
Simplified36.8%
sub0-negN/A
neg-lowering-neg.f6436.8%
Applied egg-rr36.8%
Final simplification36.8%
herbie shell --seed 2024160
(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))