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

Percentage Accurate: 99.8% → 99.9%
Time: 18.3s
Alternatives: 22
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 22 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.9% accurate, 0.4× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ t + \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, a + \mathsf{fma}\left(b + -0.5, \log c, z\right)\right)\right) \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (+ t (fma y i (fma x (log y) (+ a (fma (+ b -0.5) (log c) z))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return t + fma(y, i, fma(x, log(y), (a + fma((b + -0.5), log(c), z))));
}
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	return Float64(t + fma(y, i, fma(x, log(y), Float64(a + fma(Float64(b + -0.5), log(c), z)))))
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(t + N[(y * i + N[(x * N[Log[y], $MachinePrecision] + N[(a + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
t + \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, a + \mathsf{fma}\left(b + -0.5, \log c, z\right)\right)\right)
\end{array}
Derivation
  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. Step-by-step derivation
    1. associate-+l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{t + \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, a + \mathsf{fma}\left(b + -0.5, \log c, z\right)\right)\right)} \]
  4. Final simplification99.8%

    \[\leadsto t + \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, a + \mathsf{fma}\left(b + -0.5, \log c, z\right)\right)\right) \]

Alternative 2: 73.8% accurate, 0.4× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} t_1 := \log c \cdot \left(b - 0.5\right)\\ t_2 := y \cdot i + \left(a + z\right)\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{+112}:\\ \;\;\;\;t_1 + \left(a + y \cdot i\right)\\ \mathbf{elif}\;t_1 \leq 110:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+23}:\\ \;\;\;\;\left(a + z\right) + x \cdot \log y\\ \mathbf{elif}\;t_1 \leq 10^{+99}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) + \left(t + t_1\right)\\ \end{array} \end{array} \]
NOTE: z, t, and a 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))) (t_2 (+ (* y i) (+ a z))))
   (if (<= t_1 -4e+112)
     (+ t_1 (+ a (* y i)))
     (if (<= t_1 110.0)
       t_2
       (if (<= t_1 2e+23)
         (+ (+ a z) (* x (log y)))
         (if (<= t_1 1e+99) t_2 (+ (+ a z) (+ t t_1))))))))
assert(z < t && t < a);
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 t_2 = (y * i) + (a + z);
	double tmp;
	if (t_1 <= -4e+112) {
		tmp = t_1 + (a + (y * i));
	} else if (t_1 <= 110.0) {
		tmp = t_2;
	} else if (t_1 <= 2e+23) {
		tmp = (a + z) + (x * log(y));
	} else if (t_1 <= 1e+99) {
		tmp = t_2;
	} else {
		tmp = (a + z) + (t + t_1);
	}
	return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = log(c) * (b - 0.5d0)
    t_2 = (y * i) + (a + z)
    if (t_1 <= (-4d+112)) then
        tmp = t_1 + (a + (y * i))
    else if (t_1 <= 110.0d0) then
        tmp = t_2
    else if (t_1 <= 2d+23) then
        tmp = (a + z) + (x * log(y))
    else if (t_1 <= 1d+99) then
        tmp = t_2
    else
        tmp = (a + z) + (t + t_1)
    end if
    code = tmp
end function
assert z < t && t < a;
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 t_2 = (y * i) + (a + z);
	double tmp;
	if (t_1 <= -4e+112) {
		tmp = t_1 + (a + (y * i));
	} else if (t_1 <= 110.0) {
		tmp = t_2;
	} else if (t_1 <= 2e+23) {
		tmp = (a + z) + (x * Math.log(y));
	} else if (t_1 <= 1e+99) {
		tmp = t_2;
	} else {
		tmp = (a + z) + (t + t_1);
	}
	return tmp;
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	t_1 = math.log(c) * (b - 0.5)
	t_2 = (y * i) + (a + z)
	tmp = 0
	if t_1 <= -4e+112:
		tmp = t_1 + (a + (y * i))
	elif t_1 <= 110.0:
		tmp = t_2
	elif t_1 <= 2e+23:
		tmp = (a + z) + (x * math.log(y))
	elif t_1 <= 1e+99:
		tmp = t_2
	else:
		tmp = (a + z) + (t + t_1)
	return tmp
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(c) * Float64(b - 0.5))
	t_2 = Float64(Float64(y * i) + Float64(a + z))
	tmp = 0.0
	if (t_1 <= -4e+112)
		tmp = Float64(t_1 + Float64(a + Float64(y * i)));
	elseif (t_1 <= 110.0)
		tmp = t_2;
	elseif (t_1 <= 2e+23)
		tmp = Float64(Float64(a + z) + Float64(x * log(y)));
	elseif (t_1 <= 1e+99)
		tmp = t_2;
	else
		tmp = Float64(Float64(a + z) + Float64(t + t_1));
	end
	return tmp
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = log(c) * (b - 0.5);
	t_2 = (y * i) + (a + z);
	tmp = 0.0;
	if (t_1 <= -4e+112)
		tmp = t_1 + (a + (y * i));
	elseif (t_1 <= 110.0)
		tmp = t_2;
	elseif (t_1 <= 2e+23)
		tmp = (a + z) + (x * log(y));
	elseif (t_1 <= 1e+99)
		tmp = t_2;
	else
		tmp = (a + z) + (t + t_1);
	end
	tmp_2 = tmp;
