
(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 x (log y) z) (+ t a)) (+ (* (+ b -0.5) (log c)) (* 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 (fma(x, log(y), z) + (t + a)) + (((b + -0.5) * log(c)) + (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(fma(x, log(y), z) + Float64(t + a)) + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(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[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + 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])\\
\\
\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.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
(let* ((t_1 (* (log c) (- b 0.5))))
(if (or (<= t_1 -1e+233) (not (<= t_1 5e+196)))
(+ (* y i) (+ a (* b (log c))))
(+ (* y i) (+ a (+ 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) {
double t_1 = log(c) * (b - 0.5);
double tmp;
if ((t_1 <= -1e+233) || !(t_1 <= 5e+196)) {
tmp = (y * i) + (a + (b * log(c)));
} else {
tmp = (y * i) + (a + (z + (x * log(y))));
}
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 = log(c) * (b - 0.5d0)
if ((t_1 <= (-1d+233)) .or. (.not. (t_1 <= 5d+196))) then
tmp = (y * i) + (a + (b * log(c)))
else
tmp = (y * i) + (a + (z + (x * log(y))))
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 = Math.log(c) * (b - 0.5);
double tmp;
if ((t_1 <= -1e+233) || !(t_1 <= 5e+196)) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
}
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 = math.log(c) * (b - 0.5) tmp = 0 if (t_1 <= -1e+233) or not (t_1 <= 5e+196): tmp = (y * i) + (a + (b * math.log(c))) else: tmp = (y * i) + (a + (z + (x * math.log(y)))) 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(log(c) * Float64(b - 0.5)) tmp = 0.0 if ((t_1 <= -1e+233) || !(t_1 <= 5e+196)) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); 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 = log(c) * (b - 0.5);
tmp = 0.0;
if ((t_1 <= -1e+233) || ~((t_1 <= 5e+196)))
tmp = (y * i) + (a + (b * log(c)));
else
tmp = (y * i) + (a + (z + (x * log(y))));
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[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+233], N[Not[LessEqual[t$95$1, 5e+196]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $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}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+233} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+196}\right):\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 b 1/2) (log.f64 c)) < -9.99999999999999974e232 or 4.9999999999999998e196 < (*.f64 (-.f64 b 1/2) (log.f64 c)) Initial program 99.6%
Taylor expanded in a around inf 80.4%
Taylor expanded in b around inf 80.4%
*-commutative80.4%
Simplified80.4%
if -9.99999999999999974e232 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 4.9999999999999998e196Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in t around 0 71.4%
Final simplification72.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 -1.5e+102) (+ (+ (fma x (log y) z) (+ t a)) (* y i)) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ t (* 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) {
double tmp;
if (z <= -1.5e+102) {
tmp = (fma(x, log(y), z) + (t + a)) + (y * i);
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (t + (x * log(y)))));
}
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.5e+102) tmp = Float64(Float64(fma(x, log(y), z) + Float64(t + a)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(x * log(y)))))); 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[LessEqual[z, -1.5e+102], N[(N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(x * N[Log[y], $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}\;z \leq -1.5 \cdot 10^{+102}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + x \cdot \log y\right)\right)\right)\\
\end{array}
\end{array}
if z < -1.4999999999999999e102Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 89.2%
*-commutative89.2%
Simplified89.2%
if -1.4999999999999999e102 < z Initial program 99.9%
Taylor expanded in x around inf 91.9%
Final simplification91.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 (<= x -6.4e+165)
(+ (* y i) (+ a (+ z (* x (log y)))))
(if (<= x 3.25e+74)
(+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))
(+ (+ (fma x (log y) z) (+ t 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 (x <= -6.4e+165) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else if (x <= 3.25e+74) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
} else {
tmp = (fma(x, log(y), z) + (t + 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 (x <= -6.4e+165) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); elseif (x <= 3.25e+74) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); else tmp = Float64(Float64(fma(x, log(y), z) + Float64(t + a)) + Float64(y * i)); 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[LessEqual[x, -6.4e+165], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.25e+74], 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], N[(N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+165}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{elif}\;x \leq 3.25 \cdot 10^{+74}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + y \cdot i\\
\end{array}
\end{array}
if x < -6.4e165Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in t around 0 88.7%
if -6.4e165 < x < 3.24999999999999981e74Initial program 99.9%
Taylor expanded in x around 0 97.8%
if 3.24999999999999981e74 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 89.4%
*-commutative89.4%
Simplified89.4%
Final simplification95.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 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5)))))
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) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
}
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) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0)))
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) + ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5)));
}
[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) + ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5)))
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(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5)))) 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) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
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[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $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(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right)
\end{array}
Initial program 99.9%
Final simplification99.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
(let* ((t_1 (* x (log y))))
(if (<= z -6e+231)
(+ (* y i) (+ z t_1))
(if (<= z -6e+102)
(+ (* y i) (+ a (+ z t)))
(if (<= z -6.2e+43)
(+ (* y i) (+ a (* b (log c))))
(if (<= z -1.7e-103)
(+ (* y i) (+ a t_1))
(+ (* y i) (+ a (* (log c) (- b 0.5))))))))))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 = x * log(y);
double tmp;
if (z <= -6e+231) {
tmp = (y * i) + (z + t_1);
} else if (z <= -6e+102) {
tmp = (y * i) + (a + (z + t));
} else if (z <= -6.2e+43) {
tmp = (y * i) + (a + (b * log(c)));
} else if (z <= -1.7e-103) {
tmp = (y * i) + (a + t_1);
} else {
tmp = (y * i) + (a + (log(c) * (b - 0.5)));
}
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 = x * log(y)
if (z <= (-6d+231)) then
tmp = (y * i) + (z + t_1)
else if (z <= (-6d+102)) then
tmp = (y * i) + (a + (z + t))
else if (z <= (-6.2d+43)) then
tmp = (y * i) + (a + (b * log(c)))
else if (z <= (-1.7d-103)) then
tmp = (y * i) + (a + t_1)
else
tmp = (y * i) + (a + (log(c) * (b - 0.5d0)))
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 = x * Math.log(y);
double tmp;
if (z <= -6e+231) {
tmp = (y * i) + (z + t_1);
} else if (z <= -6e+102) {
tmp = (y * i) + (a + (z + t));
} else if (z <= -6.2e+43) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else if (z <= -1.7e-103) {
tmp = (y * i) + (a + t_1);
} else {
tmp = (y * i) + (a + (Math.log(c) * (b - 0.5)));
}
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 = x * math.log(y) tmp = 0 if z <= -6e+231: tmp = (y * i) + (z + t_1) elif z <= -6e+102: tmp = (y * i) + (a + (z + t)) elif z <= -6.2e+43: tmp = (y * i) + (a + (b * math.log(c))) elif z <= -1.7e-103: tmp = (y * i) + (a + t_1) else: tmp = (y * i) + (a + (math.log(c) * (b - 0.5))) 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(x * log(y)) tmp = 0.0 if (z <= -6e+231) tmp = Float64(Float64(y * i) + Float64(z + t_1)); elseif (z <= -6e+102) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); elseif (z <= -6.2e+43) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); elseif (z <= -1.7e-103) tmp = Float64(Float64(y * i) + Float64(a + t_1)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(log(c) * Float64(b - 0.5)))); 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 = x * log(y);
tmp = 0.0;
if (z <= -6e+231)
tmp = (y * i) + (z + t_1);
elseif (z <= -6e+102)
tmp = (y * i) + (a + (z + t));
elseif (z <= -6.2e+43)
tmp = (y * i) + (a + (b * log(c)));
elseif (z <= -1.7e-103)
tmp = (y * i) + (a + t_1);
else
tmp = (y * i) + (a + (log(c) * (b - 0.5)));
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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+231], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6e+102], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e+43], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e-103], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $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}
t_1 := x \cdot \log y\\
\mathbf{if}\;z \leq -6 \cdot 10^{+231}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+102}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{+43}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-103}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \log c \cdot \left(b - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -6.0000000000000003e231Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-define99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 99.7%
Taylor expanded in a around 0 92.9%
if -6.0000000000000003e231 < z < -5.9999999999999996e102Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in x around 0 71.7%
if -5.9999999999999996e102 < z < -6.2000000000000003e43Initial program 99.6%
Taylor expanded in a around inf 74.8%
Taylor expanded in b around inf 74.8%
*-commutative74.8%
Simplified74.8%
if -6.2000000000000003e43 < z < -1.70000000000000001e-103Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-define99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in t around 0 69.4%
Taylor expanded in z around 0 66.6%
+-commutative66.6%
Simplified66.6%
if -1.70000000000000001e-103 < z Initial program 99.9%
Taylor expanded in a around inf 55.3%
Final simplification60.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
(let* ((t_1 (* x (log y))) (t_2 (+ (* y i) (+ a (+ z t)))))
(if (<= x -2.2e+166)
(+ (* y i) (+ a t_1))
(if (<= x -2.9e-259)
t_2
(if (<= x 8.5e-162)
(+ (* y i) (+ a (* b (log c))))
(if (<= x 3e+92) t_2 (+ (* y i) (+ z t_1))))))))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 = x * log(y);
double t_2 = (y * i) + (a + (z + t));
double tmp;
if (x <= -2.2e+166) {
tmp = (y * i) + (a + t_1);
} else if (x <= -2.9e-259) {
tmp = t_2;
} else if (x <= 8.5e-162) {
tmp = (y * i) + (a + (b * log(c)));
} else if (x <= 3e+92) {
tmp = t_2;
} else {
tmp = (y * i) + (z + t_1);
}
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 = x * log(y)
t_2 = (y * i) + (a + (z + t))
if (x <= (-2.2d+166)) then
tmp = (y * i) + (a + t_1)
else if (x <= (-2.9d-259)) then
tmp = t_2
else if (x <= 8.5d-162) then
tmp = (y * i) + (a + (b * log(c)))
else if (x <= 3d+92) then
tmp = t_2
else
tmp = (y * i) + (z + t_1)
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 = x * Math.log(y);
double t_2 = (y * i) + (a + (z + t));
double tmp;
if (x <= -2.2e+166) {
tmp = (y * i) + (a + t_1);
} else if (x <= -2.9e-259) {
tmp = t_2;
} else if (x <= 8.5e-162) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else if (x <= 3e+92) {
tmp = t_2;
} else {
tmp = (y * i) + (z + t_1);
}
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 = x * math.log(y) t_2 = (y * i) + (a + (z + t)) tmp = 0 if x <= -2.2e+166: tmp = (y * i) + (a + t_1) elif x <= -2.9e-259: tmp = t_2 elif x <= 8.5e-162: tmp = (y * i) + (a + (b * math.log(c))) elif x <= 3e+92: tmp = t_2 else: tmp = (y * i) + (z + t_1) 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(x * log(y)) t_2 = Float64(Float64(y * i) + Float64(a + Float64(z + t))) tmp = 0.0 if (x <= -2.2e+166) tmp = Float64(Float64(y * i) + Float64(a + t_1)); elseif (x <= -2.9e-259) tmp = t_2; elseif (x <= 8.5e-162) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); elseif (x <= 3e+92) tmp = t_2; else tmp = Float64(Float64(y * i) + Float64(z + t_1)); 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 = x * log(y);
t_2 = (y * i) + (a + (z + t));
tmp = 0.0;
if (x <= -2.2e+166)
tmp = (y * i) + (a + t_1);
elseif (x <= -2.9e-259)
tmp = t_2;
elseif (x <= 8.5e-162)
tmp = (y * i) + (a + (b * log(c)));
elseif (x <= 3e+92)
tmp = t_2;
else
tmp = (y * i) + (z + t_1);
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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.2e+166], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.9e-259], t$95$2, If[LessEqual[x, 8.5e-162], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e+92], t$95$2, N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $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 := x \cdot \log y\\
t_2 := y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{+166}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-259}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-162}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{elif}\;x \leq 3 \cdot 10^{+92}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\end{array}
\end{array}
if x < -2.1999999999999999e166Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in t around 0 88.7%
Taylor expanded in z around 0 85.6%
+-commutative85.6%
Simplified85.6%
if -2.1999999999999999e166 < x < -2.90000000000000009e-259 or 8.49999999999999955e-162 < x < 3.00000000000000013e92Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in x around 0 78.1%
if -2.90000000000000009e-259 < x < 8.49999999999999955e-162Initial program 99.9%
Taylor expanded in a around inf 82.9%
Taylor expanded in b around inf 72.9%
*-commutative72.9%
Simplified72.9%
if 3.00000000000000013e92 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-define99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in t around 0 84.2%
Taylor expanded in a around 0 72.2%
Final simplification77.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 -6.4e+165) (not (<= x 1.65e+70))) (+ (* y i) (+ a (+ 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 <= -6.4e+165) || !(x <= 1.65e+70)) {
tmp = (y * i) + (a + (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 <= (-6.4d+165)) .or. (.not. (x <= 1.65d+70))) then
tmp = (y * i) + (a + (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 <= -6.4e+165) || !(x <= 1.65e+70)) {
tmp = (y * i) + (a + (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 <= -6.4e+165) or not (x <= 1.65e+70): tmp = (y * i) + (a + (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 <= -6.4e+165) || !(x <= 1.65e+70)) tmp = Float64(Float64(y * i) + Float64(a + 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 <= -6.4e+165) || ~((x <= 1.65e+70)))
tmp = (y * i) + (a + (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, -6.4e+165], N[Not[LessEqual[x, 1.65e+70]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + 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 -6.4 \cdot 10^{+165} \lor \neg \left(x \leq 1.65 \cdot 10^{+70}\right):\\
\;\;\;\;y \cdot i + \left(a + \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 < -6.4e165 or 1.65000000000000008e70 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in t around 0 86.9%
if -6.4e165 < x < 1.65000000000000008e70Initial program 99.9%
Taylor expanded in x around 0 97.8%
Final simplification94.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 (+ (* y i) (+ z (* x (log y))))))
(if (<= a 1.8e-42)
t_1
(if (<= a 1.52e-27)
(+ (* y i) (* (log c) (- b 0.5)))
(if (<= a 4.9e+103) t_1 (+ (* y i) (+ a (* b (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 t_1 = (y * i) + (z + (x * log(y)));
double tmp;
if (a <= 1.8e-42) {
tmp = t_1;
} else if (a <= 1.52e-27) {
tmp = (y * i) + (log(c) * (b - 0.5));
} else if (a <= 4.9e+103) {
tmp = t_1;
} else {
tmp = (y * i) + (a + (b * 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) :: t_1
real(8) :: tmp
t_1 = (y * i) + (z + (x * log(y)))
if (a <= 1.8d-42) then
tmp = t_1
else if (a <= 1.52d-27) then
tmp = (y * i) + (log(c) * (b - 0.5d0))
else if (a <= 4.9d+103) then
tmp = t_1
else
tmp = (y * i) + (a + (b * 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 t_1 = (y * i) + (z + (x * Math.log(y)));
double tmp;
if (a <= 1.8e-42) {
tmp = t_1;
} else if (a <= 1.52e-27) {
tmp = (y * i) + (Math.log(c) * (b - 0.5));
} else if (a <= 4.9e+103) {
tmp = t_1;
} else {
tmp = (y * i) + (a + (b * 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): t_1 = (y * i) + (z + (x * math.log(y))) tmp = 0 if a <= 1.8e-42: tmp = t_1 elif a <= 1.52e-27: tmp = (y * i) + (math.log(c) * (b - 0.5)) elif a <= 4.9e+103: tmp = t_1 else: tmp = (y * i) + (a + (b * 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) t_1 = Float64(Float64(y * i) + Float64(z + Float64(x * log(y)))) tmp = 0.0 if (a <= 1.8e-42) tmp = t_1; elseif (a <= 1.52e-27) tmp = Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5))); elseif (a <= 4.9e+103) tmp = t_1; else tmp = Float64(Float64(y * i) + Float64(a + Float64(b * 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)
t_1 = (y * i) + (z + (x * log(y)));
tmp = 0.0;
if (a <= 1.8e-42)
tmp = t_1;
elseif (a <= 1.52e-27)
tmp = (y * i) + (log(c) * (b - 0.5));
elseif (a <= 4.9e+103)
tmp = t_1;
else
tmp = (y * i) + (a + (b * 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_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.8e-42], t$95$1, If[LessEqual[a, 1.52e-27], N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.9e+103], t$95$1, N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * 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}
t_1 := y \cdot i + \left(z + x \cdot \log y\right)\\
\mathbf{if}\;a \leq 1.8 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.52 \cdot 10^{-27}:\\
\;\;\;\;y \cdot i + \log c \cdot \left(b - 0.5\right)\\
\mathbf{elif}\;a \leq 4.9 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 1.8000000000000001e-42 or 1.52000000000000004e-27 < a < 4.8999999999999999e103Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in t around 0 61.2%
Taylor expanded in a around 0 50.0%
if 1.8000000000000001e-42 < a < 1.52000000000000004e-27Initial program 99.5%
Taylor expanded in a around inf 84.2%
Taylor expanded in a around 0 84.2%
if 4.8999999999999999e103 < a Initial program 99.9%
Taylor expanded in a around inf 64.7%
Taylor expanded in b around inf 64.7%
*-commutative64.7%
Simplified64.7%
Final simplification52.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 (<= (- b 0.5) -2e+75) (not (<= (- b 0.5) 8e+193))) (+ (* y i) (+ a (* b (log c)))) (+ (* y i) (+ 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 (((b - 0.5) <= -2e+75) || !((b - 0.5) <= 8e+193)) {
tmp = (y * i) + (a + (b * log(c)));
} else {
tmp = (y * i) + (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 (((b - 0.5d0) <= (-2d+75)) .or. (.not. ((b - 0.5d0) <= 8d+193))) then
tmp = (y * i) + (a + (b * log(c)))
else
tmp = (y * i) + (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 (((b - 0.5) <= -2e+75) || !((b - 0.5) <= 8e+193)) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else {
tmp = (y * i) + (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 ((b - 0.5) <= -2e+75) or not ((b - 0.5) <= 8e+193): tmp = (y * i) + (a + (b * math.log(c))) else: tmp = (y * i) + (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 ((Float64(b - 0.5) <= -2e+75) || !(Float64(b - 0.5) <= 8e+193)) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + 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 (((b - 0.5) <= -2e+75) || ~(((b - 0.5) <= 8e+193)))
tmp = (y * i) + (a + (b * log(c)));
else
tmp = (y * i) + (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[N[(b - 0.5), $MachinePrecision], -2e+75], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 8e+193]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $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}\;b - 0.5 \leq -2 \cdot 10^{+75} \lor \neg \left(b - 0.5 \leq 8 \cdot 10^{+193}\right):\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -1.99999999999999985e75 or 8.00000000000000053e193 < (-.f64 b 1/2) Initial program 99.7%
Taylor expanded in a around inf 69.4%
Taylor expanded in b around inf 69.4%
*-commutative69.4%
Simplified69.4%
if -1.99999999999999985e75 < (-.f64 b 1/2) < 8.00000000000000053e193Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 92.0%
*-commutative92.0%
Simplified92.0%
Taylor expanded in x around 0 74.2%
Final simplification72.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 -6.4e+165) (not (<= x 1.6e+78))) (+ (* y i) (+ a (+ z (* x (log y))))) (+ (* y i) (+ (+ a (+ z t)) (* b (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 <= -6.4e+165) || !(x <= 1.6e+78)) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else {
tmp = (y * i) + ((a + (z + t)) + (b * 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 <= (-6.4d+165)) .or. (.not. (x <= 1.6d+78))) then
tmp = (y * i) + (a + (z + (x * log(y))))
else
tmp = (y * i) + ((a + (z + t)) + (b * 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 <= -6.4e+165) || !(x <= 1.6e+78)) {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + ((a + (z + t)) + (b * 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 <= -6.4e+165) or not (x <= 1.6e+78): tmp = (y * i) + (a + (z + (x * math.log(y)))) else: tmp = (y * i) + ((a + (z + t)) + (b * 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 <= -6.4e+165) || !(x <= 1.6e+78)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(z + t)) + Float64(b * 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 <= -6.4e+165) || ~((x <= 1.6e+78)))
tmp = (y * i) + (a + (z + (x * log(y))));
else
tmp = (y * i) + ((a + (z + t)) + (b * 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, -6.4e+165], N[Not[LessEqual[x, 1.6e+78]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(b * 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 -6.4 \cdot 10^{+165} \lor \neg \left(x \leq 1.6 \cdot 10^{+78}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(z + t\right)\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if x < -6.4e165 or 1.59999999999999997e78 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-define99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in t around 0 86.9%
if -6.4e165 < x < 1.59999999999999997e78Initial program 99.9%
Taylor expanded in x around 0 97.8%
Taylor expanded in b around inf 92.5%
*-commutative58.2%
Simplified92.5%
Final simplification90.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 (<= b -2.05e+154) (not (<= b 1.6e+236))) (+ (* y i) (* b (log c))) (+ (* y i) (+ 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 ((b <= -2.05e+154) || !(b <= 1.6e+236)) {
tmp = (y * i) + (b * log(c));
} else {
tmp = (y * i) + (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 ((b <= (-2.05d+154)) .or. (.not. (b <= 1.6d+236))) then
tmp = (y * i) + (b * log(c))
else
tmp = (y * i) + (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 ((b <= -2.05e+154) || !(b <= 1.6e+236)) {
tmp = (y * i) + (b * Math.log(c));
} else {
tmp = (y * i) + (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 (b <= -2.05e+154) or not (b <= 1.6e+236): tmp = (y * i) + (b * math.log(c)) else: tmp = (y * i) + (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 ((b <= -2.05e+154) || !(b <= 1.6e+236)) tmp = Float64(Float64(y * i) + Float64(b * log(c))); else tmp = Float64(Float64(y * i) + 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 ((b <= -2.05e+154) || ~((b <= 1.6e+236)))
tmp = (y * i) + (b * log(c));
else
tmp = (y * i) + (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[b, -2.05e+154], N[Not[LessEqual[b, 1.6e+236]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $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}\;b \leq -2.05 \cdot 10^{+154} \lor \neg \left(b \leq 1.6 \cdot 10^{+236}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if b < -2.05e154 or 1.6000000000000001e236 < b Initial program 99.6%
Taylor expanded in a around inf 77.9%
Taylor expanded in b around inf 77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in a around 0 78.1%
if -2.05e154 < b < 1.6000000000000001e236Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in x around 0 71.9%
Final simplification72.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 -4.8e+174) (not (<= x 3.5e+175))) (+ (* y i) (* x (log y))) (+ (* y i) (+ 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 <= -4.8e+174) || !(x <= 3.5e+175)) {
tmp = (y * i) + (x * log(y));
} else {
tmp = (y * i) + (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 <= (-4.8d+174)) .or. (.not. (x <= 3.5d+175))) then
tmp = (y * i) + (x * log(y))
else
tmp = (y * i) + (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 <= -4.8e+174) || !(x <= 3.5e+175)) {
tmp = (y * i) + (x * Math.log(y));
} else {
tmp = (y * i) + (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 <= -4.8e+174) or not (x <= 3.5e+175): tmp = (y * i) + (x * math.log(y)) else: tmp = (y * i) + (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 <= -4.8e+174) || !(x <= 3.5e+175)) tmp = Float64(Float64(y * i) + Float64(x * log(y))); else tmp = Float64(Float64(y * i) + 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 <= -4.8e+174) || ~((x <= 3.5e+175)))
tmp = (y * i) + (x * log(y));
else
tmp = (y * i) + (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, -4.8e+174], N[Not[LessEqual[x, 3.5e+175]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $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 -4.8 \cdot 10^{+174} \lor \neg \left(x \leq 3.5 \cdot 10^{+175}\right):\\
\;\;\;\;y \cdot i + x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if x < -4.7999999999999996e174 or 3.5000000000000003e175 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-define99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in x around inf 79.3%
if -4.7999999999999996e174 < x < 3.5000000000000003e175Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in x around 0 74.6%
Final simplification75.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 (<= b -4.1e+201) (not (<= b 5.5e+236))) (* b (log c)) (+ (* y i) (+ 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 ((b <= -4.1e+201) || !(b <= 5.5e+236)) {
tmp = b * log(c);
} else {
tmp = (y * i) + (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 ((b <= (-4.1d+201)) .or. (.not. (b <= 5.5d+236))) then
tmp = b * log(c)
else
tmp = (y * i) + (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 ((b <= -4.1e+201) || !(b <= 5.5e+236)) {
tmp = b * Math.log(c);
} else {
tmp = (y * i) + (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 (b <= -4.1e+201) or not (b <= 5.5e+236): tmp = b * math.log(c) else: tmp = (y * i) + (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 ((b <= -4.1e+201) || !(b <= 5.5e+236)) tmp = Float64(b * log(c)); else tmp = Float64(Float64(y * i) + 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 ((b <= -4.1e+201) || ~((b <= 5.5e+236)))
tmp = b * log(c);
else
tmp = (y * i) + (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[b, -4.1e+201], N[Not[LessEqual[b, 5.5e+236]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $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}\;b \leq -4.1 \cdot 10^{+201} \lor \neg \left(b \leq 5.5 \cdot 10^{+236}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if b < -4.1000000000000002e201 or 5.5e236 < b Initial program 99.6%
Taylor expanded in x around inf 99.6%
Taylor expanded in x around inf 91.9%
Taylor expanded in y around 0 77.6%
fma-define77.6%
sub-neg77.6%
metadata-eval77.6%
Simplified77.6%
Taylor expanded in b around inf 63.2%
*-commutative63.2%
Simplified63.2%
if -4.1000000000000002e201 < b < 5.5e236Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in x around 0 72.1%
Final simplification70.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 (<= a 1.9e+103) (+ 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 (a <= 1.9e+103) {
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 (a <= 1.9d+103) 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 (a <= 1.9e+103) {
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 a <= 1.9e+103: 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 (a <= 1.9e+103) 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 (a <= 1.9e+103)
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[a, 1.9e+103], 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}\;a \leq 1.9 \cdot 10^{+103}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 1.8999999999999998e103Initial program 99.8%
Taylor expanded in x around 0 82.5%
Taylor expanded in z around inf 33.3%
if 1.8999999999999998e103 < a Initial program 99.9%
Taylor expanded in a around inf 64.7%
Taylor expanded in a around inf 57.4%
Final simplification36.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 (+ (* y i) (+ 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) {
return (y * i) + (a + (z + t));
}
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) + (a + (z + t))
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) + (a + (z + t));
}
[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) + (a + (z + t))
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(a + Float64(z + t))) 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) + (a + (z + t));
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[(a + N[(z + t), $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(a + \left(z + t\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in x around 0 64.6%
Final simplification64.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 (+ (* y i) (+ 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) {
return (y * i) + (z + 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 = (y * i) + (z + 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 (y * i) + (z + 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 (y * i) + (z + 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 Float64(Float64(y * i) + Float64(z + 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 = (y * i) + (z + 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[(N[(y * i), $MachinePrecision] + N[(z + a), $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(z + a\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-define99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in t around 0 64.4%
Taylor expanded in x around 0 47.3%
+-commutative47.3%
Simplified47.3%
Final simplification47.3%
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 (* 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 a + (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 = a + (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 a + (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 a + (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(a + 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 = a + (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[(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])\\
\\
a + y \cdot i
\end{array}
Initial program 99.9%
Taylor expanded in a around inf 54.8%
Taylor expanded in a around inf 37.6%
Final simplification37.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 (* 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 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 = 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 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 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(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 = 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[(y * i), $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
\end{array}
Initial program 99.9%
Taylor expanded in a around inf 54.8%
Taylor expanded in y around inf 22.8%
Final simplification22.8%
herbie shell --seed 2024046
(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)))