
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
double code(double x, double y, double z, double t) {
return (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
def code(x, y, z, t): return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t) end
function tmp = code(x, y, z, t) tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (- (fma y (- 1.0 z) (* (log y) (+ -1.0 x))) t))
double code(double x, double y, double z, double t) {
return fma(y, (1.0 - z), (log(y) * (-1.0 + x))) - t;
}
function code(x, y, z, t) return Float64(fma(y, Float64(1.0 - z), Float64(log(y) * Float64(-1.0 + x))) - t) end
code[x_, y_, z_, t_] := N[(N[(y * N[(1.0 - z), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, 1 - z, \log y \cdot \left(-1 + x\right)\right) - t
\end{array}
Initial program 90.4%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.7
Simplified99.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (log y) x))
(t_2 (+ (* (log y) (+ -1.0 x)) (* (+ z -1.0) (log (- 1.0 y)))))
(t_3 (- (fma y (- z) y) t)))
(if (<= t_2 -1.5e+60)
t_1
(if (<= t_2 590.0)
t_3
(if (<= t_2 695.6) (- (log y)) (if (<= t_2 1e+135) t_3 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double t_2 = (log(y) * (-1.0 + x)) + ((z + -1.0) * log((1.0 - y)));
double t_3 = fma(y, -z, y) - t;
double tmp;
if (t_2 <= -1.5e+60) {
tmp = t_1;
} else if (t_2 <= 590.0) {
tmp = t_3;
} else if (t_2 <= 695.6) {
tmp = -log(y);
} else if (t_2 <= 1e+135) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(log(y) * x) t_2 = Float64(Float64(log(y) * Float64(-1.0 + x)) + Float64(Float64(z + -1.0) * log(Float64(1.0 - y)))) t_3 = Float64(fma(y, Float64(-z), y) - t) tmp = 0.0 if (t_2 <= -1.5e+60) tmp = t_1; elseif (t_2 <= 590.0) tmp = t_3; elseif (t_2 <= 695.6) tmp = Float64(-log(y)); elseif (t_2 <= 1e+135) tmp = t_3; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * (-z) + y), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t$95$2, -1.5e+60], t$95$1, If[LessEqual[t$95$2, 590.0], t$95$3, If[LessEqual[t$95$2, 695.6], (-N[Log[y], $MachinePrecision]), If[LessEqual[t$95$2, 1e+135], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x\\
t_2 := \log y \cdot \left(-1 + x\right) + \left(z + -1\right) \cdot \log \left(1 - y\right)\\
t_3 := \mathsf{fma}\left(y, -z, y\right) - t\\
\mathbf{if}\;t\_2 \leq -1.5 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 590:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 695.6:\\
\;\;\;\;-\log y\\
\mathbf{elif}\;t\_2 \leq 10^{+135}:\\
\;\;\;\;t\_3\\
\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)))) < -1.4999999999999999e60 or 9.99999999999999962e134 < (+.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 97.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6486.3
Simplified86.3%
if -1.4999999999999999e60 < (+.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)))) < 590 or 695.600000000000023 < (+.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)))) < 9.99999999999999962e134Initial program 85.9%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64100.0
Simplified100.0%
Taylor expanded in y around inf
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-neg.f6464.0
Simplified64.0%
if 590 < (+.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)))) < 695.600000000000023Initial program 95.8%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.9
Simplified99.9%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6495.8
Simplified95.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6476.5
Simplified76.5%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f64N/A
lower-log.f6476.5
Simplified76.5%
Final simplification72.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (+ (* (log y) (+ -1.0 x)) (* (+ z -1.0) (log (- 1.0 y)))) t)))
(if (<= t_1 110.0)
(- (- t) (* y z))
(if (<= t_1 1000.0) (- (log y)) (- (fma y (- z) y) t)))))
double code(double x, double y, double z, double t) {
double t_1 = ((log(y) * (-1.0 + x)) + ((z + -1.0) * log((1.0 - y)))) - t;
double tmp;
if (t_1 <= 110.0) {
tmp = -t - (y * z);
} else if (t_1 <= 1000.0) {
tmp = -log(y);
} else {
tmp = fma(y, -z, y) - t;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(Float64(log(y) * Float64(-1.0 + x)) + Float64(Float64(z + -1.0) * log(Float64(1.0 - y)))) - t) tmp = 0.0 if (t_1 <= 110.0) tmp = Float64(Float64(-t) - Float64(y * z)); elseif (t_1 <= 1000.0) tmp = Float64(-log(y)); else tmp = Float64(fma(y, Float64(-z), y) - t); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t$95$1, 110.0], N[((-t) - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1000.0], (-N[Log[y], $MachinePrecision]), N[(N[(y * (-z) + y), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\log y \cdot \left(-1 + x\right) + \left(z + -1\right) \cdot \log \left(1 - y\right)\right) - t\\
\mathbf{if}\;t\_1 \leq 110:\\
\;\;\;\;\left(-t\right) - y \cdot z\\
\mathbf{elif}\;t\_1 \leq 1000:\\
\;\;\;\;-\log y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, -z, y\right) - t\\
\end{array}
\end{array}
if (-.f64 (+.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)))) t) < 110Initial program 93.9%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.8
Simplified99.8%
Taylor expanded in z around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f6450.0
Simplified50.0%
if 110 < (-.f64 (+.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)))) t) < 1e3Initial program 78.0%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.9
Simplified99.9%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6478.0
Simplified78.0%
Taylor expanded in t around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6475.1
Simplified75.1%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f64N/A
lower-log.f6474.7
Simplified74.7%
if 1e3 < (-.f64 (+.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)))) t) Initial program 94.6%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.6
Simplified99.6%
Taylor expanded in y around inf
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-neg.f6451.7
Simplified51.7%
Final simplification56.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (fma (log y) (+ -1.0 x) (- t))))
(if (<= (+ -1.0 x) -1.2)
t_1
(if (<= (+ -1.0 x) -1.0) (- (- y (fma y z (log y))) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma(log(y), (-1.0 + x), -t);
double tmp;
if ((-1.0 + x) <= -1.2) {
tmp = t_1;
} else if ((-1.0 + x) <= -1.0) {
tmp = (y - fma(y, z, log(y))) - t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(log(y), Float64(-1.0 + x), Float64(-t)) tmp = 0.0 if (Float64(-1.0 + x) <= -1.2) tmp = t_1; elseif (Float64(-1.0 + x) <= -1.0) tmp = Float64(Float64(y - fma(y, z, log(y))) - t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision] + (-t)), $MachinePrecision]}, If[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.2], t$95$1, If[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.0], N[(N[(y - N[(y * z + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log y, -1 + x, -t\right)\\
\mathbf{if}\;-1 + x \leq -1.2:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;-1 + x \leq -1:\\
\;\;\;\;\left(y - \mathsf{fma}\left(y, z, \log y\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -1.19999999999999996 or -1 < (-.f64 x #s(literal 1 binary64)) Initial program 94.7%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6494.3
Simplified94.3%
if -1.19999999999999996 < (-.f64 x #s(literal 1 binary64)) < -1Initial program 85.8%
lift--.f64N/A
lift-log.f64N/A
*-commutativeN/A
lift--.f64N/A
flip3--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip3--N/A
lift--.f64N/A
lower-/.f6485.8
lift--.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval85.8
Applied egg-rr85.8%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64100.0
Simplified100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-out--N/A
*-rgt-identityN/A
associate-+l-N/A
lower--.f64N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
lower-log.f64100.0
Simplified100.0%
Final simplification97.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (fma (log y) (+ -1.0 x) (- t))))
(if (<= t -3.7e-7)
t_1
(if (<= t 2.2e-6) (- (fma (log y) (+ -1.0 x) y) (* y z)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma(log(y), (-1.0 + x), -t);
double tmp;
if (t <= -3.7e-7) {
tmp = t_1;
} else if (t <= 2.2e-6) {
tmp = fma(log(y), (-1.0 + x), y) - (y * z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(log(y), Float64(-1.0 + x), Float64(-t)) tmp = 0.0 if (t <= -3.7e-7) tmp = t_1; elseif (t <= 2.2e-6) tmp = Float64(fma(log(y), Float64(-1.0 + x), y) - Float64(y * z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision] + (-t)), $MachinePrecision]}, If[LessEqual[t, -3.7e-7], t$95$1, If[LessEqual[t, 2.2e-6], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision] + y), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log y, -1 + x, -t\right)\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(\log y, -1 + x, y\right) - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.70000000000000004e-7 or 2.2000000000000001e-6 < t Initial program 96.4%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6496.0
Simplified96.0%
if -3.70000000000000004e-7 < t < 2.2000000000000001e-6Initial program 84.4%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.8
Simplified99.8%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-rgt-identityN/A
associate-+r+N/A
+-commutativeN/A
Simplified99.8%
Final simplification97.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (log y) x)))
(if (<= (+ -1.0 x) -2e+57)
t_1
(if (<= (+ -1.0 x) 5e+57) (- (- t) (log y)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double tmp;
if ((-1.0 + x) <= -2e+57) {
tmp = t_1;
} else if ((-1.0 + x) <= 5e+57) {
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 = log(y) * x
if (((-1.0d0) + x) <= (-2d+57)) then
tmp = t_1
else if (((-1.0d0) + x) <= 5d+57) 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 = Math.log(y) * x;
double tmp;
if ((-1.0 + x) <= -2e+57) {
tmp = t_1;
} else if ((-1.0 + x) <= 5e+57) {
tmp = -t - Math.log(y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * x tmp = 0 if (-1.0 + x) <= -2e+57: tmp = t_1 elif (-1.0 + x) <= 5e+57: tmp = -t - math.log(y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(log(y) * x) tmp = 0.0 if (Float64(-1.0 + x) <= -2e+57) tmp = t_1; elseif (Float64(-1.0 + x) <= 5e+57) tmp = Float64(Float64(-t) - log(y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(y) * x; tmp = 0.0; if ((-1.0 + x) <= -2e+57) tmp = t_1; elseif ((-1.0 + x) <= 5e+57) tmp = -t - log(y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[N[(-1.0 + x), $MachinePrecision], -2e+57], t$95$1, If[LessEqual[N[(-1.0 + x), $MachinePrecision], 5e+57], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;-1 + x \leq -2 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;-1 + x \leq 5 \cdot 10^{+57}:\\
\;\;\;\;\left(-t\right) - \log y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -2.0000000000000001e57 or 4.99999999999999972e57 < (-.f64 x #s(literal 1 binary64)) Initial program 95.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6478.8
Simplified78.8%
if -2.0000000000000001e57 < (-.f64 x #s(literal 1 binary64)) < 4.99999999999999972e57Initial program 86.6%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64100.0
Simplified100.0%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6486.6
Simplified86.6%
Taylor expanded in x around 0
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-log.f6480.7
Simplified80.7%
Final simplification79.9%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (* (log y) x) t))) (if (<= x -2.35e+21) t_1 (if (<= x 2.9e-15) (- (- t) (log y)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (log(y) * x) - t;
double tmp;
if (x <= -2.35e+21) {
tmp = t_1;
} else if (x <= 2.9e-15) {
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 = (log(y) * x) - t
if (x <= (-2.35d+21)) then
tmp = t_1
else if (x <= 2.9d-15) 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 = (Math.log(y) * x) - t;
double tmp;
if (x <= -2.35e+21) {
tmp = t_1;
} else if (x <= 2.9e-15) {
tmp = -t - Math.log(y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (math.log(y) * x) - t tmp = 0 if x <= -2.35e+21: tmp = t_1 elif x <= 2.9e-15: tmp = -t - math.log(y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(log(y) * x) - t) tmp = 0.0 if (x <= -2.35e+21) tmp = t_1; elseif (x <= 2.9e-15) tmp = Float64(Float64(-t) - log(y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (log(y) * x) - t; tmp = 0.0; if (x <= -2.35e+21) tmp = t_1; elseif (x <= 2.9e-15) tmp = -t - log(y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[x, -2.35e+21], t$95$1, If[LessEqual[x, 2.9e-15], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x - t\\
\mathbf{if}\;x \leq -2.35 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-15}:\\
\;\;\;\;\left(-t\right) - \log y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.35e21 or 2.90000000000000019e-15 < x Initial program 94.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6492.6
Simplified92.6%
if -2.35e21 < x < 2.90000000000000019e-15Initial program 86.1%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64100.0
Simplified100.0%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6486.1
Simplified86.1%
Taylor expanded in x around 0
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-log.f6485.5
Simplified85.5%
Final simplification89.1%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (- t) (* y z)))) (if (<= t -8.5e+44) t_1 (if (<= t 3.7e+43) (* (log y) (+ -1.0 x)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = -t - (y * z);
double tmp;
if (t <= -8.5e+44) {
tmp = t_1;
} else if (t <= 3.7e+43) {
tmp = log(y) * (-1.0 + x);
} 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 = -t - (y * z)
if (t <= (-8.5d+44)) then
tmp = t_1
else if (t <= 3.7d+43) then
tmp = log(y) * ((-1.0d0) + x)
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 = -t - (y * z);
double tmp;
if (t <= -8.5e+44) {
tmp = t_1;
} else if (t <= 3.7e+43) {
tmp = Math.log(y) * (-1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -t - (y * z) tmp = 0 if t <= -8.5e+44: tmp = t_1 elif t <= 3.7e+43: tmp = math.log(y) * (-1.0 + x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-t) - Float64(y * z)) tmp = 0.0 if (t <= -8.5e+44) tmp = t_1; elseif (t <= 3.7e+43) tmp = Float64(log(y) * Float64(-1.0 + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -t - (y * z); tmp = 0.0; if (t <= -8.5e+44) tmp = t_1; elseif (t <= 3.7e+43) tmp = log(y) * (-1.0 + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-t) - N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+44], t$95$1, If[LessEqual[t, 3.7e+43], N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-t\right) - y \cdot z\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+43}:\\
\;\;\;\;\log y \cdot \left(-1 + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.5e44 or 3.7000000000000001e43 < t Initial program 96.6%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.7
Simplified99.7%
Taylor expanded in z around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f6481.5
Simplified81.5%
if -8.5e44 < t < 3.7000000000000001e43Initial program 86.0%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.8
Simplified99.8%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
lower-neg.f6486.0
Simplified86.0%
Taylor expanded in t around 0
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6481.1
Simplified81.1%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (<= (+ z -1.0) -5e+197) (- (* z (log1p (- y))) t) (fma (log y) (+ -1.0 x) (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z + -1.0) <= -5e+197) {
tmp = (z * log1p(-y)) - t;
} else {
tmp = fma(log(y), (-1.0 + x), -t);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (Float64(z + -1.0) <= -5e+197) tmp = Float64(Float64(z * log1p(Float64(-y))) - t); else tmp = fma(log(y), Float64(-1.0 + x), Float64(-t)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(z + -1.0), $MachinePrecision], -5e+197], N[(N[(z * N[Log[1 + (-y)], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision] + (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z + -1 \leq -5 \cdot 10^{+197}:\\
\;\;\;\;z \cdot \mathsf{log1p}\left(-y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log y, -1 + x, -t\right)\\
\end{array}
\end{array}
if (-.f64 z #s(literal 1 binary64)) < -5.00000000000000009e197Initial program 49.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
lower-log1p.f64N/A
lower-neg.f6469.2
Simplified69.2%
if -5.00000000000000009e197 < (-.f64 z #s(literal 1 binary64)) Initial program 93.7%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f64N/A
lower-neg.f6493.7
Simplified93.7%
Final simplification91.9%
(FPCore (x y z t) :precision binary64 (if (<= t -1950.0) (- t) (if (<= t 0.05) (* y (- 1.0 z)) (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1950.0) {
tmp = -t;
} else if (t <= 0.05) {
tmp = y * (1.0 - 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 <= (-1950.0d0)) then
tmp = -t
else if (t <= 0.05d0) then
tmp = y * (1.0d0 - 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 <= -1950.0) {
tmp = -t;
} else if (t <= 0.05) {
tmp = y * (1.0 - z);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1950.0: tmp = -t elif t <= 0.05: tmp = y * (1.0 - z) else: tmp = -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1950.0) tmp = Float64(-t); elseif (t <= 0.05) tmp = Float64(y * Float64(1.0 - z)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1950.0) tmp = -t; elseif (t <= 0.05) tmp = y * (1.0 - z); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1950.0], (-t), If[LessEqual[t, 0.05], N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision], (-t)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1950:\\
\;\;\;\;-t\\
\mathbf{elif}\;t \leq 0.05:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < -1950 or 0.050000000000000003 < t Initial program 97.0%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6471.5
Simplified71.5%
if -1950 < t < 0.050000000000000003Initial program 84.5%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.8
Simplified99.8%
Taylor expanded in y around inf
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-neg.f6417.0
Simplified17.0%
lift-neg.f64N/A
*-commutativeN/A
distribute-lft1-inN/A
+-commutativeN/A
lift-neg.f64N/A
sub-negN/A
lift--.f64N/A
lower-*.f6417.0
Applied egg-rr17.0%
Final simplification43.0%
(FPCore (x y z t) :precision binary64 (if (<= t -160000.0) (- t) (if (<= t 0.05) (- (* y z)) (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -160000.0) {
tmp = -t;
} else if (t <= 0.05) {
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 <= (-160000.0d0)) then
tmp = -t
else if (t <= 0.05d0) 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 <= -160000.0) {
tmp = -t;
} else if (t <= 0.05) {
tmp = -(y * z);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -160000.0: tmp = -t elif t <= 0.05: tmp = -(y * z) else: tmp = -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -160000.0) tmp = Float64(-t); elseif (t <= 0.05) 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 <= -160000.0) tmp = -t; elseif (t <= 0.05) tmp = -(y * z); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -160000.0], (-t), If[LessEqual[t, 0.05], (-N[(y * z), $MachinePrecision]), (-t)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -160000:\\
\;\;\;\;-t\\
\mathbf{elif}\;t \leq 0.05:\\
\;\;\;\;-y \cdot z\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < -1.6e5 or 0.050000000000000003 < t Initial program 97.0%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6471.5
Simplified71.5%
if -1.6e5 < t < 0.050000000000000003Initial program 84.5%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.8
Simplified99.8%
Taylor expanded in z around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f6416.6
Simplified16.6%
Final simplification42.8%
(FPCore (x y z t) :precision binary64 (- (fma y (- z) y) t))
double code(double x, double y, double z, double t) {
return fma(y, -z, y) - t;
}
function code(x, y, z, t) return Float64(fma(y, Float64(-z), y) - t) end
code[x_, y_, z_, t_] := N[(N[(y * (-z) + y), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, -z, y\right) - t
\end{array}
Initial program 90.4%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.7
Simplified99.7%
Taylor expanded in y around inf
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-neg.f6444.5
Simplified44.5%
(FPCore (x y z t) :precision binary64 (- (- t) (* y z)))
double code(double x, double y, double z, double t) {
return -t - (y * z);
}
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 - (y * z)
end function
public static double code(double x, double y, double z, double t) {
return -t - (y * z);
}
def code(x, y, z, t): return -t - (y * z)
function code(x, y, z, t) return Float64(Float64(-t) - Float64(y * z)) end
function tmp = code(x, y, z, t) tmp = -t - (y * z); end
code[x_, y_, z_, t_] := N[((-t) - N[(y * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-t\right) - y \cdot z
\end{array}
Initial program 90.4%
Taylor expanded in y around 0
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-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
lower--.f64N/A
lower-*.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
lower-+.f6499.7
Simplified99.7%
Taylor expanded in z around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
lower-*.f64N/A
lower-neg.f6444.3
Simplified44.3%
Final simplification44.3%
(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.4%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6435.6
Simplified35.6%
herbie shell --seed 2024207
(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))