Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B

Percentage Accurate: 99.8% → 99.8%
Time: 16.7s
Alternatives: 19
Speedup: 1.0×

Specification

?
\[\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} \]
(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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.8% accurate, 1.0× speedup?

\[\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} \]
(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}

Alternative 1: 99.8% accurate, 0.4× speedup?

\[\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} \]
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}
Derivation
  1. Initial program 99.5%

    \[\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 \]
  2. Step-by-step derivation
    1. associate-+l+99.5%

      \[\leadsto \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right)} \]
    2. +-commutative99.5%

      \[\leadsto \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)} + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    3. associate-+l+99.5%

      \[\leadsto \left(a + \color{blue}{\left(x \cdot \log y + \left(z + t\right)\right)}\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    4. associate-+r+99.5%

      \[\leadsto \color{blue}{\left(\left(a + x \cdot \log y\right) + \left(z + t\right)\right)} + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    5. +-commutative99.5%

      \[\leadsto \left(\left(a + x \cdot \log y\right) + \color{blue}{\left(t + z\right)}\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    6. +-commutative99.5%

      \[\leadsto \left(\color{blue}{\left(x \cdot \log y + a\right)} + \left(t + z\right)\right) + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    7. associate-+l+99.5%

      \[\leadsto \color{blue}{\left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right)} + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right) \]
    8. associate-+l+99.5%

      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i} \]
    9. +-commutative99.5%

      \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
    10. fma-define99.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right) + \left(b - 0.5\right) \cdot \log c\right)} \]
    11. +-commutative99.5%

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\left(b - 0.5\right) \cdot \log c + \left(\left(\left(x \cdot \log y + a\right) + t\right) + z\right)}\right) \]
    12. fma-define99.5%

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\mathsf{fma}\left(b - 0.5, \log c, \left(\left(x \cdot \log y + a\right) + t\right) + z\right)}\right) \]
    13. sub-neg99.5%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\color{blue}{b + \left(-0.5\right)}, \log c, \left(\left(x \cdot \log y + a\right) + t\right) + z\right)\right) \]
    14. metadata-eval99.5%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + \color{blue}{-0.5}, \log c, \left(\left(x \cdot \log y + a\right) + t\right) + z\right)\right) \]
    15. +-commutative99.5%

      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{z + \left(\left(x \cdot \log y + a\right) + t\right)}\right)\right) \]
  3. Simplified99.5%

    \[\leadsto \color{blue}{\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)} \]
  4. Add Preprocessing
  5. Final simplification99.5%

    \[\leadsto \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) \]
  6. Add Preprocessing

Alternative 2: 90.6% accurate, 1.0× speedup?

\[\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.7 \cdot 10^{+51}:\\ \;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(z + t\_1\right)\right)\\ \end{array} \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
 (let* ((t_1 (* (log c) (- b 0.5))))
   (if (<= y 2.7e+51)
     (+ a (+ t (+ z (+ (* x (log y)) t_1))))
     (+ (* y i) (+ a (+ 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.7e+51) {
		tmp = a + (t + (z + ((x * log(y)) + t_1)));
	} else {
		tmp = (y * i) + (a + (z + t_1));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = log(c) * (b - 0.5d0)
    if (y <= 2.7d+51) then
        tmp = a + (t + (z + ((x * log(y)) + t_1)))
    else
        tmp = (y * i) + (a + (z + t_1))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = Math.log(c) * (b - 0.5);
	double tmp;
	if (y <= 2.7e+51) {
		tmp = a + (t + (z + ((x * Math.log(y)) + t_1)));
	} else {
		tmp = (y * i) + (a + (z + t_1));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	t_1 = math.log(c) * (b - 0.5)
	tmp = 0
	if y <= 2.7e+51:
		tmp = a + (t + (z + ((x * math.log(y)) + t_1)))
	else:
		tmp = (y * i) + (a + (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.7e+51)
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + t_1))));
	else
		tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t_1)));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = log(c) * (b - 0.5);
	tmp = 0.0;
	if (y <= 2.7e+51)
		tmp = a + (t + (z + ((x * log(y)) + t_1)));
	else
		tmp = (y * i) + (a + (z + t_1));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.7e+51], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t$95$1), $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.7 \cdot 10^{+51}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\_1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.69999999999999992e51

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 96.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]

    if 2.69999999999999992e51 < y

    1. Initial program 99.0%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 91.3%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in t around 0 79.1%

      \[\leadsto \color{blue}{\left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 2.7 \cdot 10^{+51}:\\ \;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 99.8% accurate, 1.0× speedup?

\[\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} \]
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}
Derivation
  1. Initial program 99.5%

    \[\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 \]
  2. Add Preprocessing
  3. Final simplification99.5%

    \[\leadsto \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 \]
  4. Add Preprocessing

