
(FPCore (x y z t) :precision binary64 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
return (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t): return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t) end
function tmp = code(x, y, z, t) tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
return (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t): return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t) end
function tmp = code(x, y, z, t) tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (- (+ (* (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 92.1%
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 (+ -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 * (-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 * ((-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 * (-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 * (-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(Float64(y * Float64(-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 * (-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[(N[(y * N[(-1.0 + N[(y * N[(-0.5 + N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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(\left(y \cdot \left(-1 + y \cdot \left(-0.5 + y \cdot -0.3333333333333333\right)\right)\right) \cdot \left(z + -1\right) + \log y \cdot \left(x + -1\right)\right) - t
\end{array}
Initial program 92.1%
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%
Final simplification99.7%
(FPCore (x y z t) :precision binary64 (if (<= x -1.15e-14) (- (/ (log y) (/ 1.0 (+ x -1.0))) t) (if (<= x 6.4e+19) (- (- (* y (- 1.0 z)) (log y)) t) (- (* x (log y)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.15e-14) {
tmp = (log(y) / (1.0 / (x + -1.0))) - t;
} else if (x <= 6.4e+19) {
tmp = ((y * (1.0 - z)) - log(y)) - t;
} else {
tmp = (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 (x <= (-1.15d-14)) then
tmp = (log(y) / (1.0d0 / (x + (-1.0d0)))) - t
else if (x <= 6.4d+19) then
tmp = ((y * (1.0d0 - z)) - log(y)) - t
else
tmp = (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 (x <= -1.15e-14) {
tmp = (Math.log(y) / (1.0 / (x + -1.0))) - t;
} else if (x <= 6.4e+19) {
tmp = ((y * (1.0 - z)) - Math.log(y)) - t;
} else {
tmp = (x * Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.15e-14: tmp = (math.log(y) / (1.0 / (x + -1.0))) - t elif x <= 6.4e+19: tmp = ((y * (1.0 - z)) - math.log(y)) - t else: tmp = (x * math.log(y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.15e-14) tmp = Float64(Float64(log(y) / Float64(1.0 / Float64(x + -1.0))) - t); elseif (x <= 6.4e+19) tmp = Float64(Float64(Float64(y * Float64(1.0 - z)) - log(y)) - t); else tmp = Float64(Float64(x * log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.15e-14) tmp = (log(y) / (1.0 / (x + -1.0))) - t; elseif (x <= 6.4e+19) tmp = ((y * (1.0 - z)) - log(y)) - t; else tmp = (x * log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.15e-14], N[(N[(N[Log[y], $MachinePrecision] / N[(1.0 / N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[x, 6.4e+19], N[(N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-14}:\\
\;\;\;\;\frac{\log y}{\frac{1}{x + -1}} - t\\
\mathbf{elif}\;x \leq 6.4 \cdot 10^{+19}:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y - t\\
\end{array}
\end{array}
if x < -1.14999999999999999e-14Initial program 97.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-+.f6497.1%
Simplified97.1%
/-rgt-identityN/A
+-commutativeN/A
associate-/r/N/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f6497.2%
Applied egg-rr97.2%
if -1.14999999999999999e-14 < x < 6.4e19Initial program 86.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-+.f6498.8%
Simplified98.8%
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
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.f6498.5%
Simplified98.5%
if 6.4e19 < x Initial program 98.0%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6498.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t) :precision binary64 (if (<= x -4e-15) (- (+ y (* (log y) (+ x -1.0))) t) (if (<= x 6.4e+19) (- (- (* y (- 1.0 z)) (log y)) t) (- (* x (log y)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4e-15) {
tmp = (y + (log(y) * (x + -1.0))) - t;
} else if (x <= 6.4e+19) {
tmp = ((y * (1.0 - z)) - log(y)) - t;
} else {
tmp = (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 (x <= (-4d-15)) then
tmp = (y + (log(y) * (x + (-1.0d0)))) - t
else if (x <= 6.4d+19) then
tmp = ((y * (1.0d0 - z)) - log(y)) - t
else
tmp = (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 (x <= -4e-15) {
tmp = (y + (Math.log(y) * (x + -1.0))) - t;
} else if (x <= 6.4e+19) {
tmp = ((y * (1.0 - z)) - Math.log(y)) - t;
} else {
tmp = (x * Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4e-15: tmp = (y + (math.log(y) * (x + -1.0))) - t elif x <= 6.4e+19: tmp = ((y * (1.0 - z)) - math.log(y)) - t else: tmp = (x * math.log(y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4e-15) tmp = Float64(Float64(y + Float64(log(y) * Float64(x + -1.0))) - t); elseif (x <= 6.4e+19) tmp = Float64(Float64(Float64(y * Float64(1.0 - z)) - log(y)) - t); else tmp = Float64(Float64(x * log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4e-15) tmp = (y + (log(y) * (x + -1.0))) - t; elseif (x <= 6.4e+19) tmp = ((y * (1.0 - z)) - log(y)) - t; else tmp = (x * log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4e-15], N[(N[(y + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[x, 6.4e+19], N[(N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{-15}:\\
\;\;\;\;\left(y + \log y \cdot \left(x + -1\right)\right) - t\\
\mathbf{elif}\;x \leq 6.4 \cdot 10^{+19}:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y - t\\
\end{array}
\end{array}
if x < -4.0000000000000003e-15Initial program 97.4%
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.1%
Simplified99.1%
Taylor expanded in z around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6496.6%
Simplified96.6%
if -4.0000000000000003e-15 < x < 6.4e19Initial program 86.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-+.f6499.1%
Simplified99.1%
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
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.f6498.8%
Simplified98.8%
if 6.4e19 < x Initial program 98.0%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6498.0%
Simplified98.0%
Final simplification98.0%
(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 92.1%
Taylor expanded in y around 0
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x (log y)) t)))
(if (<= t -240000000.0)
t_1
(if (<= t 550000000.0) (* (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 <= -240000000.0) {
tmp = t_1;
} else if (t <= 550000000.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 = (x * log(y)) - t
if (t <= (-240000000.0d0)) then
tmp = t_1
else if (t <= 550000000.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 = (x * Math.log(y)) - t;
double tmp;
if (t <= -240000000.0) {
tmp = t_1;
} else if (t <= 550000000.0) {
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 <= -240000000.0: tmp = t_1 elif t <= 550000000.0: 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 <= -240000000.0) tmp = t_1; elseif (t <= 550000000.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 = (x * log(y)) - t; tmp = 0.0; if (t <= -240000000.0) tmp = t_1; elseif (t <= 550000000.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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t, -240000000.0], t$95$1, If[LessEqual[t, 550000000.0], 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 -240000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 550000000:\\
\;\;\;\;\log y \cdot \left(x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.4e8 or 5.5e8 < t Initial program 97.1%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6496.4%
Simplified96.4%
if -2.4e8 < t < 5.5e8Initial program 87.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.7%
Simplified85.7%
Taylor expanded in t around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6484.8%
Simplified84.8%
Final simplification90.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1
(- (* y (* z (+ -1.0 (* y (+ -0.5 (* y -0.3333333333333333)))))) t)))
(if (<= t -1.32e+14) t_1 (if (<= t 5.1e+57) (* (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 <= -1.32e+14) {
tmp = t_1;
} else if (t <= 5.1e+57) {
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 <= (-1.32d+14)) then
tmp = t_1
else if (t <= 5.1d+57) 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 <= -1.32e+14) {
tmp = t_1;
} else if (t <= 5.1e+57) {
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 <= -1.32e+14: tmp = t_1 elif t <= 5.1e+57: 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 <= -1.32e+14) tmp = t_1; elseif (t <= 5.1e+57) 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 <= -1.32e+14) tmp = t_1; elseif (t <= 5.1e+57) 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, -1.32e+14], t$95$1, If[LessEqual[t, 5.1e+57], 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 -1.32 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+57}:\\
\;\;\;\;\log y \cdot \left(x + -1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.32e14 or 5.10000000000000023e57 < t Initial program 97.8%
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.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
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6478.4%
Simplified78.4%
if -1.32e14 < t < 5.10000000000000023e57Initial program 88.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-+.f6486.0%
Simplified86.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.9%
Simplified83.9%
Final simplification81.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -8.5e+138)
t_1
(if (<= x 2.35e+82)
(- (* 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 <= -8.5e+138) {
tmp = t_1;
} else if (x <= 2.35e+82) {
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 <= (-8.5d+138)) then
tmp = t_1
else if (x <= 2.35d+82) 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 <= -8.5e+138) {
tmp = t_1;
} else if (x <= 2.35e+82) {
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 <= -8.5e+138: tmp = t_1 elif x <= 2.35e+82: 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 <= -8.5e+138) tmp = t_1; elseif (x <= 2.35e+82) 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 <= -8.5e+138) tmp = t_1; elseif (x <= 2.35e+82) 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, -8.5e+138], t$95$1, If[LessEqual[x, 2.35e+82], 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 -8.5 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{+82}:\\
\;\;\;\;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 < -8.5000000000000006e138 or 2.35e82 < x Initial program 99.7%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6481.7%
Simplified81.7%
if -8.5000000000000006e138 < x < 2.35e82Initial program 88.8%
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
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6453.6%
Simplified53.6%
Final simplification62.3%
(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 92.1%
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.2%
Simplified99.2%
Final simplification99.2%
(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 92.1%
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.2%
Simplified99.2%
Taylor expanded in z around inf
Simplified98.9%
Final simplification98.9%
(FPCore (x y z t) :precision binary64 (- (+ y (* (log y) (+ x -1.0))) t))
double code(double x, double y, double z, double t) {
return (y + (log(y) * (x + -1.0))) - t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (y + (log(y) * (x + (-1.0d0)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (y + (Math.log(y) * (x + -1.0))) - t;
}
def code(x, y, z, t): return (y + (math.log(y) * (x + -1.0))) - t
function code(x, y, z, t) return Float64(Float64(y + Float64(log(y) * Float64(x + -1.0))) - t) end
function tmp = code(x, y, z, t) tmp = (y + (log(y) * (x + -1.0))) - t; end
code[x_, y_, z_, t_] := N[(N[(y + N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(y + \log y \cdot \left(x + -1\right)\right) - t
\end{array}
Initial program 92.1%
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.2%
Simplified99.2%
Taylor expanded in z around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6491.1%
Simplified91.1%
(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 92.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-+.f6490.8%
Simplified90.8%
Final simplification90.8%
(FPCore (x y z t) :precision binary64 (if (<= t -0.00065) (- 0.0 t) (if (<= t 7e+39) (* y (- 1.0 z)) (- 0.0 t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -0.00065) {
tmp = 0.0 - t;
} else if (t <= 7e+39) {
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 <= (-0.00065d0)) then
tmp = 0.0d0 - t
else if (t <= 7d+39) 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 <= -0.00065) {
tmp = 0.0 - t;
} else if (t <= 7e+39) {
tmp = y * (1.0 - z);
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -0.00065: tmp = 0.0 - t elif t <= 7e+39: tmp = y * (1.0 - z) else: tmp = 0.0 - t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -0.00065) tmp = Float64(0.0 - t); elseif (t <= 7e+39) 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 <= -0.00065) tmp = 0.0 - t; elseif (t <= 7e+39) tmp = y * (1.0 - z); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -0.00065], N[(0.0 - t), $MachinePrecision], If[LessEqual[t, 7e+39], N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(0.0 - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.00065:\\
\;\;\;\;0 - t\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+39}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < -6.4999999999999997e-4 or 7.0000000000000003e39 < t Initial program 97.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6472.9%
Simplified72.9%
sub0-negN/A
neg-lowering-neg.f6472.9%
Applied egg-rr72.9%
if -6.4999999999999997e-4 < t < 7.0000000000000003e39Initial program 87.5%
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.8%
Simplified98.8%
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--.f6415.2%
Simplified15.2%
Final simplification41.1%
(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 92.1%
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
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6442.6%
Simplified42.6%
Final simplification42.6%
(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 92.1%
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.2%
Simplified99.2%
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--.f6442.6%
Simplified42.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 92.1%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6434.8%
Simplified34.8%
sub0-negN/A
neg-lowering-neg.f6434.8%
Applied egg-rr34.8%
Final simplification34.8%
herbie shell --seed 2024158
(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))