end
NOTE: z, t, and a 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]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+112], N[(t$95$1 + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 110.0], t$95$2, If[LessEqual[t$95$1, 2e+23], N[(N[(a + z), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+99], t$95$2, N[(N[(a + z), $MachinePrecision] + N[(t + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
t_2 := y \cdot i + \left(a + z\right)\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+112}:\\
\;\;\;\;t_1 + \left(a + y \cdot i\right)\\

\mathbf{elif}\;t_1 \leq 110:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+23}:\\
\;\;\;\;\left(a + z\right) + x \cdot \log y\\

\mathbf{elif}\;t_1 \leq 10^{+99}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\left(a + z\right) + \left(t + t_1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (-.f64 b 1/2) (log.f64 c)) < -3.9999999999999997e112

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative89.1%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative89.1%

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def82.5%

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

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

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

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

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

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

    if -3.9999999999999997e112 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 110 or 1.9999999999999998e23 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 9.9999999999999997e98

    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. Step-by-step derivation
      1. +-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative84.1%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative84.1%

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

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

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

    if 110 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 1.9999999999999998e23

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999997e98 < (*.f64 (-.f64 b 1/2) (log.f64 c))

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative90.7%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative90.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\log c \cdot \left(b - 0.5\right) \leq -4 \cdot 10^{+112}:\\ \;\;\;\;\log c \cdot \left(b - 0.5\right) + \left(a + y \cdot i\right)\\ \mathbf{elif}\;\log c \cdot \left(b - 0.5\right) \leq 110:\\ \;\;\;\;y \cdot i + \left(a + z\right)\\ \mathbf{elif}\;\log c \cdot \left(b - 0.5\right) \leq 2 \cdot 10^{+23}:\\ \;\;\;\;\left(a + z\right) + x \cdot \log y\\ \mathbf{elif}\;\log c \cdot \left(b - 0.5\right) \leq 10^{+99}:\\ \;\;\;\;y \cdot i + \left(a + z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) + \left(t + \log c \cdot \left(b - 0.5\right)\right)\\ \end{array} \]

Alternative 3: 73.7% accurate, 0.4× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} t_1 := \log c \cdot \left(b - 0.5\right)\\ t_2 := y \cdot i + \left(a + z\right)\\ \mathbf{if}\;t_1 \leq -4 \cdot 10^{+112}:\\ \;\;\;\;t_1 + \left(a + y \cdot i\right)\\ \mathbf{elif}\;t_1 \leq 110:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+23}:\\ \;\;\;\;\left(a + z\right) + x \cdot \log y\\ \mathbf{elif}\;t_1 \leq 10^{+99}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) + b \cdot \log c\\ \end{array} \end{array} \]
NOTE: z, t, and a 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))) (t_2 (+ (* y i) (+ a z))))
   (if (<= t_1 -4e+112)
     (+ t_1 (+ a (* y i)))
     (if (<= t_1 110.0)
       t_2
       (if (<= t_1 2e+23)
         (+ (+ a z) (* x (log y)))
         (if (<= t_1 1e+99) t_2 (+ (+ a z) (* b (log c)))))))))
assert(z < t && t < a);
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 t_2 = (y * i) + (a + z);
	double tmp;
	if (t_1 <= -4e+112) {
		tmp = t_1 + (a + (y * i));
	} else if (t_1 <= 110.0) {
		tmp = t_2;
	} else if (t_1 <= 2e+23) {
		tmp = (a + z) + (x * log(y));
	} else if (t_1 <= 1e+99) {
		tmp = t_2;
	} else {
		tmp = (a + z) + (b * log(c));
	}
	return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = log(c) * (b - 0.5d0)
    t_2 = (y * i) + (a + z)
    if (t_1 <= (-4d+112)) then
        tmp = t_1 + (a + (y * i))
    else if (t_1 <= 110.0d0) then
        tmp = t_2
    else if (t_1 <= 2d+23) then
        tmp = (a + z) + (x * log(y))
    else if (t_1 <= 1d+99) then
        tmp = t_2
    else
        tmp = (a + z) + (b * log(c))
    end if
    code = tmp
end function
assert z < t && t < a;
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 t_2 = (y * i) + (a + z);
	double tmp;
	if (t_1 <= -4e+112) {
		tmp = t_1 + (a + (y * i));
	} else if (t_1 <= 110.0) {
		tmp = t_2;
	} else if (t_1 <= 2e+23) {
		tmp = (a + z) + (x * Math.log(y));
	} else if (t_1 <= 1e+99) {
		tmp = t_2;
	} else {
		tmp = (a + z) + (b * Math.log(c));
	}
	return tmp;
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	t_1 = math.log(c) * (b - 0.5)
	t_2 = (y * i) + (a + z)
	tmp = 0
	if t_1 <= -4e+112:
		tmp = t_1 + (a + (y * i))
	elif t_1 <= 110.0:
		tmp = t_2
	elif t_1 <= 2e+23:
		tmp = (a + z) + (x * math.log(y))
	elif t_1 <= 1e+99:
		tmp = t_2
	else:
		tmp = (a + z) + (b * math.log(c))
	return tmp
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(c) * Float64(b - 0.5))
	t_2 = Float64(Float64(y * i) + Float64(a + z))
	tmp = 0.0
	if (t_1 <= -4e+112)
		tmp = Float64(t_1 + Float64(a + Float64(y * i)));
	elseif (t_1 <= 110.0)
		tmp = t_2;
	elseif (t_1 <= 2e+23)
		tmp = Float64(Float64(a + z) + Float64(x * log(y)));
	elseif (t_1 <= 1e+99)
		tmp = t_2;
	else
		tmp = Float64(Float64(a + z) + Float64(b * log(c)));
	end
	return tmp
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = log(c) * (b - 0.5);
	t_2 = (y * i) + (a + z);
	tmp = 0.0;
	if (t_1 <= -4e+112)
		tmp = t_1 + (a + (y * i));
	elseif (t_1 <= 110.0)
		tmp = t_2;
	elseif (t_1 <= 2e+23)
		tmp = (a + z) + (x * log(y));
	elseif (t_1 <= 1e+99)
		tmp = t_2;
	else
		tmp = (a + z) + (b * log(c));
	end
	tmp_2 = tmp;