Alternative 4: 89.4% accurate, 1.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;y \leq 8 \cdot 10^{+51}:\\ \;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + b \cdot \log c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \end{array} \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
 (if (<= y 8e+51)
   (+ a (+ t (+ z (+ (* x (log y)) (* b (log c))))))
   (+ (* y i) (+ a (+ z (* (log c) (- b 0.5)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= 8e+51) {
		tmp = a + (t + (z + ((x * log(y)) + (b * log(c)))));
	} else {
		tmp = (y * i) + (a + (z + (log(c) * (b - 0.5))));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (y <= 8d+51) then
        tmp = a + (t + (z + ((x * log(y)) + (b * log(c)))))
    else
        tmp = (y * i) + (a + (z + (log(c) * (b - 0.5d0))))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= 8e+51) {
		tmp = a + (t + (z + ((x * Math.log(y)) + (b * Math.log(c)))));
	} else {
		tmp = (y * i) + (a + (z + (Math.log(c) * (b - 0.5))));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= 8e+51:
		tmp = a + (t + (z + ((x * math.log(y)) + (b * math.log(c)))))
	else:
		tmp = (y * i) + (a + (z + (math.log(c) * (b - 0.5))))
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= 8e+51)
		tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(b * log(c))))));
	else
		tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5)))));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= 8e+51)
		tmp = a + (t + (z + ((x * log(y)) + (b * log(c)))));
	else
		tmp = (y * i) + (a + (z + (log(c) * (b - 0.5))));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 8e+51], 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[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8 \cdot 10^{+51}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + b \cdot \log c\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 8e51

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 96.1%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in b around inf 92.9%

      \[\leadsto a + \left(t + \left(z + \left(x \cdot \log y + \color{blue}{b \cdot \log c}\right)\right)\right) \]

    if 8e51 < y

    1. Initial program 99.0%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 91.3%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in t around 0 79.1%

      \[\leadsto \color{blue}{\left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 8 \cdot 10^{+51}:\\ \;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + b \cdot \log c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 90.3% accurate, 1.7× speedup?

\[\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 -7.5 \cdot 10^{+180}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+247}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + x \cdot \left(\log y - \frac{a \cdot \left(-1 - \frac{t}{a}\right)}{x}\right)\\ \end{array} \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
 (if (<= x -7.5e+180)
   (+ a (+ t (+ z (* x (log y)))))
   (if (<= x 9.6e+247)
     (+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))
     (+ (* y i) (* x (- (log y) (/ (* a (- -1.0 (/ t a))) x)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (x <= -7.5e+180) {
		tmp = a + (t + (z + (x * log(y))));
	} else if (x <= 9.6e+247) {
		tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
	} else {
		tmp = (y * i) + (x * (log(y) - ((a * (-1.0 - (t / a))) / x)));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (x <= (-7.5d+180)) then
        tmp = a + (t + (z + (x * log(y))))
    else if (x <= 9.6d+247) then
        tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
    else
        tmp = (y * i) + (x * (log(y) - ((a * ((-1.0d0) - (t / a))) / x)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (x <= -7.5e+180) {
		tmp = a + (t + (z + (x * Math.log(y))));
	} else if (x <= 9.6e+247) {
		tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
	} else {
		tmp = (y * i) + (x * (Math.log(y) - ((a * (-1.0 - (t / a))) / x)));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if x <= -7.5e+180:
		tmp = a + (t + (z + (x * math.log(y))))
	elif x <= 9.6e+247:
		tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5)))))
	else:
		tmp = (y * i) + (x * (math.log(y) - ((a * (-1.0 - (t / a))) / x)))
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (x <= -7.5e+180)
		tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y)))));
	elseif (x <= 9.6e+247)
		tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))));
	else
		tmp = Float64(Float64(y * i) + Float64(x * Float64(log(y) - Float64(Float64(a * Float64(-1.0 - Float64(t / a))) / x))));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (x <= -7.5e+180)
		tmp = a + (t + (z + (x * log(y))));
	elseif (x <= 9.6e+247)
		tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
	else
		tmp = (y * i) + (x * (log(y) - ((a * (-1.0 - (t / a))) / x)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -7.5e+180], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.6e+247], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(x * N[(N[Log[y], $MachinePrecision] - N[(N[(a * N[(-1.0 - N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+180}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\

\mathbf{elif}\;x \leq 9.6 \cdot 10^{+247}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + x \cdot \left(\log y - \frac{a \cdot \left(-1 - \frac{t}{a}\right)}{x}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.5000000000000003e180

    1. Initial program 99.7%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 91.4%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in x around inf 87.2%

      \[\leadsto a + \left(t + \left(z + \color{blue}{x \cdot \log y}\right)\right) \]

    if -7.5000000000000003e180 < x < 9.6e247

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 93.4%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]

    if 9.6e247 < x

    1. Initial program 93.6%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 58.6%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\frac{x \cdot \log y}{a} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right)} + y \cdot i \]
    4. Step-by-step derivation
      1. associate-/l*58.6%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\color{blue}{x \cdot \frac{\log y}{a}} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      2. sub-neg58.6%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)}}{a}\right)\right)\right)\right) + y \cdot i \]
      3. metadata-eval58.6%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \left(b + \color{blue}{-0.5}\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      4. associate-/l*58.7%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \color{blue}{\log c \cdot \frac{b + -0.5}{a}}\right)\right)\right)\right) + y \cdot i \]
    5. Simplified58.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \log c \cdot \frac{b + -0.5}{a}\right)\right)\right)\right)} + y \cdot i \]
    6. Taylor expanded in x around inf 52.5%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \color{blue}{\frac{x \cdot \log y}{a}}\right)\right) + y \cdot i \]
    7. Step-by-step derivation
      1. associate-*r/52.5%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \color{blue}{x \cdot \frac{\log y}{a}}\right)\right) + y \cdot i \]
    8. Simplified52.5%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \color{blue}{x \cdot \frac{\log y}{a}}\right)\right) + y \cdot i \]
    9. Taylor expanded in x around inf 75.4%

      \[\leadsto \color{blue}{x \cdot \left(\log y + \frac{a \cdot \left(1 + \frac{t}{a}\right)}{x}\right)} + y \cdot i \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -7.5 \cdot 10^{+180}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;x \leq 9.6 \cdot 10^{+247}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + x \cdot \left(\log y - \frac{a \cdot \left(-1 - \frac{t}{a}\right)}{x}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 89.9% accurate, 1.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -1.12 \cdot 10^{+176}:\\ \;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\ \mathbf{elif}\;x \leq 3.35 \cdot 10^{+258}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 + y \cdot i\\ \end{array} \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
 (let* ((t_1 (* x (log y))))
   (if (<= x -1.12e+176)
     (+ a (+ t (+ z t_1)))
     (if (<= x 3.35e+258)
       (+ (* y i) (+ a (+ t (+ z (* (log c) (- b 0.5))))))
       (+ t_1 (* y i))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -1.12e+176) {
		tmp = a + (t + (z + t_1));
	} else if (x <= 3.35e+258) {
		tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
	} else {
		tmp = t_1 + (y * i);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * log(y)
    if (x <= (-1.12d+176)) then
        tmp = a + (t + (z + t_1))
    else if (x <= 3.35d+258) then
        tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5d0)))))
    else
        tmp = t_1 + (y * i)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * Math.log(y);
	double tmp;
	if (x <= -1.12e+176) {
		tmp = a + (t + (z + t_1));
	} else if (x <= 3.35e+258) {
		tmp = (y * i) + (a + (t + (z + (Math.log(c) * (b - 0.5)))));
	} else {
		tmp = t_1 + (y * i);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	t_1 = x * math.log(y)
	tmp = 0
	if x <= -1.12e+176:
		tmp = a + (t + (z + t_1))
	elif x <= 3.35e+258:
		tmp = (y * i) + (a + (t + (z + (math.log(c) * (b - 0.5)))))
	else:
		tmp = t_1 + (y * i)
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -1.12e+176)
		tmp = Float64(a + Float64(t + Float64(z + t_1)));
	elseif (x <= 3.35e+258)
		tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))));
	else
		tmp = Float64(t_1 + Float64(y * i));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x * log(y);
	tmp = 0.0;
	if (x <= -1.12e+176)
		tmp = a + (t + (z + t_1));
	elseif (x <= 3.35e+258)
		tmp = (y * i) + (a + (t + (z + (log(c) * (b - 0.5)))));
	else
		tmp = t_1 + (y * i);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.12e+176], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.35e+258], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.12 \cdot 10^{+176}:\\
