
(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 17 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.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.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 (+ (+ (fma x (log y) z) (+ t a)) (+ (* (+ b -0.5) (log c)) (* y i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (fma(x, log(y), z) + (t + a)) + (((b + -0.5) * log(c)) + (y * i));
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(fma(x, log(y), z) + Float64(t + a)) + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i))) end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.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 (if (<= y 6.2e+59) (+ a (+ t (+ z (+ (* x (log y)) (* (log c) (- b 0.5)))))) (+ (+ (* (+ b -0.5) (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 (y <= 6.2e+59) {
tmp = a + (t + (z + ((x * log(y)) + (log(c) * (b - 0.5)))));
} else {
tmp = (((b + -0.5) * log(c)) + (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 <= 6.2d+59) then
tmp = a + (t + (z + ((x * log(y)) + (log(c) * (b - 0.5d0)))))
else
tmp = (((b + (-0.5d0)) * log(c)) + (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 <= 6.2e+59) {
tmp = a + (t + (z + ((x * Math.log(y)) + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (((b + -0.5) * Math.log(c)) + (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 <= 6.2e+59: tmp = a + (t + (z + ((x * math.log(y)) + (math.log(c) * (b - 0.5))))) else: tmp = (((b + -0.5) * math.log(c)) + (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 <= 6.2e+59) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(Float64(Float64(b + -0.5) * log(c)) + 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 <= 6.2e+59)
tmp = a + (t + (z + ((x * log(y)) + (log(c) * (b - 0.5)))));
else
tmp = (((b + -0.5) * log(c)) + (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, 6.2e+59], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $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 6.2 \cdot 10^{+59}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right) + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if y < 6.20000000000000029e59Initial 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.9%
Taylor expanded in y around 0 97.9%
if 6.20000000000000029e59 < y Initial 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 92.6%
associate-+r+92.6%
Simplified92.6%
Final simplification95.7%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0)))
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5)));
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5)))
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5)))) end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= y 7.8e+59) (+ a (+ t (+ z (+ (* x (log y)) (* b (log c)))))) (+ (+ (* (+ b -0.5) (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 (y <= 7.8e+59) {
tmp = a + (t + (z + ((x * log(y)) + (b * log(c)))));
} else {
tmp = (((b + -0.5) * log(c)) + (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 <= 7.8d+59) then
tmp = a + (t + (z + ((x * log(y)) + (b * log(c)))))
else
tmp = (((b + (-0.5d0)) * log(c)) + (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 <= 7.8e+59) {
tmp = a + (t + (z + ((x * Math.log(y)) + (b * Math.log(c)))));
} else {
tmp = (((b + -0.5) * Math.log(c)) + (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 <= 7.8e+59: tmp = a + (t + (z + ((x * math.log(y)) + (b * math.log(c))))) else: tmp = (((b + -0.5) * math.log(c)) + (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 <= 7.8e+59) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(b * log(c)))))); else tmp = Float64(Float64(Float64(Float64(b + -0.5) * log(c)) + 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 <= 7.8e+59)
tmp = a + (t + (z + ((x * log(y)) + (b * log(c)))));
else
tmp = (((b + -0.5) * log(c)) + (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, 7.8e+59], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $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 7.8 \cdot 10^{+59}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + b \cdot \log c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right) + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if y < 7.80000000000000043e59Initial 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.9%
Taylor expanded in i around inf 62.6%
+-commutative62.6%
+-commutative62.6%
associate-+l+62.6%
Simplified62.6%
Taylor expanded in b around inf 61.2%
Taylor expanded in i around 0 96.5%
if 7.80000000000000043e59 < y Initial 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 92.6%
associate-+r+92.6%
Simplified92.6%
Final simplification94.9%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ 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.9%
Taylor expanded in b around inf 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.5%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.9e+239) (not (<= x 4.5e+234))) (+ (* y i) (* x (log y))) (+ (+ (* (+ b -0.5) (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 ((x <= -3.9e+239) || !(x <= 4.5e+234)) {
tmp = (y * i) + (x * log(y));
} else {
tmp = (((b + -0.5) * log(c)) + (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 ((x <= (-3.9d+239)) .or. (.not. (x <= 4.5d+234))) then
tmp = (y * i) + (x * log(y))
else
tmp = (((b + (-0.5d0)) * log(c)) + (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 ((x <= -3.9e+239) || !(x <= 4.5e+234)) {
tmp = (y * i) + (x * Math.log(y));
} else {
tmp = (((b + -0.5) * Math.log(c)) + (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 (x <= -3.9e+239) or not (x <= 4.5e+234): tmp = (y * i) + (x * math.log(y)) else: tmp = (((b + -0.5) * math.log(c)) + (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 ((x <= -3.9e+239) || !(x <= 4.5e+234)) tmp = Float64(Float64(y * i) + Float64(x * log(y))); else tmp = Float64(Float64(Float64(Float64(b + -0.5) * log(c)) + 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 ((x <= -3.9e+239) || ~((x <= 4.5e+234)))
tmp = (y * i) + (x * log(y));
else
tmp = (((b + -0.5) * log(c)) + (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[x, -3.9e+239], N[Not[LessEqual[x, 4.5e+234]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $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}\;x \leq -3.9 \cdot 10^{+239} \lor \neg \left(x \leq 4.5 \cdot 10^{+234}\right):\\
\;\;\;\;y \cdot i + x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right) + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -3.8999999999999998e239 or 4.49999999999999982e234 < x Initial program 99.6%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 83.1%
if -3.8999999999999998e239 < x < 4.49999999999999982e234Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 91.2%
associate-+r+91.2%
Simplified91.2%
Final simplification90.0%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ b -0.5) (log c))))
(if (<= a 1.9e+149)
(+ z (+ t_1 (* y i)))
(if (<= a 4.9e+230)
(+ (+ t a) (+ z t_1))
(+ a (+ (* y i) (* b (log c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b + -0.5) * log(c);
double tmp;
if (a <= 1.9e+149) {
tmp = z + (t_1 + (y * i));
} else if (a <= 4.9e+230) {
tmp = (t + a) + (z + t_1);
} else {
tmp = a + ((y * i) + (b * log(c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (b + (-0.5d0)) * log(c)
if (a <= 1.9d+149) then
tmp = z + (t_1 + (y * i))
else if (a <= 4.9d+230) then
tmp = (t + a) + (z + t_1)
else
tmp = a + ((y * i) + (b * log(c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b + -0.5) * Math.log(c);
double tmp;
if (a <= 1.9e+149) {
tmp = z + (t_1 + (y * i));
} else if (a <= 4.9e+230) {
tmp = (t + a) + (z + t_1);
} else {
tmp = a + ((y * i) + (b * Math.log(c)));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = (b + -0.5) * math.log(c) tmp = 0 if a <= 1.9e+149: tmp = z + (t_1 + (y * i)) elif a <= 4.9e+230: tmp = (t + a) + (z + t_1) else: tmp = a + ((y * i) + (b * math.log(c))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b + -0.5) * log(c)) tmp = 0.0 if (a <= 1.9e+149) tmp = Float64(z + Float64(t_1 + Float64(y * i))); elseif (a <= 4.9e+230) tmp = Float64(Float64(t + a) + Float64(z + t_1)); else tmp = Float64(a + Float64(Float64(y * i) + Float64(b * log(c)))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = (b + -0.5) * log(c);
tmp = 0.0;
if (a <= 1.9e+149)
tmp = z + (t_1 + (y * i));
elseif (a <= 4.9e+230)
tmp = (t + a) + (z + t_1);
else
tmp = a + ((y * i) + (b * log(c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.9e+149], N[(z + N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.9e+230], N[(N[(t + a), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := \left(b + -0.5\right) \cdot \log c\\
\mathbf{if}\;a \leq 1.9 \cdot 10^{+149}:\\
\;\;\;\;z + \left(t\_1 + y \cdot i\right)\\
\mathbf{elif}\;a \leq 4.9 \cdot 10^{+230}:\\
\;\;\;\;\left(t + a\right) + \left(z + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 1.9e149Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 53.9%
if 1.9e149 < a < 4.89999999999999969e230Initial 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 84.8%
associate-+r+84.8%
Simplified84.8%
Taylor expanded in y around inf 48.4%
associate-+r+48.4%
associate-+r+48.4%
associate-/l*48.4%
sub-neg48.4%
metadata-eval48.4%
+-commutative48.4%
Simplified48.4%
Taylor expanded in y around 0 78.0%
associate-+r+78.0%
sub-neg78.0%
metadata-eval78.0%
+-commutative78.0%
Simplified78.0%
if 4.89999999999999969e230 < a Initial 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 a around inf 96.8%
Taylor expanded in b around inf 96.8%
*-commutative96.8%
Simplified96.8%
Final simplification57.7%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 5.9e+62) (+ z (+ (* (+ b -0.5) (log c)) (* y i))) (+ (+ z (+ t a)) (+ (* y i) (* -0.5 (log c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 5.9e+62) {
tmp = z + (((b + -0.5) * log(c)) + (y * i));
} else {
tmp = (z + (t + a)) + ((y * i) + (-0.5 * log(c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 5.9d+62) then
tmp = z + (((b + (-0.5d0)) * log(c)) + (y * i))
else
tmp = (z + (t + a)) + ((y * i) + ((-0.5d0) * log(c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 5.9e+62) {
tmp = z + (((b + -0.5) * Math.log(c)) + (y * i));
} else {
tmp = (z + (t + a)) + ((y * i) + (-0.5 * Math.log(c)));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 5.9e+62: tmp = z + (((b + -0.5) * math.log(c)) + (y * i)) else: tmp = (z + (t + a)) + ((y * i) + (-0.5 * math.log(c))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 5.9e+62) tmp = Float64(z + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i))); else tmp = Float64(Float64(z + Float64(t + a)) + Float64(Float64(y * i) + Float64(-0.5 * log(c)))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 5.9e+62)
tmp = z + (((b + -0.5) * log(c)) + (y * i));
else
tmp = (z + (t + a)) + ((y * i) + (-0.5 * log(c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 5.9e+62], N[(z + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.9 \cdot 10^{+62}:\\
\;\;\;\;z + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(t + a\right)\right) + \left(y \cdot i + -0.5 \cdot \log c\right)\\
\end{array}
\end{array}
if a < 5.9000000000000003e62Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 52.9%
if 5.9000000000000003e62 < a Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 90.6%
associate-+r+90.6%
Simplified90.6%
Taylor expanded in b around 0 76.7%
Final simplification56.7%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 3.6e+103) (+ z (+ (* (+ b -0.5) (log c)) (* y i))) (+ a (+ (* y i) (* b (log c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.6e+103) {
tmp = z + (((b + -0.5) * log(c)) + (y * i));
} else {
tmp = a + ((y * i) + (b * log(c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 3.6d+103) then
tmp = z + (((b + (-0.5d0)) * log(c)) + (y * i))
else
tmp = a + ((y * i) + (b * log(c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.6e+103) {
tmp = z + (((b + -0.5) * Math.log(c)) + (y * i));
} else {
tmp = a + ((y * i) + (b * Math.log(c)));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 3.6e+103: tmp = z + (((b + -0.5) * math.log(c)) + (y * i)) else: tmp = a + ((y * i) + (b * math.log(c))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 3.6e+103) tmp = Float64(z + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i))); else tmp = Float64(a + Float64(Float64(y * i) + Float64(b * log(c)))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 3.6e+103)
tmp = z + (((b + -0.5) * log(c)) + (y * i));
else
tmp = a + ((y * i) + (b * log(c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.6e+103], N[(z + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.6 \cdot 10^{+103}:\\
\;\;\;\;z + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 3.60000000000000017e103Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 52.9%
if 3.60000000000000017e103 < a Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 80.1%
Taylor expanded in b around inf 80.1%
*-commutative80.1%
Simplified80.1%
Final simplification56.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 (<= z -9.5e+136) (+ z (* y i)) (+ a (+ (* (+ b -0.5) (log c)) (* y i)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -9.5e+136) {
tmp = z + (y * i);
} else {
tmp = a + (((b + -0.5) * log(c)) + (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 <= (-9.5d+136)) then
tmp = z + (y * i)
else
tmp = a + (((b + (-0.5d0)) * log(c)) + (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 <= -9.5e+136) {
tmp = z + (y * i);
} else {
tmp = a + (((b + -0.5) * Math.log(c)) + (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 <= -9.5e+136: tmp = z + (y * i) else: tmp = a + (((b + -0.5) * math.log(c)) + (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 <= -9.5e+136) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(Float64(Float64(b + -0.5) * log(c)) + 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 <= -9.5e+136)
tmp = z + (y * i);
else
tmp = a + (((b + -0.5) * log(c)) + (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, -9.5e+136], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+136}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)\\
\end{array}
\end{array}
if z < -9.49999999999999907e136Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 61.6%
if -9.49999999999999907e136 < z Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 55.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.42e+137) (+ z (* y i)) (+ a (+ (* y i) (* b (log c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.42e+137) {
tmp = z + (y * i);
} else {
tmp = a + ((y * i) + (b * log(c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.42d+137)) then
tmp = z + (y * i)
else
tmp = a + ((y * i) + (b * log(c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.42e+137) {
tmp = z + (y * i);
} else {
tmp = a + ((y * i) + (b * Math.log(c)));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.42e+137: tmp = z + (y * i) else: tmp = a + ((y * i) + (b * math.log(c))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.42e+137) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(Float64(y * i) + Float64(b * log(c)))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -1.42e+137)
tmp = z + (y * i);
else
tmp = a + ((y * i) + (b * log(c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.42e+137], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{+137}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \left(y \cdot i + b \cdot \log c\right)\\
\end{array}
\end{array}
if z < -1.42e137Initial program 99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 61.6%
if -1.42e137 < z Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 55.2%
Taylor expanded in b around inf 53.8%
*-commutative53.8%
Simplified53.8%
Final simplification54.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 6e-73) (* i (/ z i)) (if (<= a 1.96e+149) (* 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 <= 6e-73) {
tmp = i * (z / i);
} else if (a <= 1.96e+149) {
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 <= 6d-73) then
tmp = i * (z / i)
else if (a <= 1.96d+149) 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 <= 6e-73) {
tmp = i * (z / i);
} else if (a <= 1.96e+149) {
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 <= 6e-73: tmp = i * (z / i) elif a <= 1.96e+149: 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 <= 6e-73) tmp = Float64(i * Float64(z / i)); elseif (a <= 1.96e+149) 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 <= 6e-73)
tmp = i * (z / i);
elseif (a <= 1.96e+149)
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, 6e-73], N[(i * N[(z / i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.96e+149], 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 6 \cdot 10^{-73}:\\
\;\;\;\;i \cdot \frac{z}{i}\\
\mathbf{elif}\;a \leq 1.96 \cdot 10^{+149}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 6e-73Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in i around inf 64.7%
+-commutative64.7%
+-commutative64.7%
associate-+l+64.7%
Simplified64.7%
Taylor expanded in z around inf 11.4%
if 6e-73 < a < 1.96e149Initial 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%
Taylor expanded in y around inf 20.8%
*-commutative20.8%
Simplified20.8%
if 1.96e149 < a 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.9%
Simplified99.9%
Taylor expanded in i around inf 59.2%
+-commutative59.2%
+-commutative59.2%
associate-+l+59.2%
Simplified59.2%
Taylor expanded in a around inf 31.1%
Taylor expanded in i around 0 63.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 5.4e+103) (+ z (* y i)) (+ a (* y i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 5.4e+103) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 5.4d+103) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 5.4e+103) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 5.4e+103: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 5.4e+103) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 5.4e+103)
tmp = z + (y * i);
else
tmp = a + (y * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 5.4e+103], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.4 \cdot 10^{+103}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 5.39999999999999985e103Initial program 99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 37.7%
if 5.39999999999999985e103 < a Initial program 99.8%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 67.3%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.3e+228) (* i (/ z i)) (+ a (* y i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.3e+228) {
tmp = i * (z / i);
} else {
tmp = a + (y * i);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.3d+228)) then
tmp = i * (z / i)
else
tmp = a + (y * i)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.3e+228) {
tmp = i * (z / i);
} else {
tmp = a + (y * i);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.3e+228: tmp = i * (z / i) else: tmp = a + (y * i) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.3e+228) tmp = Float64(i * Float64(z / i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -1.3e+228)
tmp = i * (z / i);
else
tmp = a + (y * i);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.3e+228], N[(i * N[(z / i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+228}:\\
\;\;\;\;i \cdot \frac{z}{i}\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.30000000000000004e228Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in i around inf 26.4%
+-commutative26.4%
+-commutative26.4%
associate-+l+26.4%
Simplified26.4%
Taylor expanded in z around inf 27.7%
if -1.30000000000000004e228 < z Initial program 99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 39.3%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 2e+149) (* 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 <= 2e+149) {
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 <= 2d+149) 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 <= 2e+149) {
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 <= 2e+149: 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 <= 2e+149) 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 <= 2e+149)
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, 2e+149], 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 2 \cdot 10^{+149}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.0000000000000001e149Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 22.6%
*-commutative22.6%
Simplified22.6%
if 2.0000000000000001e149 < a 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.9%
Simplified99.9%
Taylor expanded in i around inf 59.2%
+-commutative59.2%
+-commutative59.2%
associate-+l+59.2%
Simplified59.2%
Taylor expanded in a around inf 31.1%
Taylor expanded in i around 0 63.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.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in i around inf 63.6%
+-commutative63.6%
+-commutative63.6%
associate-+l+63.6%
Simplified63.5%
Taylor expanded in a around inf 10.6%
Taylor expanded in i around 0 18.8%
herbie shell --seed 2024170
(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)))