end
NOTE: z, t, and a 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]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+112], N[(t$95$1 + N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 110.0], t$95$2, If[LessEqual[t$95$1, 2e+23], N[(N[(a + z), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+99], t$95$2, N[(N[(a + z), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
t_2 := y \cdot i + \left(a + z\right)\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+112}:\\
\;\;\;\;t_1 + \left(a + y \cdot i\right)\\

\mathbf{elif}\;t_1 \leq 110:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+23}:\\
\;\;\;\;\left(a + z\right) + x \cdot \log y\\

\mathbf{elif}\;t_1 \leq 10^{+99}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (-.f64 b 1/2) (log.f64 c)) < -3.9999999999999997e112

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative89.1%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative89.1%

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def82.5%

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

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

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

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

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

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

    if -3.9999999999999997e112 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 110 or 1.9999999999999998e23 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 9.9999999999999997e98

    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. Step-by-step derivation
      1. +-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative84.1%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative84.1%

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

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

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

    if 110 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 1.9999999999999998e23

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999997e98 < (*.f64 (-.f64 b 1/2) (log.f64 c))

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative90.7%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative90.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\log c \cdot \left(b - 0.5\right) \leq -4 \cdot 10^{+112}:\\ \;\;\;\;\log c \cdot \left(b - 0.5\right) + \left(a + y \cdot i\right)\\ \mathbf{elif}\;\log c \cdot \left(b - 0.5\right) \leq 110:\\ \;\;\;\;y \cdot i + \left(a + z\right)\\ \mathbf{elif}\;\log c \cdot \left(b - 0.5\right) \leq 2 \cdot 10^{+23}:\\ \;\;\;\;\left(a + z\right) + x \cdot \log y\\ \mathbf{elif}\;\log c \cdot \left(b - 0.5\right) \leq 10^{+99}:\\ \;\;\;\;y \cdot i + \left(a + z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) + b \cdot \log c\\ \end{array} \]

Alternative 4: 90.4% accurate, 1.0× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} t_1 := \log c \cdot \left(b - 0.5\right)\\ \mathbf{if}\;i \leq -1.1 \cdot 10^{+101}:\\ \;\;\;\;\left(a + z\right) + \mathsf{fma}\left(b + -0.5, \log c, t + y \cdot i\right)\\ \mathbf{elif}\;i \leq 3.5 \cdot 10^{-79}:\\ \;\;\;\;\left(a + z\right) + \left(x \cdot \log y + \left(t + t_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(t_1 + \left(a + \left(t + z\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: z, t, and a 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 (<= i -1.1e+101)
     (+ (+ a z) (fma (+ b -0.5) (log c) (+ t (* y i))))
     (if (<= i 3.5e-79)
       (+ (+ a z) (+ (* x (log y)) (+ t t_1)))
       (+ (* y i) (+ t_1 (+ a (+ t z))))))))
assert(z < t && t < a);
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 (i <= -1.1e+101) {
		tmp = (a + z) + fma((b + -0.5), log(c), (t + (y * i)));
	} else if (i <= 3.5e-79) {
		tmp = (a + z) + ((x * log(y)) + (t + t_1));
	} else {
		tmp = (y * i) + (t_1 + (a + (t + z)));
	}
	return tmp;
}
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(c) * Float64(b - 0.5))
	tmp = 0.0
	if (i <= -1.1e+101)
		tmp = Float64(Float64(a + z) + fma(Float64(b + -0.5), log(c), Float64(t + Float64(y * i))));
	elseif (i <= 3.5e-79)
		tmp = Float64(Float64(a + z) + Float64(Float64(x * log(y)) + Float64(t + t_1)));
	else
		tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(t + z))));
	end
	return tmp
end
NOTE: z, t, and a 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[i, -1.1e+101], N[(N[(a + z), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.5e-79], N[(N[(a + z), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(t + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;i \leq -1.1 \cdot 10^{+101}:\\
\;\;\;\;\left(a + z\right) + \mathsf{fma}\left(b + -0.5, \log c, t + y \cdot i\right)\\

\mathbf{elif}\;i \leq 3.5 \cdot 10^{-79}:\\
\;\;\;\;\left(a + z\right) + \left(x \cdot \log y + \left(t + t_1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -1.1e101

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative91.0%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative91.0%

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

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

    if -1.1e101 < i < 3.5000000000000003e-79

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5000000000000003e-79 < i

    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. Taylor expanded in x around 0 91.6%

      \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Step-by-step derivation
      1. +-commutative91.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -1.1 \cdot 10^{+101}:\\ \;\;\;\;\left(a + z\right) + \mathsf{fma}\left(b + -0.5, \log c, t + y \cdot i\right)\\ \mathbf{elif}\;i \leq 3.5 \cdot 10^{-79}:\\ \;\;\;\;\left(a + z\right) + \left(x \cdot \log y + \left(t + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + z\right)\right)\right)\\ \end{array} \]

Alternative 5: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* y i)))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i);
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (y * i)
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (y * i);
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (y * i)
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + Float64(y * i))
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i);
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Derivation
  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. Final simplification99.8%

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

Alternative 6: 90.2% accurate, 1.0× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} t_1 := \log c \cdot \left(b - 0.5\right)\\ \mathbf{if}\;i \leq -2.25 \cdot 10^{+100} \lor \neg \left(i \leq 4.5 \cdot 10^{-78}\right):\\ \;\;\;\;y \cdot i + \left(t_1 + \left(a + \left(t + z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) + \left(t_1 + x \cdot \log y\right)\\ \end{array} \end{array} \]
NOTE: z, t, and a 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 (or (<= i -2.25e+100) (not (<= i 4.5e-78)))
     (+ (* y i) (+ t_1 (+ a (+ t z))))
     (+ (+ a z) (+ t_1 (* x (log y)))))))
assert(z < t && t < a);
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 ((i <= -2.25e+100) || !(i <= 4.5e-78)) {
		tmp = (y * i) + (t_1 + (a + (t + z)));
	} else {
		tmp = (a + z) + (t_1 + (x * log(y)));
	}
	return tmp;
}
NOTE: z, t, and a 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 ((i <= (-2.25d+100)) .or. (.not. (i <= 4.5d-78))) then
        tmp = (y * i) + (t_1 + (a + (t + z)))
    else
        tmp = (a + z) + (t_1 + (x * log(y)))
    end if
    code = tmp
end function
assert z < t && t < a;
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 ((i <= -2.25e+100) || !(i <= 4.5e-78)) {
		tmp = (y * i) + (t_1 + (a + (t + z)));
	} else {
		tmp = (a + z) + (t_1 + (x * Math.log(y)));
	}
	return tmp;
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	t_1 = math.log(c) * (b - 0.5)
	tmp = 0
	if (i <= -2.25e+100) or not (i <= 4.5e-78):
		tmp = (y * i) + (t_1 + (a + (t + z)))
	else:
		tmp = (a + z) + (t_1 + (x * math.log(y)))
	return tmp
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(c) * Float64(b - 0.5))
	tmp = 0.0
	if ((i <= -2.25e+100) || !(i <= 4.5e-78))
		tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(t + z))));
	else
		tmp = Float64(Float64(a + z) + Float64(t_1 + Float64(x * log(y))));
	end
	return tmp
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = log(c) * (b - 0.5);
	tmp = 0.0;
	if ((i <= -2.25e+100) || ~((i <= 4.5e-78)))
		tmp = (y * i) + (t_1 + (a + (t + z)));
	else
		tmp = (a + z) + (t_1 + (x * log(y)));
	end
	tmp_2 = tmp;