\;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\

\mathbf{elif}\;x \leq 3.35 \cdot 10^{+258}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 + y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.12e176

    1. Initial program 99.7%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 91.4%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in x around inf 87.2%

      \[\leadsto a + \left(t + \left(z + \color{blue}{x \cdot \log y}\right)\right) \]

    if -1.12e176 < x < 3.34999999999999988e258

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 93.4%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]

    if 3.34999999999999988e258 < x

    1. Initial program 93.1%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around -inf 62.7%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
    4. Taylor expanded in x around inf 74.8%

      \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot \left(x \cdot \log y\right)\right)} + y \cdot i \]
    5. Step-by-step derivation
      1. mul-1-neg74.8%

        \[\leadsto -1 \cdot \color{blue}{\left(-x \cdot \log y\right)} + y \cdot i \]
      2. *-commutative74.8%

        \[\leadsto -1 \cdot \left(-\color{blue}{\log y \cdot x}\right) + y \cdot i \]
      3. distribute-rgt-neg-in74.8%

        \[\leadsto -1 \cdot \color{blue}{\left(\log y \cdot \left(-x\right)\right)} + y \cdot i \]
    6. Simplified74.8%

      \[\leadsto -1 \cdot \color{blue}{\left(\log y \cdot \left(-x\right)\right)} + y \cdot i \]
  3. Recombined 3 regimes into one program.
  4. Final simplification91.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.12 \cdot 10^{+176}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;x \leq 3.35 \cdot 10^{+258}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 71.4% accurate, 1.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+249} \lor \neg \left(b \leq -7.2 \cdot 10^{+206} \lor \neg \left(b \leq -9.4 \cdot 10^{+188}\right) \land b \leq 1.08 \cdot 10^{+250}\right):\\ \;\;\;\;b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\ \end{array} \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
 (if (or (<= b -1.65e+249)
         (not
          (or (<= b -7.2e+206) (and (not (<= b -9.4e+188)) (<= b 1.08e+250)))))
   (* b (log c))
   (+ (* y i) (+ t (+ z a)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((b <= -1.65e+249) || !((b <= -7.2e+206) || (!(b <= -9.4e+188) && (b <= 1.08e+250)))) {
		tmp = b * log(c);
	} else {
		tmp = (y * i) + (t + (z + a));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((b <= (-1.65d+249)) .or. (.not. (b <= (-7.2d+206)) .or. (.not. (b <= (-9.4d+188))) .and. (b <= 1.08d+250))) then
        tmp = b * log(c)
    else
        tmp = (y * i) + (t + (z + a))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((b <= -1.65e+249) || !((b <= -7.2e+206) || (!(b <= -9.4e+188) && (b <= 1.08e+250)))) {
		tmp = b * Math.log(c);
	} else {
		tmp = (y * i) + (t + (z + a));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (b <= -1.65e+249) or not ((b <= -7.2e+206) or (not (b <= -9.4e+188) and (b <= 1.08e+250))):
		tmp = b * math.log(c)
	else:
		tmp = (y * i) + (t + (z + a))
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((b <= -1.65e+249) || !((b <= -7.2e+206) || (!(b <= -9.4e+188) && (b <= 1.08e+250))))
		tmp = Float64(b * log(c));
	else
		tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a)));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((b <= -1.65e+249) || ~(((b <= -7.2e+206) || (~((b <= -9.4e+188)) && (b <= 1.08e+250)))))
		tmp = b * log(c);
	else
		tmp = (y * i) + (t + (z + a));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -1.65e+249], N[Not[Or[LessEqual[b, -7.2e+206], And[N[Not[LessEqual[b, -9.4e+188]], $MachinePrecision], LessEqual[b, 1.08e+250]]]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.65 \cdot 10^{+249} \lor \neg \left(b \leq -7.2 \cdot 10^{+206} \lor \neg \left(b \leq -9.4 \cdot 10^{+188}\right) \land b \leq 1.08 \cdot 10^{+250}\right):\\
\;\;\;\;b \cdot \log c\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.65000000000000007e249 or -7.20000000000000057e206 < b < -9.3999999999999995e188 or 1.08000000000000007e250 < b

    1. Initial program 99.6%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf 76.4%

      \[\leadsto \color{blue}{b \cdot \log c} \]
    4. Step-by-step derivation
      1. *-commutative76.4%

        \[\leadsto \color{blue}{\log c \cdot b} \]
    5. Simplified76.4%

      \[\leadsto \color{blue}{\log c \cdot b} \]

    if -1.65000000000000007e249 < b < -7.20000000000000057e206 or -9.3999999999999995e188 < b < 1.08000000000000007e250

    1. Initial program 99.5%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 76.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\frac{x \cdot \log y}{a} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right)} + y \cdot i \]
    4. Step-by-step derivation
      1. associate-/l*76.7%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\color{blue}{x \cdot \frac{\log y}{a}} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      2. sub-neg76.7%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)}}{a}\right)\right)\right)\right) + y \cdot i \]
      3. metadata-eval76.7%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \left(b + \color{blue}{-0.5}\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      4. associate-/l*76.7%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \color{blue}{\log c \cdot \frac{b + -0.5}{a}}\right)\right)\right)\right) + y \cdot i \]
    5. Simplified76.7%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \log c \cdot \frac{b + -0.5}{a}\right)\right)\right)\right)} + y \cdot i \]
    6. Taylor expanded in z around inf 62.9%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \color{blue}{\frac{z}{a}}\right)\right) + y \cdot i \]
    7. Taylor expanded in a around 0 75.4%

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
    8. Step-by-step derivation
      1. +-commutative75.4%

        \[\leadsto \color{blue}{\left(\left(t + z\right) + a\right)} + y \cdot i \]
      2. associate-+l+75.4%

        \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]
    9. Simplified75.4%

      \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.65 \cdot 10^{+249} \lor \neg \left(b \leq -7.2 \cdot 10^{+206} \lor \neg \left(b \leq -9.4 \cdot 10^{+188}\right) \land b \leq 1.08 \cdot 10^{+250}\right):\\ \;\;\;\;b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 73.8% accurate, 1.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+145}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{elif}\;b - 0.5 \leq 5 \cdot 10^{+109}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \end{array} \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
 (if (<= (- b 0.5) -5e+145)
   (+ (* y i) (* b (log c)))
   (if (<= (- b 0.5) 5e+109)
     (+ (* y i) (+ t (+ z a)))
     (+ a (+ z (* (log c) (- b 0.5)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((b - 0.5) <= -5e+145) {
		tmp = (y * i) + (b * log(c));
	} else if ((b - 0.5) <= 5e+109) {
		tmp = (y * i) + (t + (z + a));
	} else {
		tmp = a + (z + (log(c) * (b - 0.5)));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((b - 0.5d0) <= (-5d+145)) then
        tmp = (y * i) + (b * log(c))
    else if ((b - 0.5d0) <= 5d+109) then
        tmp = (y * i) + (t + (z + a))
    else
        tmp = a + (z + (log(c) * (b - 0.5d0)))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((b - 0.5) <= -5e+145) {
		tmp = (y * i) + (b * Math.log(c));
	} else if ((b - 0.5) <= 5e+109) {
		tmp = (y * i) + (t + (z + a));
	} else {
		tmp = a + (z + (Math.log(c) * (b - 0.5)));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (b - 0.5) <= -5e+145:
		tmp = (y * i) + (b * math.log(c))
	elif (b - 0.5) <= 5e+109:
		tmp = (y * i) + (t + (z + a))
	else:
		tmp = a + (z + (math.log(c) * (b - 0.5)))
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(b - 0.5) <= -5e+145)
		tmp = Float64(Float64(y * i) + Float64(b * log(c)));
	elseif (Float64(b - 0.5) <= 5e+109)
		tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a)));
	else
		tmp = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5))));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((b - 0.5) <= -5e+145)
		tmp = (y * i) + (b * log(c));
	elseif ((b - 0.5) <= 5e+109)
		tmp = (y * i) + (t + (z + a));
	else
		tmp = a + (z + (log(c) * (b - 0.5)));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+145], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+109], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+145}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\

