
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
Simplified99.8%
Final simplification99.8%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -3.5e+159)
(+ (* y i) (+ a (+ t (+ z (* x (log y))))))
(if (<= x 1.5e+107)
(+ a (+ t (+ z (fma y i (* (+ b -0.5) (log c))))))
(+ (* y i) (+ (+ t a) (fma x (log y) z))))))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 <= -3.5e+159) {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
} else if (x <= 1.5e+107) {
tmp = a + (t + (z + fma(y, i, ((b + -0.5) * log(c)))));
} else {
tmp = (y * i) + ((t + a) + fma(x, log(y), z));
}
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 <= -3.5e+159) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); elseif (x <= 1.5e+107) tmp = Float64(a + Float64(t + Float64(z + fma(y, i, Float64(Float64(b + -0.5) * log(c)))))); else tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + fma(x, log(y), z))); 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, -3.5e+159], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e+107], N[(a + N[(t + N[(z + N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + z), $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 -3.5 \cdot 10^{+159}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+107}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(y, i, \left(b + -0.5\right) \cdot \log c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right)\\
\end{array}
\end{array}
if x < -3.4999999999999999e159Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 95.5%
if -3.4999999999999999e159 < x < 1.50000000000000012e107Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 98.3%
*-commutative98.3%
sub-neg98.3%
metadata-eval98.3%
fma-undefine98.3%
+-commutative98.3%
Simplified98.3%
if 1.50000000000000012e107 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 97.5%
*-commutative97.5%
Simplified97.5%
Final simplification97.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 (<= x -3.8e+159)
(+ (* y i) (+ a (+ t (+ z (* x (log y))))))
(if (<= x 7.8e+104)
(+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))
(+ (* y i) (+ (+ t a) (fma x (log y) z))))))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 <= -3.8e+159) {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
} else if (x <= 7.8e+104) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
} else {
tmp = (y * i) + ((t + a) + fma(x, log(y), z));
}
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 <= -3.8e+159) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); elseif (x <= 7.8e+104) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); else tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + fma(x, log(y), z))); 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, -3.8e+159], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e+104], 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[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + z), $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 -3.8 \cdot 10^{+159}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+104}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \mathsf{fma}\left(x, \log y, z\right)\right)\\
\end{array}
\end{array}
if x < -3.79999999999999965e159Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 95.5%
if -3.79999999999999965e159 < x < 7.80000000000000033e104Initial program 99.8%
Taylor expanded in x around 0 98.3%
if 7.80000000000000033e104 < x Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 97.5%
*-commutative97.5%
Simplified97.5%
Final simplification97.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 (+ (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* x (log y)))))) (* y i)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y)))))) + (y * i);
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((log(c) * (b - 0.5d0)) + (a + (t + (z + (x * log(y)))))) + (y * i)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (x * Math.log(y)))))) + (y * i);
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return ((math.log(c) * (b - 0.5)) + (a + (t + (z + (x * math.log(y)))))) + (y * i)
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))) + Float64(y * i)) end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y)))))) + (y * i);
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right) + y \cdot i
\end{array}
Initial program 99.8%
Final simplification99.8%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* b (log c)) (+ a (+ t (+ z (* x (log y))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))));
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))))
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((b * Math.log(c)) + (a + (t + (z + (x * Math.log(y))))));
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return (y * i) + ((b * math.log(c)) + (a + (t + (z + (x * math.log(y))))))
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y))))))) end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (y * i) + ((b * log(c)) + (a + (t + (z + (x * log(y))))));
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
y \cdot i + \left(b \cdot \log c + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 98.2%
*-commutative98.2%
Simplified98.2%
Final simplification98.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 (+ (* y i) (+ z (+ t a))))
(t_2 (+ a (+ t (+ z (* (log c) (- b 0.5))))))
(t_3 (+ (* y i) (+ t (+ z (* x (log y)))))))
(if (<= x -3e+135)
t_3
(if (<= x -36000000000.0)
t_2
(if (<= x -7e-151)
t_1
(if (<= x -1.9e-238)
t_2
(if (<= x 2.05e-275) t_1 (if (<= x 6.2e+98) t_2 t_3))))))))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 + (t + a));
double t_2 = a + (t + (z + (log(c) * (b - 0.5))));
double t_3 = (y * i) + (t + (z + (x * log(y))));
double tmp;
if (x <= -3e+135) {
tmp = t_3;
} else if (x <= -36000000000.0) {
tmp = t_2;
} else if (x <= -7e-151) {
tmp = t_1;
} else if (x <= -1.9e-238) {
tmp = t_2;
} else if (x <= 2.05e-275) {
tmp = t_1;
} else if (x <= 6.2e+98) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = (y * i) + (z + (t + a))
t_2 = a + (t + (z + (log(c) * (b - 0.5d0))))
t_3 = (y * i) + (t + (z + (x * log(y))))
if (x <= (-3d+135)) then
tmp = t_3
else if (x <= (-36000000000.0d0)) then
tmp = t_2
else if (x <= (-7d-151)) then
tmp = t_1
else if (x <= (-1.9d-238)) then
tmp = t_2
else if (x <= 2.05d-275) then
tmp = t_1
else if (x <= 6.2d+98) then
tmp = t_2
else
tmp = t_3
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 + (t + a));
double t_2 = a + (t + (z + (Math.log(c) * (b - 0.5))));
double t_3 = (y * i) + (t + (z + (x * Math.log(y))));
double tmp;
if (x <= -3e+135) {
tmp = t_3;
} else if (x <= -36000000000.0) {
tmp = t_2;
} else if (x <= -7e-151) {
tmp = t_1;
} else if (x <= -1.9e-238) {
tmp = t_2;
} else if (x <= 2.05e-275) {
tmp = t_1;
} else if (x <= 6.2e+98) {
tmp = t_2;
} else {
tmp = t_3;
}
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 + (t + a)) t_2 = a + (t + (z + (math.log(c) * (b - 0.5)))) t_3 = (y * i) + (t + (z + (x * math.log(y)))) tmp = 0 if x <= -3e+135: tmp = t_3 elif x <= -36000000000.0: tmp = t_2 elif x <= -7e-151: tmp = t_1 elif x <= -1.9e-238: tmp = t_2 elif x <= 2.05e-275: tmp = t_1 elif x <= 6.2e+98: tmp = t_2 else: tmp = t_3 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(t + a))) t_2 = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))) t_3 = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(x * log(y))))) tmp = 0.0 if (x <= -3e+135) tmp = t_3; elseif (x <= -36000000000.0) tmp = t_2; elseif (x <= -7e-151) tmp = t_1; elseif (x <= -1.9e-238) tmp = t_2; elseif (x <= 2.05e-275) tmp = t_1; elseif (x <= 6.2e+98) tmp = t_2; else tmp = t_3; 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 + (t + a));
t_2 = a + (t + (z + (log(c) * (b - 0.5))));
t_3 = (y * i) + (t + (z + (x * log(y))));
tmp = 0.0;
if (x <= -3e+135)
tmp = t_3;
elseif (x <= -36000000000.0)
tmp = t_2;
elseif (x <= -7e-151)
tmp = t_1;
elseif (x <= -1.9e-238)
tmp = t_2;
elseif (x <= 2.05e-275)
tmp = t_1;
elseif (x <= 6.2e+98)
tmp = t_2;
else
tmp = t_3;
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[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3e+135], t$95$3, If[LessEqual[x, -36000000000.0], t$95$2, If[LessEqual[x, -7e-151], t$95$1, If[LessEqual[x, -1.9e-238], t$95$2, If[LessEqual[x, 2.05e-275], t$95$1, If[LessEqual[x, 6.2e+98], t$95$2, t$95$3]]]]]]]]]
\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 + \left(t + a\right)\right)\\
t_2 := a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
t_3 := y \cdot i + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -3 \cdot 10^{+135}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -36000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-238}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+98}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -3e135 or 6.20000000000000038e98 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 95.6%
Taylor expanded in a around 0 85.3%
if -3e135 < x < -3.6e10 or -6.99999999999999991e-151 < x < -1.8999999999999998e-238 or 2.04999999999999987e-275 < x < 6.20000000000000038e98Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 98.3%
*-commutative98.3%
sub-neg98.3%
metadata-eval98.3%
fma-undefine98.3%
+-commutative98.3%
Simplified98.3%
Taylor expanded in y around 0 87.7%
if -3.6e10 < x < -6.99999999999999991e-151 or -1.8999999999999998e-238 < x < 2.04999999999999987e-275Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 87.4%
Taylor expanded in x around 0 87.4%
associate-+r+87.4%
+-commutative87.4%
Simplified87.4%
Final simplification86.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 (+ a (+ t (+ z (* (log c) (- b 0.5)))))) (t_2 (* x (log y))))
(if (<= x -6.4e+159)
(+ t_2 (* y i))
(if (<= x -1.75e-239)
t_1
(if (<= x 4.4e-275)
(+ (* y i) (+ z (+ t a)))
(if (<= x 2.8e+101) t_1 (+ a (+ t (+ z 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 = a + (t + (z + (log(c) * (b - 0.5))));
double t_2 = x * log(y);
double tmp;
if (x <= -6.4e+159) {
tmp = t_2 + (y * i);
} else if (x <= -1.75e-239) {
tmp = t_1;
} else if (x <= 4.4e-275) {
tmp = (y * i) + (z + (t + a));
} else if (x <= 2.8e+101) {
tmp = t_1;
} else {
tmp = a + (t + (z + 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 = a + (t + (z + (log(c) * (b - 0.5d0))))
t_2 = x * log(y)
if (x <= (-6.4d+159)) then
tmp = t_2 + (y * i)
else if (x <= (-1.75d-239)) then
tmp = t_1
else if (x <= 4.4d-275) then
tmp = (y * i) + (z + (t + a))
else if (x <= 2.8d+101) then
tmp = t_1
else
tmp = a + (t + (z + 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 = a + (t + (z + (Math.log(c) * (b - 0.5))));
double t_2 = x * Math.log(y);
double tmp;
if (x <= -6.4e+159) {
tmp = t_2 + (y * i);
} else if (x <= -1.75e-239) {
tmp = t_1;
} else if (x <= 4.4e-275) {
tmp = (y * i) + (z + (t + a));
} else if (x <= 2.8e+101) {
tmp = t_1;
} else {
tmp = a + (t + (z + 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 = a + (t + (z + (math.log(c) * (b - 0.5)))) t_2 = x * math.log(y) tmp = 0 if x <= -6.4e+159: tmp = t_2 + (y * i) elif x <= -1.75e-239: tmp = t_1 elif x <= 4.4e-275: tmp = (y * i) + (z + (t + a)) elif x <= 2.8e+101: tmp = t_1 else: tmp = a + (t + (z + 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(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))) t_2 = Float64(x * log(y)) tmp = 0.0 if (x <= -6.4e+159) tmp = Float64(t_2 + Float64(y * i)); elseif (x <= -1.75e-239) tmp = t_1; elseif (x <= 4.4e-275) tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); elseif (x <= 2.8e+101) tmp = t_1; else tmp = Float64(a + Float64(t + Float64(z + 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 = a + (t + (z + (log(c) * (b - 0.5))));
t_2 = x * log(y);
tmp = 0.0;
if (x <= -6.4e+159)
tmp = t_2 + (y * i);
elseif (x <= -1.75e-239)
tmp = t_1;
elseif (x <= 4.4e-275)
tmp = (y * i) + (z + (t + a));
elseif (x <= 2.8e+101)
tmp = t_1;
else
tmp = a + (t + (z + 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[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.4e+159], N[(t$95$2 + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.75e-239], t$95$1, If[LessEqual[x, 4.4e-275], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+101], t$95$1, N[(a + N[(t + N[(z + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
t_2 := x \cdot \log y\\
\mathbf{if}\;x \leq -6.4 \cdot 10^{+159}:\\
\;\;\;\;t\_2 + y \cdot i\\
\mathbf{elif}\;x \leq -1.75 \cdot 10^{-239}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-275}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + t\_2\right)\right)\\
\end{array}
\end{array}
if x < -6.3999999999999997e159Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 79.4%
if -6.3999999999999997e159 < x < -1.75000000000000003e-239 or 4.39999999999999977e-275 < x < 2.79999999999999981e101Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 98.0%
*-commutative98.0%
sub-neg98.0%
metadata-eval98.0%
fma-undefine98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in y around 0 82.4%
if -1.75000000000000003e-239 < x < 4.39999999999999977e-275Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 86.4%
Taylor expanded in x around 0 86.4%
associate-+r+86.4%
+-commutative86.4%
Simplified86.4%
if 2.79999999999999981e101 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 97.4%
Taylor expanded in y around 0 78.2%
Final simplification81.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 (+ (* y i) (+ z (+ t a)))))
(if (<= x -1.3e+160)
(+ (* x (log y)) (* y i))
(if (<= x -7e-181)
t_1
(if (<= x -3e-214)
(* b (log c))
(if (<= x 2.7e+189) t_1 (* x (+ (log y) (/ a x)))))))))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 + (t + a));
double tmp;
if (x <= -1.3e+160) {
tmp = (x * log(y)) + (y * i);
} else if (x <= -7e-181) {
tmp = t_1;
} else if (x <= -3e-214) {
tmp = b * log(c);
} else if (x <= 2.7e+189) {
tmp = t_1;
} else {
tmp = x * (log(y) + (a / x));
}
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 + (t + a))
if (x <= (-1.3d+160)) then
tmp = (x * log(y)) + (y * i)
else if (x <= (-7d-181)) then
tmp = t_1
else if (x <= (-3d-214)) then
tmp = b * log(c)
else if (x <= 2.7d+189) then
tmp = t_1
else
tmp = x * (log(y) + (a / x))
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 + (t + a));
double tmp;
if (x <= -1.3e+160) {
tmp = (x * Math.log(y)) + (y * i);
} else if (x <= -7e-181) {
tmp = t_1;
} else if (x <= -3e-214) {
tmp = b * Math.log(c);
} else if (x <= 2.7e+189) {
tmp = t_1;
} else {
tmp = x * (Math.log(y) + (a / x));
}
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 + (t + a)) tmp = 0 if x <= -1.3e+160: tmp = (x * math.log(y)) + (y * i) elif x <= -7e-181: tmp = t_1 elif x <= -3e-214: tmp = b * math.log(c) elif x <= 2.7e+189: tmp = t_1 else: tmp = x * (math.log(y) + (a / x)) 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(t + a))) tmp = 0.0 if (x <= -1.3e+160) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif (x <= -7e-181) tmp = t_1; elseif (x <= -3e-214) tmp = Float64(b * log(c)); elseif (x <= 2.7e+189) tmp = t_1; else tmp = Float64(x * Float64(log(y) + Float64(a / x))); 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 + (t + a));
tmp = 0.0;
if (x <= -1.3e+160)
tmp = (x * log(y)) + (y * i);
elseif (x <= -7e-181)
tmp = t_1;
elseif (x <= -3e-214)
tmp = b * log(c);
elseif (x <= 2.7e+189)
tmp = t_1;
else
tmp = x * (log(y) + (a / x));
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[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.3e+160], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7e-181], t$95$1, If[LessEqual[x, -3e-214], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.7e+189], t$95$1, N[(x * N[(N[Log[y], $MachinePrecision] + N[(a / x), $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 + \left(t + a\right)\right)\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{+160}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-181}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-214}:\\
\;\;\;\;b \cdot \log c\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+189}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y + \frac{a}{x}\right)\\
\end{array}
\end{array}
if x < -1.3e160Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 79.4%
if -1.3e160 < x < -6.99999999999999993e-181 or -2.99999999999999994e-214 < x < 2.69999999999999994e189Initial program 99.8%
Taylor expanded in b around inf 98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in b around 0 77.1%
Taylor expanded in x around 0 72.9%
associate-+r+72.9%
+-commutative72.9%
Simplified72.9%
if -6.99999999999999993e-181 < x < -2.99999999999999994e-214Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-undefine99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 52.7%
associate-/l*36.2%
associate-/l*35.9%
sub-neg35.9%
metadata-eval35.9%
Simplified35.9%
Taylor expanded in b around inf 80.6%
*-commutative80.6%
Simplified80.6%
if 2.69999999999999994e189 < x Initial program 99.6%
Taylor expanded in x around -inf 99.6%
mul-1-neg99.6%
distribute-lft-out99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in a around inf 83.2%
Taylor expanded in y around 0 83.2%
Final simplification74.6%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= (- b 0.5) -2e+148)
(+ a (+ t (+ z t_1)))
(if (<= (- b 0.5) 2e+109)
(+ (* y i) (+ a (+ t (+ z (* x (log y))))))
(+ 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 = log(c) * (b - 0.5);
double tmp;
if ((b - 0.5) <= -2e+148) {
tmp = a + (t + (z + t_1));
} else if ((b - 0.5) <= 2e+109) {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
} else {
tmp = 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 = log(c) * (b - 0.5d0)
if ((b - 0.5d0) <= (-2d+148)) then
tmp = a + (t + (z + t_1))
else if ((b - 0.5d0) <= 2d+109) then
tmp = (y * i) + (a + (t + (z + (x * log(y)))))
else
tmp = 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 = Math.log(c) * (b - 0.5);
double tmp;
if ((b - 0.5) <= -2e+148) {
tmp = a + (t + (z + t_1));
} else if ((b - 0.5) <= 2e+109) {
tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
} else {
tmp = 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 = math.log(c) * (b - 0.5) tmp = 0 if (b - 0.5) <= -2e+148: tmp = a + (t + (z + t_1)) elif (b - 0.5) <= 2e+109: tmp = (y * i) + (a + (t + (z + (x * math.log(y))))) else: tmp = 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(log(c) * Float64(b - 0.5)) tmp = 0.0 if (Float64(b - 0.5) <= -2e+148) tmp = Float64(a + Float64(t + Float64(z + t_1))); elseif (Float64(b - 0.5) <= 2e+109) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); else tmp = Float64(t + Float64(z + Float64(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 = log(c) * (b - 0.5);
tmp = 0.0;
if ((b - 0.5) <= -2e+148)
tmp = a + (t + (z + t_1));
elseif ((b - 0.5) <= 2e+109)
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
else
tmp = 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[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+148], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+109], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(z + N[(t$95$1 + N[(y * i), $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}\;b - 0.5 \leq -2 \cdot 10^{+148}:\\
\;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+109}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(z + \left(t\_1 + y \cdot i\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -2.0000000000000001e148Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 93.3%
*-commutative93.3%
sub-neg93.3%
metadata-eval93.3%
fma-undefine93.3%
+-commutative93.3%
Simplified93.3%
Taylor expanded in y around 0 80.2%
if -2.0000000000000001e148 < (-.f64 b #s(literal 1/2 binary64)) < 1.99999999999999996e109Initial program 99.9%
Taylor expanded in b around inf 97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in b around 0 94.0%
if 1.99999999999999996e109 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 88.6%
*-commutative88.6%
sub-neg88.6%
metadata-eval88.6%
fma-undefine88.6%
+-commutative88.6%
Simplified88.6%
Taylor expanded in a around 0 81.6%
Final simplification90.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.75e+160) (not (<= x 2.05e+106))) (+ (* y i) (+ a (+ t (+ z (* x (log y)))))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.75e+160) || !(x <= 2.05e+106)) {
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-2.75d+160)) .or. (.not. (x <= 2.05d+106))) then
tmp = (y * i) + (a + (t + (z + (x * log(y)))))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (z + t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.75e+160) || !(x <= 2.05e+106)) {
tmp = (y * i) + (a + (t + (z + (x * Math.log(y)))));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.75e+160) or not (x <= 2.05e+106): tmp = (y * i) + (a + (t + (z + (x * math.log(y))))) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.75e+160) || !(x <= 2.05e+106)) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -2.75e+160) || ~((x <= 2.05e+106)))
tmp = (y * i) + (a + (t + (z + (x * log(y)))));
else
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.75e+160], N[Not[LessEqual[x, 2.05e+106]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $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 -2.75 \cdot 10^{+160} \lor \neg \left(x \leq 2.05 \cdot 10^{+106}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.75e160 or 2.0500000000000001e106 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in b around 0 96.7%
if -2.75e160 < x < 2.0500000000000001e106Initial program 99.8%
Taylor expanded in x around 0 98.3%
Final simplification97.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 (<= y 8e-34) (+ a (+ t (+ z (* x (log y))))) (+ (* y i) (+ z (+ 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) {
double tmp;
if (y <= 8e-34) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = (y * i) + (z + (t + 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 (y <= 8d-34) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = (y * i) + (z + (t + 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 (y <= 8e-34) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + (z + (t + 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 y <= 8e-34: tmp = a + (t + (z + (x * math.log(y)))) else: tmp = (y * i) + (z + (t + 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 (y <= 8e-34) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + 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 (y <= 8e-34)
tmp = a + (t + (z + (x * log(y))));
else
tmp = (y * i) + (z + (t + 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[y, 8e-34], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + 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}\;y \leq 8 \cdot 10^{-34}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if y < 7.99999999999999942e-34Initial program 99.7%
Taylor expanded in b around inf 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in b around 0 77.0%
Taylor expanded in y around 0 73.1%
if 7.99999999999999942e-34 < y Initial program 99.9%
Taylor expanded in b around inf 98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in b around 0 81.5%
Taylor expanded in x around 0 73.2%
associate-+r+73.2%
+-commutative73.2%
Simplified73.2%
Final simplification73.1%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -3.5e+241) (not (<= b 2.2e+237))) (* b (log c)) (+ (* y i) (+ z (+ 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) {
double tmp;
if ((b <= -3.5e+241) || !(b <= 2.2e+237)) {
tmp = b * log(c);
} else {
tmp = (y * i) + (z + (t + 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+241)) .or. (.not. (b <= 2.2d+237))) then
tmp = b * log(c)
else
tmp = (y * i) + (z + (t + 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+241) || !(b <= 2.2e+237)) {
tmp = b * Math.log(c);
} else {
tmp = (y * i) + (z + (t + 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+241) or not (b <= 2.2e+237): tmp = b * math.log(c) else: tmp = (y * i) + (z + (t + 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+241) || !(b <= 2.2e+237)) tmp = Float64(b * log(c)); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + 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+241) || ~((b <= 2.2e+237)))
tmp = b * log(c);
else
tmp = (y * i) + (z + (t + 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+241], N[Not[LessEqual[b, 2.2e+237]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + 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^{+241} \lor \neg \left(b \leq 2.2 \cdot 10^{+237}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if b < -3.5e241 or 2.2e237 < b Initial program 99.6%
associate-+l+99.6%
associate-+l+99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 93.9%
*-commutative93.9%
sub-neg93.9%
metadata-eval93.9%
fma-undefine93.9%
+-commutative93.9%
Simplified93.9%
Taylor expanded in t around inf 64.8%
associate-/l*64.8%
associate-/l*64.7%
sub-neg64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in b around inf 79.7%
*-commutative79.7%
Simplified79.7%
if -3.5e241 < b < 2.2e237Initial program 99.9%
Taylor expanded in b around inf 98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in b around 0 88.4%
Taylor expanded in x around 0 69.5%
associate-+r+69.5%
+-commutative69.5%
Simplified69.5%
Final simplification70.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 (<= a 4.6e-51)
z
(if (<= a 1.65e+47)
(* y i)
(if (<= a 4.4e+84) z (if (<= a 3.9e+101) (* y i) a)))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.6e-51) {
tmp = z;
} else if (a <= 1.65e+47) {
tmp = y * i;
} else if (a <= 4.4e+84) {
tmp = z;
} else if (a <= 3.9e+101) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 4.6d-51) then
tmp = z
else if (a <= 1.65d+47) then
tmp = y * i
else if (a <= 4.4d+84) then
tmp = z
else if (a <= 3.9d+101) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.6e-51) {
tmp = z;
} else if (a <= 1.65e+47) {
tmp = y * i;
} else if (a <= 4.4e+84) {
tmp = z;
} else if (a <= 3.9e+101) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4.6e-51: tmp = z elif a <= 1.65e+47: tmp = y * i elif a <= 4.4e+84: tmp = z elif a <= 3.9e+101: tmp = y * i else: tmp = a return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 4.6e-51) tmp = z; elseif (a <= 1.65e+47) tmp = Float64(y * i); elseif (a <= 4.4e+84) tmp = z; elseif (a <= 3.9e+101) tmp = Float64(y * i); else tmp = a; end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 4.6e-51)
tmp = z;
elseif (a <= 1.65e+47)
tmp = y * i;
elseif (a <= 4.4e+84)
tmp = z;
elseif (a <= 3.9e+101)
tmp = y * i;
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4.6e-51], z, If[LessEqual[a, 1.65e+47], N[(y * i), $MachinePrecision], If[LessEqual[a, 4.4e+84], z, If[LessEqual[a, 3.9e+101], N[(y * i), $MachinePrecision], a]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.6 \cdot 10^{-51}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+47}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{+84}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{+101}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 4.60000000000000004e-51 or 1.65e47 < a < 4.3999999999999997e84Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 78.4%
*-commutative78.4%
sub-neg78.4%
metadata-eval78.4%
fma-undefine78.4%
+-commutative78.4%
Simplified78.4%
Taylor expanded in z around inf 13.4%
if 4.60000000000000004e-51 < a < 1.65e47 or 4.3999999999999997e84 < a < 3.9e101Initial program 99.9%
Taylor expanded in a around inf 46.3%
Taylor expanded in a around 0 41.4%
*-commutative41.4%
Simplified41.4%
if 3.9e101 < a Initial program 99.9%
Taylor expanded in a around inf 53.9%
Taylor expanded in a around inf 46.1%
Final simplification21.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.22e+165) 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 <= -1.22e+165) {
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 <= (-1.22d+165)) 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 <= -1.22e+165) {
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 <= -1.22e+165: 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 <= -1.22e+165) 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 <= -1.22e+165)
tmp = z;
else
tmp = a + (y * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.22e+165], 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 -1.22 \cdot 10^{+165}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.2199999999999999e165Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around 0 96.9%
*-commutative96.9%
sub-neg96.9%
metadata-eval96.9%
fma-undefine96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in z around inf 43.2%
if -1.2199999999999999e165 < z Initial program 99.8%
Taylor expanded in a around inf 35.4%
Final simplification36.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 (<= a 1.4e+78) (+ 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.4e+78) {
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.4d+78) 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.4e+78) {
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.4e+78: 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.4e+78) 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.4e+78)
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.4e+78], 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.4 \cdot 10^{+78}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 1.4000000000000001e78Initial program 99.8%
Taylor expanded in b around inf 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in z around inf 32.4%
if 1.4000000000000001e78 < a Initial program 99.9%
Taylor expanded in a around inf 53.7%
Final simplification36.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 (+ 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 (y * i) + (z + (t + 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 + (t + 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 + (t + 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 + (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 Float64(Float64(y * i) + Float64(z + Float64(t + 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 + (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[(N[(y * i), $MachinePrecision] + N[(z + N[(t + 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(z + \left(t + a\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in b around 0 79.1%
Taylor expanded in x around 0 62.1%
associate-+r+62.1%
+-commutative62.1%
Simplified62.1%
Final simplification62.1%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.4e+77) 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 (a <= 4.4e+77) {
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 (a <= 4.4d+77) 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 (a <= 4.4e+77) {
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 a <= 4.4e+77: 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 (a <= 4.4e+77) 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 (a <= 4.4e+77)
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[a, 4.4e+77], 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}\;a \leq 4.4 \cdot 10^{+77}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 4.4000000000000001e77Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 80.0%
*-commutative80.0%
sub-neg80.0%
metadata-eval80.0%
fma-undefine80.0%
+-commutative80.0%
Simplified80.0%
Taylor expanded in z around inf 12.7%
if 4.4000000000000001e77 < a Initial program 99.9%
Taylor expanded in a around inf 53.7%
Taylor expanded in a around inf 43.2%
Final simplification18.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 a)
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return a
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return a end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = a;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
a
\end{array}
Initial program 99.8%
Taylor expanded in a around inf 34.3%
Taylor expanded in a around inf 16.1%
Final simplification16.1%
herbie shell --seed 2024130
(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)))