end
NOTE: z, t, and a 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[Or[LessEqual[i, -2.25e+100], N[Not[LessEqual[i, 4.5e-78]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $MachinePrecision] + N[(t$95$1 + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;i \leq -2.25 \cdot 10^{+100} \lor \neg \left(i \leq 4.5 \cdot 10^{-78}\right):\\
\;\;\;\;y \cdot i + \left(t_1 + \left(a + \left(t + z\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a + z\right) + \left(t_1 + x \cdot \log y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -2.25000000000000018e100 or 4.5e-78 < i

    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. Taylor expanded in x around 0 91.4%

      \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Step-by-step derivation
      1. +-commutative91.4%

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

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

    if -2.25000000000000018e100 < i < 4.5e-78

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -2.25 \cdot 10^{+100} \lor \neg \left(i \leq 4.5 \cdot 10^{-78}\right):\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) + \left(\log c \cdot \left(b - 0.5\right) + x \cdot \log y\right)\\ \end{array} \]

Alternative 7: 90.2% accurate, 1.0× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} t_1 := \log c \cdot \left(b - 0.5\right)\\ \mathbf{if}\;i \leq -2.25 \cdot 10^{+100}:\\ \;\;\;\;\left(a + z\right) + \mathsf{fma}\left(b + -0.5, \log c, t + y \cdot i\right)\\ \mathbf{elif}\;i \leq 1.25 \cdot 10^{-78}:\\ \;\;\;\;\left(a + z\right) + \left(t_1 + x \cdot \log y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(t_1 + \left(a + \left(t + z\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: z, t, and a 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 (<= i -2.25e+100)
     (+ (+ a z) (fma (+ b -0.5) (log c) (+ t (* y i))))
     (if (<= i 1.25e-78)
       (+ (+ a z) (+ t_1 (* x (log y))))
       (+ (* y i) (+ t_1 (+ a (+ t z))))))))
assert(z < t && t < a);
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 (i <= -2.25e+100) {
		tmp = (a + z) + fma((b + -0.5), log(c), (t + (y * i)));
	} else if (i <= 1.25e-78) {
		tmp = (a + z) + (t_1 + (x * log(y)));
	} else {
		tmp = (y * i) + (t_1 + (a + (t + z)));
	}
	return tmp;
}
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(c) * Float64(b - 0.5))
	tmp = 0.0
	if (i <= -2.25e+100)
		tmp = Float64(Float64(a + z) + fma(Float64(b + -0.5), log(c), Float64(t + Float64(y * i))));
	elseif (i <= 1.25e-78)
		tmp = Float64(Float64(a + z) + Float64(t_1 + Float64(x * log(y))));
	else
		tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(t + z))));
	end
	return tmp
end
NOTE: z, t, and a 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[i, -2.25e+100], N[(N[(a + z), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.25e-78], N[(N[(a + z), $MachinePrecision] + N[(t$95$1 + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;i \leq -2.25 \cdot 10^{+100}:\\
\;\;\;\;\left(a + z\right) + \mathsf{fma}\left(b + -0.5, \log c, t + y \cdot i\right)\\

\mathbf{elif}\;i \leq 1.25 \cdot 10^{-78}:\\
\;\;\;\;\left(a + z\right) + \left(t_1 + x \cdot \log y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -2.25000000000000018e100

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative91.0%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative91.0%

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

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

    if -2.25000000000000018e100 < i < 1.2499999999999999e-78

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2499999999999999e-78 < i

    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. Taylor expanded in x around 0 91.6%

      \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Step-by-step derivation
      1. +-commutative91.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -2.25 \cdot 10^{+100}:\\ \;\;\;\;\left(a + z\right) + \mathsf{fma}\left(b + -0.5, \log c, t + y \cdot i\right)\\ \mathbf{elif}\;i \leq 1.25 \cdot 10^{-78}:\\ \;\;\;\;\left(a + z\right) + \left(\log c \cdot \left(b - 0.5\right) + x \cdot \log y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + z\right)\right)\right)\\ \end{array} \]

Alternative 8: 90.1% accurate, 1.0× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} t_1 := x \cdot \log y\\ t_2 := \log c \cdot \left(b - 0.5\right)\\ \mathbf{if}\;x \leq -2.1 \cdot 10^{+171}:\\ \;\;\;\;t + \mathsf{fma}\left(y, i, t_1\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+221}:\\ \;\;\;\;y \cdot i + \left(t_2 + \left(a + \left(t + z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 + \left(z + t_2\right)\\ \end{array} \end{array} \]
NOTE: z, t, and a 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))) (t_2 (* (log c) (- b 0.5))))
   (if (<= x -2.1e+171)
     (+ t (fma y i t_1))
     (if (<= x 2.2e+221)
       (+ (* y i) (+ t_2 (+ a (+ t z))))
       (+ t_1 (+ z t_2))))))
assert(z < t && t < a);
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 t_2 = log(c) * (b - 0.5);
	double tmp;
	if (x <= -2.1e+171) {
		tmp = t + fma(y, i, t_1);
	} else if (x <= 2.2e+221) {
		tmp = (y * i) + (t_2 + (a + (t + z)));
	} else {
		tmp = t_1 + (z + t_2);
	}
	return tmp;
}
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(x * log(y))
	t_2 = Float64(log(c) * Float64(b - 0.5))
	tmp = 0.0
	if (x <= -2.1e+171)
		tmp = Float64(t + fma(y, i, t_1));
	elseif (x <= 2.2e+221)
		tmp = Float64(Float64(y * i) + Float64(t_2 + Float64(a + Float64(t + z))));
	else
		tmp = Float64(t_1 + Float64(z + t_2));
	end
	return tmp