\mathbf{elif}\;b - 0.5 \leq 5 \cdot 10^{+109}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 b #s(literal 1/2 binary64)) < -4.99999999999999967e145

    1. Initial program 99.7%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 87.7%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in t around 0 81.5%

      \[\leadsto \color{blue}{\left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} + y \cdot i \]
    5. Taylor expanded in b around inf 74.7%

      \[\leadsto \color{blue}{b \cdot \log c} + y \cdot i \]
    6. Step-by-step derivation
      1. *-commutative74.7%

        \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
    7. Simplified74.7%

      \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]

    if -4.99999999999999967e145 < (-.f64 b #s(literal 1/2 binary64)) < 5.0000000000000001e109

    1. Initial program 99.4%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 80.0%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\frac{x \cdot \log y}{a} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right)} + y \cdot i \]
    4. Step-by-step derivation
      1. associate-/l*80.0%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\color{blue}{x \cdot \frac{\log y}{a}} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      2. sub-neg80.0%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)}}{a}\right)\right)\right)\right) + y \cdot i \]
      3. metadata-eval80.0%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \left(b + \color{blue}{-0.5}\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      4. associate-/l*80.0%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \color{blue}{\log c \cdot \frac{b + -0.5}{a}}\right)\right)\right)\right) + y \cdot i \]
    5. Simplified80.0%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \log c \cdot \frac{b + -0.5}{a}\right)\right)\right)\right)} + y \cdot i \]
    6. Taylor expanded in z around inf 68.2%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \color{blue}{\frac{z}{a}}\right)\right) + y \cdot i \]
    7. Taylor expanded in a around 0 80.2%

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
    8. Step-by-step derivation
      1. +-commutative80.2%

        \[\leadsto \color{blue}{\left(\left(t + z\right) + a\right)} + y \cdot i \]
      2. associate-+l+80.2%

        \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]
    9. Simplified80.2%

      \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]

    if 5.0000000000000001e109 < (-.f64 b #s(literal 1/2 binary64))

    1. Initial program 99.8%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 87.3%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in t around 0 71.7%

      \[\leadsto \color{blue}{\left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} + y \cdot i \]
    5. Taylor expanded in y around 0 54.9%

      \[\leadsto \color{blue}{a + \left(z + \log c \cdot \left(b - 0.5\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+145}:\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{elif}\;b - 0.5 \leq 5 \cdot 10^{+109}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 88.4% accurate, 1.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -1.28 \cdot 10^{+182}:\\ \;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+258}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + b \cdot \log c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 + y \cdot i\\ \end{array} \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
 (let* ((t_1 (* x (log y))))
   (if (<= x -1.28e+182)
     (+ a (+ t (+ z t_1)))
     (if (<= x 3.9e+258)
       (+ (* y i) (+ a (+ t (+ z (* b (log c))))))
       (+ t_1 (* y i))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -1.28e+182) {
		tmp = a + (t + (z + t_1));
	} else if (x <= 3.9e+258) {
		tmp = (y * i) + (a + (t + (z + (b * log(c)))));
	} else {
		tmp = t_1 + (y * i);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * log(y)
    if (x <= (-1.28d+182)) then
        tmp = a + (t + (z + t_1))
    else if (x <= 3.9d+258) then
        tmp = (y * i) + (a + (t + (z + (b * log(c)))))
    else
        tmp = t_1 + (y * i)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * Math.log(y);
	double tmp;
	if (x <= -1.28e+182) {
		tmp = a + (t + (z + t_1));
	} else if (x <= 3.9e+258) {
		tmp = (y * i) + (a + (t + (z + (b * Math.log(c)))));
	} else {
		tmp = t_1 + (y * i);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	t_1 = x * math.log(y)
	tmp = 0
	if x <= -1.28e+182:
		tmp = a + (t + (z + t_1))
	elif x <= 3.9e+258:
		tmp = (y * i) + (a + (t + (z + (b * math.log(c)))))
	else:
		tmp = t_1 + (y * i)
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -1.28e+182)
		tmp = Float64(a + Float64(t + Float64(z + t_1)));
	elseif (x <= 3.9e+258)
		tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(b * log(c))))));
	else
		tmp = Float64(t_1 + Float64(y * i));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x * log(y);
	tmp = 0.0;
	if (x <= -1.28e+182)
		tmp = a + (t + (z + t_1));
	elseif (x <= 3.9e+258)
		tmp = (y * i) + (a + (t + (z + (b * log(c)))));
	else
		tmp = t_1 + (y * i);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.28e+182], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e+258], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.28 \cdot 10^{+182}:\\
