
(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 91.6%
sub-negN/A
log1p-defineN/A
log1p-lowering-log1p.f64N/A
neg-sub0N/A
--lowering--.f6499.8%
Applied egg-rr99.8%
Final simplification99.8%
(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 91.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.3%
Final simplification99.3%
(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 91.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 -0.00017)
t_1
(if (<= x 2.6e+18) (- (- (* 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 <= -0.00017) {
tmp = t_1;
} else if (x <= 2.6e+18) {
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 <= (-0.00017d0)) then
tmp = t_1
else if (x <= 2.6d+18) 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 <= -0.00017) {
tmp = t_1;
} else if (x <= 2.6e+18) {
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 <= -0.00017: tmp = t_1 elif x <= 2.6e+18: 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 <= -0.00017) tmp = t_1; elseif (x <= 2.6e+18) 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 <= -0.00017) tmp = t_1; elseif (x <= 2.6e+18) 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, -0.00017], t$95$1, If[LessEqual[x, 2.6e+18], 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 -0.00017:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+18}:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.7e-4 or 2.6e18 < x Initial program 95.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-+.f6495.1%
Simplified95.1%
if -1.7e-4 < x < 2.6e18Initial program 87.1%
sub-negN/A
log1p-defineN/A
log1p-lowering-log1p.f64N/A
neg-sub0N/A
--lowering--.f64100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
--lowering--.f64N/A
Simplified98.0%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
--lowering--.f64N/A
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
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6498.0%
Simplified98.0%
Final simplification96.4%
(FPCore (x y z t) :precision binary64 (- (+ (* y (* (+ z -1.0) (+ -1.0 (* y -0.5)))) (* (log y) (+ x -1.0))) t))
double code(double x, double y, double z, double t) {
return ((y * ((z + -1.0) * (-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 = ((y * ((z + (-1.0d0)) * ((-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 ((y * ((z + -1.0) * (-1.0 + (y * -0.5)))) + (Math.log(y) * (x + -1.0))) - t;
}
def code(x, y, z, t): return ((y * ((z + -1.0) * (-1.0 + (y * -0.5)))) + (math.log(y) * (x + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(Float64(y * Float64(Float64(z + -1.0) * Float64(-1.0 + Float64(y * -0.5)))) + Float64(log(y) * Float64(x + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = ((y * ((z + -1.0) * (-1.0 + (y * -0.5)))) + (log(y) * (x + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(y * N[(N[(z + -1.0), $MachinePrecision] * 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(y \cdot \left(\left(z + -1\right) \cdot \left(-1 + y \cdot -0.5\right)\right) + \log y \cdot \left(x + -1\right)\right) - t
\end{array}
Initial program 91.6%
sub-negN/A
log1p-defineN/A
log1p-lowering-log1p.f64N/A
neg-sub0N/A
--lowering--.f6499.8%
Applied egg-rr99.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (* x (log y)) t))) (if (<= x -3.9e-13) t_1 (if (<= x 2.6e+18) (- (- 0.0 t) (log y)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - t;
double tmp;
if (x <= -3.9e-13) {
tmp = t_1;
} else if (x <= 2.6e+18) {
tmp = (0.0 - t) - log(y);
} 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 <= (-3.9d-13)) then
tmp = t_1
else if (x <= 2.6d+18) then
tmp = (0.0d0 - t) - log(y)
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 <= -3.9e-13) {
tmp = t_1;
} else if (x <= 2.6e+18) {
tmp = (0.0 - t) - Math.log(y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * math.log(y)) - t tmp = 0 if x <= -3.9e-13: tmp = t_1 elif x <= 2.6e+18: tmp = (0.0 - t) - math.log(y) 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 <= -3.9e-13) tmp = t_1; elseif (x <= 2.6e+18) tmp = Float64(Float64(0.0 - t) - log(y)); 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 <= -3.9e-13) tmp = t_1; elseif (x <= 2.6e+18) tmp = (0.0 - t) - log(y); 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, -3.9e-13], t$95$1, If[LessEqual[x, 2.6e+18], N[(N[(0.0 - t), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y - t\\
\mathbf{if}\;x \leq -3.9 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+18}:\\
\;\;\;\;\left(0 - t\right) - \log y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.90000000000000004e-13 or 2.6e18 < x Initial program 95.2%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6493.8%
Simplified93.8%
if -3.90000000000000004e-13 < x < 2.6e18Initial program 87.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-+.f6485.0%
Simplified85.0%
Taylor expanded in x around 0
--lowering--.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
log-lowering-log.f6485.0%
Simplified85.0%
sub0-negN/A
neg-lowering-neg.f64N/A
log-lowering-log.f6485.0%
Applied egg-rr85.0%
Final simplification89.9%
(FPCore (x y z t)
:precision binary64
(if (<= t -3.2e+25)
(* t (+ -1.0 (/ (* y (- 1.0 z)) t)))
(if (<= t 5e+77)
(* (log y) (+ x -1.0))
(- (* y (* z (+ -1.0 (* y -0.5)))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.2e+25) {
tmp = t * (-1.0 + ((y * (1.0 - z)) / t));
} else if (t <= 5e+77) {
tmp = log(y) * (x + -1.0);
} else {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-3.2d+25)) then
tmp = t * ((-1.0d0) + ((y * (1.0d0 - z)) / t))
else if (t <= 5d+77) then
tmp = log(y) * (x + (-1.0d0))
else
tmp = (y * (z * ((-1.0d0) + (y * (-0.5d0))))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.2e+25) {
tmp = t * (-1.0 + ((y * (1.0 - z)) / t));
} else if (t <= 5e+77) {
tmp = Math.log(y) * (x + -1.0);
} else {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -3.2e+25: tmp = t * (-1.0 + ((y * (1.0 - z)) / t)) elif t <= 5e+77: tmp = math.log(y) * (x + -1.0) else: tmp = (y * (z * (-1.0 + (y * -0.5)))) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -3.2e+25) tmp = Float64(t * Float64(-1.0 + Float64(Float64(y * Float64(1.0 - z)) / t))); elseif (t <= 5e+77) tmp = Float64(log(y) * Float64(x + -1.0)); else tmp = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * -0.5)))) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -3.2e+25) tmp = t * (-1.0 + ((y * (1.0 - z)) / t)); elseif (t <= 5e+77) tmp = log(y) * (x + -1.0); else tmp = (y * (z * (-1.0 + (y * -0.5)))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -3.2e+25], N[(t * N[(-1.0 + N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+77], N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(z * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+25}:\\
\;\;\;\;t \cdot \left(-1 + \frac{y \cdot \left(1 - z\right)}{t}\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+77}:\\
\;\;\;\;\log y \cdot \left(x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(-1 + y \cdot -0.5\right)\right) - t\\
\end{array}
\end{array}
if t < -3.1999999999999999e25Initial program 94.7%
Taylor expanded in t around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified94.6%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified99.8%
Taylor expanded in y around inf
div-subN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
sub-negN/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
distribute-frac-negN/A
/-lowering-/.f64N/A
Simplified83.1%
if -3.1999999999999999e25 < t < 5.00000000000000004e77Initial program 88.8%
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-+.f6486.4%
Simplified86.4%
Taylor expanded in t around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6482.5%
Simplified82.5%
if 5.00000000000000004e77 < t Initial program 95.6%
sub-negN/A
log1p-defineN/A
log1p-lowering-log1p.f64N/A
neg-sub0N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6480.0%
Simplified80.0%
Final simplification82.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y)))) (if (<= x -3.4e+100) t_1 (if (<= x 1.65e+159) (- (- 0.0 t) (log y)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -3.4e+100) {
tmp = t_1;
} else if (x <= 1.65e+159) {
tmp = (0.0 - t) - log(y);
} 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 <= (-3.4d+100)) then
tmp = t_1
else if (x <= 1.65d+159) then
tmp = (0.0d0 - t) - log(y)
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 <= -3.4e+100) {
tmp = t_1;
} else if (x <= 1.65e+159) {
tmp = (0.0 - t) - Math.log(y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -3.4e+100: tmp = t_1 elif x <= 1.65e+159: tmp = (0.0 - t) - math.log(y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -3.4e+100) tmp = t_1; elseif (x <= 1.65e+159) tmp = Float64(Float64(0.0 - t) - log(y)); 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 <= -3.4e+100) tmp = t_1; elseif (x <= 1.65e+159) tmp = (0.0 - t) - log(y); 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, -3.4e+100], t$95$1, If[LessEqual[x, 1.65e+159], N[(N[(0.0 - t), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{+159}:\\
\;\;\;\;\left(0 - t\right) - \log y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.39999999999999994e100 or 1.6499999999999999e159 < x Initial program 95.9%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6480.2%
Simplified80.2%
if -3.39999999999999994e100 < x < 1.6499999999999999e159Initial program 89.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-+.f6487.7%
Simplified87.7%
Taylor expanded in x around 0
--lowering--.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
log-lowering-log.f6476.4%
Simplified76.4%
sub0-negN/A
neg-lowering-neg.f64N/A
log-lowering-log.f6476.4%
Applied egg-rr76.4%
Final simplification77.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -5.6e+99)
t_1
(if (<= x 3.9e+159)
(- (* (+ -1.0 (* y (+ -0.5 (* y -0.3333333333333333)))) (* y z)) t)
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -5.6e+99) {
tmp = t_1;
} else if (x <= 3.9e+159) {
tmp = ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - 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 <= (-5.6d+99)) then
tmp = t_1
else if (x <= 3.9d+159) then
tmp = (((-1.0d0) + (y * ((-0.5d0) + (y * (-0.3333333333333333d0))))) * (y * z)) - 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 <= -5.6e+99) {
tmp = t_1;
} else if (x <= 3.9e+159) {
tmp = ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -5.6e+99: tmp = t_1 elif x <= 3.9e+159: tmp = ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -5.6e+99) tmp = t_1; elseif (x <= 3.9e+159) tmp = Float64(Float64(Float64(-1.0 + Float64(y * Float64(-0.5 + Float64(y * -0.3333333333333333)))) * Float64(y * z)) - 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 <= -5.6e+99) tmp = t_1; elseif (x <= 3.9e+159) tmp = ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - 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, -5.6e+99], t$95$1, If[LessEqual[x, 3.9e+159], N[(N[(N[(-1.0 + N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+159}:\\
\;\;\;\;\left(-1 + y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right) \cdot \left(y \cdot z\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.6e99 or 3.9000000000000001e159 < x Initial program 95.9%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6480.2%
Simplified80.2%
if -5.6e99 < x < 3.9000000000000001e159Initial program 89.4%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6458.9%
Simplified58.9%
Final simplification66.1%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.05e-7)
(* t (+ -1.0 (/ (* y (- 1.0 z)) t)))
(if (<= t 25.0)
(- 0.0 (log y))
(- (* (+ -1.0 (* y (+ -0.5 (* y -0.3333333333333333)))) (* y z)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.05e-7) {
tmp = t * (-1.0 + ((y * (1.0 - z)) / t));
} else if (t <= 25.0) {
tmp = 0.0 - log(y);
} else {
tmp = ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.05d-7)) then
tmp = t * ((-1.0d0) + ((y * (1.0d0 - z)) / t))
else if (t <= 25.0d0) then
tmp = 0.0d0 - log(y)
else
tmp = (((-1.0d0) + (y * ((-0.5d0) + (y * (-0.3333333333333333d0))))) * (y * z)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.05e-7) {
tmp = t * (-1.0 + ((y * (1.0 - z)) / t));
} else if (t <= 25.0) {
tmp = 0.0 - Math.log(y);
} else {
tmp = ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.05e-7: tmp = t * (-1.0 + ((y * (1.0 - z)) / t)) elif t <= 25.0: tmp = 0.0 - math.log(y) else: tmp = ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.05e-7) tmp = Float64(t * Float64(-1.0 + Float64(Float64(y * Float64(1.0 - z)) / t))); elseif (t <= 25.0) tmp = Float64(0.0 - log(y)); else tmp = Float64(Float64(Float64(-1.0 + Float64(y * Float64(-0.5 + Float64(y * -0.3333333333333333)))) * Float64(y * z)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.05e-7) tmp = t * (-1.0 + ((y * (1.0 - z)) / t)); elseif (t <= 25.0) tmp = 0.0 - log(y); else tmp = ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.05e-7], N[(t * N[(-1.0 + N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 25.0], N[(0.0 - N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(N[(-1.0 + N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-7}:\\
\;\;\;\;t \cdot \left(-1 + \frac{y \cdot \left(1 - z\right)}{t}\right)\\
\mathbf{elif}\;t \leq 25:\\
\;\;\;\;0 - \log y\\
\mathbf{else}:\\
\;\;\;\;\left(-1 + y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right) \cdot \left(y \cdot z\right) - t\\
\end{array}
\end{array}
if t < -1.05e-7Initial program 93.7%
Taylor expanded in t around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
Simplified93.6%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified99.8%
Taylor expanded in y around inf
div-subN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
sub-negN/A
associate-*r/N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-/l*N/A
distribute-frac-negN/A
/-lowering-/.f64N/A
Simplified80.1%
if -1.05e-7 < t < 25Initial program 88.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-+.f6486.8%
Simplified86.8%
Taylor expanded in x around 0
--lowering--.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
log-lowering-log.f6441.3%
Simplified41.3%
Taylor expanded in t around 0
mul-1-negN/A
log-recN/A
log-lowering-log.f64N/A
/-lowering-/.f6440.4%
Simplified40.4%
log-recN/A
neg-lowering-neg.f64N/A
log-lowering-log.f6440.4%
Applied egg-rr40.4%
if 25 < t Initial program 95.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
Simplified98.9%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6469.3%
Simplified69.3%
Final simplification58.6%
(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 91.6%
sub-negN/A
log1p-defineN/A
log1p-lowering-log1p.f64N/A
neg-sub0N/A
--lowering--.f6499.8%
Applied egg-rr99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
--lowering--.f64N/A
Simplified98.8%
Taylor expanded in z around inf
*-lowering-*.f6498.8%
Simplified98.8%
(FPCore (x y z t) :precision binary64 (- (* (log y) (+ x -1.0)) t))
double code(double x, double y, double z, double t) {
return (log(y) * (x + -1.0)) - t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (log(y) * (x + (-1.0d0))) - t
end function
public static double code(double x, double y, double z, double t) {
return (Math.log(y) * (x + -1.0)) - t;
}
def code(x, y, z, t): return (math.log(y) * (x + -1.0)) - t
function code(x, y, z, t) return Float64(Float64(log(y) * Float64(x + -1.0)) - t) end
function tmp = code(x, y, z, t) tmp = (log(y) * (x + -1.0)) - t; end
code[x_, y_, z_, t_] := N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\log y \cdot \left(x + -1\right) - t
\end{array}
Initial program 91.6%
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-+.f6490.3%
Simplified90.3%
Final simplification90.3%
(FPCore (x y z t) :precision binary64 (if (<= t -1.32e+29) (- 0.0 t) (if (<= t 3e+24) (* y (- 1.0 z)) (- 0.0 t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.32e+29) {
tmp = 0.0 - t;
} else if (t <= 3e+24) {
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 <= (-1.32d+29)) then
tmp = 0.0d0 - t
else if (t <= 3d+24) 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 <= -1.32e+29) {
tmp = 0.0 - t;
} else if (t <= 3e+24) {
tmp = y * (1.0 - z);
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.32e+29: tmp = 0.0 - t elif t <= 3e+24: tmp = y * (1.0 - z) else: tmp = 0.0 - t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.32e+29) tmp = Float64(0.0 - t); elseif (t <= 3e+24) 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 <= -1.32e+29) tmp = 0.0 - t; elseif (t <= 3e+24) tmp = y * (1.0 - z); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.32e+29], N[(0.0 - t), $MachinePrecision], If[LessEqual[t, 3e+24], N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(0.0 - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.32 \cdot 10^{+29}:\\
\;\;\;\;0 - t\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+24}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < -1.32e29 or 2.99999999999999995e24 < t Initial program 96.2%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6474.0%
Simplified74.0%
sub0-negN/A
neg-lowering-neg.f6474.0%
Applied egg-rr74.0%
if -1.32e29 < t < 2.99999999999999995e24Initial program 87.3%
sub-negN/A
log1p-defineN/A
log1p-lowering-log1p.f64N/A
neg-sub0N/A
--lowering--.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
--lowering--.f64N/A
Simplified97.8%
Taylor expanded in y around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f6415.1%
Simplified15.1%
Final simplification43.6%
(FPCore (x y z t) :precision binary64 (- (* (+ -1.0 (* y (+ -0.5 (* y -0.3333333333333333)))) (* y z)) t))
double code(double x, double y, double z, double t) {
return ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (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 = (((-1.0d0) + (y * ((-0.5d0) + (y * (-0.3333333333333333d0))))) * (y * z)) - t
end function
public static double code(double x, double y, double z, double t) {
return ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - t;
}
def code(x, y, z, t): return ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - t
function code(x, y, z, t) return Float64(Float64(Float64(-1.0 + Float64(y * Float64(-0.5 + Float64(y * -0.3333333333333333)))) * Float64(y * z)) - t) end
function tmp = code(x, y, z, t) tmp = ((-1.0 + (y * (-0.5 + (y * -0.3333333333333333)))) * (y * z)) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(-1.0 + N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(-1 + y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right) \cdot \left(y \cdot z\right) - t
\end{array}
Initial program 91.6%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.3%
Taylor expanded in z around inf
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6445.9%
Simplified45.9%
Final simplification45.9%
(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 91.6%
sub-negN/A
log1p-defineN/A
log1p-lowering-log1p.f64N/A
neg-sub0N/A
--lowering--.f6499.8%
Applied egg-rr99.8%
Taylor expanded in y around 0
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
metadata-evalN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
sub-negN/A
metadata-evalN/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
*-commutativeN/A
*-lowering-*.f6445.8%
Simplified45.8%
(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 91.6%
sub-negN/A
log1p-defineN/A
log1p-lowering-log1p.f64N/A
neg-sub0N/A
--lowering--.f6499.8%
Applied egg-rr99.8%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
--lowering--.f64N/A
Simplified98.8%
Taylor expanded in y around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f6445.7%
Simplified45.7%
(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 91.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6437.6%
Simplified37.6%
sub0-negN/A
neg-lowering-neg.f6437.6%
Applied egg-rr37.6%
Final simplification37.6%
herbie shell --seed 2024161
(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))