
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (+ y (fma z (- 1.0 (log t)) (fma b (+ a -0.5) x))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return y + fma(z, (1.0 - log(t)), fma(b, (a + -0.5), x));
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(y + fma(z, Float64(1.0 - log(t)), fma(b, Float64(a + -0.5), x))) end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
y + \mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(b, a + -0.5, x\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in x around 0
associate-+r+N/A
associate--l+N/A
+-commutativeN/A
associate-+r+N/A
associate--l+N/A
lower-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
log-recN/A
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
associate-+r+N/A
Applied rewrites99.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))) (t_2 (+ y (fma b (+ a -0.5) x))))
(if (<= t_1 -4e+130)
t_2
(if (<= t_1 4e+104) (fma z (- 1.0 (log t)) (+ x y)) t_2))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double t_2 = y + fma(b, (a + -0.5), x);
double tmp;
if (t_1 <= -4e+130) {
tmp = t_2;
} else if (t_1 <= 4e+104) {
tmp = fma(z, (1.0 - log(t)), (x + y));
} else {
tmp = t_2;
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) t_2 = Float64(y + fma(b, Float64(a + -0.5), x)) tmp = 0.0 if (t_1 <= -4e+130) tmp = t_2; elseif (t_1 <= 4e+104) tmp = fma(z, Float64(1.0 - log(t)), Float64(x + y)); else tmp = t_2; end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+130], t$95$2, If[LessEqual[t$95$1, 4e+104], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
t_2 := y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+104}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - \log t, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -4.0000000000000002e130 or 4e104 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6492.5
Applied rewrites92.5%
if -4.0000000000000002e130 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4e104Initial program 99.6%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f6494.3
Applied rewrites94.3%
Final simplification93.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (let* ((t_1 (fma z (- 1.0 (log t)) (fma b (+ a -0.5) y)))) (if (<= z -1.6e-5) t_1 (if (<= z 5.2e+96) (+ y (fma b (+ a -0.5) x)) t_1))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (1.0 - log(t)), fma(b, (a + -0.5), y));
double tmp;
if (z <= -1.6e-5) {
tmp = t_1;
} else if (z <= 5.2e+96) {
tmp = y + fma(b, (a + -0.5), x);
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - log(t)), fma(b, Float64(a + -0.5), y)) tmp = 0.0 if (z <= -1.6e-5) tmp = t_1; elseif (z <= 5.2e+96) tmp = Float64(y + fma(b, Float64(a + -0.5), x)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(b * N[(a + -0.5), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e-5], t$95$1, If[LessEqual[z, 5.2e+96], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(b, a + -0.5, y\right)\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+96}:\\
\;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.59999999999999993e-5 or 5.2e96 < z Initial program 99.5%
Taylor expanded in x around 0
*-commutativeN/A
cancel-sign-sub-invN/A
log-recN/A
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-rgt-identityN/A
distribute-lft-inN/A
log-recN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites85.9%
if -1.59999999999999993e-5 < z < 5.2e96Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6497.1
Applied rewrites97.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) -5e-80) (+ (- (+ x z) (* z (log t))) (* a b)) (fma z (- 1.0 (log t)) (fma b (+ a -0.5) y))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -5e-80) {
tmp = ((x + z) - (z * log(t))) + (a * b);
} else {
tmp = fma(z, (1.0 - log(t)), fma(b, (a + -0.5), y));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= -5e-80) tmp = Float64(Float64(Float64(x + z) - Float64(z * log(t))) + Float64(a * b)); else tmp = fma(z, Float64(1.0 - log(t)), fma(b, Float64(a + -0.5), y)); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -5e-80], N[(N[(N[(x + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(b * N[(a + -0.5), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -5 \cdot 10^{-80}:\\
\;\;\;\;\left(\left(x + z\right) - z \cdot \log t\right) + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(b, a + -0.5, y\right)\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -5e-80Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6490.3
Applied rewrites90.3%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f6469.0
Applied rewrites69.0%
if -5e-80 < (+.f64 x y) Initial program 99.7%
Taylor expanded in x around 0
*-commutativeN/A
cancel-sign-sub-invN/A
log-recN/A
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
*-rgt-identityN/A
distribute-lft-inN/A
log-recN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites80.2%
Final simplification75.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- 1.0 (log t))))
(if (<= z -2.55e+127)
(fma z t_1 y)
(if (<= z 1.5e+137) (+ y (fma b (+ a -0.5) x)) (fma z t_1 x)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 - log(t);
double tmp;
if (z <= -2.55e+127) {
tmp = fma(z, t_1, y);
} else if (z <= 1.5e+137) {
tmp = y + fma(b, (a + -0.5), x);
} else {
tmp = fma(z, t_1, x);
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(1.0 - log(t)) tmp = 0.0 if (z <= -2.55e+127) tmp = fma(z, t_1, y); elseif (z <= 1.5e+137) tmp = Float64(y + fma(b, Float64(a + -0.5), x)); else tmp = fma(z, t_1, x); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.55e+127], N[(z * t$95$1 + y), $MachinePrecision], If[LessEqual[z, 1.5e+137], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(z * t$95$1 + x), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 1 - \log t\\
\mathbf{if}\;z \leq -2.55 \cdot 10^{+127}:\\
\;\;\;\;\mathsf{fma}\left(z, t\_1, y\right)\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+137}:\\
\;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, t\_1, x\right)\\
\end{array}
\end{array}
if z < -2.55000000000000019e127Initial program 99.3%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f6487.4
Applied rewrites87.4%
Taylor expanded in x around 0
Applied rewrites73.5%
if -2.55000000000000019e127 < z < 1.5e137Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6492.9
Applied rewrites92.9%
if 1.5e137 < z Initial program 99.6%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f6477.6
Applied rewrites77.6%
Taylor expanded in y around 0
Applied rewrites74.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 (log t)) x)))
(if (<= z -7e+207)
t_1
(if (<= z 1.5e+137) (+ y (fma b (+ a -0.5) x)) t_1))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (1.0 - log(t)), x);
double tmp;
if (z <= -7e+207) {
tmp = t_1;
} else if (z <= 1.5e+137) {
tmp = y + fma(b, (a + -0.5), x);
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - log(t)), x) tmp = 0.0 if (z <= -7e+207) tmp = t_1; elseif (z <= 1.5e+137) tmp = Float64(y + fma(b, Float64(a + -0.5), x)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -7e+207], t$95$1, If[LessEqual[z, 1.5e+137], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - \log t, x\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+137}:\\
\;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.00000000000000056e207 or 1.5e137 < z Initial program 99.5%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f6485.0
Applied rewrites85.0%
Taylor expanded in y around 0
Applied rewrites79.1%
if -7.00000000000000056e207 < z < 1.5e137Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6489.3
Applied rewrites89.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -1.3e+208) (- z (* z (log t))) (if (<= z 1.5e+137) (+ y (fma b (+ a -0.5) x)) (fma (log t) (- z) z))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.3e+208) {
tmp = z - (z * log(t));
} else if (z <= 1.5e+137) {
tmp = y + fma(b, (a + -0.5), x);
} else {
tmp = fma(log(t), -z, z);
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.3e+208) tmp = Float64(z - Float64(z * log(t))); elseif (z <= 1.5e+137) tmp = Float64(y + fma(b, Float64(a + -0.5), x)); else tmp = fma(log(t), Float64(-z), z); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.3e+208], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+137], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[Log[t], $MachinePrecision] * (-z) + z), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+208}:\\
\;\;\;\;z - z \cdot \log t\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+137}:\\
\;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log t, -z, z\right)\\
\end{array}
\end{array}
if z < -1.3e208Initial program 99.5%
Taylor expanded in z around inf
sub-negN/A
log-recN/A
distribute-lft-inN/A
*-rgt-identityN/A
remove-double-negN/A
mul-1-negN/A
sub-negN/A
lower--.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
lower-*.f64N/A
lower-log.f6481.5
Applied rewrites81.5%
if -1.3e208 < z < 1.5e137Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6489.3
Applied rewrites89.3%
if 1.5e137 < z Initial program 99.6%
lift-+.f64N/A
flip-+N/A
clear-numN/A
lower-/.f64N/A
clear-numN/A
flip-+N/A
lift-+.f64N/A
Applied rewrites99.5%
Taylor expanded in z around inf
mul-1-negN/A
log-recN/A
distribute-lft-inN/A
*-rgt-identityN/A
+-commutativeN/A
*-commutativeN/A
log-recN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
lower-log.f64N/A
neg-mul-1N/A
lower-neg.f6466.1
Applied rewrites66.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- z (* z (log t)))))
(if (<= z -1.3e+208)
t_1
(if (<= z 1.5e+137) (+ y (fma b (+ a -0.5) x)) t_1))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z - (z * log(t));
double tmp;
if (z <= -1.3e+208) {
tmp = t_1;
} else if (z <= 1.5e+137) {
tmp = y + fma(b, (a + -0.5), x);
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(z - Float64(z * log(t))) tmp = 0.0 if (z <= -1.3e+208) tmp = t_1; elseif (z <= 1.5e+137) tmp = Float64(y + fma(b, Float64(a + -0.5), x)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+208], t$95$1, If[LessEqual[z, 1.5e+137], N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := z - z \cdot \log t\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+137}:\\
\;\;\;\;y + \mathsf{fma}\left(b, a + -0.5, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3e208 or 1.5e137 < z Initial program 99.5%
Taylor expanded in z around inf
sub-negN/A
log-recN/A
distribute-lft-inN/A
*-rgt-identityN/A
remove-double-negN/A
mul-1-negN/A
sub-negN/A
lower--.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
lower-*.f64N/A
lower-log.f6472.6
Applied rewrites72.6%
if -1.3e208 < z < 1.5e137Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6489.3
Applied rewrites89.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5))) (t_2 (* b (+ a -0.5)))) (if (<= t_1 -2e+142) t_2 (if (<= t_1 1e+123) (+ x y) t_2))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double t_2 = b * (a + -0.5);
double tmp;
if (t_1 <= -2e+142) {
tmp = t_2;
} else if (t_1 <= 1e+123) {
tmp = x + y;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * (a - 0.5d0)
t_2 = b * (a + (-0.5d0))
if (t_1 <= (-2d+142)) then
tmp = t_2
else if (t_1 <= 1d+123) then
tmp = x + y
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double t_2 = b * (a + -0.5);
double tmp;
if (t_1 <= -2e+142) {
tmp = t_2;
} else if (t_1 <= 1e+123) {
tmp = x + y;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) t_2 = b * (a + -0.5) tmp = 0 if t_1 <= -2e+142: tmp = t_2 elif t_1 <= 1e+123: tmp = x + y else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) t_2 = Float64(b * Float64(a + -0.5)) tmp = 0.0 if (t_1 <= -2e+142) tmp = t_2; elseif (t_1 <= 1e+123) tmp = Float64(x + y); else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a - 0.5);
t_2 = b * (a + -0.5);
tmp = 0.0;
if (t_1 <= -2e+142)
tmp = t_2;
elseif (t_1 <= 1e+123)
tmp = x + y;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+142], t$95$2, If[LessEqual[t$95$1, 1e+123], N[(x + y), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
t_2 := b \cdot \left(a + -0.5\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+142}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+123}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.0000000000000001e142 or 9.99999999999999978e122 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
Taylor expanded in b around inf
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6479.1
Applied rewrites79.1%
if -2.0000000000000001e142 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 9.99999999999999978e122Initial program 99.6%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f6493.3
Applied rewrites93.3%
Taylor expanded in z around 0
Applied rewrites56.4%
Final simplification66.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= t_1 -2e+142) (* a b) (if (<= t_1 4e+221) (+ x y) (* a b)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -2e+142) {
tmp = a * b;
} else if (t_1 <= 4e+221) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (t_1 <= (-2d+142)) then
tmp = a * b
else if (t_1 <= 4d+221) then
tmp = x + y
else
tmp = a * b
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -2e+142) {
tmp = a * b;
} else if (t_1 <= 4e+221) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if t_1 <= -2e+142: tmp = a * b elif t_1 <= 4e+221: tmp = x + y else: tmp = a * b return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (t_1 <= -2e+142) tmp = Float64(a * b); elseif (t_1 <= 4e+221) tmp = Float64(x + y); else tmp = Float64(a * b); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a - 0.5);
tmp = 0.0;
if (t_1 <= -2e+142)
tmp = a * b;
elseif (t_1 <= 4e+221)
tmp = x + y;
else
tmp = a * b;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+142], N[(a * b), $MachinePrecision], If[LessEqual[t$95$1, 4e+221], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+142}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+221}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.0000000000000001e142 or 4.0000000000000002e221 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6471.8
Applied rewrites71.8%
if -2.0000000000000001e142 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 4.0000000000000002e221Initial program 99.7%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f6485.5
Applied rewrites85.5%
Taylor expanded in z around 0
Applied rewrites53.7%
Final simplification59.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (+ a -0.5)))) (if (<= b -4.9e+199) t_1 (if (<= b 2.8e+121) (+ (* a b) (+ x y)) t_1))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a + -0.5);
double tmp;
if (b <= -4.9e+199) {
tmp = t_1;
} else if (b <= 2.8e+121) {
tmp = (a * b) + (x + y);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a + (-0.5d0))
if (b <= (-4.9d+199)) then
tmp = t_1
else if (b <= 2.8d+121) then
tmp = (a * b) + (x + y)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a + -0.5);
double tmp;
if (b <= -4.9e+199) {
tmp = t_1;
} else if (b <= 2.8e+121) {
tmp = (a * b) + (x + y);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = b * (a + -0.5) tmp = 0 if b <= -4.9e+199: tmp = t_1 elif b <= 2.8e+121: tmp = (a * b) + (x + y) else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a + -0.5)) tmp = 0.0 if (b <= -4.9e+199) tmp = t_1; elseif (b <= 2.8e+121) tmp = Float64(Float64(a * b) + Float64(x + y)); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = b * (a + -0.5);
tmp = 0.0;
if (b <= -4.9e+199)
tmp = t_1;
elseif (b <= 2.8e+121)
tmp = (a * b) + (x + y);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.9e+199], t$95$1, If[LessEqual[b, 2.8e+121], N[(N[(a * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := b \cdot \left(a + -0.5\right)\\
\mathbf{if}\;b \leq -4.9 \cdot 10^{+199}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+121}:\\
\;\;\;\;a \cdot b + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.89999999999999965e199 or 2.80000000000000006e121 < b Initial program 100.0%
Taylor expanded in b around inf
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6485.7
Applied rewrites85.7%
if -4.89999999999999965e199 < b < 2.80000000000000006e121Initial program 99.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f6494.7
Applied rewrites94.7%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f6466.1
Applied rewrites66.1%
Final simplification70.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (+ y (fma b (+ a -0.5) x)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return y + fma(b, (a + -0.5), x);
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(y + fma(b, Float64(a + -0.5), x)) end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(y + N[(b * N[(a + -0.5), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
y + \mathsf{fma}\left(b, a + -0.5, x\right)
\end{array}
Initial program 99.8%
Taylor expanded in z around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6475.8
Applied rewrites75.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (+ x y))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x + y;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + y
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x + y;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x + y
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x + y) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x + y;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x + y
\end{array}
Initial program 99.8%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f6463.5
Applied rewrites63.5%
Taylor expanded in z around 0
Applied rewrites39.3%
Final simplification39.3%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}
herbie shell --seed 2024220
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))