\;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\

\mathbf{elif}\;x \leq 3.9 \cdot 10^{+258}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + b \cdot \log c\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 + y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.28e182

    1. Initial program 99.7%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 91.4%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in x around inf 87.2%

      \[\leadsto a + \left(t + \left(z + \color{blue}{x \cdot \log y}\right)\right) \]

    if -1.28e182 < x < 3.90000000000000037e258

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 93.4%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in b around inf 91.2%

      \[\leadsto \left(a + \left(t + \left(z + \color{blue}{b \cdot \log c}\right)\right)\right) + y \cdot i \]

    if 3.90000000000000037e258 < x

    1. Initial program 93.1%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around -inf 62.7%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
    4. Taylor expanded in x around inf 74.8%

      \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot \left(x \cdot \log y\right)\right)} + y \cdot i \]
    5. Step-by-step derivation
      1. mul-1-neg74.8%

        \[\leadsto -1 \cdot \color{blue}{\left(-x \cdot \log y\right)} + y \cdot i \]
      2. *-commutative74.8%

        \[\leadsto -1 \cdot \left(-\color{blue}{\log y \cdot x}\right) + y \cdot i \]
      3. distribute-rgt-neg-in74.8%

        \[\leadsto -1 \cdot \color{blue}{\left(\log y \cdot \left(-x\right)\right)} + y \cdot i \]
    6. Simplified74.8%

      \[\leadsto -1 \cdot \color{blue}{\left(\log y \cdot \left(-x\right)\right)} + y \cdot i \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.28 \cdot 10^{+182}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{+258}:\\ \;\;\;\;y \cdot i + \left(a + \left(t + \left(z + b \cdot \log c\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 89.5% accurate, 1.8× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -4.15 \cdot 10^{+180}:\\ \;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+258}:\\ \;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 + y \cdot i\\ \end{array} \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
 (let* ((t_1 (* x (log y))))
   (if (<= x -4.15e+180)
     (+ a (+ t (+ z t_1)))
     (if (<= x 3.6e+258)
       (+ (* y i) (+ a (+ z (* (log c) (- b 0.5)))))
       (+ t_1 (* y i))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * log(y);
	double tmp;
	if (x <= -4.15e+180) {
		tmp = a + (t + (z + t_1));
	} else if (x <= 3.6e+258) {
		tmp = (y * i) + (a + (z + (log(c) * (b - 0.5))));
	} else {
		tmp = t_1 + (y * i);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * log(y)
    if (x <= (-4.15d+180)) then
        tmp = a + (t + (z + t_1))
    else if (x <= 3.6d+258) then
        tmp = (y * i) + (a + (z + (log(c) * (b - 0.5d0))))
    else
        tmp = t_1 + (y * i)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = x * Math.log(y);
	double tmp;
	if (x <= -4.15e+180) {
		tmp = a + (t + (z + t_1));
	} else if (x <= 3.6e+258) {
		tmp = (y * i) + (a + (z + (Math.log(c) * (b - 0.5))));
	} else {
		tmp = t_1 + (y * i);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	t_1 = x * math.log(y)
	tmp = 0
	if x <= -4.15e+180:
		tmp = a + (t + (z + t_1))
	elif x <= 3.6e+258:
		tmp = (y * i) + (a + (z + (math.log(c) * (b - 0.5))))
	else:
		tmp = t_1 + (y * i)
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	tmp = 0.0
	if (x <= -4.15e+180)
		tmp = Float64(a + Float64(t + Float64(z + t_1)));
	elseif (x <= 3.6e+258)
		tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5)))));
	else
		tmp = Float64(t_1 + Float64(y * i));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = x * log(y);
	tmp = 0.0;
	if (x <= -4.15e+180)
		tmp = a + (t + (z + t_1));
	elseif (x <= 3.6e+258)
		tmp = (y * i) + (a + (z + (log(c) * (b - 0.5))));
	else
		tmp = t_1 + (y * i);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.15e+180], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e+258], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -4.15 \cdot 10^{+180}:\\
\;\;\;\;a + \left(t + \left(z + t\_1\right)\right)\\

\mathbf{elif}\;x \leq 3.6 \cdot 10^{+258}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 + y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.1500000000000004e180

    1. Initial program 99.7%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 91.4%

      \[\leadsto \color{blue}{a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} \]
    4. Taylor expanded in x around inf 87.2%

      \[\leadsto a + \left(t + \left(z + \color{blue}{x \cdot \log y}\right)\right) \]

    if -4.1500000000000004e180 < x < 3.5999999999999999e258

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 93.4%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in t around 0 74.3%

      \[\leadsto \color{blue}{\left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} + y \cdot i \]

    if 3.5999999999999999e258 < x

    1. Initial program 93.1%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around -inf 62.7%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
    4. Taylor expanded in x around inf 74.8%

      \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot \left(x \cdot \log y\right)\right)} + y \cdot i \]
    5. Step-by-step derivation
      1. mul-1-neg74.8%

        \[\leadsto -1 \cdot \color{blue}{\left(-x \cdot \log y\right)} + y \cdot i \]
      2. *-commutative74.8%

        \[\leadsto -1 \cdot \left(-\color{blue}{\log y \cdot x}\right) + y \cdot i \]
      3. distribute-rgt-neg-in74.8%

        \[\leadsto -1 \cdot \color{blue}{\left(\log y \cdot \left(-x\right)\right)} + y \cdot i \]
    6. Simplified74.8%

      \[\leadsto -1 \cdot \color{blue}{\left(\log y \cdot \left(-x\right)\right)} + y \cdot i \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -4.15 \cdot 10^{+180}:\\ \;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+258}:\\ \;\;\;\;y \cdot i + \left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 71.9% accurate, 1.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+145} \lor \neg \left(b \leq 3.8 \cdot 10^{+109}\right):\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\ \end{array} \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
 (if (or (<= b -5.2e+145) (not (<= b 3.8e+109)))
   (+ (* y i) (* b (log c)))
   (+ (* y i) (+ t (+ z a)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((b <= -5.2e+145) || !(b <= 3.8e+109)) {
		tmp = (y * i) + (b * log(c));
	} else {
		tmp = (y * i) + (t + (z + a));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((b <= (-5.2d+145)) .or. (.not. (b <= 3.8d+109))) then
        tmp = (y * i) + (b * log(c))
    else
        tmp = (y * i) + (t + (z + a))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((b <= -5.2e+145) || !(b <= 3.8e+109)) {
		tmp = (y * i) + (b * Math.log(c));
	} else {
		tmp = (y * i) + (t + (z + a));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (b <= -5.2e+145) or not (b <= 3.8e+109):
		tmp = (y * i) + (b * math.log(c))
	else:
		tmp = (y * i) + (t + (z + a))
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((b <= -5.2e+145) || !(b <= 3.8e+109))
		tmp = Float64(Float64(y * i) + Float64(b * log(c)));
	else
		tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a)));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((b <= -5.2e+145) || ~((b <= 3.8e+109)))
		tmp = (y * i) + (b * log(c));
	else
		tmp = (y * i) + (t + (z + a));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -5.2e+145], N[Not[LessEqual[b, 3.8e+109]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+145} \lor \neg \left(b \leq 3.8 \cdot 10^{+109}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.20000000000000005e145 or 3.80000000000000039e109 < b

    1. Initial program 99.8%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 87.7%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in t around 0 77.1%

      \[\leadsto \color{blue}{\left(a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)} + y \cdot i \]
    5. Taylor expanded in b around inf 70.0%

      \[\leadsto \color{blue}{b \cdot \log c} + y \cdot i \]
    6. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]
    7. Simplified70.0%

      \[\leadsto \color{blue}{\log c \cdot b} + y \cdot i \]

    if -5.20000000000000005e145 < b < 3.80000000000000039e109

    1. Initial program 99.4%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 79.9%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\frac{x \cdot \log y}{a} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right)} + y \cdot i \]
    4. Step-by-step derivation
      1. associate-/l*79.9%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\color{blue}{x \cdot \frac{\log y}{a}} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      2. sub-neg79.9%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)}}{a}\right)\right)\right)\right) + y \cdot i \]
      3. metadata-eval79.9%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \left(b + \color{blue}{-0.5}\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      4. associate-/l*79.9%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \color{blue}{\log c \cdot \frac{b + -0.5}{a}}\right)\right)\right)\right) + y \cdot i \]
    5. Simplified79.9%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \log c \cdot \frac{b + -0.5}{a}\right)\right)\right)\right)} + y \cdot i \]
    6. Taylor expanded in z around inf 68.0%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \color{blue}{\frac{z}{a}}\right)\right) + y \cdot i \]
    7. Taylor expanded in a around 0 80.1%

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
    8. Step-by-step derivation
      1. +-commutative80.1%

        \[\leadsto \color{blue}{\left(\left(t + z\right) + a\right)} + y \cdot i \]
      2. associate-+l+80.1%

        \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]
    9. Simplified80.1%

      \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+145} \lor \neg \left(b \leq 3.8 \cdot 10^{+109}\right):\\ \;\;\;\;y \cdot i + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 69.0% accurate, 2.0× speedup?