end
NOTE: z, t, and a 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]}, Block[{t$95$2 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.1e+171], N[(t + N[(y * i + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+221], N[(N[(y * i), $MachinePrecision] + N[(t$95$2 + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(z + t$95$2), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{+171}:\\
\;\;\;\;t + \mathsf{fma}\left(y, i, t_1\right)\\

\mathbf{elif}\;x \leq 2.2 \cdot 10^{+221}:\\
\;\;\;\;y \cdot i + \left(t_2 + \left(a + \left(t + z\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 + \left(z + t_2\right)\\


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

    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. Step-by-step derivation
      1. associate-+l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t + \mathsf{fma}\left(y, i, \color{blue}{\log y \cdot x}\right) \]

    if -2.1000000000000001e171 < x < 2.1999999999999999e221

    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. Taylor expanded in x around 0 91.5%

      \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Step-by-step derivation
      1. +-commutative91.5%

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

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

    if 2.1999999999999999e221 < 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. Step-by-step derivation
      1. +-commutative99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log y \cdot x + \log c \cdot \left(b - 0.5\right)\right)} \]
    6. Step-by-step derivation
      1. fma-def89.8%

        \[\leadsto \left(z + a\right) + \color{blue}{\mathsf{fma}\left(\log y, x, \log c \cdot \left(b - 0.5\right)\right)} \]
      2. sub-neg89.8%

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

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(\log y, x, \log c \cdot \left(b + \color{blue}{-0.5}\right)\right) \]
      4. +-commutative89.8%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(\log y, x, \log c \cdot \color{blue}{\left(-0.5 + b\right)}\right) \]
    7. Simplified89.8%

      \[\leadsto \left(z + a\right) + \color{blue}{\mathsf{fma}\left(\log y, x, \log c \cdot \left(-0.5 + b\right)\right)} \]
    8. Taylor expanded in a around 0 80.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.1 \cdot 10^{+171}:\\ \;\;\;\;t + \mathsf{fma}\left(y, i, x \cdot \log y\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+221}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \log y + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\ \end{array} \]

Alternative 9: 90.4% accurate, 1.0× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -1.06 \cdot 10^{+171} \lor \neg \left(x \leq 5.5 \cdot 10^{+179}\right):\\ \;\;\;\;t + \mathsf{fma}\left(y, i, x \cdot \log y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + z\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (if (or (<= x -1.06e+171) (not (<= x 5.5e+179)))
   (+ t (fma y i (* x (log y))))
   (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ t z))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((x <= -1.06e+171) || !(x <= 5.5e+179)) {
		tmp = t + fma(y, i, (x * log(y)));
	} else {
		tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (t + z)));
	}
	return tmp;
}
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if ((x <= -1.06e+171) || !(x <= 5.5e+179))
		tmp = Float64(t + fma(y, i, Float64(x * log(y))));
	else
		tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + z))));
	end
	return tmp
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.06e+171], N[Not[LessEqual[x, 5.5e+179]], $MachinePrecision]], N[(t + N[(y * i + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.06 \cdot 10^{+171} \lor \neg \left(x \leq 5.5 \cdot 10^{+179}\right):\\
\;\;\;\;t + \mathsf{fma}\left(y, i, x \cdot \log y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.06000000000000001e171 or 5.4999999999999998e179 < x

    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. Step-by-step derivation
      1. associate-+l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto t + \mathsf{fma}\left(y, i, \color{blue}{\log y \cdot x}\right) \]

    if -1.06000000000000001e171 < x < 5.4999999999999998e179

    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. Taylor expanded in x around 0 93.4%

      \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Step-by-step derivation
      1. +-commutative93.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.06 \cdot 10^{+171} \lor \neg \left(x \leq 5.5 \cdot 10^{+179}\right):\\ \;\;\;\;t + \mathsf{fma}\left(y, i, x \cdot \log y\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + z\right)\right)\right)\\ \end{array} \]

Alternative 10: 74.2% accurate, 1.8× speedup?

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

\mathbf{elif}\;b - 0.5 \leq -1 \cdot 10^{+144}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b - 0.5 \leq -1 \cdot 10^{+107}:\\
\;\;\;\;t_2\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 b 1/2) < -2e229 or -1.00000000000000002e144 < (-.f64 b 1/2) < -9.9999999999999997e106

    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. +-commutative99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative95.4%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative95.4%

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def95.4%

        \[\leadsto \left(z + a\right) + \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right)} \]
      2. sub-neg95.4%

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

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

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, i \cdot y\right) \]
    9. Simplified95.4%

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

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

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

    if -2e229 < (-.f64 b 1/2) < -1.00000000000000002e144 or 1.99999999999999991e111 < (-.f64 b 1/2)

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative88.8%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative88.8%

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

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

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

    if -9.9999999999999997e106 < (-.f64 b 1/2) < 1.99999999999999991e111

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative79.4%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative79.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+229}:\\ \;\;\;\;\log c \cdot \left(b - 0.5\right) + y \cdot i\\ \mathbf{elif}\;b - 0.5 \leq -1 \cdot 10^{+144}:\\ \;\;\;\;\left(a + z\right) + b \cdot \log c\\ \mathbf{elif}\;b - 0.5 \leq -1 \cdot 10^{+107}:\\ \;\;\;\;\log c \cdot \left(b - 0.5\right) + y \cdot i\\ \mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+111}:\\ \;\;\;\;y \cdot i + \left(a + z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + z\right) + b \cdot \log c\\ \end{array} \]

