
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= y 6e-26)
(+ a (+ t (+ z (+ (* x (log y)) t_1))))
(fma y i (+ a (+ t (+ z t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double tmp;
if (y <= 6e-26) {
tmp = a + (t + (z + ((x * log(y)) + t_1)));
} else {
tmp = fma(y, i, (a + (t + (z + t_1))));
}
return tmp;
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (y <= 6e-26) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + t_1)))); else tmp = fma(y, i, Float64(a + Float64(t + Float64(z + t_1)))); 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[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 6e-26], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(a + N[(t + N[(z + t$95$1), $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}\;y \leq 6 \cdot 10^{-26}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if y < 6.00000000000000023e-26Initial program 99.8%
Taylor expanded in y around 0 96.9%
if 6.00000000000000023e-26 < y Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 89.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
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= y 2.6e-24)
(+ a (+ z (+ (* x (log y)) t_1)))
(fma y i (+ a (+ t (+ z t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double tmp;
if (y <= 2.6e-24) {
tmp = a + (z + ((x * log(y)) + t_1));
} else {
tmp = fma(y, i, (a + (t + (z + t_1))));
}
return tmp;
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (y <= 2.6e-24) tmp = Float64(a + Float64(z + Float64(Float64(x * log(y)) + t_1))); else tmp = fma(y, i, Float64(a + Float64(t + Float64(z + t_1)))); 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[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.6e-24], N[(a + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(a + N[(t + N[(z + t$95$1), $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}\;y \leq 2.6 \cdot 10^{-24}:\\
\;\;\;\;a + \left(z + \left(x \cdot \log y + t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if y < 2.6e-24Initial program 99.8%
Taylor expanded in y around 0 96.9%
Taylor expanded in t around 0 83.7%
if 2.6e-24 < y Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 89.9%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= y 2.9e-25)
(+ a (+ z (+ (* x (log y)) t_1)))
(+ (* y i) (+ t_1 (+ 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 t_1 = log(c) * (b - 0.5);
double tmp;
if (y <= 2.9e-25) {
tmp = a + (z + ((x * log(y)) + t_1));
} else {
tmp = (y * i) + (t_1 + (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) :: t_1
real(8) :: tmp
t_1 = log(c) * (b - 0.5d0)
if (y <= 2.9d-25) then
tmp = a + (z + ((x * log(y)) + t_1))
else
tmp = (y * i) + (t_1 + (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 t_1 = Math.log(c) * (b - 0.5);
double tmp;
if (y <= 2.9e-25) {
tmp = a + (z + ((x * Math.log(y)) + t_1));
} else {
tmp = (y * i) + (t_1 + (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): t_1 = math.log(c) * (b - 0.5) tmp = 0 if y <= 2.9e-25: tmp = a + (z + ((x * math.log(y)) + t_1)) else: tmp = (y * i) + (t_1 + (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) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (y <= 2.9e-25) tmp = Float64(a + Float64(z + Float64(Float64(x * log(y)) + t_1))); else tmp = Float64(Float64(y * i) + Float64(t_1 + 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)
t_1 = log(c) * (b - 0.5);
tmp = 0.0;
if (y <= 2.9e-25)
tmp = a + (z + ((x * log(y)) + t_1));
else
tmp = (y * i) + (t_1 + (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_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.9e-25], N[(a + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + 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}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;y \leq 2.9 \cdot 10^{-25}:\\
\;\;\;\;a + \left(z + \left(x \cdot \log y + t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if y < 2.9000000000000001e-25Initial program 99.8%
Taylor expanded in y around 0 96.9%
Taylor expanded in t around 0 83.7%
if 2.9000000000000001e-25 < y Initial program 99.9%
Taylor expanded in x around 0 89.9%
Final simplification86.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) (+ (+ a (+ t (+ z (* x (log y))))) (* 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) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)))
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c)));
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(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])\\
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.8%
Taylor expanded in b around inf 97.4%
*-commutative97.4%
Simplified97.4%
Final simplification97.4%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (* b (log c)))) (t_2 (+ z (* x (log y)))))
(if (<= a 2e-224)
t_2
(if (<= a 2.5e-159)
t_1
(if (<= a 3.4e-81)
t_2
(if (<= a 5.1e-26)
t_1
(if (<= a 0.08)
(* x (+ (log y) (/ z x)))
(if (<= a 1.7e+37)
t_1
(if (<= a 4.4e+64)
t_2
(if (<= a 7e+120) (fma y i z) (fma 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 t_1 = (y * i) + (b * log(c));
double t_2 = z + (x * log(y));
double tmp;
if (a <= 2e-224) {
tmp = t_2;
} else if (a <= 2.5e-159) {
tmp = t_1;
} else if (a <= 3.4e-81) {
tmp = t_2;
} else if (a <= 5.1e-26) {
tmp = t_1;
} else if (a <= 0.08) {
tmp = x * (log(y) + (z / x));
} else if (a <= 1.7e+37) {
tmp = t_1;
} else if (a <= 4.4e+64) {
tmp = t_2;
} else if (a <= 7e+120) {
tmp = fma(y, i, z);
} else {
tmp = fma(y, i, 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) t_1 = Float64(Float64(y * i) + Float64(b * log(c))) t_2 = Float64(z + Float64(x * log(y))) tmp = 0.0 if (a <= 2e-224) tmp = t_2; elseif (a <= 2.5e-159) tmp = t_1; elseif (a <= 3.4e-81) tmp = t_2; elseif (a <= 5.1e-26) tmp = t_1; elseif (a <= 0.08) tmp = Float64(x * Float64(log(y) + Float64(z / x))); elseif (a <= 1.7e+37) tmp = t_1; elseif (a <= 4.4e+64) tmp = t_2; elseif (a <= 7e+120) tmp = fma(y, i, z); else tmp = fma(y, i, a); 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[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 2e-224], t$95$2, If[LessEqual[a, 2.5e-159], t$95$1, If[LessEqual[a, 3.4e-81], t$95$2, If[LessEqual[a, 5.1e-26], t$95$1, If[LessEqual[a, 0.08], N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e+37], t$95$1, If[LessEqual[a, 4.4e+64], t$95$2, If[LessEqual[a, 7e+120], N[(y * i + z), $MachinePrecision], N[(y * i + a), $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 + b \cdot \log c\\
t_2 := z + x \cdot \log y\\
\mathbf{if}\;a \leq 2 \cdot 10^{-224}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-81}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 0.08:\\
\;\;\;\;x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 7 \cdot 10^{+120}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
\end{array}
\end{array}
if a < 2e-224 or 2.50000000000000016e-159 < a < 3.3999999999999999e-81 or 1.70000000000000003e37 < a < 4.40000000000000004e64Initial program 99.8%
Taylor expanded in x around inf 77.0%
Taylor expanded in z around inf 27.7%
Taylor expanded in x around 0 32.2%
+-commutative32.2%
Simplified32.2%
if 2e-224 < a < 2.50000000000000016e-159 or 3.3999999999999999e-81 < a < 5.09999999999999991e-26 or 0.0800000000000000017 < a < 1.70000000000000003e37Initial program 99.9%
Taylor expanded in i around inf 75.5%
associate-/l*75.4%
sub-neg75.4%
metadata-eval75.4%
associate-/l*75.4%
+-commutative75.4%
Simplified75.4%
Taylor expanded in b around inf 42.6%
associate-/l*42.5%
Simplified42.5%
Taylor expanded in i around 0 45.3%
if 5.09999999999999991e-26 < a < 0.0800000000000000017Initial program 99.8%
Taylor expanded in x around inf 69.0%
Taylor expanded in z around inf 67.6%
if 4.40000000000000004e64 < a < 7.00000000000000015e120Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in z around inf 60.5%
if 7.00000000000000015e120 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 84.2%
Taylor expanded in a around inf 62.8%
Final simplification41.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 (* x (log y)))))) (t_2 (+ (* y i) (* b (log c)))))
(if (<= b -4e+147)
t_2
(if (<= b -6.8e-208)
t_1
(if (<= b -1.9e-246) (fma y i a) (if (<= b 4.9e+158) 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 = a + (t + (z + (x * log(y))));
double t_2 = (y * i) + (b * log(c));
double tmp;
if (b <= -4e+147) {
tmp = t_2;
} else if (b <= -6.8e-208) {
tmp = t_1;
} else if (b <= -1.9e-246) {
tmp = fma(y, i, a);
} else if (b <= 4.9e+158) {
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(a + Float64(t + Float64(z + Float64(x * log(y))))) t_2 = Float64(Float64(y * i) + Float64(b * log(c))) tmp = 0.0 if (b <= -4e+147) tmp = t_2; elseif (b <= -6.8e-208) tmp = t_1; elseif (b <= -1.9e-246) tmp = fma(y, i, a); elseif (b <= 4.9e+158) tmp = t_1; else tmp = t_2; 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[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4e+147], t$95$2, If[LessEqual[b, -6.8e-208], t$95$1, If[LessEqual[b, -1.9e-246], N[(y * i + a), $MachinePrecision], If[LessEqual[b, 4.9e+158], 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 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\
t_2 := y \cdot i + b \cdot \log c\\
\mathbf{if}\;b \leq -4 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -6.8 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.9 \cdot 10^{-246}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
\mathbf{elif}\;b \leq 4.9 \cdot 10^{+158}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3.9999999999999999e147 or 4.9000000000000004e158 < b Initial program 99.8%
Taylor expanded in i around inf 74.4%
associate-/l*74.4%
sub-neg74.4%
metadata-eval74.4%
associate-/l*74.4%
+-commutative74.4%
Simplified74.4%
Taylor expanded in b around inf 60.2%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in i around 0 74.5%
if -3.9999999999999999e147 < b < -6.8e-208 or -1.89999999999999988e-246 < b < 4.9000000000000004e158Initial program 99.9%
Taylor expanded in y around 0 78.9%
Taylor expanded in x around inf 70.8%
if -6.8e-208 < b < -1.89999999999999988e-246Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in a around inf 62.7%
Final simplification71.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 (<= x -2.3e+175)
(+ a (+ t (+ z (* x (log y)))))
(if (<= x 6.8e+188)
(+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t))))
(* x (+ (log y) (/ (* y i) 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 tmp;
if (x <= -2.3e+175) {
tmp = a + (t + (z + (x * log(y))));
} else if (x <= 6.8e+188) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
} else {
tmp = x * (log(y) + ((y * i) / 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) :: tmp
if (x <= (-2.3d+175)) then
tmp = a + (t + (z + (x * log(y))))
else if (x <= 6.8d+188) then
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (z + t)))
else
tmp = x * (log(y) + ((y * i) / 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 tmp;
if (x <= -2.3e+175) {
tmp = a + (t + (z + (x * Math.log(y))));
} else if (x <= 6.8e+188) {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
} else {
tmp = x * (Math.log(y) + ((y * i) / 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): tmp = 0 if x <= -2.3e+175: tmp = a + (t + (z + (x * math.log(y)))) elif x <= 6.8e+188: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t))) else: tmp = x * (math.log(y) + ((y * i) / 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) tmp = 0.0 if (x <= -2.3e+175) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); elseif (x <= 6.8e+188) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))); else tmp = Float64(x * Float64(log(y) + Float64(Float64(y * i) / 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)
tmp = 0.0;
if (x <= -2.3e+175)
tmp = a + (t + (z + (x * log(y))));
elseif (x <= 6.8e+188)
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
else
tmp = x * (log(y) + ((y * i) / 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_] := If[LessEqual[x, -2.3e+175], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e+188], 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[(x * N[(N[Log[y], $MachinePrecision] + N[(N[(y * i), $MachinePrecision] / 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}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+175}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{+188}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y + \frac{y \cdot i}{x}\right)\\
\end{array}
\end{array}
if x < -2.3e175Initial program 99.7%
Taylor expanded in y around 0 84.5%
Taylor expanded in x around inf 80.1%
if -2.3e175 < x < 6.79999999999999991e188Initial program 99.9%
Taylor expanded in x around 0 95.6%
if 6.79999999999999991e188 < x Initial program 99.7%
Taylor expanded in x around inf 99.7%
Taylor expanded in i around inf 84.3%
Final simplification92.6%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.15e+170)
(+ a (+ t (+ z (* x (log y)))))
(if (<= x 2.4e+186)
(+ a (+ t (+ z (* (log c) (- b 0.5)))))
(* x (+ (log y) (/ (* y i) 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 tmp;
if (x <= -1.15e+170) {
tmp = a + (t + (z + (x * log(y))));
} else if (x <= 2.4e+186) {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
} else {
tmp = x * (log(y) + ((y * i) / 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) :: tmp
if (x <= (-1.15d+170)) then
tmp = a + (t + (z + (x * log(y))))
else if (x <= 2.4d+186) then
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
else
tmp = x * (log(y) + ((y * i) / 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 tmp;
if (x <= -1.15e+170) {
tmp = a + (t + (z + (x * Math.log(y))));
} else if (x <= 2.4e+186) {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
} else {
tmp = x * (Math.log(y) + ((y * i) / 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): tmp = 0 if x <= -1.15e+170: tmp = a + (t + (z + (x * math.log(y)))) elif x <= 2.4e+186: tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) else: tmp = x * (math.log(y) + ((y * i) / 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) tmp = 0.0 if (x <= -1.15e+170) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); elseif (x <= 2.4e+186) tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); else tmp = Float64(x * Float64(log(y) + Float64(Float64(y * i) / 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)
tmp = 0.0;
if (x <= -1.15e+170)
tmp = a + (t + (z + (x * log(y))));
elseif (x <= 2.4e+186)
tmp = a + (t + (z + (log(c) * (b - 0.5))));
else
tmp = x * (log(y) + ((y * i) / 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_] := If[LessEqual[x, -1.15e+170], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e+186], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[y], $MachinePrecision] + N[(N[(y * i), $MachinePrecision] / 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}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+170}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+186}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y + \frac{y \cdot i}{x}\right)\\
\end{array}
\end{array}
if x < -1.15e170Initial program 99.7%
Taylor expanded in y around 0 84.5%
Taylor expanded in x around inf 80.1%
if -1.15e170 < x < 2.39999999999999995e186Initial program 99.9%
Taylor expanded in y around 0 76.3%
Taylor expanded in x around 0 72.3%
if 2.39999999999999995e186 < x Initial program 99.7%
Taylor expanded in x around inf 99.7%
Taylor expanded in i around inf 84.3%
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 (<= x -8.5e+168)
(+ a (+ t (+ z (* x (log y)))))
(if (<= x 3.9e+186)
(+ a (+ z (* (log c) (- b 0.5))))
(* x (+ (log y) (/ (* y i) 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 tmp;
if (x <= -8.5e+168) {
tmp = a + (t + (z + (x * log(y))));
} else if (x <= 3.9e+186) {
tmp = a + (z + (log(c) * (b - 0.5)));
} else {
tmp = x * (log(y) + ((y * i) / 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) :: tmp
if (x <= (-8.5d+168)) then
tmp = a + (t + (z + (x * log(y))))
else if (x <= 3.9d+186) then
tmp = a + (z + (log(c) * (b - 0.5d0)))
else
tmp = x * (log(y) + ((y * i) / 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 tmp;
if (x <= -8.5e+168) {
tmp = a + (t + (z + (x * Math.log(y))));
} else if (x <= 3.9e+186) {
tmp = a + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = x * (Math.log(y) + ((y * i) / 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): tmp = 0 if x <= -8.5e+168: tmp = a + (t + (z + (x * math.log(y)))) elif x <= 3.9e+186: tmp = a + (z + (math.log(c) * (b - 0.5))) else: tmp = x * (math.log(y) + ((y * i) / 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) tmp = 0.0 if (x <= -8.5e+168) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); elseif (x <= 3.9e+186) tmp = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(x * Float64(log(y) + Float64(Float64(y * i) / 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)
tmp = 0.0;
if (x <= -8.5e+168)
tmp = a + (t + (z + (x * log(y))));
elseif (x <= 3.9e+186)
tmp = a + (z + (log(c) * (b - 0.5)));
else
tmp = x * (log(y) + ((y * i) / 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_] := If[LessEqual[x, -8.5e+168], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e+186], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[y], $MachinePrecision] + N[(N[(y * i), $MachinePrecision] / 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}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+168}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+186}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y + \frac{y \cdot i}{x}\right)\\
\end{array}
\end{array}
if x < -8.50000000000000069e168Initial program 99.7%
Taylor expanded in y around 0 84.5%
Taylor expanded in x around inf 80.1%
if -8.50000000000000069e168 < x < 3.9000000000000001e186Initial program 99.9%
Taylor expanded in y around 0 76.3%
Taylor expanded in x around 0 72.3%
Taylor expanded in t around 0 58.6%
if 3.9000000000000001e186 < x Initial program 99.7%
Taylor expanded in x around inf 99.7%
Taylor expanded in i around inf 84.3%
Final simplification63.8%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 9.6e-203) (+ z (* x (log y))) (if (<= a 6.4e+120) (fma y i z) (fma 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 <= 9.6e-203) {
tmp = z + (x * log(y));
} else if (a <= 6.4e+120) {
tmp = fma(y, i, z);
} else {
tmp = fma(y, i, 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 <= 9.6e-203) tmp = Float64(z + Float64(x * log(y))); elseif (a <= 6.4e+120) tmp = fma(y, i, z); else tmp = fma(y, i, a); 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[a, 9.6e-203], N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.4e+120], N[(y * i + z), $MachinePrecision], N[(y * i + a), $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 9.6 \cdot 10^{-203}:\\
\;\;\;\;z + x \cdot \log y\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{+120}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
\end{array}
\end{array}
if a < 9.5999999999999994e-203Initial program 99.8%
Taylor expanded in x around inf 75.2%
Taylor expanded in z around inf 28.0%
Taylor expanded in x around 0 32.8%
+-commutative32.8%
Simplified32.8%
if 9.5999999999999994e-203 < a < 6.39999999999999964e120Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 88.6%
Taylor expanded in z around inf 46.0%
if 6.39999999999999964e120 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 84.2%
Taylor expanded in a around inf 62.8%
Final simplification41.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 (<= a 3.1e-104) z (if (<= a 6.4e+120) (* i (+ y (/ z i))) (fma 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 <= 3.1e-104) {
tmp = z;
} else if (a <= 6.4e+120) {
tmp = i * (y + (z / i));
} else {
tmp = fma(y, i, 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 <= 3.1e-104) tmp = z; elseif (a <= 6.4e+120) tmp = Float64(i * Float64(y + Float64(z / i))); else tmp = fma(y, i, a); 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[a, 3.1e-104], z, If[LessEqual[a, 6.4e+120], N[(i * N[(y + N[(z / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + a), $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 3.1 \cdot 10^{-104}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{+120}:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
\end{array}
\end{array}
if a < 3.09999999999999976e-104Initial program 99.8%
Taylor expanded in y around 0 79.7%
Taylor expanded in z around inf 15.1%
if 3.09999999999999976e-104 < a < 6.39999999999999964e120Initial program 99.9%
Taylor expanded in i around inf 71.4%
associate-/l*71.4%
sub-neg71.4%
metadata-eval71.4%
associate-/l*71.4%
+-commutative71.4%
Simplified71.4%
Taylor expanded in z around inf 40.3%
if 6.39999999999999964e120 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 84.2%
Taylor expanded in a around inf 62.8%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 8e+120) (fma y i z) (fma 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 <= 8e+120) {
tmp = fma(y, i, z);
} else {
tmp = fma(y, i, 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 <= 8e+120) tmp = fma(y, i, z); else tmp = fma(y, i, a); 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[a, 8e+120], N[(y * i + z), $MachinePrecision], N[(y * i + a), $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 8 \cdot 10^{+120}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
\end{array}
\end{array}
if a < 7.9999999999999998e120Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 83.0%
Taylor expanded in z around inf 37.2%
if 7.9999999999999998e120 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 84.2%
Taylor expanded in a around inf 62.8%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 3.2e-104) z (if (<= a 2.66e+126) (* i (+ y (/ z 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 <= 3.2e-104) {
tmp = z;
} else if (a <= 2.66e+126) {
tmp = i * (y + (z / 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 <= 3.2d-104) then
tmp = z
else if (a <= 2.66d+126) then
tmp = i * (y + (z / 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 <= 3.2e-104) {
tmp = z;
} else if (a <= 2.66e+126) {
tmp = i * (y + (z / 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 <= 3.2e-104: tmp = z elif a <= 2.66e+126: tmp = i * (y + (z / 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 <= 3.2e-104) tmp = z; elseif (a <= 2.66e+126) tmp = Float64(i * Float64(y + Float64(z / 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 <= 3.2e-104)
tmp = z;
elseif (a <= 2.66e+126)
tmp = i * (y + (z / 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, 3.2e-104], z, If[LessEqual[a, 2.66e+126], N[(i * N[(y + N[(z / i), $MachinePrecision]), $MachinePrecision]), $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 3.2 \cdot 10^{-104}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 2.66 \cdot 10^{+126}:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 3.19999999999999989e-104Initial program 99.8%
Taylor expanded in y around 0 79.7%
Taylor expanded in z around inf 15.1%
if 3.19999999999999989e-104 < a < 2.6599999999999999e126Initial program 99.9%
Taylor expanded in i around inf 72.9%
associate-/l*72.9%
sub-neg72.9%
metadata-eval72.9%
associate-/l*72.9%
+-commutative72.9%
Simplified72.9%
Taylor expanded in z around inf 41.9%
if 2.6599999999999999e126 < a Initial program 99.8%
Taylor expanded in a around inf 42.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 1.15e-79) z (if (<= a 1.1e+248) (* i (+ y (/ a 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 <= 1.15e-79) {
tmp = z;
} else if (a <= 1.1e+248) {
tmp = i * (y + (a / 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 <= 1.15d-79) then
tmp = z
else if (a <= 1.1d+248) then
tmp = i * (y + (a / 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 <= 1.15e-79) {
tmp = z;
} else if (a <= 1.1e+248) {
tmp = i * (y + (a / 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 <= 1.15e-79: tmp = z elif a <= 1.1e+248: tmp = i * (y + (a / 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 <= 1.15e-79) tmp = z; elseif (a <= 1.1e+248) tmp = Float64(i * Float64(y + Float64(a / 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 <= 1.15e-79)
tmp = z;
elseif (a <= 1.1e+248)
tmp = i * (y + (a / 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, 1.15e-79], z, If[LessEqual[a, 1.1e+248], N[(i * N[(y + N[(a / i), $MachinePrecision]), $MachinePrecision]), $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 1.15 \cdot 10^{-79}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{+248}:\\
\;\;\;\;i \cdot \left(y + \frac{a}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 1.15000000000000006e-79Initial program 99.8%
Taylor expanded in y around 0 80.2%
Taylor expanded in z around inf 15.3%
if 1.15000000000000006e-79 < a < 1.1e248Initial program 99.8%
Taylor expanded in i around inf 73.0%
associate-/l*73.0%
sub-neg73.0%
metadata-eval73.0%
associate-/l*73.0%
+-commutative73.0%
Simplified73.0%
Taylor expanded in a around inf 37.7%
if 1.1e248 < a Initial program 100.0%
Taylor expanded in a around inf 63.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 (<= a 4.2e-80) z (if (<= a 6e+120) (* 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.2e-80) {
tmp = z;
} else if (a <= 6e+120) {
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.2d-80) then
tmp = z
else if (a <= 6d+120) 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.2e-80) {
tmp = z;
} else if (a <= 6e+120) {
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.2e-80: tmp = z elif a <= 6e+120: 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.2e-80) tmp = z; elseif (a <= 6e+120) 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.2e-80)
tmp = z;
elseif (a <= 6e+120)
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.2e-80], z, If[LessEqual[a, 6e+120], 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.2 \cdot 10^{-80}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 6 \cdot 10^{+120}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 4.20000000000000003e-80Initial program 99.8%
Taylor expanded in y around 0 80.2%
Taylor expanded in z around inf 15.3%
if 4.20000000000000003e-80 < a < 6e120Initial program 99.9%
Taylor expanded in y around inf 35.1%
*-commutative35.1%
Simplified35.1%
if 6e120 < a Initial program 99.9%
Taylor expanded in a around inf 42.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 (<= a 7.5e+120) 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 <= 7.5e+120) {
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 <= 7.5d+120) 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 <= 7.5e+120) {
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 <= 7.5e+120: 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 <= 7.5e+120) 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 <= 7.5e+120)
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, 7.5e+120], 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 7.5 \cdot 10^{+120}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 7.5000000000000006e120Initial program 99.8%
Taylor expanded in y around 0 76.5%
Taylor expanded in z around inf 16.2%
if 7.5000000000000006e120 < a Initial program 99.9%
Taylor expanded in a around inf 42.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.8%
Taylor expanded in a around inf 17.7%
herbie shell --seed 2024091
(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)))