\[\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.06 \cdot 10^{+192}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\ \end{array} \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
 (if (<= x -1.06e+192) (* x (log y)) (+ (* y i) (+ t (+ z a)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (x <= -1.06e+192) {
		tmp = x * log(y);
	} else {
		tmp = (y * i) + (t + (z + a));
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (x <= (-1.06d+192)) then
        tmp = x * log(y)
    else
        tmp = (y * i) + (t + (z + a))
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (x <= -1.06e+192) {
		tmp = x * Math.log(y);
	} else {
		tmp = (y * i) + (t + (z + a));
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if x <= -1.06e+192:
		tmp = x * math.log(y)
	else:
		tmp = (y * i) + (t + (z + a))
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (x <= -1.06e+192)
		tmp = Float64(x * log(y));
	else
		tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a)));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (x <= -1.06e+192)
		tmp = x * log(y);
	else
		tmp = (y * i) + (t + (z + a));
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.06e+192], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.06 \cdot 10^{+192}:\\
\;\;\;\;x \cdot \log y\\

\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.06000000000000006e192

    1. Initial program 99.6%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around -inf 70.7%

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)}{a} - 1\right)\right)} + y \cdot i \]
    4. Taylor expanded in x around inf 74.0%

      \[\leadsto \color{blue}{x \cdot \log y} \]

    if -1.06000000000000006e192 < x

    1. Initial program 99.5%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 74.0%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\frac{x \cdot \log y}{a} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right)} + y \cdot i \]
    4. Step-by-step derivation
      1. associate-/l*73.9%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\color{blue}{x \cdot \frac{\log y}{a}} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      2. sub-neg73.9%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)}}{a}\right)\right)\right)\right) + y \cdot i \]
      3. metadata-eval73.9%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \left(b + \color{blue}{-0.5}\right)}{a}\right)\right)\right)\right) + y \cdot i \]
      4. associate-/l*73.9%

        \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \color{blue}{\log c \cdot \frac{b + -0.5}{a}}\right)\right)\right)\right) + y \cdot i \]
    5. Simplified73.9%

      \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \log c \cdot \frac{b + -0.5}{a}\right)\right)\right)\right)} + y \cdot i \]
    6. Taylor expanded in z around inf 58.0%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \color{blue}{\frac{z}{a}}\right)\right) + y \cdot i \]
    7. Taylor expanded in a around 0 69.5%

      \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
    8. Step-by-step derivation
      1. +-commutative69.5%

        \[\leadsto \color{blue}{\left(\left(t + z\right) + a\right)} + y \cdot i \]
      2. associate-+l+69.5%

        \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]
    9. Simplified69.5%

      \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.06 \cdot 10^{+192}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 52.1% accurate, 10.9× speedup?