Alternative 11: 74.5% accurate, 1.8× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} t_1 := \left(a + z\right) + \left(b + -0.5\right) \cdot \log c\\ t_2 := y \cdot i + \left(a + z\right)\\ t_3 := \left(a + z\right) + x \cdot \log y\\ \mathbf{if}\;i \leq -2.2 \cdot 10^{+83}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;i \leq -8.5:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq -8.5 \cdot 10^{-144}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;i \leq 2.1 \cdot 10^{-290}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;i \leq 1.9 \cdot 10^{-78}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;i \leq 62000000:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (+ a z) (* (+ b -0.5) (log c))))
        (t_2 (+ (* y i) (+ a z)))
        (t_3 (+ (+ a z) (* x (log y)))))
   (if (<= i -2.2e+83)
     t_2
     (if (<= i -8.5)
       t_1
       (if (<= i -8.5e-144)
         t_3
         (if (<= i 2.1e-290)
           t_1
           (if (<= i 1.9e-78) t_3 (if (<= i 62000000.0) t_1 t_2))))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a + z) + ((b + -0.5) * log(c));
	double t_2 = (y * i) + (a + z);
	double t_3 = (a + z) + (x * log(y));
	double tmp;
	if (i <= -2.2e+83) {
		tmp = t_2;
	} else if (i <= -8.5) {
		tmp = t_1;
	} else if (i <= -8.5e-144) {
		tmp = t_3;
	} else if (i <= 2.1e-290) {
		tmp = t_1;
	} else if (i <= 1.9e-78) {
		tmp = t_3;
	} else if (i <= 62000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (a + z) + ((b + (-0.5d0)) * log(c))
    t_2 = (y * i) + (a + z)
    t_3 = (a + z) + (x * log(y))
    if (i <= (-2.2d+83)) then
        tmp = t_2
    else if (i <= (-8.5d0)) then
        tmp = t_1
    else if (i <= (-8.5d-144)) then
        tmp = t_3
    else if (i <= 2.1d-290) then
        tmp = t_1
    else if (i <= 1.9d-78) then
        tmp = t_3
    else if (i <= 62000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (a + z) + ((b + -0.5) * Math.log(c));
	double t_2 = (y * i) + (a + z);
	double t_3 = (a + z) + (x * Math.log(y));
	double tmp;
	if (i <= -2.2e+83) {
		tmp = t_2;
	} else if (i <= -8.5) {
		tmp = t_1;
	} else if (i <= -8.5e-144) {
		tmp = t_3;
	} else if (i <= 2.1e-290) {
		tmp = t_1;
	} else if (i <= 1.9e-78) {
		tmp = t_3;
	} else if (i <= 62000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	t_1 = (a + z) + ((b + -0.5) * math.log(c))
	t_2 = (y * i) + (a + z)
	t_3 = (a + z) + (x * math.log(y))
	tmp = 0
	if i <= -2.2e+83:
		tmp = t_2
	elif i <= -8.5:
		tmp = t_1
	elif i <= -8.5e-144:
		tmp = t_3
	elif i <= 2.1e-290:
		tmp = t_1
	elif i <= 1.9e-78:
		tmp = t_3
	elif i <= 62000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(a + z) + Float64(Float64(b + -0.5) * log(c)))
	t_2 = Float64(Float64(y * i) + Float64(a + z))
	t_3 = Float64(Float64(a + z) + Float64(x * log(y)))
	tmp = 0.0
	if (i <= -2.2e+83)
		tmp = t_2;
	elseif (i <= -8.5)
		tmp = t_1;
	elseif (i <= -8.5e-144)
		tmp = t_3;
	elseif (i <= 2.1e-290)
		tmp = t_1;
	elseif (i <= 1.9e-78)
		tmp = t_3;
	elseif (i <= 62000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (a + z) + ((b + -0.5) * log(c));
	t_2 = (y * i) + (a + z);
	t_3 = (a + z) + (x * log(y));
	tmp = 0.0;
	if (i <= -2.2e+83)
		tmp = t_2;
	elseif (i <= -8.5)
		tmp = t_1;
	elseif (i <= -8.5e-144)
		tmp = t_3;
	elseif (i <= 2.1e-290)
		tmp = t_1;
	elseif (i <= 1.9e-78)
		tmp = t_3;
	elseif (i <= 62000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
NOTE: z, t, and a 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[(a + z), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + z), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -2.2e+83], t$95$2, If[LessEqual[i, -8.5], t$95$1, If[LessEqual[i, -8.5e-144], t$95$3, If[LessEqual[i, 2.1e-290], t$95$1, If[LessEqual[i, 1.9e-78], t$95$3, If[LessEqual[i, 62000000.0], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := \left(a + z\right) + \left(b + -0.5\right) \cdot \log c\\
t_2 := y \cdot i + \left(a + z\right)\\
t_3 := \left(a + z\right) + x \cdot \log y\\
\mathbf{if}\;i \leq -2.2 \cdot 10^{+83}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;i \leq -8.5:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq -8.5 \cdot 10^{-144}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;i \leq 2.1 \cdot 10^{-290}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;i \leq 1.9 \cdot 10^{-78}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;i \leq 62000000:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -2.19999999999999999e83 or 6.2e7 < i

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative88.8%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative88.8%

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

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

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

    if -2.19999999999999999e83 < i < -8.5 or -8.49999999999999958e-144 < i < 2.1000000000000001e-290 or 1.8999999999999999e-78 < i < 6.2e7

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative87.9%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative87.9%

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def74.5%

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\log c \cdot \left(b - 0.5\right)} \]
    11. Step-by-step derivation
      1. *-commutative74.7%

        \[\leadsto \left(z + a\right) + \color{blue}{\left(b - 0.5\right) \cdot \log c} \]
      2. sub-neg74.7%

        \[\leadsto \left(z + a\right) + \color{blue}{\left(b + \left(-0.5\right)\right)} \cdot \log c \]
      3. metadata-eval74.7%

        \[\leadsto \left(z + a\right) + \left(b + \color{blue}{-0.5}\right) \cdot \log c \]
    12. Simplified74.7%

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

    if -8.5 < i < -8.49999999999999958e-144 or 2.1000000000000001e-290 < i < 1.8999999999999999e-78

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\log y \cdot x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification71.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -2.2 \cdot 10^{+83}:\\ \;\;\;\;y \cdot i + \left(a + z\right)\\ \mathbf{elif}\;i \leq -8.5:\\ \;\;\;\;\left(a + z\right) + \left(b + -0.5\right) \cdot \log c\\ \mathbf{elif}\;i \leq -8.5 \cdot 10^{-144}:\\ \;\;\;\;\left(a + z\right) + x \cdot \log y\\ \mathbf{elif}\;i \leq 2.1 \cdot 10^{-290}:\\ \;\;\;\;\left(a + z\right) + \left(b + -0.5\right) \cdot \log c\\ \mathbf{elif}\;i \leq 1.9 \cdot 10^{-78}:\\ \;\;\;\;\left(a + z\right) + x \cdot \log y\\ \mathbf{elif}\;i \leq 62000000:\\ \;\;\;\;\left(a + z\right) + \left(b + -0.5\right) \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + z\right)\\ \end{array} \]

Alternative 12: 90.8% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.9999999999999998e173 or 1.1599999999999999e227 < x

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999998e173 < x < 1.1599999999999999e227

    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. Taylor expanded in x around 0 91.1%

      \[\leadsto \left(\left(\color{blue}{\left(t + z\right)} + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    3. Step-by-step derivation
      1. +-commutative91.1%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3 \cdot 10^{+173} \lor \neg \left(x \leq 1.16 \cdot 10^{+227}\right):\\ \;\;\;\;\left(a + z\right) + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + z\right)\right)\right)\\ \end{array} \]

Alternative 13: 90.4% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.9000000000000001e176 or 2.40000000000000001e224 < x

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9000000000000001e176 < x < 2.40000000000000001e224

    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. Step-by-step derivation
      1. associate-+l+99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+176} \lor \neg \left(x \leq 2.4 \cdot 10^{+224}\right):\\ \;\;\;\;\left(a + z\right) + x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + z\right)\right)\\ \end{array} \]

