
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
Simplified99.8%
Final simplification99.8%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.9e+23) (not (<= x 2.95e+122))) (+ (* y i) (+ (+ t a) (fma x (log y) z))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.9e+23) || !(x <= 2.95e+122)) {
tmp = (y * i) + ((t + a) + fma(x, log(y), z));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.9e+23) || !(x <= 2.95e+122)) tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + fma(x, log(y), z))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); end return tmp end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.9e+23], N[Not[LessEqual[x, 2.95e+122]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+23} \lor \neg \left(x \leq 2.95 \cdot 10^{+122}\right):\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.90000000000000013e23 or 2.95000000000000016e122 < x Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 97.2%
*-commutative97.2%
Simplified97.2%
if -2.90000000000000013e23 < x < 2.95000000000000016e122Initial program 99.9%
Taylor expanded in x around 0 97.5%
Final simplification97.4%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* x (log y)))))) (* y i)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y)))))) + (y * i);
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = ((log(c) * (b - 0.5d0)) + (a + (t + (z + (x * log(y)))))) + (y * i)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (x * Math.log(y)))))) + (y * i);
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return ((math.log(c) * (b - 0.5)) + (a + (t + (z + (x * math.log(y)))))) + (y * i)
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))) + Float64(y * i)) end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y)))))) + (y * i);
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right) + y \cdot i
\end{array}
Initial program 99.8%
Final simplification99.8%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* b (log c)) (+ a (+ t (+ z (* x (log y))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))));
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))))
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * Math.log(c)) + (a + (t + (z + (x * Math.log(y))))));
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return (y * i) + ((b * math.log(c)) + (a + (t + (z + (x * math.log(y))))))
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y))))))) end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))));
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
y \cdot i + \left(b \cdot \log c + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 97.6%
*-commutative97.6%
Simplified97.6%
Final simplification97.6%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (* a (+ (/ z a) 1.0))))
(t_2 (+ (* x (log y)) (* y i))))
(if (<= x -1.75e+137)
t_2
(if (<= x 6e+41)
t_1
(if (<= x 2.65e+81)
(* z (+ 1.0 (* x (/ (log y) z))))
(if (<= x 6.5e+240) t_1 t_2))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (a * ((z / a) + 1.0));
double t_2 = (x * log(y)) + (y * i);
double tmp;
if (x <= -1.75e+137) {
tmp = t_2;
} else if (x <= 6e+41) {
tmp = t_1;
} else if (x <= 2.65e+81) {
tmp = z * (1.0 + (x * (log(y) / z)));
} else if (x <= 6.5e+240) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * i) + (a * ((z / a) + 1.0d0))
t_2 = (x * log(y)) + (y * i)
if (x <= (-1.75d+137)) then
tmp = t_2
else if (x <= 6d+41) then
tmp = t_1
else if (x <= 2.65d+81) then
tmp = z * (1.0d0 + (x * (log(y) / z)))
else if (x <= 6.5d+240) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (a * ((z / a) + 1.0));
double t_2 = (x * Math.log(y)) + (y * i);
double tmp;
if (x <= -1.75e+137) {
tmp = t_2;
} else if (x <= 6e+41) {
tmp = t_1;
} else if (x <= 2.65e+81) {
tmp = z * (1.0 + (x * (Math.log(y) / z)));
} else if (x <= 6.5e+240) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (a * ((z / a) + 1.0)) t_2 = (x * math.log(y)) + (y * i) tmp = 0 if x <= -1.75e+137: tmp = t_2 elif x <= 6e+41: tmp = t_1 elif x <= 2.65e+81: tmp = z * (1.0 + (x * (math.log(y) / z))) elif x <= 6.5e+240: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(a * Float64(Float64(z / a) + 1.0))) t_2 = Float64(Float64(x * log(y)) + Float64(y * i)) tmp = 0.0 if (x <= -1.75e+137) tmp = t_2; elseif (x <= 6e+41) tmp = t_1; elseif (x <= 2.65e+81) tmp = Float64(z * Float64(1.0 + Float64(x * Float64(log(y) / z)))); elseif (x <= 6.5e+240) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = (y * i) + (a * ((z / a) + 1.0));
t_2 = (x * log(y)) + (y * i);
tmp = 0.0;
if (x <= -1.75e+137)
tmp = t_2;
elseif (x <= 6e+41)
tmp = t_1;
elseif (x <= 2.65e+81)
tmp = z * (1.0 + (x * (log(y) / z)));
elseif (x <= 6.5e+240)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(a * N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.75e+137], t$95$2, If[LessEqual[x, 6e+41], t$95$1, If[LessEqual[x, 2.65e+81], N[(z * N[(1.0 + N[(x * N[(N[Log[y], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e+240], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := y \cdot i + a \cdot \left(\frac{z}{a} + 1\right)\\
t_2 := x \cdot \log y + y \cdot i\\
\mathbf{if}\;x \leq -1.75 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.65 \cdot 10^{+81}:\\
\;\;\;\;z \cdot \left(1 + x \cdot \frac{\log y}{z}\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{+240}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.7500000000000001e137 or 6.50000000000000018e240 < x Initial program 99.6%
Taylor expanded in a around -inf 61.3%
Taylor expanded in x around inf 84.3%
mul-1-neg84.3%
distribute-rgt-neg-in84.3%
Simplified84.3%
Taylor expanded in x around 0 84.3%
if -1.7500000000000001e137 < x < 5.9999999999999997e41 or 2.65000000000000014e81 < x < 6.50000000000000018e240Initial program 99.9%
Taylor expanded in a around -inf 74.2%
Taylor expanded in z around inf 53.4%
if 5.9999999999999997e41 < x < 2.65000000000000014e81Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 63.1%
+-commutative63.1%
associate-/l*63.1%
sub-neg63.1%
metadata-eval63.1%
associate-/l*63.1%
+-commutative63.1%
associate-/l*63.1%
Simplified63.1%
Taylor expanded in x around inf 27.9%
associate-/l*27.9%
Simplified27.9%
Final simplification58.8%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.95e+232) (not (<= x 1.95e+161))) (+ a (+ t (+ z (* x (log y))))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.95e+232) || !(x <= 1.95e+161)) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.95d+232)) .or. (.not. (x <= 1.95d+161))) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (z + t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.95e+232) || !(x <= 1.95e+161)) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.95e+232) or not (x <= 1.95e+161): tmp = a + (t + (z + (x * math.log(y)))) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.95e+232) || !(x <= 1.95e+161)) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -1.95e+232) || ~((x <= 1.95e+161)))
tmp = a + (t + (z + (x * log(y))));
else
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.95e+232], N[Not[LessEqual[x, 1.95e+161]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+232} \lor \neg \left(x \leq 1.95 \cdot 10^{+161}\right):\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.9499999999999999e232 or 1.9500000000000001e161 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around 0 96.2%
if -1.9499999999999999e232 < x < 1.9500000000000001e161Initial program 99.9%
Taylor expanded in x around 0 94.2%
Final simplification94.6%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.1e+27) (not (<= x 1.35e+122))) (+ (* y i) (* x (+ (log y) (/ (+ z (+ t a)) x)))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.1e+27) || !(x <= 1.35e+122)) {
tmp = (y * i) + (x * (log(y) + ((z + (t + a)) / x)));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.1d+27)) .or. (.not. (x <= 1.35d+122))) then
tmp = (y * i) + (x * (log(y) + ((z + (t + a)) / x)))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (z + t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.1e+27) || !(x <= 1.35e+122)) {
tmp = (y * i) + (x * (Math.log(y) + ((z + (t + a)) / x)));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.1e+27) or not (x <= 1.35e+122): tmp = (y * i) + (x * (math.log(y) + ((z + (t + a)) / x))) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.1e+27) || !(x <= 1.35e+122)) tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) + Float64(Float64(z + Float64(t + a)) / x)))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -1.1e+27) || ~((x <= 1.35e+122)))
tmp = (y * i) + (x * (log(y) + ((z + (t + a)) / x)));
else
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.1e+27], N[Not[LessEqual[x, 1.35e+122]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] + N[(N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+27} \lor \neg \left(x \leq 1.35 \cdot 10^{+122}\right):\\
\;\;\;\;y \cdot i + x \cdot \left(\log y + \frac{z + \left(t + a\right)}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.0999999999999999e27 or 1.3499999999999999e122 < x Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in x around -inf 97.2%
mul-1-neg97.2%
distribute-rgt-neg-in97.2%
mul-1-neg97.2%
unsub-neg97.2%
mul-1-neg97.2%
+-commutative97.2%
+-commutative97.2%
associate-+l+97.2%
+-commutative97.2%
Simplified97.2%
if -1.0999999999999999e27 < x < 1.3499999999999999e122Initial program 99.9%
Taylor expanded in x around 0 97.5%
Final simplification97.4%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t (+ z (* x (log y)))))))
(if (<= y 4.8e-26)
t_1
(if (<= y 1.02e-16)
(+ (* y i) (* b (log c)))
(if (<= y 2.4e+100) t_1 (+ (* y i) (* a (+ (/ z a) 1.0))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + (z + (x * log(y))));
double tmp;
if (y <= 4.8e-26) {
tmp = t_1;
} else if (y <= 1.02e-16) {
tmp = (y * i) + (b * log(c));
} else if (y <= 2.4e+100) {
tmp = t_1;
} else {
tmp = (y * i) + (a * ((z / a) + 1.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (t + (z + (x * log(y))))
if (y <= 4.8d-26) then
tmp = t_1
else if (y <= 1.02d-16) then
tmp = (y * i) + (b * log(c))
else if (y <= 2.4d+100) then
tmp = t_1
else
tmp = (y * i) + (a * ((z / a) + 1.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + (z + (x * Math.log(y))));
double tmp;
if (y <= 4.8e-26) {
tmp = t_1;
} else if (y <= 1.02e-16) {
tmp = (y * i) + (b * Math.log(c));
} else if (y <= 2.4e+100) {
tmp = t_1;
} else {
tmp = (y * i) + (a * ((z / a) + 1.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = a + (t + (z + (x * math.log(y)))) tmp = 0 if y <= 4.8e-26: tmp = t_1 elif y <= 1.02e-16: tmp = (y * i) + (b * math.log(c)) elif y <= 2.4e+100: tmp = t_1 else: tmp = (y * i) + (a * ((z / a) + 1.0)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) tmp = 0.0 if (y <= 4.8e-26) tmp = t_1; elseif (y <= 1.02e-16) tmp = Float64(Float64(y * i) + Float64(b * log(c))); elseif (y <= 2.4e+100) tmp = t_1; else tmp = Float64(Float64(y * i) + Float64(a * Float64(Float64(z / a) + 1.0))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = a + (t + (z + (x * log(y))));
tmp = 0.0;
if (y <= 4.8e-26)
tmp = t_1;
elseif (y <= 1.02e-16)
tmp = (y * i) + (b * log(c));
elseif (y <= 2.4e+100)
tmp = t_1;
else
tmp = (y * i) + (a * ((z / a) + 1.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4.8e-26], t$95$1, If[LessEqual[y, 1.02e-16], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+100], t$95$1, N[(N[(y * i), $MachinePrecision] + N[(a * N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{if}\;y \leq 4.8 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-16}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + a \cdot \left(\frac{z}{a} + 1\right)\\
\end{array}
\end{array}
if y < 4.8000000000000002e-26 or 1.0200000000000001e-16 < y < 2.40000000000000012e100Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y around 0 76.2%
if 4.8000000000000002e-26 < y < 1.0200000000000001e-16Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
if 2.40000000000000012e100 < y Initial program 99.8%
Taylor expanded in a around -inf 80.8%
Taylor expanded in z around inf 67.5%
Final simplification74.0%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.95e+232) (not (<= x 4.8e+30))) (+ a (+ t (+ z (* x (log y))))) (+ a (+ t (+ z (+ (* y i) (* -0.5 (log c))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.95e+232) || !(x <= 4.8e+30)) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = a + (t + (z + ((y * i) + (-0.5 * log(c)))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.95d+232)) .or. (.not. (x <= 4.8d+30))) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = a + (t + (z + ((y * i) + ((-0.5d0) * log(c)))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.95e+232) || !(x <= 4.8e+30)) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = a + (t + (z + ((y * i) + (-0.5 * Math.log(c)))));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.95e+232) or not (x <= 4.8e+30): tmp = a + (t + (z + (x * math.log(y)))) else: tmp = a + (t + (z + ((y * i) + (-0.5 * math.log(c))))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.95e+232) || !(x <= 4.8e+30)) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(-0.5 * log(c)))))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -1.95e+232) || ~((x <= 4.8e+30)))
tmp = a + (t + (z + (x * log(y))));
else
tmp = a + (t + (z + ((y * i) + (-0.5 * log(c)))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.95e+232], N[Not[LessEqual[x, 4.8e+30]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+232} \lor \neg \left(x \leq 4.8 \cdot 10^{+30}\right):\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + -0.5 \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.9499999999999999e232 or 4.7999999999999999e30 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in y around 0 86.2%
if -1.9499999999999999e232 < x < 4.7999999999999999e30Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around 0 84.7%
Taylor expanded in x around 0 81.0%
Final simplification82.7%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2e+232) (not (<= x 1.65e+161))) (+ a (+ t (+ z (* x (log y))))) (+ (* y i) (+ (+ z a) (* (+ b -0.5) (log c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2e+232) || !(x <= 1.65e+161)) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = (y * i) + ((z + a) + ((b + -0.5) * log(c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-2d+232)) .or. (.not. (x <= 1.65d+161))) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = (y * i) + ((z + a) + ((b + (-0.5d0)) * log(c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2e+232) || !(x <= 1.65e+161)) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + ((z + a) + ((b + -0.5) * Math.log(c)));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2e+232) or not (x <= 1.65e+161): tmp = a + (t + (z + (x * math.log(y)))) else: tmp = (y * i) + ((z + a) + ((b + -0.5) * math.log(c))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2e+232) || !(x <= 1.65e+161)) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(Float64(z + a) + Float64(Float64(b + -0.5) * log(c)))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -2e+232) || ~((x <= 1.65e+161)))
tmp = a + (t + (z + (x * log(y))));
else
tmp = (y * i) + ((z + a) + ((b + -0.5) * log(c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2e+232], N[Not[LessEqual[x, 1.65e+161]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+232} \lor \neg \left(x \leq 1.65 \cdot 10^{+161}\right):\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(z + a\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if x < -2.00000000000000011e232 or 1.64999999999999999e161 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in y around 0 96.2%
if -2.00000000000000011e232 < x < 1.64999999999999999e161Initial program 99.9%
Taylor expanded in x around 0 94.2%
Taylor expanded in t around 0 79.8%
associate-+r+79.8%
sub-neg79.8%
metadata-eval79.8%
Simplified79.8%
Final simplification83.4%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.6e+137) (not (<= x 6.5e+240))) (+ (* x (log y)) (* y i)) (+ (* y i) (* a (+ (/ z a) 1.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.6e+137) || !(x <= 6.5e+240)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + (a * ((z / a) + 1.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-2.6d+137)) .or. (.not. (x <= 6.5d+240))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + (a * ((z / a) + 1.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.6e+137) || !(x <= 6.5e+240)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + (a * ((z / a) + 1.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.6e+137) or not (x <= 6.5e+240): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + (a * ((z / a) + 1.0)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.6e+137) || !(x <= 6.5e+240)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a * Float64(Float64(z / a) + 1.0))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -2.6e+137) || ~((x <= 6.5e+240)))
tmp = (x * log(y)) + (y * i);
else
tmp = (y * i) + (a * ((z / a) + 1.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.6e+137], N[Not[LessEqual[x, 6.5e+240]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a * N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+137} \lor \neg \left(x \leq 6.5 \cdot 10^{+240}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + a \cdot \left(\frac{z}{a} + 1\right)\\
\end{array}
\end{array}
if x < -2.5999999999999999e137 or 6.50000000000000018e240 < x Initial program 99.6%
Taylor expanded in a around -inf 61.3%
Taylor expanded in x around inf 84.3%
mul-1-neg84.3%
distribute-rgt-neg-in84.3%
Simplified84.3%
Taylor expanded in x around 0 84.3%
if -2.5999999999999999e137 < x < 6.50000000000000018e240Initial program 99.9%
Taylor expanded in a around -inf 74.6%
Taylor expanded in z around inf 52.3%
Final simplification58.9%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -9.5e+232) (not (<= x 1.55e+241))) (* x (log y)) (+ (* y i) (* a (+ (/ z a) 1.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -9.5e+232) || !(x <= 1.55e+241)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (a * ((z / a) + 1.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-9.5d+232)) .or. (.not. (x <= 1.55d+241))) then
tmp = x * log(y)
else
tmp = (y * i) + (a * ((z / a) + 1.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -9.5e+232) || !(x <= 1.55e+241)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (a * ((z / a) + 1.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -9.5e+232) or not (x <= 1.55e+241): tmp = x * math.log(y) else: tmp = (y * i) + (a * ((z / a) + 1.0)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -9.5e+232) || !(x <= 1.55e+241)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(a * Float64(Float64(z / a) + 1.0))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -9.5e+232) || ~((x <= 1.55e+241)))
tmp = x * log(y);
else
tmp = (y * i) + (a * ((z / a) + 1.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -9.5e+232], N[Not[LessEqual[x, 1.55e+241]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a * N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+232} \lor \neg \left(x \leq 1.55 \cdot 10^{+241}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + a \cdot \left(\frac{z}{a} + 1\right)\\
\end{array}
\end{array}
if x < -9.4999999999999996e232 or 1.55e241 < x Initial program 99.5%
Taylor expanded in a around -inf 67.3%
Taylor expanded in x around inf 95.7%
mul-1-neg95.7%
distribute-rgt-neg-in95.7%
Simplified95.7%
Taylor expanded in x around inf 93.0%
*-commutative93.0%
Simplified93.0%
if -9.4999999999999996e232 < x < 1.55e241Initial program 99.9%
Taylor expanded in a around -inf 72.6%
Taylor expanded in z around inf 51.6%
Final simplification57.1%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 5.8e+50) (+ z (* y i)) (+ (* y i) (* a (+ (/ z a) 1.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 5.8e+50) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (a * ((z / a) + 1.0));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 5.8d+50) then
tmp = z + (y * i)
else
tmp = (y * i) + (a * ((z / a) + 1.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 5.8e+50) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (a * ((z / a) + 1.0));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 5.8e+50: tmp = z + (y * i) else: tmp = (y * i) + (a * ((z / a) + 1.0)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 5.8e+50) tmp = Float64(z + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a * Float64(Float64(z / a) + 1.0))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 5.8e+50)
tmp = z + (y * i);
else
tmp = (y * i) + (a * ((z / a) + 1.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 5.8e+50], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a * N[(N[(z / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.8 \cdot 10^{+50}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + a \cdot \left(\frac{z}{a} + 1\right)\\
\end{array}
\end{array}
if a < 5.8e50Initial program 99.8%
Taylor expanded in x around 0 78.2%
Taylor expanded in z around inf 39.8%
if 5.8e50 < a Initial program 99.9%
Taylor expanded in a around -inf 99.7%
Taylor expanded in z around inf 65.7%
Final simplification44.4%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.9e+170) z (if (<= z -8.2e-265) (* y i) a)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.9e+170) {
tmp = z;
} else if (z <= -8.2e-265) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.9d+170)) then
tmp = z
else if (z <= (-8.2d-265)) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.9e+170) {
tmp = z;
} else if (z <= -8.2e-265) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.9e+170: tmp = z elif z <= -8.2e-265: tmp = y * i else: tmp = a return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.9e+170) tmp = z; elseif (z <= -8.2e-265) tmp = Float64(y * i); else tmp = a; end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -1.9e+170)
tmp = z;
elseif (z <= -8.2e-265)
tmp = y * i;
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.9e+170], z, If[LessEqual[z, -8.2e-265], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+170}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-265}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.8999999999999999e170Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 91.6%
*-commutative91.6%
Simplified91.6%
Taylor expanded in z around inf 57.5%
if -1.8999999999999999e170 < z < -8.2e-265Initial program 99.8%
Taylor expanded in x around 0 78.7%
Taylor expanded in y around inf 32.2%
*-commutative32.2%
Simplified32.2%
if -8.2e-265 < z Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 63.1%
+-commutative63.1%
associate-/l*63.0%
sub-neg63.0%
metadata-eval63.0%
associate-/l*63.0%
+-commutative63.0%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in a around inf 18.5%
Final simplification28.1%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.02e+83) (+ z (* y i)) (+ a (+ t (* y i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.02e+83) {
tmp = z + (y * i);
} else {
tmp = a + (t + (y * i));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.02d+83)) then
tmp = z + (y * i)
else
tmp = a + (t + (y * i))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.02e+83) {
tmp = z + (y * i);
} else {
tmp = a + (t + (y * i));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.02e+83: tmp = z + (y * i) else: tmp = a + (t + (y * i)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.02e+83) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(t + Float64(y * i))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -1.02e+83)
tmp = z + (y * i);
else
tmp = a + (t + (y * i));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.02e+83], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+83}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + y \cdot i\right)\\
\end{array}
\end{array}
if z < -1.0200000000000001e83Initial program 99.9%
Taylor expanded in x around 0 88.0%
Taylor expanded in z around inf 67.6%
if -1.0200000000000001e83 < z Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 86.6%
Taylor expanded in i around inf 55.6%
*-commutative55.6%
Simplified55.6%
Final simplification57.9%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -4.5e+171) z (+ a (* y i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -4.5e+171) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-4.5d+171)) then
tmp = z
else
tmp = a + (y * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -4.5e+171) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -4.5e+171: tmp = z else: tmp = a + (y * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -4.5e+171) tmp = z; else tmp = Float64(a + Float64(y * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -4.5e+171)
tmp = z;
else
tmp = a + (y * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -4.5e+171], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+171}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -4.49999999999999969e171Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 91.6%
*-commutative91.6%
Simplified91.6%
Taylor expanded in z around inf 57.5%
if -4.49999999999999969e171 < z Initial program 99.8%
Taylor expanded in a around inf 41.3%
Final simplification43.5%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -6.5e+82) (+ z (* y i)) (+ a (* y i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -6.5e+82) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-6.5d+82)) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -6.5e+82) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -6.5e+82: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -6.5e+82) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -6.5e+82)
tmp = z + (y * i);
else
tmp = a + (y * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -6.5e+82], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+82}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -6.5000000000000003e82Initial program 99.9%
Taylor expanded in x around 0 88.0%
Taylor expanded in z around inf 67.6%
if -6.5000000000000003e82 < z Initial program 99.8%
Taylor expanded in a around inf 41.2%
Final simplification46.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -7.8e+82) z a))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -7.8e+82) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-7.8d+82)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -7.8e+82) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -7.8e+82: tmp = z else: tmp = a return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -7.8e+82) tmp = z; else tmp = a; end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -7.8e+82)
tmp = z;
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -7.8e+82], z, a]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+82}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -7.79999999999999951e82Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in z around inf 42.0%
if -7.79999999999999951e82 < z Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 61.7%
+-commutative61.7%
associate-/l*61.7%
sub-neg61.7%
metadata-eval61.7%
associate-/l*61.7%
+-commutative61.7%
associate-/l*59.2%
Simplified59.2%
Taylor expanded in a around inf 19.0%
Final simplification23.4%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 a)
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return a
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return a end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = a;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
a
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 69.0%
+-commutative69.0%
associate-/l*69.0%
sub-neg69.0%
metadata-eval69.0%
associate-/l*69.0%
+-commutative69.0%
associate-/l*67.0%
Simplified67.0%
Taylor expanded in a around inf 16.6%
Final simplification16.6%
herbie shell --seed 2024085
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
:precision binary64
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))