\[\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 -3.2 \cdot 10^{+204} \lor \neg \left(z \leq -8.8 \cdot 10^{+161}\right) \land z \leq -5 \cdot 10^{+113}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \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
 (if (or (<= z -3.2e+204) (and (not (<= z -8.8e+161)) (<= z -5e+113)))
   z
   (+ a (* y i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((z <= -3.2e+204) || (!(z <= -8.8e+161) && (z <= -5e+113))) {
		tmp = z;
	} else {
		tmp = a + (y * i);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if ((z <= (-3.2d+204)) .or. (.not. (z <= (-8.8d+161))) .and. (z <= (-5d+113))) then
        tmp = z
    else
        tmp = a + (y * i)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((z <= -3.2e+204) || (!(z <= -8.8e+161) && (z <= -5e+113))) {
		tmp = z;
	} else {
		tmp = a + (y * i);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if (z <= -3.2e+204) or (not (z <= -8.8e+161) and (z <= -5e+113)):
		tmp = z
	else:
		tmp = a + (y * i)
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((z <= -3.2e+204) || (!(z <= -8.8e+161) && (z <= -5e+113)))
		tmp = z;
	else
		tmp = Float64(a + Float64(y * i));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if ((z <= -3.2e+204) || (~((z <= -8.8e+161)) && (z <= -5e+113)))
		tmp = z;
	else
		tmp = a + (y * i);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -3.2e+204], And[N[Not[LessEqual[z, -8.8e+161]], $MachinePrecision], LessEqual[z, -5e+113]]], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+204} \lor \neg \left(z \leq -8.8 \cdot 10^{+161}\right) \land z \leq -5 \cdot 10^{+113}:\\
\;\;\;\;z\\

\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.2e204 or -8.7999999999999999e161 < z < -5e113

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 53.0%

      \[\leadsto \color{blue}{z} \]

    if -3.2e204 < z < -8.7999999999999999e161 or -5e113 < z

    1. Initial program 99.5%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 84.8%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in a around inf 40.4%

      \[\leadsto \color{blue}{a} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+204} \lor \neg \left(z \leq -8.8 \cdot 10^{+161}\right) \land z \leq -5 \cdot 10^{+113}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 35.4% accurate, 12.1× speedup?

\[\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 5.8 \cdot 10^{-229}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-218}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 1.16 \cdot 10^{+51}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \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
 (if (<= y 5.8e-229) z (if (<= y 3e-218) a (if (<= y 1.16e+51) z (* 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 (y <= 5.8e-229) {
		tmp = z;
	} else if (y <= 3e-218) {
		tmp = a;
	} else if (y <= 1.16e+51) {
		tmp = z;
	} else {
		tmp = 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 (y <= 5.8d-229) then
        tmp = z
    else if (y <= 3d-218) then
        tmp = a
    else if (y <= 1.16d+51) then
        tmp = z
    else
        tmp = 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 (y <= 5.8e-229) {
		tmp = z;
	} else if (y <= 3e-218) {
		tmp = a;
	} else if (y <= 1.16e+51) {
		tmp = z;
	} else {
		tmp = 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 y <= 5.8e-229:
		tmp = z
	elif y <= 3e-218:
		tmp = a
	elif y <= 1.16e+51:
		tmp = z
	else:
		tmp = 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 (y <= 5.8e-229)
		tmp = z;
	elseif (y <= 3e-218)
		tmp = a;
	elseif (y <= 1.16e+51)
		tmp = z;
	else
		tmp = 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 (y <= 5.8e-229)
		tmp = z;
	elseif (y <= 3e-218)
		tmp = a;
	elseif (y <= 1.16e+51)
		tmp = z;
	else
		tmp = 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[y, 5.8e-229], z, If[LessEqual[y, 3e-218], a, If[LessEqual[y, 1.16e+51], z, N[(y * i), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.8 \cdot 10^{-229}:\\
\;\;\;\;z\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-218}:\\
\;\;\;\;a\\

\mathbf{elif}\;y \leq 1.16 \cdot 10^{+51}:\\
\;\;\;\;z\\

\mathbf{else}:\\
\;\;\;\;y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 5.7999999999999999e-229 or 2.9999999999999998e-218 < y < 1.16e51

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 15.9%

      \[\leadsto \color{blue}{z} \]

    if 5.7999999999999999e-229 < y < 2.9999999999999998e-218

    1. Initial program 100.0%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 44.3%

      \[\leadsto \color{blue}{a} \]

    if 1.16e51 < y

    1. Initial program 99.0%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 53.4%

      \[\leadsto \color{blue}{i \cdot y} \]
    4. Step-by-step derivation
      1. *-commutative53.4%

        \[\leadsto \color{blue}{y \cdot i} \]
    5. Simplified53.4%

      \[\leadsto \color{blue}{y \cdot i} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification31.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 5.8 \cdot 10^{-229}:\\ \;\;\;\;z\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-218}:\\ \;\;\;\;a\\ \mathbf{elif}\;y \leq 1.16 \cdot 10^{+51}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 60.4% accurate, 21.9× speedup?

\[\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.8 \cdot 10^{+71}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \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
 (if (<= z -1.8e+71) (+ z (* y i)) (+ a (* y i))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -1.8e+71) {
		tmp = z + (y * i);
	} else {
		tmp = a + (y * i);
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (z <= (-1.8d+71)) then
        tmp = z + (y * i)
    else
        tmp = a + (y * i)
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -1.8e+71) {
		tmp = z + (y * i);
	} else {
		tmp = a + (y * i);
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if z <= -1.8e+71:
		tmp = z + (y * i)
	else:
		tmp = a + (y * i)
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (z <= -1.8e+71)
		tmp = Float64(z + Float64(y * i));
	else
		tmp = Float64(a + Float64(y * i));
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (z <= -1.8e+71)
		tmp = z + (y * i);
	else
		tmp = a + (y * i);
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.8e+71], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+71}:\\
\;\;\;\;z + y \cdot i\\

\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.8e71

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 95.0%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in z around inf 57.0%

      \[\leadsto \color{blue}{z} + y \cdot i \]

    if -1.8e71 < z

    1. Initial program 99.4%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 84.1%

      \[\leadsto \color{blue}{\left(a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)} + y \cdot i \]
    4. Taylor expanded in a around inf 40.5%

      \[\leadsto \color{blue}{a} + y \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+71}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 66.9% accurate, 24.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ y \cdot i + \left(t + \left(z + a\right)\right) \end{array} \]
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ t (+ z a))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + (t + (z + a));
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = (y * i) + (t + (z + a))
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + (t + (z + a));
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	return (y * i) + (t + (z + a))
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(y * i) + Float64(t + Float64(z + a)))
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (y * i) + (t + (z + a));
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
y \cdot i + \left(t + \left(z + a\right)\right)
\end{array}
Derivation
  1. Initial program 99.5%

    \[\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 \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 73.7%

    \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\frac{x \cdot \log y}{a} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right)} + y \cdot i \]
  4. Step-by-step derivation
    1. associate-/l*73.6%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\color{blue}{x \cdot \frac{\log y}{a}} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right) + y \cdot i \]
    2. sub-neg73.6%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)}}{a}\right)\right)\right)\right) + y \cdot i \]
    3. metadata-eval73.6%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \left(b + \color{blue}{-0.5}\right)}{a}\right)\right)\right)\right) + y \cdot i \]
    4. associate-/l*73.6%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \color{blue}{\log c \cdot \frac{b + -0.5}{a}}\right)\right)\right)\right) + y \cdot i \]
  5. Simplified73.6%

    \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \log c \cdot \frac{b + -0.5}{a}\right)\right)\right)\right)} + y \cdot i \]
  6. Taylor expanded in z around inf 55.4%

    \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \color{blue}{\frac{z}{a}}\right)\right) + y \cdot i \]
  7. Taylor expanded in a around 0 66.4%

    \[\leadsto \color{blue}{\left(a + \left(t + z\right)\right)} + y \cdot i \]
  8. Step-by-step derivation
    1. +-commutative66.4%

      \[\leadsto \color{blue}{\left(\left(t + z\right) + a\right)} + y \cdot i \]
    2. associate-+l+66.4%

      \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]
  9. Simplified66.4%

    \[\leadsto \color{blue}{\left(t + \left(z + a\right)\right)} + y \cdot i \]
  10. Final simplification66.4%

    \[\leadsto y \cdot i + \left(t + \left(z + a\right)\right) \]
  11. Add Preprocessing