Alternative 14: 72.5% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b 1/2) < -1.3000000000000001e180 or 3.4999999999999999e190 < (-.f64 b 1/2)

    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. Step-by-step derivation
      1. +-commutative99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative92.5%

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

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def92.5%

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

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

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

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

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

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

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

    if -1.3000000000000001e180 < (-.f64 b 1/2) < 3.4999999999999999e190

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative80.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b - 0.5 \leq -1.3 \cdot 10^{+180} \lor \neg \left(b - 0.5 \leq 3.5 \cdot 10^{+190}\right):\\ \;\;\;\;a + \log c \cdot \left(b - 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + z\right)\\ \end{array} \]

Alternative 15: 74.7% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 b 1/2) < -9.9999999999999997e106 or 1.99999999999999991e111 < (-.f64 b 1/2)

    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. Step-by-step derivation
      1. +-commutative99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative90.6%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative90.6%

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

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

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

    if -9.9999999999999997e106 < (-.f64 b 1/2) < 1.99999999999999991e111

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative79.4%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative79.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+107} \lor \neg \left(b - 0.5 \leq 2 \cdot 10^{+111}\right):\\ \;\;\;\;\left(a + z\right) + b \cdot \log c\\ \mathbf{else}:\\ \;\;\;\;y \cdot i + \left(a + z\right)\\ \end{array} \]

Alternative 16: 37.2% accurate, 16.5× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+139}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.96 \cdot 10^{+102}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+76}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -32000:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-239}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= z -1.2e+139)
   z
   (if (<= z -1.96e+102)
     (* y i)
     (if (<= z -7.5e+76)
       z
       (if (<= z -32000.0) a (if (<= z 8.6e-239) (* y i) a))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (z <= -1.2e+139) {
		tmp = z;
	} else if (z <= -1.96e+102) {
		tmp = y * i;
	} else if (z <= -7.5e+76) {
		tmp = z;
	} else if (z <= -32000.0) {
		tmp = a;
	} else if (z <= 8.6e-239) {
		tmp = y * i;
	} else {
		tmp = a;
	}
	return tmp;
}
NOTE: z, t, and a 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.2d+139)) then
        tmp = z
    else if (z <= (-1.96d+102)) then
        tmp = y * i
    else if (z <= (-7.5d+76)) then
        tmp = z
    else if (z <= (-32000.0d0)) then
        tmp = a
    else if (z <= 8.6d-239) then
        tmp = y * i
    else
        tmp = a
    end if
    code = tmp
end function
assert z < t && t < a;
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.2e+139) {
		tmp = z;
	} else if (z <= -1.96e+102) {
		tmp = y * i;
	} else if (z <= -7.5e+76) {
		tmp = z;
	} else if (z <= -32000.0) {
		tmp = a;
	} else if (z <= 8.6e-239) {
		tmp = y * i;
	} else {
		tmp = a;
	}
	return tmp;
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if z <= -1.2e+139:
		tmp = z
	elif z <= -1.96e+102:
		tmp = y * i
	elif z <= -7.5e+76:
		tmp = z
	elif z <= -32000.0:
		tmp = a
	elif z <= 8.6e-239:
		tmp = y * i
	else:
		tmp = a
	return tmp
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (z <= -1.2e+139)
		tmp = z;
	elseif (z <= -1.96e+102)
		tmp = Float64(y * i);
	elseif (z <= -7.5e+76)
		tmp = z;
	elseif (z <= -32000.0)
		tmp = a;
	elseif (z <= 8.6e-239)
		tmp = Float64(y * i);
	else
		tmp = a;
	end
	return tmp
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (z <= -1.2e+139)
		tmp = z;
	elseif (z <= -1.96e+102)
		tmp = y * i;
	elseif (z <= -7.5e+76)
		tmp = z;
	elseif (z <= -32000.0)
		tmp = a;
	elseif (z <= 8.6e-239)
		tmp = y * i;
	else
		tmp = a;
	end
	tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.2e+139], z, If[LessEqual[z, -1.96e+102], N[(y * i), $MachinePrecision], If[LessEqual[z, -7.5e+76], z, If[LessEqual[z, -32000.0], a, If[LessEqual[z, 8.6e-239], N[(y * i), $MachinePrecision], a]]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+139}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq -1.96 \cdot 10^{+102}:\\
\;\;\;\;y \cdot i\\

\mathbf{elif}\;z \leq -7.5 \cdot 10^{+76}:\\
\;\;\;\;z\\

\mathbf{elif}\;z \leq -32000:\\
\;\;\;\;a\\

\mathbf{elif}\;z \leq 8.6 \cdot 10^{-239}:\\
\;\;\;\;y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.20000000000000004e139 or -1.95999999999999993e102 < z < -7.4999999999999995e76

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative93.3%

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

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def91.3%

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

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

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

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

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

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

    if -1.20000000000000004e139 < z < -1.95999999999999993e102 or -32000 < z < 8.6000000000000001e-239

    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. Step-by-step derivation
      1. associate-+l+99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    6. Simplified27.3%

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

    if -7.4999999999999995e76 < z < -32000 or 8.6000000000000001e-239 < z

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative87.3%

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

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def72.5%

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

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

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

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

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

      \[\leadsto \color{blue}{a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification27.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+139}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -1.96 \cdot 10^{+102}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;z \leq -7.5 \cdot 10^{+76}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq -32000:\\ \;\;\;\;a\\ \mathbf{elif}\;z \leq 8.6 \cdot 10^{-239}:\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 17: 50.4% accurate, 19.4× speedup?

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

\mathbf{elif}\;i \leq -2.9 \cdot 10^{+196}:\\
\;\;\;\;z\\

\mathbf{elif}\;i \leq -1.35 \cdot 10^{+101} \lor \neg \left(i \leq 2 \cdot 10^{+91}\right):\\
\;\;\;\;y \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -5.1999999999999996e207 or -2.9e196 < i < -1.35000000000000003e101 or 2.00000000000000016e91 < i

    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. Step-by-step derivation
      1. associate-+l+99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot i} \]
    6. Simplified59.2%

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

    if -5.1999999999999996e207 < i < -2.9e196

    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. Step-by-step derivation
      1. +-commutative100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative100.0%

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def81.3%

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

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

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

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

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

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

    if -1.35000000000000003e101 < i < 2.00000000000000016e91

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative78.9%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative78.9%

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

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

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

      \[\leadsto \color{blue}{a + z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -5.2 \cdot 10^{+207}:\\ \;\;\;\;y \cdot i\\ \mathbf{elif}\;i \leq -2.9 \cdot 10^{+196}:\\ \;\;\;\;z\\ \mathbf{elif}\;i \leq -1.35 \cdot 10^{+101} \lor \neg \left(i \leq 2 \cdot 10^{+91}\right):\\ \;\;\;\;y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + z\\ \end{array} \]

Alternative 18: 57.5% accurate, 31.0× speedup?

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

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


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

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative92.8%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative92.8%

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

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

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

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

    if -2.50000000000000008e138 < z

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative80.8%

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
      2. *-commutative80.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+138}:\\ \;\;\;\;a + z\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]

