
(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 22 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.4%
associate-+l+99.4%
+-commutative99.4%
associate-+l+99.4%
associate-+r+99.4%
+-commutative99.4%
+-commutative99.4%
associate-+l+99.4%
associate-+l+99.4%
+-commutative99.4%
fma-define99.4%
+-commutative99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
+-commutative99.4%
Simplified99.4%
Final simplification99.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 (* x (log y))))
(if (<= (- b 0.5) -2e+137)
(+ (* y i) (+ t (+ a (fma (log c) (+ b -0.5) z))))
(if (<= (- b 0.5) 2e+115)
(+ (+ a (+ t (+ z t_1))) (* y i))
(+ a (+ t (+ z (+ t_1 (* (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 ((b - 0.5) <= -2e+137) {
tmp = (y * i) + (t + (a + fma(log(c), (b + -0.5), z)));
} else if ((b - 0.5) <= 2e+115) {
tmp = (a + (t + (z + t_1))) + (y * i);
} else {
tmp = a + (t + (z + (t_1 + (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 (Float64(b - 0.5) <= -2e+137) tmp = Float64(Float64(y * i) + Float64(t + Float64(a + fma(log(c), Float64(b + -0.5), z)))); elseif (Float64(b - 0.5) <= 2e+115) tmp = Float64(Float64(a + Float64(t + Float64(z + t_1))) + Float64(y * i)); else tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5)))))); 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_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+137], N[(N[(y * i), $MachinePrecision] + N[(t + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+115], N[(N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $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}
t_1 := x \cdot \log y\\
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+137}:\\
\;\;\;\;y \cdot i + \left(t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\right)\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+115}:\\
\;\;\;\;\left(a + \left(t + \left(z + t\_1\right)\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -2.0000000000000001e137Initial program 99.5%
Taylor expanded in x around 0 87.7%
associate-+r+87.7%
+-commutative87.7%
associate-+l+87.7%
+-commutative87.7%
sub-neg87.7%
metadata-eval87.7%
fma-define87.7%
Simplified87.7%
if -2.0000000000000001e137 < (-.f64 b #s(literal 1/2 binary64)) < 2e115Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in b around 0 95.3%
+-commutative95.3%
Simplified95.3%
if 2e115 < (-.f64 b #s(literal 1/2 binary64)) Initial program 97.0%
Taylor expanded in y around 0 95.0%
Final simplification94.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
(let* ((t_1 (* x (log y))))
(if (<= (- b 0.5) -2e+137)
(+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))
(if (<= (- b 0.5) 2e+115)
(+ (+ a (+ t (+ z t_1))) (* y i))
(+ a (+ t (+ z (+ t_1 (* 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 = x * log(y);
double tmp;
if ((b - 0.5) <= -2e+137) {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
} else if ((b - 0.5) <= 2e+115) {
tmp = (a + (t + (z + t_1))) + (y * i);
} else {
tmp = a + (t + (z + (t_1 + (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 = x * log(y)
if ((b - 0.5d0) <= (-2d+137)) then
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
else if ((b - 0.5d0) <= 2d+115) then
tmp = (a + (t + (z + t_1))) + (y * i)
else
tmp = a + (t + (z + (t_1 + (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 = x * Math.log(y);
double tmp;
if ((b - 0.5) <= -2e+137) {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
} else if ((b - 0.5) <= 2e+115) {
tmp = (a + (t + (z + t_1))) + (y * i);
} else {
tmp = a + (t + (z + (t_1 + (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 = x * math.log(y) tmp = 0 if (b - 0.5) <= -2e+137: tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) elif (b - 0.5) <= 2e+115: tmp = (a + (t + (z + t_1))) + (y * i) else: tmp = a + (t + (z + (t_1 + (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(x * log(y)) tmp = 0.0 if (Float64(b - 0.5) <= -2e+137) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); elseif (Float64(b - 0.5) <= 2e+115) tmp = Float64(Float64(a + Float64(t + Float64(z + t_1))) + Float64(y * i)); else tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + 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 = x * log(y);
tmp = 0.0;
if ((b - 0.5) <= -2e+137)
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
elseif ((b - 0.5) <= 2e+115)
tmp = (a + (t + (z + t_1))) + (y * i);
else
tmp = a + (t + (z + (t_1 + (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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+137], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+115], N[(N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(t$95$1 + N[(b * 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}
t_1 := x \cdot \log y\\
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+137}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+115}:\\
\;\;\;\;\left(a + \left(t + \left(z + t\_1\right)\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + b \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -2.0000000000000001e137Initial program 99.5%
Taylor expanded in x around 0 87.7%
if -2.0000000000000001e137 < (-.f64 b #s(literal 1/2 binary64)) < 2e115Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in b around 0 95.3%
+-commutative95.3%
Simplified95.3%
if 2e115 < (-.f64 b #s(literal 1/2 binary64)) Initial program 97.0%
add-cube-cbrt96.6%
pow396.7%
sub-neg96.7%
metadata-eval96.7%
*-commutative96.7%
Applied egg-rr96.7%
Taylor expanded in b around inf 97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in y around 0 95.0%
Final simplification94.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
(let* ((t_1 (* x (log y))))
(if (<= (- b 0.5) -2e+137)
(+ (* y i) (+ t (+ a (fma (log c) (+ b -0.5) z))))
(if (<= (- b 0.5) 2e+115)
(+ (+ a (+ t (+ z t_1))) (* y i))
(+ a (+ t (+ z (+ t_1 (* 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 = x * log(y);
double tmp;
if ((b - 0.5) <= -2e+137) {
tmp = (y * i) + (t + (a + fma(log(c), (b + -0.5), z)));
} else if ((b - 0.5) <= 2e+115) {
tmp = (a + (t + (z + t_1))) + (y * i);
} else {
tmp = a + (t + (z + (t_1 + (b * 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(x * log(y)) tmp = 0.0 if (Float64(b - 0.5) <= -2e+137) tmp = Float64(Float64(y * i) + Float64(t + Float64(a + fma(log(c), Float64(b + -0.5), z)))); elseif (Float64(b - 0.5) <= 2e+115) tmp = Float64(Float64(a + Float64(t + Float64(z + t_1))) + Float64(y * i)); else tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(b * log(c)))))); 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_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+137], N[(N[(y * i), $MachinePrecision] + N[(t + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+115], N[(N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(t$95$1 + N[(b * 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}
t_1 := x \cdot \log y\\
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+137}:\\
\;\;\;\;y \cdot i + \left(t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\right)\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+115}:\\
\;\;\;\;\left(a + \left(t + \left(z + t\_1\right)\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + b \cdot \log c\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -2.0000000000000001e137Initial program 99.5%
Taylor expanded in x around 0 87.7%
associate-+r+87.7%
+-commutative87.7%
associate-+l+87.7%
+-commutative87.7%
sub-neg87.7%
metadata-eval87.7%
fma-define87.7%
Simplified87.7%
if -2.0000000000000001e137 < (-.f64 b #s(literal 1/2 binary64)) < 2e115Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in b around 0 95.3%
+-commutative95.3%
Simplified95.3%
if 2e115 < (-.f64 b #s(literal 1/2 binary64)) Initial program 97.0%
add-cube-cbrt96.6%
pow396.7%
sub-neg96.7%
metadata-eval96.7%
*-commutative96.7%
Applied egg-rr96.7%
Taylor expanded in b around inf 97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in y around 0 95.0%
Final simplification94.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
(let* ((t_1 (* x (log y))))
(if (<= a 1.55e+76)
(+ (* y i) (+ t (+ z (+ t_1 (* (log c) (- b 0.5))))))
(+ (+ a (+ t (+ z t_1))) (* 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 t_1 = x * log(y);
double tmp;
if (a <= 1.55e+76) {
tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
} else {
tmp = (a + (t + (z + t_1))) + (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) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (a <= 1.55d+76) then
tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5d0)))))
else
tmp = (a + (t + (z + t_1))) + (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 t_1 = x * Math.log(y);
double tmp;
if (a <= 1.55e+76) {
tmp = (y * i) + (t + (z + (t_1 + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (a + (t + (z + t_1))) + (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): t_1 = x * math.log(y) tmp = 0 if a <= 1.55e+76: tmp = (y * i) + (t + (z + (t_1 + (math.log(c) * (b - 0.5))))) else: tmp = (a + (t + (z + t_1))) + (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) t_1 = Float64(x * log(y)) tmp = 0.0 if (a <= 1.55e+76) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(a + Float64(t + Float64(z + t_1))) + 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)
t_1 = x * log(y);
tmp = 0.0;
if (a <= 1.55e+76)
tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
else
tmp = (a + (t + (z + t_1))) + (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_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.55e+76], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + N[(t + N[(z + t$95$1), $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])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;a \leq 1.55 \cdot 10^{+76}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + \left(t + \left(z + t\_1\right)\right)\right) + y \cdot i\\
\end{array}
\end{array}
if a < 1.55000000000000006e76Initial program 99.3%
Taylor expanded in a around 0 88.9%
if 1.55000000000000006e76 < a Initial program 99.8%
add-cube-cbrt99.8%
pow399.9%
sub-neg99.9%
metadata-eval99.9%
*-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 94.7%
+-commutative94.7%
Simplified94.7%
Final simplification89.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
(let* ((t_1 (* x (log y))))
(if (<= a 20.0)
(+ (* y i) (+ t (+ z (+ t_1 (* (log c) (- b 0.5))))))
(+ (* y i) (+ (+ a (+ t (+ z t_1))) (* 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 = x * log(y);
double tmp;
if (a <= 20.0) {
tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + ((a + (t + (z + t_1))) + (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 = x * log(y)
if (a <= 20.0d0) then
tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5d0)))))
else
tmp = (y * i) + ((a + (t + (z + t_1))) + (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 = x * Math.log(y);
double tmp;
if (a <= 20.0) {
tmp = (y * i) + (t + (z + (t_1 + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + ((a + (t + (z + t_1))) + (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 = x * math.log(y) tmp = 0 if a <= 20.0: tmp = (y * i) + (t + (z + (t_1 + (math.log(c) * (b - 0.5))))) else: tmp = (y * i) + ((a + (t + (z + t_1))) + (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(x * log(y)) tmp = 0.0 if (a <= 20.0) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + t_1))) + 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 = x * log(y);
tmp = 0.0;
if (a <= 20.0)
tmp = (y * i) + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
else
tmp = (y * i) + ((a + (t + (z + t_1))) + (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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 20.0], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $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}
t_1 := x \cdot \log y\\
\mathbf{if}\;a \leq 20:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + t\_1\right)\right)\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 20Initial program 99.3%
Taylor expanded in a around 0 88.3%
if 20 < a Initial program 99.8%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification90.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
(let* ((t_1 (* x (log y))))
(if (<= a 1.22e+84)
(+ (* y i) (+ t (+ z (+ t_1 (* b (log c))))))
(+ (+ a (+ t (+ z t_1))) (* 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 t_1 = x * log(y);
double tmp;
if (a <= 1.22e+84) {
tmp = (y * i) + (t + (z + (t_1 + (b * log(c)))));
} else {
tmp = (a + (t + (z + t_1))) + (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) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (a <= 1.22d+84) then
tmp = (y * i) + (t + (z + (t_1 + (b * log(c)))))
else
tmp = (a + (t + (z + t_1))) + (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 t_1 = x * Math.log(y);
double tmp;
if (a <= 1.22e+84) {
tmp = (y * i) + (t + (z + (t_1 + (b * Math.log(c)))));
} else {
tmp = (a + (t + (z + t_1))) + (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): t_1 = x * math.log(y) tmp = 0 if a <= 1.22e+84: tmp = (y * i) + (t + (z + (t_1 + (b * math.log(c))))) else: tmp = (a + (t + (z + t_1))) + (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) t_1 = Float64(x * log(y)) tmp = 0.0 if (a <= 1.22e+84) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(t_1 + Float64(b * log(c)))))); else tmp = Float64(Float64(a + Float64(t + Float64(z + t_1))) + 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)
t_1 = x * log(y);
tmp = 0.0;
if (a <= 1.22e+84)
tmp = (y * i) + (t + (z + (t_1 + (b * log(c)))));
else
tmp = (a + (t + (z + t_1))) + (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_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.22e+84], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + N[(t + N[(z + t$95$1), $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])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;a \leq 1.22 \cdot 10^{+84}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \left(t\_1 + b \cdot \log c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + \left(t + \left(z + t\_1\right)\right)\right) + y \cdot i\\
\end{array}
\end{array}
if a < 1.2200000000000001e84Initial program 99.3%
add-cube-cbrt99.1%
pow399.1%
sub-neg99.1%
metadata-eval99.1%
*-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in b around inf 96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in a around 0 86.2%
if 1.2200000000000001e84 < a Initial program 99.8%
add-cube-cbrt99.8%
pow399.9%
sub-neg99.9%
metadata-eval99.9%
*-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 94.7%
+-commutative94.7%
Simplified94.7%
Final simplification87.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 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* 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 + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (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 + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (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 + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (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 + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (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(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + 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 + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (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[(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] + 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(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.4%
Final simplification99.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 (<= (- b 0.5) -2e+137) (not (<= (- b 0.5) 2e+49))) (+ (* y i) (+ a (+ t (+ z (* (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) {
double tmp;
if (((b - 0.5) <= -2e+137) || !((b - 0.5) <= 2e+49)) {
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
} else {
tmp = (a + (t + (z + (x * log(y))))) + (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 (((b - 0.5d0) <= (-2d+137)) .or. (.not. ((b - 0.5d0) <= 2d+49))) then
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
else
tmp = (a + (t + (z + (x * log(y))))) + (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 (((b - 0.5) <= -2e+137) || !((b - 0.5) <= 2e+49)) {
tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (a + (t + (z + (x * Math.log(y))))) + (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 ((b - 0.5) <= -2e+137) or not ((b - 0.5) <= 2e+49): tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5))))) else: tmp = (a + (t + (z + (x * math.log(y))))) + (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 ((Float64(b - 0.5) <= -2e+137) || !(Float64(b - 0.5) <= 2e+49)) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + 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 (((b - 0.5) <= -2e+137) || ~(((b - 0.5) <= 2e+49)))
tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
else
tmp = (a + (t + (z + (x * log(y))))) + (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[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+137], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+49]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $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])\\
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+137} \lor \neg \left(b - 0.5 \leq 2 \cdot 10^{+49}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + y \cdot i\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -2.0000000000000001e137 or 1.99999999999999989e49 < (-.f64 b #s(literal 1/2 binary64)) Initial program 98.5%
Taylor expanded in x around 0 90.6%
if -2.0000000000000001e137 < (-.f64 b #s(literal 1/2 binary64)) < 1.99999999999999989e49Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in b around 0 95.6%
+-commutative95.6%
Simplified95.6%
Final simplification93.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
(let* ((t_1 (+ (* y i) (+ t (+ z a)))) (t_2 (+ (* y i) (* b (log c)))))
(if (<= b -7e+134)
t_2
(if (<= b -7e-187)
t_1
(if (<= b 4e-277)
(+ (* x (log y)) (* y i))
(if (<= b 7.5e+213) 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) + (t + (z + a));
double t_2 = (y * i) + (b * log(c));
double tmp;
if (b <= -7e+134) {
tmp = t_2;
} else if (b <= -7e-187) {
tmp = t_1;
} else if (b <= 4e-277) {
tmp = (x * log(y)) + (y * i);
} else if (b <= 7.5e+213) {
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) + (t + (z + a))
t_2 = (y * i) + (b * log(c))
if (b <= (-7d+134)) then
tmp = t_2
else if (b <= (-7d-187)) then
tmp = t_1
else if (b <= 4d-277) then
tmp = (x * log(y)) + (y * i)
else if (b <= 7.5d+213) 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) + (t + (z + a));
double t_2 = (y * i) + (b * Math.log(c));
double tmp;
if (b <= -7e+134) {
tmp = t_2;
} else if (b <= -7e-187) {
tmp = t_1;
} else if (b <= 4e-277) {
tmp = (x * Math.log(y)) + (y * i);
} else if (b <= 7.5e+213) {
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) + (t + (z + a)) t_2 = (y * i) + (b * math.log(c)) tmp = 0 if b <= -7e+134: tmp = t_2 elif b <= -7e-187: tmp = t_1 elif b <= 4e-277: tmp = (x * math.log(y)) + (y * i) elif b <= 7.5e+213: 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(t + Float64(z + a))) t_2 = Float64(Float64(y * i) + Float64(b * log(c))) tmp = 0.0 if (b <= -7e+134) tmp = t_2; elseif (b <= -7e-187) tmp = t_1; elseif (b <= 4e-277) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif (b <= 7.5e+213) 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) + (t + (z + a));
t_2 = (y * i) + (b * log(c));
tmp = 0.0;
if (b <= -7e+134)
tmp = t_2;
elseif (b <= -7e-187)
tmp = t_1;
elseif (b <= 4e-277)
tmp = (x * log(y)) + (y * i);
elseif (b <= 7.5e+213)
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[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7e+134], t$95$2, If[LessEqual[b, -7e-187], t$95$1, If[LessEqual[b, 4e-277], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+213], 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 + \left(t + \left(z + a\right)\right)\\
t_2 := y \cdot i + b \cdot \log c\\
\mathbf{if}\;b \leq -7 \cdot 10^{+134}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4 \cdot 10^{-277}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -7.00000000000000006e134 or 7.5000000000000003e213 < b Initial program 97.4%
Taylor expanded in a around -inf 69.6%
Taylor expanded in b around inf 56.1%
Taylor expanded in a around 0 69.6%
if -7.00000000000000006e134 < b < -6.99999999999999958e-187 or 3.99999999999999988e-277 < b < 7.5000000000000003e213Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in b around 0 91.5%
+-commutative91.5%
Simplified91.5%
Taylor expanded in x around 0 78.4%
+-commutative78.4%
associate-+l+78.4%
Simplified78.4%
if -6.99999999999999958e-187 < b < 3.99999999999999988e-277Initial program 99.7%
add-cube-cbrt99.7%
pow399.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 80.0%
Final simplification76.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 (<= (- b 0.5) -2e+195)
(+ (* y i) (* z (+ 1.0 (* b (/ (log c) z)))))
(if (<= (- b 0.5) 2e+115)
(+ (+ a (+ t (+ z (* x (log y))))) (* y i))
(+ a (+ t (+ z (* 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 ((b - 0.5) <= -2e+195) {
tmp = (y * i) + (z * (1.0 + (b * (log(c) / z))));
} else if ((b - 0.5) <= 2e+115) {
tmp = (a + (t + (z + (x * log(y))))) + (y * i);
} else {
tmp = a + (t + (z + (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 ((b - 0.5d0) <= (-2d+195)) then
tmp = (y * i) + (z * (1.0d0 + (b * (log(c) / z))))
else if ((b - 0.5d0) <= 2d+115) then
tmp = (a + (t + (z + (x * log(y))))) + (y * i)
else
tmp = a + (t + (z + (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 ((b - 0.5) <= -2e+195) {
tmp = (y * i) + (z * (1.0 + (b * (Math.log(c) / z))));
} else if ((b - 0.5) <= 2e+115) {
tmp = (a + (t + (z + (x * Math.log(y))))) + (y * i);
} else {
tmp = a + (t + (z + (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 (b - 0.5) <= -2e+195: tmp = (y * i) + (z * (1.0 + (b * (math.log(c) / z)))) elif (b - 0.5) <= 2e+115: tmp = (a + (t + (z + (x * math.log(y))))) + (y * i) else: tmp = a + (t + (z + (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 (Float64(b - 0.5) <= -2e+195) tmp = Float64(Float64(y * i) + Float64(z * Float64(1.0 + Float64(b * Float64(log(c) / z))))); elseif (Float64(b - 0.5) <= 2e+115) tmp = Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(y * i)); else tmp = Float64(a + Float64(t + Float64(z + 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 ((b - 0.5) <= -2e+195)
tmp = (y * i) + (z * (1.0 + (b * (log(c) / z))));
elseif ((b - 0.5) <= 2e+115)
tmp = (a + (t + (z + (x * log(y))))) + (y * i);
else
tmp = a + (t + (z + (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[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+195], N[(N[(y * i), $MachinePrecision] + N[(z * N[(1.0 + N[(b * N[(N[Log[c], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+115], N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(b * N[Log[c], $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}\;b - 0.5 \leq -2 \cdot 10^{+195}:\\
\;\;\;\;y \cdot i + z \cdot \left(1 + b \cdot \frac{\log c}{z}\right)\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+115}:\\
\;\;\;\;\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -1.99999999999999995e195Initial program 99.5%
Taylor expanded in z around inf 58.2%
sub-neg58.2%
metadata-eval58.2%
associate-/l*57.9%
Simplified57.9%
Taylor expanded in b around inf 45.8%
associate-/l*45.8%
Simplified45.8%
if -1.99999999999999995e195 < (-.f64 b #s(literal 1/2 binary64)) < 2e115Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in b around 0 94.0%
+-commutative94.0%
Simplified94.0%
if 2e115 < (-.f64 b #s(literal 1/2 binary64)) Initial program 97.0%
add-cube-cbrt96.6%
pow396.7%
sub-neg96.7%
metadata-eval96.7%
*-commutative96.7%
Applied egg-rr96.7%
Taylor expanded in b around inf 97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in y around 0 95.0%
Taylor expanded in x around 0 86.9%
Final simplification88.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+195) (not (<= (- b 0.5) 2e+115))) (+ a (+ t (+ z (* 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 tmp;
if (((b - 0.5) <= -2e+195) || !((b - 0.5) <= 2e+115)) {
tmp = a + (t + (z + (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) :: tmp
if (((b - 0.5d0) <= (-2d+195)) .or. (.not. ((b - 0.5d0) <= 2d+115))) then
tmp = a + (t + (z + (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 tmp;
if (((b - 0.5) <= -2e+195) || !((b - 0.5) <= 2e+115)) {
tmp = a + (t + (z + (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): tmp = 0 if ((b - 0.5) <= -2e+195) or not ((b - 0.5) <= 2e+115): tmp = a + (t + (z + (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) tmp = 0.0 if ((Float64(b - 0.5) <= -2e+195) || !(Float64(b - 0.5) <= 2e+115)) tmp = Float64(a + Float64(t + Float64(z + 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)
tmp = 0.0;
if (((b - 0.5) <= -2e+195) || ~(((b - 0.5) <= 2e+115)))
tmp = a + (t + (z + (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_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+195], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+115]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $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}
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+195} \lor \neg \left(b - 0.5 \leq 2 \cdot 10^{+115}\right):\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -1.99999999999999995e195 or 2e115 < (-.f64 b #s(literal 1/2 binary64)) Initial program 97.9%
add-cube-cbrt97.5%
pow397.5%
sub-neg97.5%
metadata-eval97.5%
*-commutative97.5%
Applied egg-rr97.5%
Taylor expanded in b around inf 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in y around 0 90.6%
Taylor expanded in x around 0 84.0%
if -1.99999999999999995e195 < (-.f64 b #s(literal 1/2 binary64)) < 2e115Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in b around 0 94.0%
+-commutative94.0%
Simplified94.0%
Taylor expanded in t around 0 73.9%
Final simplification76.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
(if (<= (- b 0.5) -2e+195)
(+ (* y i) (* z (+ 1.0 (* b (/ (log c) z)))))
(if (<= (- b 0.5) 2e+115)
(+ (* y i) (+ a (+ z (* x (log y)))))
(+ a (+ t (+ z (* 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 ((b - 0.5) <= -2e+195) {
tmp = (y * i) + (z * (1.0 + (b * (log(c) / z))));
} else if ((b - 0.5) <= 2e+115) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else {
tmp = a + (t + (z + (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 ((b - 0.5d0) <= (-2d+195)) then
tmp = (y * i) + (z * (1.0d0 + (b * (log(c) / z))))
else if ((b - 0.5d0) <= 2d+115) then
tmp = (y * i) + (a + (z + (x * log(y))))
else
tmp = a + (t + (z + (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 ((b - 0.5) <= -2e+195) {
tmp = (y * i) + (z * (1.0 + (b * (Math.log(c) / z))));
} else if ((b - 0.5) <= 2e+115) {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
} else {
tmp = a + (t + (z + (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 (b - 0.5) <= -2e+195: tmp = (y * i) + (z * (1.0 + (b * (math.log(c) / z)))) elif (b - 0.5) <= 2e+115: tmp = (y * i) + (a + (z + (x * math.log(y)))) else: tmp = a + (t + (z + (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 (Float64(b - 0.5) <= -2e+195) tmp = Float64(Float64(y * i) + Float64(z * Float64(1.0 + Float64(b * Float64(log(c) / z))))); elseif (Float64(b - 0.5) <= 2e+115) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); else tmp = Float64(a + Float64(t + Float64(z + 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 ((b - 0.5) <= -2e+195)
tmp = (y * i) + (z * (1.0 + (b * (log(c) / z))));
elseif ((b - 0.5) <= 2e+115)
tmp = (y * i) + (a + (z + (x * log(y))));
else
tmp = a + (t + (z + (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[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+195], N[(N[(y * i), $MachinePrecision] + N[(z * N[(1.0 + N[(b * N[(N[Log[c], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+115], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(b * N[Log[c], $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}\;b - 0.5 \leq -2 \cdot 10^{+195}:\\
\;\;\;\;y \cdot i + z \cdot \left(1 + b \cdot \frac{\log c}{z}\right)\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+115}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -1.99999999999999995e195Initial program 99.5%
Taylor expanded in z around inf 58.2%
sub-neg58.2%
metadata-eval58.2%
associate-/l*57.9%
Simplified57.9%
Taylor expanded in b around inf 45.8%
associate-/l*45.8%
Simplified45.8%
if -1.99999999999999995e195 < (-.f64 b #s(literal 1/2 binary64)) < 2e115Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in b around 0 94.0%
+-commutative94.0%
Simplified94.0%
Taylor expanded in t around 0 73.9%
if 2e115 < (-.f64 b #s(literal 1/2 binary64)) Initial program 97.0%
add-cube-cbrt96.6%
pow396.7%
sub-neg96.7%
metadata-eval96.7%
*-commutative96.7%
Applied egg-rr96.7%
Taylor expanded in b around inf 97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in y around 0 95.0%
Taylor expanded in x around 0 86.9%
Final simplification73.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 (if (or (<= (- b 0.5) -2e+137) (not (<= (- b 0.5) 2e+115))) (+ a (+ t (+ z (* b (log c))))) (+ (* y i) (+ t (+ 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 (((b - 0.5) <= -2e+137) || !((b - 0.5) <= 2e+115)) {
tmp = a + (t + (z + (b * log(c))));
} else {
tmp = (y * i) + (t + (z + 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 (((b - 0.5d0) <= (-2d+137)) .or. (.not. ((b - 0.5d0) <= 2d+115))) then
tmp = a + (t + (z + (b * log(c))))
else
tmp = (y * i) + (t + (z + 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 (((b - 0.5) <= -2e+137) || !((b - 0.5) <= 2e+115)) {
tmp = a + (t + (z + (b * Math.log(c))));
} else {
tmp = (y * i) + (t + (z + 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 ((b - 0.5) <= -2e+137) or not ((b - 0.5) <= 2e+115): tmp = a + (t + (z + (b * math.log(c)))) else: tmp = (y * i) + (t + (z + 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 ((Float64(b - 0.5) <= -2e+137) || !(Float64(b - 0.5) <= 2e+115)) tmp = Float64(a + Float64(t + Float64(z + Float64(b * log(c))))); else tmp = Float64(Float64(y * i) + Float64(t + Float64(z + 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 (((b - 0.5) <= -2e+137) || ~(((b - 0.5) <= 2e+115)))
tmp = a + (t + (z + (b * log(c))));
else
tmp = (y * i) + (t + (z + 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[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+137], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+115]], $MachinePrecision]], N[(a + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $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^{+137} \lor \neg \left(b - 0.5 \leq 2 \cdot 10^{+115}\right):\\
\;\;\;\;a + \left(t + \left(z + b \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -2.0000000000000001e137 or 2e115 < (-.f64 b #s(literal 1/2 binary64)) Initial program 98.1%
add-cube-cbrt97.7%
pow397.7%
sub-neg97.7%
metadata-eval97.7%
*-commutative97.7%
Applied egg-rr97.7%
Taylor expanded in b around inf 98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in y around 0 90.5%
Taylor expanded in x around 0 80.7%
if -2.0000000000000001e137 < (-.f64 b #s(literal 1/2 binary64)) < 2e115Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in b around 0 95.3%
+-commutative95.3%
Simplified95.3%
Taylor expanded in x around 0 77.5%
+-commutative77.5%
associate-+l+77.5%
Simplified77.5%
Final simplification78.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 (if (or (<= b -2.8e+136) (not (<= b 4.2e+209))) (+ (* y i) (* b (log c))) (+ (* y i) (+ t (+ 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 ((b <= -2.8e+136) || !(b <= 4.2e+209)) {
tmp = (y * i) + (b * log(c));
} else {
tmp = (y * i) + (t + (z + 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 ((b <= (-2.8d+136)) .or. (.not. (b <= 4.2d+209))) then
tmp = (y * i) + (b * log(c))
else
tmp = (y * i) + (t + (z + 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 ((b <= -2.8e+136) || !(b <= 4.2e+209)) {
tmp = (y * i) + (b * Math.log(c));
} else {
tmp = (y * i) + (t + (z + 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 (b <= -2.8e+136) or not (b <= 4.2e+209): tmp = (y * i) + (b * math.log(c)) else: tmp = (y * i) + (t + (z + 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 ((b <= -2.8e+136) || !(b <= 4.2e+209)) tmp = Float64(Float64(y * i) + Float64(b * log(c))); else tmp = Float64(Float64(y * i) + Float64(t + Float64(z + 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 ((b <= -2.8e+136) || ~((b <= 4.2e+209)))
tmp = (y * i) + (b * log(c));
else
tmp = (y * i) + (t + (z + 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[Or[LessEqual[b, -2.8e+136], N[Not[LessEqual[b, 4.2e+209]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $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.8 \cdot 10^{+136} \lor \neg \left(b \leq 4.2 \cdot 10^{+209}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\end{array}
\end{array}
if b < -2.8000000000000002e136 or 4.2e209 < b Initial program 97.4%
Taylor expanded in a around -inf 69.6%
Taylor expanded in b around inf 56.1%
Taylor expanded in a around 0 69.6%
if -2.8000000000000002e136 < b < 4.2e209Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in b around 0 92.6%
+-commutative92.6%
Simplified92.6%
Taylor expanded in x around 0 75.7%
+-commutative75.7%
associate-+l+75.7%
Simplified75.7%
Final simplification74.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 (or (<= x -1.4e+227) (not (<= x 1.02e+245))) (* x (log y)) (+ (* y i) (+ t (+ 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 ((x <= -1.4e+227) || !(x <= 1.02e+245)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (t + (z + 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 ((x <= (-1.4d+227)) .or. (.not. (x <= 1.02d+245))) then
tmp = x * log(y)
else
tmp = (y * i) + (t + (z + 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 ((x <= -1.4e+227) || !(x <= 1.02e+245)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (t + (z + 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 (x <= -1.4e+227) or not (x <= 1.02e+245): tmp = x * math.log(y) else: tmp = (y * i) + (t + (z + 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 ((x <= -1.4e+227) || !(x <= 1.02e+245)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(t + Float64(z + 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 ((x <= -1.4e+227) || ~((x <= 1.02e+245)))
tmp = x * log(y);
else
tmp = (y * i) + (t + (z + 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[Or[LessEqual[x, -1.4e+227], N[Not[LessEqual[x, 1.02e+245]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $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.4 \cdot 10^{+227} \lor \neg \left(x \leq 1.02 \cdot 10^{+245}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\end{array}
\end{array}
if x < -1.39999999999999992e227 or 1.01999999999999997e245 < x Initial program 99.7%
Taylor expanded in x around inf 70.0%
if -1.39999999999999992e227 < x < 1.01999999999999997e245Initial program 99.4%
add-cube-cbrt99.2%
pow399.2%
sub-neg99.2%
metadata-eval99.2%
*-commutative99.2%
Applied egg-rr99.2%
Taylor expanded in b around inf 96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in b around 0 80.6%
+-commutative80.6%
Simplified80.6%
Taylor expanded in x around 0 71.6%
+-commutative71.6%
associate-+l+71.6%
Simplified71.6%
Final simplification71.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 (<= b -3.5e+277) (not (<= b 2.55e+219))) (* b (log c)) (+ (* y i) (+ t (+ 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 ((b <= -3.5e+277) || !(b <= 2.55e+219)) {
tmp = b * log(c);
} else {
tmp = (y * i) + (t + (z + 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 ((b <= (-3.5d+277)) .or. (.not. (b <= 2.55d+219))) then
tmp = b * log(c)
else
tmp = (y * i) + (t + (z + 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 ((b <= -3.5e+277) || !(b <= 2.55e+219)) {
tmp = b * Math.log(c);
} else {
tmp = (y * i) + (t + (z + 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 (b <= -3.5e+277) or not (b <= 2.55e+219): tmp = b * math.log(c) else: tmp = (y * i) + (t + (z + 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 ((b <= -3.5e+277) || !(b <= 2.55e+219)) tmp = Float64(b * log(c)); else tmp = Float64(Float64(y * i) + Float64(t + Float64(z + 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 ((b <= -3.5e+277) || ~((b <= 2.55e+219)))
tmp = b * log(c);
else
tmp = (y * i) + (t + (z + 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[Or[LessEqual[b, -3.5e+277], N[Not[LessEqual[b, 2.55e+219]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $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 -3.5 \cdot 10^{+277} \lor \neg \left(b \leq 2.55 \cdot 10^{+219}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\end{array}
\end{array}
if b < -3.5000000000000001e277 or 2.54999999999999997e219 < b Initial program 95.1%
Taylor expanded in b around inf 79.5%
*-commutative79.5%
Simplified79.5%
if -3.5000000000000001e277 < b < 2.54999999999999997e219Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in b around 0 89.0%
+-commutative89.0%
Simplified89.0%
Taylor expanded in x around 0 72.3%
+-commutative72.3%
associate-+l+72.3%
Simplified72.3%
Final simplification73.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 (<= z -4.1e+195) (and (not (<= z -9e+176)) (<= z -1.05e+108))) 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.1e+195) || (!(z <= -9e+176) && (z <= -1.05e+108))) {
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.1d+195)) .or. (.not. (z <= (-9d+176))) .and. (z <= (-1.05d+108))) 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.1e+195) || (!(z <= -9e+176) && (z <= -1.05e+108))) {
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.1e+195) or (not (z <= -9e+176) and (z <= -1.05e+108)): 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.1e+195) || (!(z <= -9e+176) && (z <= -1.05e+108))) 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.1e+195) || (~((z <= -9e+176)) && (z <= -1.05e+108)))
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[Or[LessEqual[z, -4.1e+195], And[N[Not[LessEqual[z, -9e+176]], $MachinePrecision], LessEqual[z, -1.05e+108]]], 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.1 \cdot 10^{+195} \lor \neg \left(z \leq -9 \cdot 10^{+176}\right) \land z \leq -1.05 \cdot 10^{+108}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -4.1e195 or -9.00000000000000007e176 < z < -1.05000000000000005e108Initial program 100.0%
Taylor expanded in z around inf 45.8%
if -4.1e195 < z < -9.00000000000000007e176 or -1.05000000000000005e108 < z Initial program 99.3%
Taylor expanded in a around -inf 74.6%
Taylor expanded in b around inf 49.1%
Taylor expanded in b around 0 40.1%
*-commutative40.1%
Simplified40.1%
Final simplification40.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 -2.45e+92) (+ 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 <= -2.45e+92) {
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 <= (-2.45d+92)) 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 <= -2.45e+92) {
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 <= -2.45e+92: 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 <= -2.45e+92) 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 <= -2.45e+92)
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, -2.45e+92], 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 -2.45 \cdot 10^{+92}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -2.4500000000000001e92Initial program 100.0%
add-cube-cbrt99.9%
pow399.9%
sub-neg99.9%
metadata-eval99.9%
*-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 95.5%
+-commutative95.5%
Simplified95.5%
Taylor expanded in z around inf 62.8%
if -2.4500000000000001e92 < z Initial program 99.3%
Taylor expanded in a around -inf 74.6%
Taylor expanded in b around inf 48.4%
Taylor expanded in b around 0 39.5%
*-commutative39.5%
Simplified39.5%
Final simplification43.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 (+ (* y i) (+ t (+ 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) + (t + (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) + (t + (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) + (t + (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) + (t + (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(t + 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) + (t + (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[(t + N[(z + a), $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(t + \left(z + a\right)\right)
\end{array}
Initial program 99.4%
add-cube-cbrt99.2%
pow399.2%
sub-neg99.2%
metadata-eval99.2%
*-commutative99.2%
Applied egg-rr99.2%
Taylor expanded in b around inf 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in b around 0 81.7%
+-commutative81.7%
Simplified81.7%
Taylor expanded in x around 0 66.5%
+-commutative66.5%
associate-+l+66.5%
Simplified66.5%
Final simplification66.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 -1.25e+105) 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 <= -1.25e+105) {
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 <= (-1.25d+105)) 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 <= -1.25e+105) {
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 <= -1.25e+105: 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 <= -1.25e+105) 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 <= -1.25e+105)
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, -1.25e+105], 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 -1.25 \cdot 10^{+105}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.25000000000000011e105Initial program 100.0%
Taylor expanded in z around inf 44.8%
if -1.25000000000000011e105 < z Initial program 99.3%
Taylor expanded in a around inf 18.4%
Final simplification22.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 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.4%
Taylor expanded in a around inf 16.8%
Final simplification16.8%
herbie shell --seed 2024059
(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)))