Alternative 17: 66.5% accurate, 31.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ y \cdot i + \left(z + a\right) \end{array} \]
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z a)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + (z + a);
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = (y * i) + (z + a)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + (z + a);
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	return (y * i) + (z + a)
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(y * i) + Float64(z + a))
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (y * i) + (z + a);
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
y \cdot i + \left(z + a\right)
\end{array}
Derivation
  1. Initial program 99.5%

    \[\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 \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 73.7%

    \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\frac{x \cdot \log y}{a} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right)} + y \cdot i \]
  4. Step-by-step derivation
    1. associate-/l*73.6%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(\color{blue}{x \cdot \frac{\log y}{a}} + \frac{\log c \cdot \left(b - 0.5\right)}{a}\right)\right)\right)\right) + y \cdot i \]
    2. sub-neg73.6%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \color{blue}{\left(b + \left(-0.5\right)\right)}}{a}\right)\right)\right)\right) + y \cdot i \]
    3. metadata-eval73.6%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \frac{\log c \cdot \left(b + \color{blue}{-0.5}\right)}{a}\right)\right)\right)\right) + y \cdot i \]
    4. associate-/l*73.6%

      \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \color{blue}{\log c \cdot \frac{b + -0.5}{a}}\right)\right)\right)\right) + y \cdot i \]
  5. Simplified73.6%

    \[\leadsto \color{blue}{a \cdot \left(1 + \left(\frac{t}{a} + \left(\frac{z}{a} + \left(x \cdot \frac{\log y}{a} + \log c \cdot \frac{b + -0.5}{a}\right)\right)\right)\right)} + y \cdot i \]
  6. Taylor expanded in z around inf 55.4%

    \[\leadsto a \cdot \left(1 + \left(\frac{t}{a} + \color{blue}{\frac{z}{a}}\right)\right) + y \cdot i \]
  7. Taylor expanded in t around 0 44.9%

    \[\leadsto \color{blue}{a \cdot \left(1 + \frac{z}{a}\right)} + y \cdot i \]
  8. Taylor expanded in a around 0 50.0%

    \[\leadsto \color{blue}{\left(a + z\right)} + y \cdot i \]
  9. Step-by-step derivation
    1. +-commutative50.0%

      \[\leadsto \color{blue}{\left(z + a\right)} + y \cdot i \]
  10. Simplified50.0%

    \[\leadsto \color{blue}{\left(z + a\right)} + y \cdot i \]
  11. Final simplification50.0%

    \[\leadsto y \cdot i + \left(z + a\right) \]
  12. Add Preprocessing

Alternative 18: 38.2% accurate, 36.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+71}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \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 (if (<= z -2.8e+71) z a))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -2.8e+71) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: tmp
    if (z <= (-2.8d+71)) then
        tmp = z
    else
        tmp = a
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -2.8e+71) {
		tmp = z;
	} else {
		tmp = a;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if z <= -2.8e+71:
		tmp = z
	else:
		tmp = a
	return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (z <= -2.8e+71)
		tmp = z;
	else
		tmp = a;
	end
	return tmp
end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (z <= -2.8e+71)
		tmp = z;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.8e+71], z, a]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+71}:\\
\;\;\;\;z\\

\mathbf{else}:\\
\;\;\;\;a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.80000000000000002e71

    1. Initial program 99.9%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 39.3%

      \[\leadsto \color{blue}{z} \]

    if -2.80000000000000002e71 < z

    1. Initial program 99.4%

      \[\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 \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 16.6%

      \[\leadsto \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification20.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{+71}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 21.9% accurate, 219.0× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ a \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 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}
Derivation
  1. Initial program 99.5%

    \[\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 \]
  2. Add Preprocessing
  3. Taylor expanded in a around inf 15.5%

    \[\leadsto \color{blue}{a} \]
  4. Final simplification15.5%

    \[\leadsto a \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024078 
(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)))