Alternative 19: 60.6% accurate, 31.0× speedup?

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

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


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

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative92.2%

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

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

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

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

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

    if -5.99999999999999948e79 < z

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative80.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+79}:\\ \;\;\;\;z + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;a + y \cdot i\\ \end{array} \]

Alternative 20: 67.0% accurate, 31.3× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ y \cdot i + \left(a + z\right) \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ a z)))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + (a + z);
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = (y * i) + (a + z)
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (y * i) + (a + z);
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	return (y * i) + (a + z)
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(y * i) + Float64(a + z))
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (y * i) + (a + z);
end
NOTE: z, t, and a 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[(a + z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
y \cdot i + \left(a + z\right)
\end{array}
Derivation
  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. Step-by-step derivation
    1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
  5. Step-by-step derivation
    1. +-commutative82.8%

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
    2. *-commutative82.8%

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

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

    \[\leadsto \left(z + a\right) + \color{blue}{y \cdot i} \]
  8. Final simplification52.9%

    \[\leadsto y \cdot i + \left(a + z\right) \]

Alternative 21: 37.9% accurate, 71.5× speedup?

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

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


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

    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. Step-by-step derivation
      1. +-commutative99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative92.2%

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

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def90.4%

        \[\leadsto \left(z + a\right) + \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right)} \]
      2. sub-neg90.4%

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

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

        \[\leadsto \left(z + a\right) + \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, i \cdot y\right) \]
    9. Simplified90.4%

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

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

    if -1.3e78 < z

    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. Step-by-step derivation
      1. +-commutative99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
    5. Step-by-step derivation
      1. +-commutative80.5%

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

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

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

      \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
    8. Step-by-step derivation
      1. fma-def66.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+78}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \]

Alternative 22: 23.0% accurate, 219.0× speedup?

\[\begin{array}{l} [z, t, a] = \mathsf{sort}([z, t, a])\\ \\ a \end{array} \]
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i) :precision binary64 a)
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a;
}
NOTE: z, t, and a 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 z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a;
}
[z, t, a] = sort([z, t, a])
def code(x, y, z, t, a, b, c, i):
	return a
z, t, a = sort([z, t, a])
function code(x, y, z, t, a, b, c, i)
	return a
end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = a;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
a
\end{array}
Derivation
  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. Step-by-step derivation
    1. +-commutative99.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(y \cdot i + \left(t + x \cdot \log y\right)\right) + \left(z + \left(a + \left(b - 0.5\right) \cdot \log c\right)\right)} \]
    8. +-commutative99.8%

      \[\leadsto \color{blue}{\left(z + \left(a + \left(b - 0.5\right) \cdot \log c\right)\right) + \left(y \cdot i + \left(t + x \cdot \log y\right)\right)} \]
    9. associate-+r+99.8%

      \[\leadsto \color{blue}{\left(\left(z + a\right) + \left(b - 0.5\right) \cdot \log c\right)} + \left(y \cdot i + \left(t + x \cdot \log y\right)\right) \]
    10. associate-+r+99.8%

      \[\leadsto \color{blue}{\left(z + a\right) + \left(\left(b - 0.5\right) \cdot \log c + \left(y \cdot i + \left(t + x \cdot \log y\right)\right)\right)} \]
    11. fma-def99.9%

      \[\leadsto \left(z + a\right) + \color{blue}{\mathsf{fma}\left(b - 0.5, \log c, y \cdot i + \left(t + x \cdot \log y\right)\right)} \]
    12. sub-neg99.9%

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(\color{blue}{b + \left(-0.5\right)}, \log c, y \cdot i + \left(t + x \cdot \log y\right)\right) \]
    13. metadata-eval99.9%

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + \color{blue}{-0.5}, \log c, y \cdot i + \left(t + x \cdot \log y\right)\right) \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{\left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, t\right)\right)\right)} \]
  4. Taylor expanded in x around 0 82.8%

    \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{t + i \cdot y}\right) \]
  5. Step-by-step derivation
    1. +-commutative82.8%

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{i \cdot y + t}\right) \]
    2. *-commutative82.8%

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{y \cdot i} + t\right) \]
  6. Simplified82.8%

    \[\leadsto \left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \color{blue}{y \cdot i + t}\right) \]
  7. Taylor expanded in t around 0 71.2%

    \[\leadsto \left(z + a\right) + \color{blue}{\left(\log c \cdot \left(b - 0.5\right) + i \cdot y\right)} \]
  8. Step-by-step derivation
    1. fma-def71.2%

      \[\leadsto \left(z + a\right) + \color{blue}{\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right)} \]
    2. sub-neg71.2%

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(\log c, \color{blue}{b + \left(-0.5\right)}, i \cdot y\right) \]
    3. metadata-eval71.2%

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(\log c, b + \color{blue}{-0.5}, i \cdot y\right) \]
    4. +-commutative71.2%

      \[\leadsto \left(z + a\right) + \mathsf{fma}\left(\log c, \color{blue}{-0.5 + b}, i \cdot y\right) \]
  9. Simplified71.2%

    \[\leadsto \left(z + a\right) + \color{blue}{\mathsf{fma}\left(\log c, -0.5 + b, i \cdot y\right)} \]
  10. Taylor expanded in a around inf 14.6%

    \[\leadsto \color{blue}{a} \]
  11. Final simplification14.6%

    \[\leadsto a \]

Reproduce

?
herbie shell --seed 2023240 
(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)))