
(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 15 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 (/ 1.0 (/ 1.0 (fma (+ x -1.0) (log y) (fma (+ -1.0 z) (log1p (- y)) (- t))))))
double code(double x, double y, double z, double t) {
return 1.0 / (1.0 / fma((x + -1.0), log(y), fma((-1.0 + z), log1p(-y), -t)));
}
function code(x, y, z, t) return Float64(1.0 / Float64(1.0 / fma(Float64(x + -1.0), log(y), fma(Float64(-1.0 + z), log1p(Float64(-y)), Float64(-t))))) end
code[x_, y_, z_, t_] := N[(1.0 / N[(1.0 / N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision] + N[(N[(-1.0 + z), $MachinePrecision] * N[Log[1 + (-y)], $MachinePrecision] + (-t)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{1}{\mathsf{fma}\left(x + -1, \log y, \mathsf{fma}\left(-1 + z, \mathsf{log1p}\left(-y\right), -t\right)\right)}}
\end{array}
Initial program 90.7%
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (* (+ -1.0 z) (log (- 1.0 y))) (* (+ x -1.0) (log y)))))
(if (<= t_1 -500000000.0)
(- (* x (log y)) t)
(if (<= t_1 180.0)
(- (- y (* y z)) t)
(if (<= t_1 1000.0) (- (- t) (log y)) (fma (log y) x (- t)))))))
double code(double x, double y, double z, double t) {
double t_1 = ((-1.0 + z) * log((1.0 - y))) + ((x + -1.0) * log(y));
double tmp;
if (t_1 <= -500000000.0) {
tmp = (x * log(y)) - t;
} else if (t_1 <= 180.0) {
tmp = (y - (y * z)) - t;
} else if (t_1 <= 1000.0) {
tmp = -t - log(y);
} else {
tmp = fma(log(y), x, -t);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(Float64(-1.0 + z) * log(Float64(1.0 - y))) + Float64(Float64(x + -1.0) * log(y))) tmp = 0.0 if (t_1 <= -500000000.0) tmp = Float64(Float64(x * log(y)) - t); elseif (t_1 <= 180.0) tmp = Float64(Float64(y - Float64(y * z)) - t); elseif (t_1 <= 1000.0) tmp = Float64(Float64(-t) - log(y)); else tmp = fma(log(y), x, Float64(-t)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(-1.0 + z), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -500000000.0], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 180.0], N[(N[(y - N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 1000.0], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x + (-t)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-1 + z\right) \cdot \log \left(1 - y\right) + \left(x + -1\right) \cdot \log y\\
\mathbf{if}\;t\_1 \leq -500000000:\\
\;\;\;\;x \cdot \log y - t\\
\mathbf{elif}\;t\_1 \leq 180:\\
\;\;\;\;\left(y - y \cdot z\right) - t\\
\mathbf{elif}\;t\_1 \leq 1000:\\
\;\;\;\;\left(-t\right) - \log y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, -t\right)\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < -5e8Initial program 95.2%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6493.9
Simplified93.9%
if -5e8 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 180Initial program 60.9%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64100.0
Simplified100.0%
Taylor expanded in y around inf
distribute-rgt-out--N/A
*-lft-identityN/A
*-commutativeN/A
--lowering--.f64N/A
*-lowering-*.f6475.9
Simplified75.9%
if 180 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 1e3Initial program 92.0%
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
Applied egg-rr99.8%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6492.0
Simplified92.0%
Taylor expanded in x around 0
sub-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
neg-lowering-neg.f64N/A
log-lowering-log.f6491.1
Simplified91.1%
if 1e3 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) Initial program 96.0%
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
Applied egg-rr99.4%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6495.6
Simplified95.6%
Taylor expanded in x around inf
Simplified93.7%
Final simplification91.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x (log y)) t))
(t_2 (+ (* (+ -1.0 z) (log (- 1.0 y))) (* (+ x -1.0) (log y)))))
(if (<= t_2 -500000000.0)
t_1
(if (<= t_2 180.0)
(- (- y (* y z)) t)
(if (<= t_2 1000.0) (- (- t) (log y)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - t;
double t_2 = ((-1.0 + z) * log((1.0 - y))) + ((x + -1.0) * log(y));
double tmp;
if (t_2 <= -500000000.0) {
tmp = t_1;
} else if (t_2 <= 180.0) {
tmp = (y - (y * z)) - t;
} else if (t_2 <= 1000.0) {
tmp = -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) :: t_2
real(8) :: tmp
t_1 = (x * log(y)) - t
t_2 = (((-1.0d0) + z) * log((1.0d0 - y))) + ((x + (-1.0d0)) * log(y))
if (t_2 <= (-500000000.0d0)) then
tmp = t_1
else if (t_2 <= 180.0d0) then
tmp = (y - (y * z)) - t
else if (t_2 <= 1000.0d0) then
tmp = -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 t_2 = ((-1.0 + z) * Math.log((1.0 - y))) + ((x + -1.0) * Math.log(y));
double tmp;
if (t_2 <= -500000000.0) {
tmp = t_1;
} else if (t_2 <= 180.0) {
tmp = (y - (y * z)) - t;
} else if (t_2 <= 1000.0) {
tmp = -t - Math.log(y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * math.log(y)) - t t_2 = ((-1.0 + z) * math.log((1.0 - y))) + ((x + -1.0) * math.log(y)) tmp = 0 if t_2 <= -500000000.0: tmp = t_1 elif t_2 <= 180.0: tmp = (y - (y * z)) - t elif t_2 <= 1000.0: tmp = -t - math.log(y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - t) t_2 = Float64(Float64(Float64(-1.0 + z) * log(Float64(1.0 - y))) + Float64(Float64(x + -1.0) * log(y))) tmp = 0.0 if (t_2 <= -500000000.0) tmp = t_1; elseif (t_2 <= 180.0) tmp = Float64(Float64(y - Float64(y * z)) - t); elseif (t_2 <= 1000.0) tmp = Float64(Float64(-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; t_2 = ((-1.0 + z) * log((1.0 - y))) + ((x + -1.0) * log(y)); tmp = 0.0; if (t_2 <= -500000000.0) tmp = t_1; elseif (t_2 <= 180.0) tmp = (y - (y * z)) - t; elseif (t_2 <= 1000.0) tmp = -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]}, Block[{t$95$2 = N[(N[(N[(-1.0 + z), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -500000000.0], t$95$1, If[LessEqual[t$95$2, 180.0], N[(N[(y - N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$2, 1000.0], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y - t\\
t_2 := \left(-1 + z\right) \cdot \log \left(1 - y\right) + \left(x + -1\right) \cdot \log y\\
\mathbf{if}\;t\_2 \leq -500000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 180:\\
\;\;\;\;\left(y - y \cdot z\right) - t\\
\mathbf{elif}\;t\_2 \leq 1000:\\
\;\;\;\;\left(-t\right) - \log y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < -5e8 or 1e3 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) Initial program 95.6%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6493.8
Simplified93.8%
if -5e8 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 180Initial program 60.9%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64100.0
Simplified100.0%
Taylor expanded in y around inf
distribute-rgt-out--N/A
*-lft-identityN/A
*-commutativeN/A
--lowering--.f64N/A
*-lowering-*.f6475.9
Simplified75.9%
if 180 < (+.f64 (*.f64 (-.f64 x #s(literal 1 binary64)) (log.f64 y)) (*.f64 (-.f64 z #s(literal 1 binary64)) (log.f64 (-.f64 #s(literal 1 binary64) y)))) < 1e3Initial program 92.0%
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
Applied egg-rr99.8%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6492.0
Simplified92.0%
Taylor expanded in x around 0
sub-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
neg-lowering-neg.f64N/A
log-lowering-log.f6491.1
Simplified91.1%
Final simplification91.0%
(FPCore (x y z t)
:precision binary64
(if (<= (+ x -1.0) -1.0000001)
(fma (log y) (+ x -1.0) (- t))
(if (<= (+ x -1.0) 500000.0)
(- (fma y (- 1.0 z) (- (log y))) t)
(- (fma (log y) (+ x -1.0) y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x + -1.0) <= -1.0000001) {
tmp = fma(log(y), (x + -1.0), -t);
} else if ((x + -1.0) <= 500000.0) {
tmp = fma(y, (1.0 - z), -log(y)) - t;
} else {
tmp = fma(log(y), (x + -1.0), y) - t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (Float64(x + -1.0) <= -1.0000001) tmp = fma(log(y), Float64(x + -1.0), Float64(-t)); elseif (Float64(x + -1.0) <= 500000.0) tmp = Float64(fma(y, Float64(1.0 - z), Float64(-log(y))) - t); else tmp = Float64(fma(log(y), Float64(x + -1.0), y) - t); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(x + -1.0), $MachinePrecision], -1.0000001], N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision] + (-t)), $MachinePrecision], If[LessEqual[N[(x + -1.0), $MachinePrecision], 500000.0], N[(N[(y * N[(1.0 - z), $MachinePrecision] + (-N[Log[y], $MachinePrecision])), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision] + y), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + -1 \leq -1.0000001:\\
\;\;\;\;\mathsf{fma}\left(\log y, x + -1, -t\right)\\
\mathbf{elif}\;x + -1 \leq 500000:\\
\;\;\;\;\mathsf{fma}\left(y, 1 - z, -\log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x + -1, y\right) - t\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -1.00000010000000006Initial program 96.6%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6496.6
Simplified96.6%
if -1.00000010000000006 < (-.f64 x #s(literal 1 binary64)) < 5e5Initial program 84.4%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6499.6
Simplified99.6%
Taylor expanded in x around 0
mul-1-negN/A
neg-lowering-neg.f64N/A
log-lowering-log.f6499.3
Simplified99.3%
if 5e5 < (-.f64 x #s(literal 1 binary64)) Initial program 95.7%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6499.8
Simplified99.8%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6495.7
Simplified95.7%
Final simplification97.6%
(FPCore (x y z t)
:precision binary64
(if (<= (+ -1.0 z) -2e+241)
(- (fma y z t))
(if (<= (+ -1.0 z) 2e+224)
(- (fma (log y) (+ x -1.0) y) t)
(- (* z (* y (fma y -0.5 -1.0))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((-1.0 + z) <= -2e+241) {
tmp = -fma(y, z, t);
} else if ((-1.0 + z) <= 2e+224) {
tmp = fma(log(y), (x + -1.0), y) - t;
} else {
tmp = (z * (y * fma(y, -0.5, -1.0))) - t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (Float64(-1.0 + z) <= -2e+241) tmp = Float64(-fma(y, z, t)); elseif (Float64(-1.0 + z) <= 2e+224) tmp = Float64(fma(log(y), Float64(x + -1.0), y) - t); else tmp = Float64(Float64(z * Float64(y * fma(y, -0.5, -1.0))) - t); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(-1.0 + z), $MachinePrecision], -2e+241], (-N[(y * z + t), $MachinePrecision]), If[LessEqual[N[(-1.0 + z), $MachinePrecision], 2e+224], N[(N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision] + y), $MachinePrecision] - t), $MachinePrecision], N[(N[(z * N[(y * N[(y * -0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + z \leq -2 \cdot 10^{+241}:\\
\;\;\;\;-\mathsf{fma}\left(y, z, t\right)\\
\mathbf{elif}\;-1 + z \leq 2 \cdot 10^{+224}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x + -1, y\right) - t\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot \mathsf{fma}\left(y, -0.5, -1\right)\right) - t\\
\end{array}
\end{array}
if (-.f64 z #s(literal 1 binary64)) < -2.0000000000000001e241Initial program 32.3%
Taylor expanded in z around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6481.2
Simplified81.2%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
distribute-neg-outN/A
neg-lowering-neg.f64N/A
accelerator-lowering-fma.f6481.2
Simplified81.2%
if -2.0000000000000001e241 < (-.f64 z #s(literal 1 binary64)) < 1.99999999999999994e224Initial program 96.8%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6499.8
Simplified99.8%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6496.7
Simplified96.7%
if 1.99999999999999994e224 < (-.f64 z #s(literal 1 binary64)) Initial program 52.9%
Taylor expanded in z around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6476.7
Simplified76.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6476.7
Simplified76.7%
Final simplification94.4%
(FPCore (x y z t)
:precision binary64
(if (<= (+ -1.0 z) -2e+241)
(- (fma y z t))
(if (<= (+ -1.0 z) 2e+224)
(fma (log y) (+ x -1.0) (- t))
(- (* z (* y (fma y -0.5 -1.0))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((-1.0 + z) <= -2e+241) {
tmp = -fma(y, z, t);
} else if ((-1.0 + z) <= 2e+224) {
tmp = fma(log(y), (x + -1.0), -t);
} else {
tmp = (z * (y * fma(y, -0.5, -1.0))) - t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (Float64(-1.0 + z) <= -2e+241) tmp = Float64(-fma(y, z, t)); elseif (Float64(-1.0 + z) <= 2e+224) tmp = fma(log(y), Float64(x + -1.0), Float64(-t)); else tmp = Float64(Float64(z * Float64(y * fma(y, -0.5, -1.0))) - t); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(-1.0 + z), $MachinePrecision], -2e+241], (-N[(y * z + t), $MachinePrecision]), If[LessEqual[N[(-1.0 + z), $MachinePrecision], 2e+224], N[(N[Log[y], $MachinePrecision] * N[(x + -1.0), $MachinePrecision] + (-t)), $MachinePrecision], N[(N[(z * N[(y * N[(y * -0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + z \leq -2 \cdot 10^{+241}:\\
\;\;\;\;-\mathsf{fma}\left(y, z, t\right)\\
\mathbf{elif}\;-1 + z \leq 2 \cdot 10^{+224}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x + -1, -t\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot \mathsf{fma}\left(y, -0.5, -1\right)\right) - t\\
\end{array}
\end{array}
if (-.f64 z #s(literal 1 binary64)) < -2.0000000000000001e241Initial program 32.3%
Taylor expanded in z around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6481.2
Simplified81.2%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
distribute-neg-outN/A
neg-lowering-neg.f64N/A
accelerator-lowering-fma.f6481.2
Simplified81.2%
if -2.0000000000000001e241 < (-.f64 z #s(literal 1 binary64)) < 1.99999999999999994e224Initial program 96.8%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6496.5
Simplified96.5%
if 1.99999999999999994e224 < (-.f64 z #s(literal 1 binary64)) Initial program 52.9%
Taylor expanded in z around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6476.7
Simplified76.7%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6476.7
Simplified76.7%
Final simplification94.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= (+ x -1.0) -5e+55)
t_1
(if (<= (+ x -1.0) 1e+49) (- (- 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 + -1.0) <= -5e+55) {
tmp = t_1;
} else if ((x + -1.0) <= 1e+49) {
tmp = -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 + (-1.0d0)) <= (-5d+55)) then
tmp = t_1
else if ((x + (-1.0d0)) <= 1d+49) then
tmp = -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 + -1.0) <= -5e+55) {
tmp = t_1;
} else if ((x + -1.0) <= 1e+49) {
tmp = -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 + -1.0) <= -5e+55: tmp = t_1 elif (x + -1.0) <= 1e+49: tmp = -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 (Float64(x + -1.0) <= -5e+55) tmp = t_1; elseif (Float64(x + -1.0) <= 1e+49) tmp = Float64(Float64(-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 + -1.0) <= -5e+55) tmp = t_1; elseif ((x + -1.0) <= 1e+49) tmp = -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[N[(x + -1.0), $MachinePrecision], -5e+55], t$95$1, If[LessEqual[N[(x + -1.0), $MachinePrecision], 1e+49], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x + -1 \leq -5 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x + -1 \leq 10^{+49}:\\
\;\;\;\;\left(-t\right) - \log y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -5.00000000000000046e55 or 9.99999999999999946e48 < (-.f64 x #s(literal 1 binary64)) Initial program 97.2%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6474.5
Simplified74.5%
if -5.00000000000000046e55 < (-.f64 x #s(literal 1 binary64)) < 9.99999999999999946e48Initial program 85.2%
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
Applied egg-rr99.8%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6484.3
Simplified84.3%
Taylor expanded in x around 0
sub-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
neg-lowering-neg.f64N/A
log-lowering-log.f6479.0
Simplified79.0%
Final simplification76.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= (+ x -1.0) -5e+55)
t_1
(if (<= (+ x -1.0) 1e+49)
(- (* z (* y (fma y (fma y -0.3333333333333333 -0.5) -1.0))) t)
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if ((x + -1.0) <= -5e+55) {
tmp = t_1;
} else if ((x + -1.0) <= 1e+49) {
tmp = (z * (y * fma(y, fma(y, -0.3333333333333333, -0.5), -1.0))) - t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (Float64(x + -1.0) <= -5e+55) tmp = t_1; elseif (Float64(x + -1.0) <= 1e+49) tmp = Float64(Float64(z * Float64(y * fma(y, fma(y, -0.3333333333333333, -0.5), -1.0))) - t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x + -1.0), $MachinePrecision], -5e+55], t$95$1, If[LessEqual[N[(x + -1.0), $MachinePrecision], 1e+49], N[(N[(z * N[(y * N[(y * N[(y * -0.3333333333333333 + -0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x + -1 \leq -5 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x + -1 \leq 10^{+49}:\\
\;\;\;\;z \cdot \left(y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.3333333333333333, -0.5\right), -1\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -5.00000000000000046e55 or 9.99999999999999946e48 < (-.f64 x #s(literal 1 binary64)) Initial program 97.2%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6474.5
Simplified74.5%
if -5.00000000000000046e55 < (-.f64 x #s(literal 1 binary64)) < 9.99999999999999946e48Initial program 85.2%
Taylor expanded in z around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6467.5
Simplified67.5%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6467.5
Simplified67.5%
Final simplification70.7%
(FPCore (x y z t)
:precision binary64
(if (<= t -8.2e+64)
(- (fma y z t))
(if (<= t 4.1e+20)
(* (+ x -1.0) (log y))
(- (* z (* y (fma y -0.5 -1.0))) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.2e+64) {
tmp = -fma(y, z, t);
} else if (t <= 4.1e+20) {
tmp = (x + -1.0) * log(y);
} else {
tmp = (z * (y * fma(y, -0.5, -1.0))) - t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (t <= -8.2e+64) tmp = Float64(-fma(y, z, t)); elseif (t <= 4.1e+20) tmp = Float64(Float64(x + -1.0) * log(y)); else tmp = Float64(Float64(z * Float64(y * fma(y, -0.5, -1.0))) - t); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[t, -8.2e+64], (-N[(y * z + t), $MachinePrecision]), If[LessEqual[t, 4.1e+20], N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(y * N[(y * -0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+64}:\\
\;\;\;\;-\mathsf{fma}\left(y, z, t\right)\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+20}:\\
\;\;\;\;\left(x + -1\right) \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot \mathsf{fma}\left(y, -0.5, -1\right)\right) - t\\
\end{array}
\end{array}
if t < -8.19999999999999956e64Initial program 89.8%
Taylor expanded in z around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6493.7
Simplified93.7%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
distribute-neg-outN/A
neg-lowering-neg.f64N/A
accelerator-lowering-fma.f6493.7
Simplified93.7%
if -8.19999999999999956e64 < t < 4.1e20Initial program 89.2%
flip--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
Applied egg-rr99.6%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
neg-lowering-neg.f6488.8
Simplified88.8%
Taylor expanded in t around 0
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6482.0
Simplified82.0%
if 4.1e20 < t Initial program 94.6%
Taylor expanded in z around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6477.3
Simplified77.3%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6477.3
Simplified77.3%
Final simplification83.3%
(FPCore (x y z t) :precision binary64 (- (fma y (- 1.0 z) (* (+ x -1.0) (log y))) t))
double code(double x, double y, double z, double t) {
return fma(y, (1.0 - z), ((x + -1.0) * log(y))) - t;
}
function code(x, y, z, t) return Float64(fma(y, Float64(1.0 - z), Float64(Float64(x + -1.0) * log(y))) - t) end
code[x_, y_, z_, t_] := N[(N[(y * N[(1.0 - z), $MachinePrecision] + N[(N[(x + -1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, 1 - z, \left(x + -1\right) \cdot \log y\right) - t
\end{array}
Initial program 90.7%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6499.6
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t) :precision binary64 (if (<= t -2.9e-57) (- t) (if (<= t 7.2e+20) (- (* y z)) (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.9e-57) {
tmp = -t;
} else if (t <= 7.2e+20) {
tmp = -(y * z);
} else {
tmp = -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 <= (-2.9d-57)) then
tmp = -t
else if (t <= 7.2d+20) then
tmp = -(y * z)
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.9e-57) {
tmp = -t;
} else if (t <= 7.2e+20) {
tmp = -(y * z);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.9e-57: tmp = -t elif t <= 7.2e+20: tmp = -(y * z) else: tmp = -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.9e-57) tmp = Float64(-t); elseif (t <= 7.2e+20) tmp = Float64(-Float64(y * z)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2.9e-57) tmp = -t; elseif (t <= 7.2e+20) tmp = -(y * z); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.9e-57], (-t), If[LessEqual[t, 7.2e+20], (-N[(y * z), $MachinePrecision]), (-t)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-57}:\\
\;\;\;\;-t\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+20}:\\
\;\;\;\;-y \cdot z\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < -2.90000000000000025e-57 or 7.2e20 < t Initial program 94.5%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6468.1
Simplified68.1%
if -2.90000000000000025e-57 < t < 7.2e20Initial program 85.8%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6499.7
Simplified99.7%
Taylor expanded in z around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-lowering-neg.f6416.2
Simplified16.2%
Final simplification45.4%
(FPCore (x y z t) :precision binary64 (- (* z (* y (fma y -0.5 -1.0))) t))
double code(double x, double y, double z, double t) {
return (z * (y * fma(y, -0.5, -1.0))) - t;
}
function code(x, y, z, t) return Float64(Float64(z * Float64(y * fma(y, -0.5, -1.0))) - t) end
code[x_, y_, z_, t_] := N[(N[(z * N[(y * N[(y * -0.5 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(y \cdot \mathsf{fma}\left(y, -0.5, -1\right)\right) - t
\end{array}
Initial program 90.7%
Taylor expanded in z around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6449.1
Simplified49.1%
Taylor expanded in y around 0
*-lowering-*.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
accelerator-lowering-fma.f6449.1
Simplified49.1%
Final simplification49.1%
(FPCore (x y z t) :precision binary64 (- (- y (* y z)) t))
double code(double x, double y, double z, double t) {
return (y - (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 = (y - (y * z)) - t
end function
public static double code(double x, double y, double z, double t) {
return (y - (y * z)) - t;
}
def code(x, y, z, t): return (y - (y * z)) - t
function code(x, y, z, t) return Float64(Float64(y - Float64(y * z)) - t) end
function tmp = code(x, y, z, t) tmp = (y - (y * z)) - t; end
code[x_, y_, z_, t_] := N[(N[(y - N[(y * z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(y - y \cdot z\right) - t
\end{array}
Initial program 90.7%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6499.6
Simplified99.6%
Taylor expanded in y around inf
distribute-rgt-out--N/A
*-lft-identityN/A
*-commutativeN/A
--lowering--.f64N/A
*-lowering-*.f6449.1
Simplified49.1%
(FPCore (x y z t) :precision binary64 (- (fma y z t)))
double code(double x, double y, double z, double t) {
return -fma(y, z, t);
}
function code(x, y, z, t) return Float64(-fma(y, z, t)) end
code[x_, y_, z_, t_] := (-N[(y * z + t), $MachinePrecision])
\begin{array}{l}
\\
-\mathsf{fma}\left(y, z, t\right)
\end{array}
Initial program 90.7%
Taylor expanded in z around inf
*-commutativeN/A
*-lowering-*.f64N/A
sub-negN/A
accelerator-lowering-log1p.f64N/A
neg-lowering-neg.f6449.1
Simplified49.1%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
distribute-neg-outN/A
neg-lowering-neg.f64N/A
accelerator-lowering-fma.f6449.0
Simplified49.0%
(FPCore (x y z t) :precision binary64 (- t))
double code(double x, double y, double z, double t) {
return -t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -t
end function
public static double code(double x, double y, double z, double t) {
return -t;
}
def code(x, y, z, t): return -t
function code(x, y, z, t) return Float64(-t) end
function tmp = code(x, y, z, t) tmp = -t; end
code[x_, y_, z_, t_] := (-t)
\begin{array}{l}
\\
-t
\end{array}
Initial program 90.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6439.8
Simplified39.8%
herbie shell --seed 2024205
(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))