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

Percentage Accurate: 99.8% → 99.8%
Time: 7.6s
Alternatives: 18
Speedup: 1.1×

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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    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}

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 18 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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i):
	return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}

Alternative 1: 99.8% accurate, 1.1× speedup?

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

      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
    2. lift-+.f64N/A

      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
    3. +-commutativeN/A

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

      \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
    5. lift-*.f64N/A

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

      \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
    7. lower-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
    8. lift-+.f64N/A

      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
    9. +-commutativeN/A

      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
    10. lift-+.f64N/A

      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
    11. associate-+r+N/A

      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
    12. associate-+r+N/A

      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
    13. lower-+.f64N/A

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

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

Alternative 2: 99.8% accurate, 1.1× speedup?

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

      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
    2. +-commutativeN/A

      \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
    3. lift-+.f64N/A

      \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
    4. +-commutativeN/A

      \[\leadsto y \cdot i + \color{blue}{\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
    5. lift-+.f64N/A

      \[\leadsto y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
    6. associate-+r+N/A

      \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right) + a\right)} \]
    7. associate-+r+N/A

      \[\leadsto \color{blue}{\left(y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right)\right) + a} \]
    8. lower-+.f64N/A

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

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

Alternative 3: 98.4% accurate, 0.5× speedup?

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right)\right) + a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -1e21

    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. Taylor expanded in a around 0

      \[\leadsto \color{blue}{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
    3. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto t + \color{blue}{\left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
      2. lower-+.f64N/A

        \[\leadsto t + \left(z + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
      3. lower-fma.f64N/A

        \[\leadsto t + \left(z + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
      4. lower-fma.f64N/A

        \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
      5. lower-log.f64N/A

        \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
      7. lower-log.f64N/A

        \[\leadsto t + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
      8. lower--.f6477.6

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

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

    if -1e21 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

    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. Taylor expanded in z around 0

      \[\leadsto \color{blue}{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
    3. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto a + \color{blue}{\left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
      2. lower-+.f64N/A

        \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
      3. lower-fma.f64N/A

        \[\leadsto a + \left(t + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
      4. lower-fma.f64N/A

        \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
      5. lower-log.f64N/A

        \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
      7. lower-log.f64N/A

        \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
      8. lower--.f6477.1

        \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
    4. Applied rewrites77.1%

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

        \[\leadsto a + \color{blue}{\left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + \color{blue}{a} \]
      3. lower-+.f6477.1

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right)\right) + a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 93.3% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, t\_1\right)\right) + a\\


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

    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. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
      3. lift-+.f64N/A

        \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
      4. +-commutativeN/A

        \[\leadsto y \cdot i + \color{blue}{\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
      5. lift-+.f64N/A

        \[\leadsto y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
      6. associate-+r+N/A

        \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right) + a\right)} \]
      7. associate-+r+N/A

        \[\leadsto \color{blue}{\left(y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right)\right) + a} \]
      8. lower-+.f64N/A

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

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

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

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

      if -3.9e96 < 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. Taylor expanded in z around 0

        \[\leadsto \color{blue}{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
      3. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto a + \color{blue}{\left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
        2. lower-+.f64N/A

          \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
        3. lower-fma.f64N/A

          \[\leadsto a + \left(t + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
        4. lower-fma.f64N/A

          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
        5. lower-log.f64N/A

          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
        6. lower-*.f64N/A

          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
        7. lower-log.f64N/A

          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
        8. lower--.f6477.1

          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
      4. Applied rewrites77.1%

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

          \[\leadsto a + \color{blue}{\left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
        2. +-commutativeN/A

          \[\leadsto \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) + \color{blue}{a} \]
        3. lower-+.f6477.1

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right)\right) + a} \]
    6. Recombined 2 regimes into one program.
    7. Add Preprocessing

    Alternative 5: 93.1% accurate, 1.1× speedup?

    \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+90}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right) + z\right) + a\\ \mathbf{else}:\\ \;\;\;\;a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\\ \end{array} \end{array} \]
    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
    (FPCore (x y z t a b c i)
     :precision binary64
     (if (<= z -6e+90)
       (+ (fma i y (+ (fma (log c) (- b 0.5) t) z)) a)
       (+ a (fma i y (fma x (log y) (* (log c) (- b 0.5)))))))
    assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double tmp;
    	if (z <= -6e+90) {
    		tmp = fma(i, y, (fma(log(c), (b - 0.5), t) + z)) + a;
    	} else {
    		tmp = a + fma(i, y, fma(x, log(y), (log(c) * (b - 0.5))));
    	}
    	return tmp;
    }
    
    x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
    function code(x, y, z, t, a, b, c, i)
    	tmp = 0.0
    	if (z <= -6e+90)
    		tmp = Float64(fma(i, y, Float64(fma(log(c), Float64(b - 0.5), t) + z)) + a);
    	else
    		tmp = Float64(a + fma(i, y, fma(x, log(y), Float64(log(c) * Float64(b - 0.5)))));
    	end
    	return tmp
    end
    
    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -6e+90], N[(N[(i * y + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(a + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -6 \cdot 10^{+90}:\\
    \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right) + z\right) + a\\
    
    \mathbf{else}:\\
    \;\;\;\;a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -5.99999999999999957e90

      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. lift-+.f64N/A

          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
        2. +-commutativeN/A

          \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
        3. lift-+.f64N/A

          \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
        4. +-commutativeN/A

          \[\leadsto y \cdot i + \color{blue}{\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
        5. lift-+.f64N/A

          \[\leadsto y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
        6. associate-+r+N/A

          \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right) + a\right)} \]
        7. associate-+r+N/A

          \[\leadsto \color{blue}{\left(y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right)\right) + a} \]
        8. lower-+.f64N/A

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

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

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

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

        if -5.99999999999999957e90 < 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. Taylor expanded in z around 0

          \[\leadsto \color{blue}{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
        3. Step-by-step derivation
          1. lower-+.f64N/A

            \[\leadsto a + \color{blue}{\left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
          2. lower-+.f64N/A

            \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
          3. lower-fma.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          4. lower-fma.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
          5. lower-log.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
          6. lower-*.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
          7. lower-log.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
          8. lower--.f6477.1

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
        4. Applied rewrites77.1%

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

          \[\leadsto a + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)} \]
        6. Step-by-step derivation
          1. lower-+.f64N/A

            \[\leadsto a + \left(i \cdot y + \color{blue}{\left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)}\right) \]
          2. lower-fma.f64N/A

            \[\leadsto a + \mathsf{fma}\left(i, y, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right) \]
          3. lower-fma.f64N/A

            \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          4. lower-log.f64N/A

            \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          5. lower-*.f64N/A

            \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          6. lower-log.f64N/A

            \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          7. lower--.f6476.6

            \[\leadsto a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right) \]
        7. Applied rewrites76.6%

          \[\leadsto a + \color{blue}{\mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)} \]
      6. Recombined 2 regimes into one program.
      7. Add Preprocessing

      Alternative 6: 90.1% accurate, 1.0× speedup?

      \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \left(\mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right) + t\right) + a\\ \mathbf{if}\;x \leq -2.5 \cdot 10^{+172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+171}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right) + z\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
      (FPCore (x y z t a b c i)
       :precision binary64
       (let* ((t_1 (+ (+ (fma (log c) (- b 0.5) (* (log y) x)) t) a)))
         (if (<= x -2.5e+172)
           t_1
           (if (<= x 3.3e+171)
             (+ (fma i y (+ (fma (log c) (- b 0.5) t) z)) a)
             t_1))))
      assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double t_1 = (fma(log(c), (b - 0.5), (log(y) * x)) + t) + a;
      	double tmp;
      	if (x <= -2.5e+172) {
      		tmp = t_1;
      	} else if (x <= 3.3e+171) {
      		tmp = fma(i, y, (fma(log(c), (b - 0.5), t) + z)) + a;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
      function code(x, y, z, t, a, b, c, i)
      	t_1 = Float64(Float64(fma(log(c), Float64(b - 0.5), Float64(log(y) * x)) + t) + a)
      	tmp = 0.0
      	if (x <= -2.5e+172)
      		tmp = t_1;
      	elseif (x <= 3.3e+171)
      		tmp = Float64(fma(i, y, Float64(fma(log(c), Float64(b - 0.5), t) + z)) + a);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[x, -2.5e+172], t$95$1, If[LessEqual[x, 3.3e+171], N[(N[(i * y + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
      \\
      \begin{array}{l}
      t_1 := \left(\mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right) + t\right) + a\\
      \mathbf{if}\;x \leq -2.5 \cdot 10^{+172}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;x \leq 3.3 \cdot 10^{+171}:\\
      \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right) + z\right) + a\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -2.5e172 or 3.29999999999999991e171 < 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. Taylor expanded in z around 0

          \[\leadsto \color{blue}{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
        3. Step-by-step derivation
          1. lower-+.f64N/A

            \[\leadsto a + \color{blue}{\left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
          2. lower-+.f64N/A

            \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
          3. lower-fma.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          4. lower-fma.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
          5. lower-log.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
          6. lower-*.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
          7. lower-log.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
          8. lower--.f6477.1

            \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
        4. Applied rewrites77.1%

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

          \[\leadsto a + \left(t + i \cdot \color{blue}{\left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)}\right) \]
        6. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto a + \left(t + i \cdot \left(y + \color{blue}{\left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)}\right)\right) \]
          2. lower-+.f64N/A

            \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \color{blue}{\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}}\right)\right)\right) \]
          3. lower-+.f64N/A

            \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{\color{blue}{i}}\right)\right)\right) \]
          4. lower-/.f64N/A

            \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
          5. lower-*.f64N/A

            \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
          6. lower-log.f64N/A

            \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
          7. lower-/.f64N/A

            \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
          8. lower-*.f64N/A

            \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
          9. lower-log.f64N/A

            \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
          10. lower--.f6460.8

            \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - 0.5\right)}{i}\right)\right)\right) \]
        7. Applied rewrites60.8%

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

          \[\leadsto a + \left(t + \left(x \cdot \log y + \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)}\right)\right) \]
        9. Step-by-step derivation
          1. lower-fma.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          2. lower-log.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          3. lower-*.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          4. lower-log.f64N/A

            \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
          5. lower--.f6455.0

            \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right) \]
        10. Applied rewrites55.0%

          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \color{blue}{\log y}, \log c \cdot \left(b - 0.5\right)\right)\right) \]
        11. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto a + \color{blue}{\left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)} \]
          2. +-commutativeN/A

            \[\leadsto \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) + \color{blue}{a} \]
          3. lower-+.f6455.0

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

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

        if -2.5e172 < x < 3.29999999999999991e171

        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. lift-+.f64N/A

            \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
          2. +-commutativeN/A

            \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
          3. lift-+.f64N/A

            \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
          4. +-commutativeN/A

            \[\leadsto y \cdot i + \color{blue}{\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
          5. lift-+.f64N/A

            \[\leadsto y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
          6. associate-+r+N/A

            \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right) + a\right)} \]
          7. associate-+r+N/A

            \[\leadsto \color{blue}{\left(y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right)\right) + a} \]
          8. lower-+.f64N/A

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

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

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

            \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{t}\right) + z\right) + a \]
        6. Recombined 2 regimes into one program.
        7. Add Preprocessing

        Alternative 7: 88.9% accurate, 1.1× speedup?

        \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := a + \left(t + \mathsf{fma}\left(x, \log y, -0.5 \cdot \log c\right)\right)\\ \mathbf{if}\;x \leq -2.5 \cdot 10^{+172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+225}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right) + z\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
        (FPCore (x y z t a b c i)
         :precision binary64
         (let* ((t_1 (+ a (+ t (fma x (log y) (* -0.5 (log c)))))))
           (if (<= x -2.5e+172)
             t_1
             (if (<= x 2.1e+225)
               (+ (fma i y (+ (fma (log c) (- b 0.5) t) z)) a)
               t_1))))
        assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double t_1 = a + (t + fma(x, log(y), (-0.5 * log(c))));
        	double tmp;
        	if (x <= -2.5e+172) {
        		tmp = t_1;
        	} else if (x <= 2.1e+225) {
        		tmp = fma(i, y, (fma(log(c), (b - 0.5), t) + z)) + a;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
        function code(x, y, z, t, a, b, c, i)
        	t_1 = Float64(a + Float64(t + fma(x, log(y), Float64(-0.5 * log(c)))))
        	tmp = 0.0
        	if (x <= -2.5e+172)
        		tmp = t_1;
        	elseif (x <= 2.1e+225)
        		tmp = Float64(fma(i, y, Float64(fma(log(c), Float64(b - 0.5), t) + z)) + a);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(x * N[Log[y], $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e+172], t$95$1, If[LessEqual[x, 2.1e+225], N[(N[(i * y + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
        \\
        \begin{array}{l}
        t_1 := a + \left(t + \mathsf{fma}\left(x, \log y, -0.5 \cdot \log c\right)\right)\\
        \mathbf{if}\;x \leq -2.5 \cdot 10^{+172}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;x \leq 2.1 \cdot 10^{+225}:\\
        \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right) + z\right) + a\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < -2.5e172 or 2.1e225 < 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. Taylor expanded in z around 0

            \[\leadsto \color{blue}{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
          3. Step-by-step derivation
            1. lower-+.f64N/A

              \[\leadsto a + \color{blue}{\left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
            2. lower-+.f64N/A

              \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
            3. lower-fma.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
            4. lower-fma.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
            5. lower-log.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
            6. lower-*.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
            7. lower-log.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
            8. lower--.f6477.1

              \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
          4. Applied rewrites77.1%

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

            \[\leadsto a + \left(t + i \cdot \color{blue}{\left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)}\right) \]
          6. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto a + \left(t + i \cdot \left(y + \color{blue}{\left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)}\right)\right) \]
            2. lower-+.f64N/A

              \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \color{blue}{\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}}\right)\right)\right) \]
            3. lower-+.f64N/A

              \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{\color{blue}{i}}\right)\right)\right) \]
            4. lower-/.f64N/A

              \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
            5. lower-*.f64N/A

              \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
            6. lower-log.f64N/A

              \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
            7. lower-/.f64N/A

              \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
            8. lower-*.f64N/A

              \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
            9. lower-log.f64N/A

              \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
            10. lower--.f6460.8

              \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - 0.5\right)}{i}\right)\right)\right) \]
          7. Applied rewrites60.8%

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

            \[\leadsto a + \left(t + \left(x \cdot \log y + \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)}\right)\right) \]
          9. Step-by-step derivation
            1. lower-fma.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
            2. lower-log.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
            3. lower-*.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
            4. lower-log.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
            5. lower--.f6455.0

              \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right) \]
          10. Applied rewrites55.0%

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

            \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)\right) \]
          12. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \frac{-1}{2} \cdot \log c\right)\right) \]
            2. lower-log.f6439.4

              \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, -0.5 \cdot \log c\right)\right) \]
          13. Applied rewrites39.4%

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

          if -2.5e172 < x < 2.1e225

          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. lift-+.f64N/A

              \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
            2. +-commutativeN/A

              \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
            3. lift-+.f64N/A

              \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
            4. +-commutativeN/A

              \[\leadsto y \cdot i + \color{blue}{\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
            5. lift-+.f64N/A

              \[\leadsto y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
            6. associate-+r+N/A

              \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right) + a\right)} \]
            7. associate-+r+N/A

              \[\leadsto \color{blue}{\left(y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right)\right) + a} \]
            8. lower-+.f64N/A

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

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

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

              \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{t}\right) + z\right) + a \]
          6. Recombined 2 regimes into one program.
          7. Add Preprocessing

          Alternative 8: 87.6% accurate, 1.2× speedup?

          \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := x \cdot \log y\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{+281}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.6 \cdot 10^{+225}:\\ \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right) + z\right) + a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
          (FPCore (x y z t a b c i)
           :precision binary64
           (let* ((t_1 (* x (log y))))
             (if (<= x -1.05e+281)
               t_1
               (if (<= x 2.6e+225)
                 (+ (fma i y (+ (fma (log c) (- b 0.5) t) z)) a)
                 t_1))))
          assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = x * log(y);
          	double tmp;
          	if (x <= -1.05e+281) {
          		tmp = t_1;
          	} else if (x <= 2.6e+225) {
          		tmp = fma(i, y, (fma(log(c), (b - 0.5), t) + z)) + a;
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(x * log(y))
          	tmp = 0.0
          	if (x <= -1.05e+281)
          		tmp = t_1;
          	elseif (x <= 2.6e+225)
          		tmp = Float64(fma(i, y, Float64(fma(log(c), Float64(b - 0.5), t) + z)) + a);
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+281], t$95$1, If[LessEqual[x, 2.6e+225], N[(N[(i * y + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
          \\
          \begin{array}{l}
          t_1 := x \cdot \log y\\
          \mathbf{if}\;x \leq -1.05 \cdot 10^{+281}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;x \leq 2.6 \cdot 10^{+225}:\\
          \;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\right) + z\right) + a\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < -1.05000000000000003e281 or 2.60000000000000004e225 < 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. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
              2. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
              3. +-commutativeN/A

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

                \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
              5. lift-*.f64N/A

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

                \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
              7. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
              8. lift-+.f64N/A

                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
              9. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
              10. lift-+.f64N/A

                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
              11. associate-+r+N/A

                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
              12. associate-+r+N/A

                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
              13. lower-+.f64N/A

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

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

              \[\leadsto \color{blue}{x \cdot \log y} \]
            5. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto x \cdot \color{blue}{\log y} \]
              2. lower-log.f6416.9

                \[\leadsto x \cdot \log y \]
            6. Applied rewrites16.9%

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

            if -1.05000000000000003e281 < x < 2.60000000000000004e225

            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. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
              3. lift-+.f64N/A

                \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
              4. +-commutativeN/A

                \[\leadsto y \cdot i + \color{blue}{\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
              5. lift-+.f64N/A

                \[\leadsto y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
              6. associate-+r+N/A

                \[\leadsto y \cdot i + \color{blue}{\left(\left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right) + a\right)} \]
              7. associate-+r+N/A

                \[\leadsto \color{blue}{\left(y \cdot i + \left(\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(x \cdot \log y + z\right) + t\right)\right)\right) + a} \]
              8. lower-+.f64N/A

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

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

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

                \[\leadsto \mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{t}\right) + z\right) + a \]
            6. Recombined 2 regimes into one program.
            7. Add Preprocessing

            Alternative 9: 77.7% accurate, 1.4× speedup?

            \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(i, y, a + z\right) + t\right)\\ \mathbf{else}:\\ \;\;\;\;a + \left(t + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\ \end{array} \end{array} \]
            NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
            (FPCore (x y z t a b c i)
             :precision binary64
             (if (<= z -3.5e+87)
               (fma -0.5 (log c) (+ (fma i y (+ a z)) t))
               (+ a (+ t (fma i y (* (log c) (- b 0.5)))))))
            assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double tmp;
            	if (z <= -3.5e+87) {
            		tmp = fma(-0.5, log(c), (fma(i, y, (a + z)) + t));
            	} else {
            		tmp = a + (t + fma(i, y, (log(c) * (b - 0.5))));
            	}
            	return tmp;
            }
            
            x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
            function code(x, y, z, t, a, b, c, i)
            	tmp = 0.0
            	if (z <= -3.5e+87)
            		tmp = fma(-0.5, log(c), Float64(fma(i, y, Float64(a + z)) + t));
            	else
            		tmp = Float64(a + Float64(t + fma(i, y, Float64(log(c) * Float64(b - 0.5)))));
            	end
            	return tmp
            end
            
            NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.5e+87], N[(-0.5 * N[Log[c], $MachinePrecision] + N[(N[(i * y + N[(a + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -3.5 \cdot 10^{+87}:\\
            \;\;\;\;\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(i, y, a + z\right) + t\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;a + \left(t + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -3.49999999999999986e87

              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. lift-+.f64N/A

                  \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                2. lift-+.f64N/A

                  \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                3. +-commutativeN/A

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

                  \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                5. lift-*.f64N/A

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

                  \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                7. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                8. lift-+.f64N/A

                  \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                9. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                10. lift-+.f64N/A

                  \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                11. associate-+r+N/A

                  \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                12. associate-+r+N/A

                  \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                13. lower-+.f64N/A

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2}}, \log c, \mathsf{fma}\left(i, y, a + z\right) + t\right) \]
                3. Step-by-step derivation
                  1. Applied rewrites68.2%

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

                  if -3.49999999999999986e87 < 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. Taylor expanded in z around 0

                    \[\leadsto \color{blue}{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. lower-+.f64N/A

                      \[\leadsto a + \color{blue}{\left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                    2. lower-+.f64N/A

                      \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
                    3. lower-fma.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                    4. lower-fma.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                    5. lower-log.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                    6. lower-*.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                    7. lower-log.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                    8. lower--.f6477.1

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
                  4. Applied rewrites77.1%

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

                    \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                  6. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                    2. lower-log.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                    3. lower--.f6461.8

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right) \]
                  7. Applied rewrites61.8%

                    \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \log c \cdot \left(b - 0.5\right)\right)\right) \]
                4. Recombined 2 regimes into one program.
                5. Add Preprocessing

                Alternative 10: 74.3% accurate, 0.7× speedup?

                \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := a + \left(t + \log c \cdot \left(b - 0.5\right)\right)\\ t_2 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+214}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+185}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(i, y, a + z\right) + t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (let* ((t_1 (+ a (+ t (* (log c) (- b 0.5))))) (t_2 (* (- b 0.5) (log c))))
                   (if (<= t_2 -5e+214)
                     t_1
                     (if (<= t_2 2e+185) (fma -0.5 (log c) (+ (fma i y (+ a z)) t)) t_1))))
                assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = a + (t + (log(c) * (b - 0.5)));
                	double t_2 = (b - 0.5) * log(c);
                	double tmp;
                	if (t_2 <= -5e+214) {
                		tmp = t_1;
                	} else if (t_2 <= 2e+185) {
                		tmp = fma(-0.5, log(c), (fma(i, y, (a + z)) + t));
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                function code(x, y, z, t, a, b, c, i)
                	t_1 = Float64(a + Float64(t + Float64(log(c) * Float64(b - 0.5))))
                	t_2 = Float64(Float64(b - 0.5) * log(c))
                	tmp = 0.0
                	if (t_2 <= -5e+214)
                		tmp = t_1;
                	elseif (t_2 <= 2e+185)
                		tmp = fma(-0.5, log(c), Float64(fma(i, y, Float64(a + z)) + t));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+214], t$95$1, If[LessEqual[t$95$2, 2e+185], N[(-0.5 * N[Log[c], $MachinePrecision] + N[(N[(i * y + N[(a + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                
                \begin{array}{l}
                [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                \\
                \begin{array}{l}
                t_1 := a + \left(t + \log c \cdot \left(b - 0.5\right)\right)\\
                t_2 := \left(b - 0.5\right) \cdot \log c\\
                \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+214}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+185}:\\
                \;\;\;\;\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(i, y, a + z\right) + t\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -4.99999999999999953e214 or 2e185 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

                  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. Taylor expanded in z around 0

                    \[\leadsto \color{blue}{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. lower-+.f64N/A

                      \[\leadsto a + \color{blue}{\left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                    2. lower-+.f64N/A

                      \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
                    3. lower-fma.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                    4. lower-fma.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                    5. lower-log.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                    6. lower-*.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                    7. lower-log.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                    8. lower--.f6477.1

                      \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
                  4. Applied rewrites77.1%

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

                    \[\leadsto a + \left(t + i \cdot \color{blue}{\left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)}\right) \]
                  6. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto a + \left(t + i \cdot \left(y + \color{blue}{\left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)}\right)\right) \]
                    2. lower-+.f64N/A

                      \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \color{blue}{\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}}\right)\right)\right) \]
                    3. lower-+.f64N/A

                      \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{\color{blue}{i}}\right)\right)\right) \]
                    4. lower-/.f64N/A

                      \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                    5. lower-*.f64N/A

                      \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                    6. lower-log.f64N/A

                      \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                    7. lower-/.f64N/A

                      \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                    8. lower-*.f64N/A

                      \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                    9. lower-log.f64N/A

                      \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                    10. lower--.f6460.8

                      \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - 0.5\right)}{i}\right)\right)\right) \]
                  7. Applied rewrites60.8%

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

                    \[\leadsto a + \left(t + \left(x \cdot \log y + \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)}\right)\right) \]
                  9. Step-by-step derivation
                    1. lower-fma.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                    2. lower-log.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                    4. lower-log.f64N/A

                      \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                    5. lower--.f6455.0

                      \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right) \]
                  10. Applied rewrites55.0%

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

                    \[\leadsto a + \left(t + \log c \cdot \left(b - \color{blue}{\frac{1}{2}}\right)\right) \]
                  12. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto a + \left(t + \log c \cdot \left(b - \frac{1}{2}\right)\right) \]
                    2. lower-log.f64N/A

                      \[\leadsto a + \left(t + \log c \cdot \left(b - \frac{1}{2}\right)\right) \]
                    3. lower--.f6439.8

                      \[\leadsto a + \left(t + \log c \cdot \left(b - 0.5\right)\right) \]
                  13. Applied rewrites39.8%

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

                  if -4.99999999999999953e214 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 2e185

                  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. lift-+.f64N/A

                      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                    2. lift-+.f64N/A

                      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                    3. +-commutativeN/A

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

                      \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                    5. lift-*.f64N/A

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

                      \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                    7. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                    8. lift-+.f64N/A

                      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                    10. lift-+.f64N/A

                      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                    11. associate-+r+N/A

                      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                    12. associate-+r+N/A

                      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                    13. lower-+.f64N/A

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2}}, \log c, \mathsf{fma}\left(i, y, a + z\right) + t\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites68.2%

                        \[\leadsto \mathsf{fma}\left(\color{blue}{-0.5}, \log c, \mathsf{fma}\left(i, y, a + z\right) + t\right) \]
                    4. Recombined 2 regimes into one program.
                    5. Add Preprocessing

                    Alternative 11: 65.0% accurate, 0.3× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \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\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+21}:\\ \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;a + \left(t + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{y \cdot i}{a}\right) \cdot a\\ \end{array} \end{array} \]
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1
                             (+
                              (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                              (* y i))))
                       (if (<= t_1 -5e+307)
                         (* i y)
                         (if (<= t_1 -1e+21)
                           (* -1.0 (* -1.0 z))
                           (if (<= t_1 5e+305)
                             (+ a (+ t (* (log c) (- b 0.5))))
                             (* (+ 1.0 (/ (* y i) a)) a))))))
                    assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= -1e+21) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else if (t_1 <= 5e+305) {
                    		tmp = a + (t + (log(c) * (b - 0.5)));
                    	} else {
                    		tmp = (1.0 + ((y * i) / a)) * a;
                    	}
                    	return tmp;
                    }
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a, b, c, i)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: c
                        real(8), intent (in) :: i
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                        if (t_1 <= (-5d+307)) then
                            tmp = i * y
                        else if (t_1 <= (-1d+21)) then
                            tmp = (-1.0d0) * ((-1.0d0) * z)
                        else if (t_1 <= 5d+305) then
                            tmp = a + (t + (log(c) * (b - 0.5d0)))
                        else
                            tmp = (1.0d0 + ((y * i) / a)) * a
                        end if
                        code = tmp
                    end function
                    
                    assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
                    public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= -1e+21) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else if (t_1 <= 5e+305) {
                    		tmp = a + (t + (Math.log(c) * (b - 0.5)));
                    	} else {
                    		tmp = (1.0 + ((y * i) / a)) * a;
                    	}
                    	return tmp;
                    }
                    
                    [x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
                    def code(x, y, z, t, a, b, c, i):
                    	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                    	tmp = 0
                    	if t_1 <= -5e+307:
                    		tmp = i * y
                    	elif t_1 <= -1e+21:
                    		tmp = -1.0 * (-1.0 * z)
                    	elif t_1 <= 5e+305:
                    		tmp = a + (t + (math.log(c) * (b - 0.5)))
                    	else:
                    		tmp = (1.0 + ((y * i) / a)) * a
                    	return tmp
                    
                    x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                    	tmp = 0.0
                    	if (t_1 <= -5e+307)
                    		tmp = Float64(i * y);
                    	elseif (t_1 <= -1e+21)
                    		tmp = Float64(-1.0 * Float64(-1.0 * z));
                    	elseif (t_1 <= 5e+305)
                    		tmp = Float64(a + Float64(t + Float64(log(c) * Float64(b - 0.5))));
                    	else
                    		tmp = Float64(Float64(1.0 + Float64(Float64(y * i) / a)) * a);
                    	end
                    	return tmp
                    end
                    
                    x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                    	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	tmp = 0.0;
                    	if (t_1 <= -5e+307)
                    		tmp = i * y;
                    	elseif (t_1 <= -1e+21)
                    		tmp = -1.0 * (-1.0 * z);
                    	elseif (t_1 <= 5e+305)
                    		tmp = a + (t + (log(c) * (b - 0.5)));
                    	else
                    		tmp = (1.0 + ((y * i) / a)) * a;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -5e+307], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -1e+21], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+305], N[(a + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(y * i), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                    \\
                    \begin{array}{l}
                    t_1 := \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\\
                    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\
                    \;\;\;\;i \cdot y\\
                    
                    \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+21}:\\
                    \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
                    
                    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\
                    \;\;\;\;a + \left(t + \log c \cdot \left(b - 0.5\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(1 + \frac{y \cdot i}{a}\right) \cdot a\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -5e307

                      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. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                        2. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                        3. +-commutativeN/A

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

                          \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                        5. lift-*.f64N/A

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

                          \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        7. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        8. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                        9. +-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                        10. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                        11. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                        12. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                        13. lower-+.f64N/A

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

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

                        \[\leadsto \color{blue}{i \cdot y} \]
                      5. Step-by-step derivation
                        1. lower-*.f6423.9

                          \[\leadsto i \cdot \color{blue}{y} \]
                      6. Applied rewrites23.9%

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

                      if -5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -1e21

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]
                      6. Step-by-step derivation
                        1. lower-*.f6423.1

                          \[\leadsto -1 \cdot \left(-1 \cdot z\right) \]
                      7. Applied rewrites23.1%

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]

                      if -1e21 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5.00000000000000009e305

                      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. Taylor expanded in z around 0

                        \[\leadsto \color{blue}{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-+.f64N/A

                          \[\leadsto a + \color{blue}{\left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                        2. lower-+.f64N/A

                          \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
                        3. lower-fma.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        4. lower-fma.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                        5. lower-log.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                        6. lower-*.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                        7. lower-log.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                        8. lower--.f6477.1

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
                      4. Applied rewrites77.1%

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

                        \[\leadsto a + \left(t + i \cdot \color{blue}{\left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)}\right) \]
                      6. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \color{blue}{\left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)}\right)\right) \]
                        2. lower-+.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \color{blue}{\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}}\right)\right)\right) \]
                        3. lower-+.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{\color{blue}{i}}\right)\right)\right) \]
                        4. lower-/.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        5. lower-*.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        6. lower-log.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        7. lower-/.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        8. lower-*.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        9. lower-log.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        10. lower--.f6460.8

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - 0.5\right)}{i}\right)\right)\right) \]
                      7. Applied rewrites60.8%

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

                        \[\leadsto a + \left(t + \left(x \cdot \log y + \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)}\right)\right) \]
                      9. Step-by-step derivation
                        1. lower-fma.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        2. lower-log.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        3. lower-*.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        4. lower-log.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        5. lower--.f6455.0

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right) \]
                      10. Applied rewrites55.0%

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

                        \[\leadsto a + \left(t + \log c \cdot \left(b - \color{blue}{\frac{1}{2}}\right)\right) \]
                      12. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto a + \left(t + \log c \cdot \left(b - \frac{1}{2}\right)\right) \]
                        2. lower-log.f64N/A

                          \[\leadsto a + \left(t + \log c \cdot \left(b - \frac{1}{2}\right)\right) \]
                        3. lower--.f6439.8

                          \[\leadsto a + \left(t + \log c \cdot \left(b - 0.5\right)\right) \]
                      13. Applied rewrites39.8%

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

                      if 5.00000000000000009e305 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                      6. Step-by-step derivation
                        1. lower-/.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                        2. lower-*.f6441.6

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                      7. Applied rewrites41.6%

                        \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                      8. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right)} \]
                        2. mul-1-negN/A

                          \[\leadsto \mathsf{neg}\left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                        3. lift-*.f64N/A

                          \[\leadsto \mathsf{neg}\left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                        4. *-commutativeN/A

                          \[\leadsto \mathsf{neg}\left(\left(-1 \cdot \frac{i \cdot y}{a} - 1\right) \cdot a\right) \]
                        5. distribute-lft-neg-inN/A

                          \[\leadsto \left(\mathsf{neg}\left(\left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right)\right) \cdot \color{blue}{a} \]
                      9. Applied rewrites41.6%

                        \[\leadsto \left(1 + \frac{y \cdot i}{a}\right) \cdot \color{blue}{a} \]
                    3. Recombined 4 regimes into one program.
                    4. Add Preprocessing

                    Alternative 12: 65.0% accurate, 0.3× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \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\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+21}:\\ \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;a + \left(t + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(a \cdot \left(-1 \cdot \left(y \cdot \frac{i}{a}\right) - 1\right)\right)\\ \end{array} \end{array} \]
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1
                             (+
                              (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                              (* y i))))
                       (if (<= t_1 -5e+307)
                         (* i y)
                         (if (<= t_1 -1e+21)
                           (* -1.0 (* -1.0 z))
                           (if (<= t_1 5e+305)
                             (+ a (+ t (* (log c) (- b 0.5))))
                             (* -1.0 (* a (- (* -1.0 (* y (/ i a))) 1.0))))))))
                    assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= -1e+21) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else if (t_1 <= 5e+305) {
                    		tmp = a + (t + (log(c) * (b - 0.5)));
                    	} else {
                    		tmp = -1.0 * (a * ((-1.0 * (y * (i / a))) - 1.0));
                    	}
                    	return tmp;
                    }
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a, b, c, i)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: c
                        real(8), intent (in) :: i
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                        if (t_1 <= (-5d+307)) then
                            tmp = i * y
                        else if (t_1 <= (-1d+21)) then
                            tmp = (-1.0d0) * ((-1.0d0) * z)
                        else if (t_1 <= 5d+305) then
                            tmp = a + (t + (log(c) * (b - 0.5d0)))
                        else
                            tmp = (-1.0d0) * (a * (((-1.0d0) * (y * (i / a))) - 1.0d0))
                        end if
                        code = tmp
                    end function
                    
                    assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
                    public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= -1e+21) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else if (t_1 <= 5e+305) {
                    		tmp = a + (t + (Math.log(c) * (b - 0.5)));
                    	} else {
                    		tmp = -1.0 * (a * ((-1.0 * (y * (i / a))) - 1.0));
                    	}
                    	return tmp;
                    }
                    
                    [x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
                    def code(x, y, z, t, a, b, c, i):
                    	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                    	tmp = 0
                    	if t_1 <= -5e+307:
                    		tmp = i * y
                    	elif t_1 <= -1e+21:
                    		tmp = -1.0 * (-1.0 * z)
                    	elif t_1 <= 5e+305:
                    		tmp = a + (t + (math.log(c) * (b - 0.5)))
                    	else:
                    		tmp = -1.0 * (a * ((-1.0 * (y * (i / a))) - 1.0))
                    	return tmp
                    
                    x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                    	tmp = 0.0
                    	if (t_1 <= -5e+307)
                    		tmp = Float64(i * y);
                    	elseif (t_1 <= -1e+21)
                    		tmp = Float64(-1.0 * Float64(-1.0 * z));
                    	elseif (t_1 <= 5e+305)
                    		tmp = Float64(a + Float64(t + Float64(log(c) * Float64(b - 0.5))));
                    	else
                    		tmp = Float64(-1.0 * Float64(a * Float64(Float64(-1.0 * Float64(y * Float64(i / a))) - 1.0)));
                    	end
                    	return tmp
                    end
                    
                    x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                    	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	tmp = 0.0;
                    	if (t_1 <= -5e+307)
                    		tmp = i * y;
                    	elseif (t_1 <= -1e+21)
                    		tmp = -1.0 * (-1.0 * z);
                    	elseif (t_1 <= 5e+305)
                    		tmp = a + (t + (log(c) * (b - 0.5)));
                    	else
                    		tmp = -1.0 * (a * ((-1.0 * (y * (i / a))) - 1.0));
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(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]}, If[LessEqual[t$95$1, -5e+307], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -1e+21], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+305], N[(a + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(a * N[(N[(-1.0 * N[(y * N[(i / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                    \\
                    \begin{array}{l}
                    t_1 := \left(\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\\
                    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\
                    \;\;\;\;i \cdot y\\
                    
                    \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+21}:\\
                    \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
                    
                    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\
                    \;\;\;\;a + \left(t + \log c \cdot \left(b - 0.5\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;-1 \cdot \left(a \cdot \left(-1 \cdot \left(y \cdot \frac{i}{a}\right) - 1\right)\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -5e307

                      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. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                        2. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                        3. +-commutativeN/A

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

                          \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                        5. lift-*.f64N/A

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

                          \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        7. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        8. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                        9. +-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                        10. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                        11. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                        12. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                        13. lower-+.f64N/A

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

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

                        \[\leadsto \color{blue}{i \cdot y} \]
                      5. Step-by-step derivation
                        1. lower-*.f6423.9

                          \[\leadsto i \cdot \color{blue}{y} \]
                      6. Applied rewrites23.9%

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

                      if -5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -1e21

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]
                      6. Step-by-step derivation
                        1. lower-*.f6423.1

                          \[\leadsto -1 \cdot \left(-1 \cdot z\right) \]
                      7. Applied rewrites23.1%

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]

                      if -1e21 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5.00000000000000009e305

                      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. Taylor expanded in z around 0

                        \[\leadsto \color{blue}{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-+.f64N/A

                          \[\leadsto a + \color{blue}{\left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                        2. lower-+.f64N/A

                          \[\leadsto a + \left(t + \color{blue}{\left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)}\right) \]
                        3. lower-fma.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, \color{blue}{y}, x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        4. lower-fma.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                        5. lower-log.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                        6. lower-*.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                        7. lower-log.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right) \]
                        8. lower--.f6477.1

                          \[\leadsto a + \left(t + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \]
                      4. Applied rewrites77.1%

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

                        \[\leadsto a + \left(t + i \cdot \color{blue}{\left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)}\right) \]
                      6. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \color{blue}{\left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)}\right)\right) \]
                        2. lower-+.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \color{blue}{\frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}}\right)\right)\right) \]
                        3. lower-+.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{\color{blue}{i}}\right)\right)\right) \]
                        4. lower-/.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        5. lower-*.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        6. lower-log.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        7. lower-/.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        8. lower-*.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        9. lower-log.f64N/A

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{i}\right)\right)\right) \]
                        10. lower--.f6460.8

                          \[\leadsto a + \left(t + i \cdot \left(y + \left(\frac{x \cdot \log y}{i} + \frac{\log c \cdot \left(b - 0.5\right)}{i}\right)\right)\right) \]
                      7. Applied rewrites60.8%

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

                        \[\leadsto a + \left(t + \left(x \cdot \log y + \color{blue}{\log c \cdot \left(b - \frac{1}{2}\right)}\right)\right) \]
                      9. Step-by-step derivation
                        1. lower-fma.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        2. lower-log.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        3. lower-*.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        4. lower-log.f64N/A

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        5. lower--.f6455.0

                          \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right) \]
                      10. Applied rewrites55.0%

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

                        \[\leadsto a + \left(t + \log c \cdot \left(b - \color{blue}{\frac{1}{2}}\right)\right) \]
                      12. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto a + \left(t + \log c \cdot \left(b - \frac{1}{2}\right)\right) \]
                        2. lower-log.f64N/A

                          \[\leadsto a + \left(t + \log c \cdot \left(b - \frac{1}{2}\right)\right) \]
                        3. lower--.f6439.8

                          \[\leadsto a + \left(t + \log c \cdot \left(b - 0.5\right)\right) \]
                      13. Applied rewrites39.8%

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

                      if 5.00000000000000009e305 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                      6. Step-by-step derivation
                        1. lower-/.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                        2. lower-*.f6441.6

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                      7. Applied rewrites41.6%

                        \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                      8. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                        2. lift-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                        3. *-commutativeN/A

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{y \cdot i}{a} - 1\right)\right) \]
                        4. associate-/l*N/A

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \left(y \cdot \frac{i}{a}\right) - 1\right)\right) \]
                        5. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \left(y \cdot \frac{i}{a}\right) - 1\right)\right) \]
                        6. lower-/.f6441.3

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \left(y \cdot \frac{i}{a}\right) - 1\right)\right) \]
                      9. Applied rewrites41.3%

                        \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \left(y \cdot \frac{i}{a}\right) - 1\right)\right) \]
                    3. Recombined 4 regimes into one program.
                    4. Add Preprocessing

                    Alternative 13: 59.6% accurate, 0.4× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq 200:\\ \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 + \frac{y \cdot i}{a}\right) \cdot a\\ \end{array} \end{array} \]
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1
                             (+
                              (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                              (* y i))))
                       (if (<= t_1 -5e+307)
                         (* i y)
                         (if (<= t_1 200.0) (* -1.0 (* -1.0 z)) (* (+ 1.0 (/ (* y i) a)) a)))))
                    assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= 200.0) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else {
                    		tmp = (1.0 + ((y * i) / a)) * a;
                    	}
                    	return tmp;
                    }
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a, b, c, i)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: c
                        real(8), intent (in) :: i
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                        if (t_1 <= (-5d+307)) then
                            tmp = i * y
                        else if (t_1 <= 200.0d0) then
                            tmp = (-1.0d0) * ((-1.0d0) * z)
                        else
                            tmp = (1.0d0 + ((y * i) / a)) * a
                        end if
                        code = tmp
                    end function
                    
                    assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
                    public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= 200.0) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else {
                    		tmp = (1.0 + ((y * i) / a)) * a;
                    	}
                    	return tmp;
                    }
                    
                    [x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
                    def code(x, y, z, t, a, b, c, i):
                    	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                    	tmp = 0
                    	if t_1 <= -5e+307:
                    		tmp = i * y
                    	elif t_1 <= 200.0:
                    		tmp = -1.0 * (-1.0 * z)
                    	else:
                    		tmp = (1.0 + ((y * i) / a)) * a
                    	return tmp
                    
                    x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                    	tmp = 0.0
                    	if (t_1 <= -5e+307)
                    		tmp = Float64(i * y);
                    	elseif (t_1 <= 200.0)
                    		tmp = Float64(-1.0 * Float64(-1.0 * z));
                    	else
                    		tmp = Float64(Float64(1.0 + Float64(Float64(y * i) / a)) * a);
                    	end
                    	return tmp
                    end
                    
                    x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                    	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	tmp = 0.0;
                    	if (t_1 <= -5e+307)
                    		tmp = i * y;
                    	elseif (t_1 <= 200.0)
                    		tmp = -1.0 * (-1.0 * z);
                    	else
                    		tmp = (1.0 + ((y * i) / a)) * a;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -5e+307], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 200.0], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(y * i), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                    \\
                    \begin{array}{l}
                    t_1 := \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\\
                    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\
                    \;\;\;\;i \cdot y\\
                    
                    \mathbf{elif}\;t\_1 \leq 200:\\
                    \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(1 + \frac{y \cdot i}{a}\right) \cdot a\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -5e307

                      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. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                        2. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                        3. +-commutativeN/A

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

                          \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                        5. lift-*.f64N/A

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

                          \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        7. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        8. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                        9. +-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                        10. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                        11. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                        12. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                        13. lower-+.f64N/A

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

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

                        \[\leadsto \color{blue}{i \cdot y} \]
                      5. Step-by-step derivation
                        1. lower-*.f6423.9

                          \[\leadsto i \cdot \color{blue}{y} \]
                      6. Applied rewrites23.9%

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

                      if -5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 200

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]
                      6. Step-by-step derivation
                        1. lower-*.f6423.1

                          \[\leadsto -1 \cdot \left(-1 \cdot z\right) \]
                      7. Applied rewrites23.1%

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]

                      if 200 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                      6. Step-by-step derivation
                        1. lower-/.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                        2. lower-*.f6441.6

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                      7. Applied rewrites41.6%

                        \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                      8. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right)} \]
                        2. mul-1-negN/A

                          \[\leadsto \mathsf{neg}\left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                        3. lift-*.f64N/A

                          \[\leadsto \mathsf{neg}\left(a \cdot \left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right) \]
                        4. *-commutativeN/A

                          \[\leadsto \mathsf{neg}\left(\left(-1 \cdot \frac{i \cdot y}{a} - 1\right) \cdot a\right) \]
                        5. distribute-lft-neg-inN/A

                          \[\leadsto \left(\mathsf{neg}\left(\left(-1 \cdot \frac{i \cdot y}{a} - 1\right)\right)\right) \cdot \color{blue}{a} \]
                      9. Applied rewrites41.6%

                        \[\leadsto \left(1 + \frac{y \cdot i}{a}\right) \cdot \color{blue}{a} \]
                    3. Recombined 3 regimes into one program.
                    4. Add Preprocessing

                    Alternative 14: 55.8% accurate, 0.3× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \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\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq -100:\\ \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;\left(1 + \frac{z}{a}\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1
                             (+
                              (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                              (* y i))))
                       (if (<= t_1 -5e+307)
                         (* i y)
                         (if (<= t_1 -100.0)
                           (* -1.0 (* -1.0 z))
                           (if (<= t_1 5e+305) (* (+ 1.0 (/ z a)) a) (* i y))))))
                    assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= -100.0) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else if (t_1 <= 5e+305) {
                    		tmp = (1.0 + (z / a)) * a;
                    	} else {
                    		tmp = i * y;
                    	}
                    	return tmp;
                    }
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a, b, c, i)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: c
                        real(8), intent (in) :: i
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                        if (t_1 <= (-5d+307)) then
                            tmp = i * y
                        else if (t_1 <= (-100.0d0)) then
                            tmp = (-1.0d0) * ((-1.0d0) * z)
                        else if (t_1 <= 5d+305) then
                            tmp = (1.0d0 + (z / a)) * a
                        else
                            tmp = i * y
                        end if
                        code = tmp
                    end function
                    
                    assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
                    public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= -100.0) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else if (t_1 <= 5e+305) {
                    		tmp = (1.0 + (z / a)) * a;
                    	} else {
                    		tmp = i * y;
                    	}
                    	return tmp;
                    }
                    
                    [x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
                    def code(x, y, z, t, a, b, c, i):
                    	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                    	tmp = 0
                    	if t_1 <= -5e+307:
                    		tmp = i * y
                    	elif t_1 <= -100.0:
                    		tmp = -1.0 * (-1.0 * z)
                    	elif t_1 <= 5e+305:
                    		tmp = (1.0 + (z / a)) * a
                    	else:
                    		tmp = i * y
                    	return tmp
                    
                    x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                    	tmp = 0.0
                    	if (t_1 <= -5e+307)
                    		tmp = Float64(i * y);
                    	elseif (t_1 <= -100.0)
                    		tmp = Float64(-1.0 * Float64(-1.0 * z));
                    	elseif (t_1 <= 5e+305)
                    		tmp = Float64(Float64(1.0 + Float64(z / a)) * a);
                    	else
                    		tmp = Float64(i * y);
                    	end
                    	return tmp
                    end
                    
                    x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                    	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	tmp = 0.0;
                    	if (t_1 <= -5e+307)
                    		tmp = i * y;
                    	elseif (t_1 <= -100.0)
                    		tmp = -1.0 * (-1.0 * z);
                    	elseif (t_1 <= 5e+305)
                    		tmp = (1.0 + (z / a)) * a;
                    	else
                    		tmp = i * y;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(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]}, If[LessEqual[t$95$1, -5e+307], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -100.0], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+305], N[(N[(1.0 + N[(z / a), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(i * y), $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                    \\
                    \begin{array}{l}
                    t_1 := \left(\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\\
                    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\
                    \;\;\;\;i \cdot y\\
                    
                    \mathbf{elif}\;t\_1 \leq -100:\\
                    \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
                    
                    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\
                    \;\;\;\;\left(1 + \frac{z}{a}\right) \cdot a\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;i \cdot y\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -5e307 or 5.00000000000000009e305 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                      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. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                        2. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                        3. +-commutativeN/A

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

                          \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                        5. lift-*.f64N/A

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

                          \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        7. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        8. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                        9. +-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                        10. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                        11. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                        12. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                        13. lower-+.f64N/A

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

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

                        \[\leadsto \color{blue}{i \cdot y} \]
                      5. Step-by-step derivation
                        1. lower-*.f6423.9

                          \[\leadsto i \cdot \color{blue}{y} \]
                      6. Applied rewrites23.9%

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

                      if -5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -100

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]
                      6. Step-by-step derivation
                        1. lower-*.f6423.1

                          \[\leadsto -1 \cdot \left(-1 \cdot z\right) \]
                      7. Applied rewrites23.1%

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]

                      if -100 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5.00000000000000009e305

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right) \]
                      6. Step-by-step derivation
                        1. lower-/.f6437.2

                          \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right) \]
                      7. Applied rewrites37.2%

                        \[\leadsto -1 \cdot \left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right) \]
                      8. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right)} \]
                        2. mul-1-negN/A

                          \[\leadsto \mathsf{neg}\left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right) \]
                        3. lift-*.f64N/A

                          \[\leadsto \mathsf{neg}\left(a \cdot \left(-1 \cdot \frac{z}{a} - 1\right)\right) \]
                        4. *-commutativeN/A

                          \[\leadsto \mathsf{neg}\left(\left(-1 \cdot \frac{z}{a} - 1\right) \cdot a\right) \]
                        5. distribute-lft-neg-inN/A

                          \[\leadsto \left(\mathsf{neg}\left(\left(-1 \cdot \frac{z}{a} - 1\right)\right)\right) \cdot \color{blue}{a} \]
                      9. Applied rewrites37.2%

                        \[\leadsto \color{blue}{\left(1 + \frac{z}{a}\right) \cdot a} \]
                    3. Recombined 3 regimes into one program.
                    4. Add Preprocessing

                    Alternative 15: 55.7% accurate, 0.3× speedup?

                    \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \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\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq -100:\\ \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;-1 \cdot \left(a \cdot -1\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1
                             (+
                              (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                              (* y i))))
                       (if (<= t_1 -5e+307)
                         (* i y)
                         (if (<= t_1 -100.0)
                           (* -1.0 (* -1.0 z))
                           (if (<= t_1 5e+305) (* -1.0 (* a -1.0)) (* i y))))))
                    assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= -100.0) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else if (t_1 <= 5e+305) {
                    		tmp = -1.0 * (a * -1.0);
                    	} else {
                    		tmp = i * y;
                    	}
                    	return tmp;
                    }
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a, b, c, i)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: c
                        real(8), intent (in) :: i
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                        if (t_1 <= (-5d+307)) then
                            tmp = i * y
                        else if (t_1 <= (-100.0d0)) then
                            tmp = (-1.0d0) * ((-1.0d0) * z)
                        else if (t_1 <= 5d+305) then
                            tmp = (-1.0d0) * (a * (-1.0d0))
                        else
                            tmp = i * y
                        end if
                        code = tmp
                    end function
                    
                    assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
                    public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                    	double tmp;
                    	if (t_1 <= -5e+307) {
                    		tmp = i * y;
                    	} else if (t_1 <= -100.0) {
                    		tmp = -1.0 * (-1.0 * z);
                    	} else if (t_1 <= 5e+305) {
                    		tmp = -1.0 * (a * -1.0);
                    	} else {
                    		tmp = i * y;
                    	}
                    	return tmp;
                    }
                    
                    [x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
                    def code(x, y, z, t, a, b, c, i):
                    	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                    	tmp = 0
                    	if t_1 <= -5e+307:
                    		tmp = i * y
                    	elif t_1 <= -100.0:
                    		tmp = -1.0 * (-1.0 * z)
                    	elif t_1 <= 5e+305:
                    		tmp = -1.0 * (a * -1.0)
                    	else:
                    		tmp = i * y
                    	return tmp
                    
                    x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                    	tmp = 0.0
                    	if (t_1 <= -5e+307)
                    		tmp = Float64(i * y);
                    	elseif (t_1 <= -100.0)
                    		tmp = Float64(-1.0 * Float64(-1.0 * z));
                    	elseif (t_1 <= 5e+305)
                    		tmp = Float64(-1.0 * Float64(a * -1.0));
                    	else
                    		tmp = Float64(i * y);
                    	end
                    	return tmp
                    end
                    
                    x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
                    function tmp_2 = code(x, y, z, t, a, b, c, i)
                    	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                    	tmp = 0.0;
                    	if (t_1 <= -5e+307)
                    		tmp = i * y;
                    	elseif (t_1 <= -100.0)
                    		tmp = -1.0 * (-1.0 * z);
                    	elseif (t_1 <= 5e+305)
                    		tmp = -1.0 * (a * -1.0);
                    	else
                    		tmp = i * y;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(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]}, If[LessEqual[t$95$1, -5e+307], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -100.0], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+305], N[(-1.0 * N[(a * -1.0), $MachinePrecision]), $MachinePrecision], N[(i * y), $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                    \\
                    \begin{array}{l}
                    t_1 := \left(\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\\
                    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\
                    \;\;\;\;i \cdot y\\
                    
                    \mathbf{elif}\;t\_1 \leq -100:\\
                    \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
                    
                    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\
                    \;\;\;\;-1 \cdot \left(a \cdot -1\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;i \cdot y\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -5e307 or 5.00000000000000009e305 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                      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. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                        2. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                        3. +-commutativeN/A

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

                          \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                        5. lift-*.f64N/A

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

                          \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        7. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        8. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                        9. +-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                        10. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                        11. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                        12. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                        13. lower-+.f64N/A

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

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

                        \[\leadsto \color{blue}{i \cdot y} \]
                      5. Step-by-step derivation
                        1. lower-*.f6423.9

                          \[\leadsto i \cdot \color{blue}{y} \]
                      6. Applied rewrites23.9%

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

                      if -5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -100

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]
                      6. Step-by-step derivation
                        1. lower-*.f6423.1

                          \[\leadsto -1 \cdot \left(-1 \cdot z\right) \]
                      7. Applied rewrites23.1%

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]

                      if -100 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5.00000000000000009e305

                      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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(a \cdot -1\right) \]
                      6. Step-by-step derivation
                        1. Applied rewrites22.5%

                          \[\leadsto -1 \cdot \left(a \cdot -1\right) \]
                      7. Recombined 3 regimes into one program.
                      8. Add Preprocessing

                      Alternative 16: 40.4% accurate, 0.4× speedup?

                      \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ \begin{array}{l} t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq 200:\\ \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1
                               (+
                                (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                                (* y i))))
                         (if (<= t_1 -5e+307)
                           (* i y)
                           (if (<= t_1 200.0) (* -1.0 (* -1.0 z)) (* i y)))))
                      assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                      	double tmp;
                      	if (t_1 <= -5e+307) {
                      		tmp = i * y;
                      	} else if (t_1 <= 200.0) {
                      		tmp = -1.0 * (-1.0 * z);
                      	} else {
                      		tmp = i * y;
                      	}
                      	return tmp;
                      }
                      
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t, a, b, c, i)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          real(8), intent (in) :: c
                          real(8), intent (in) :: i
                          real(8) :: t_1
                          real(8) :: tmp
                          t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                          if (t_1 <= (-5d+307)) then
                              tmp = i * y
                          else if (t_1 <= 200.0d0) then
                              tmp = (-1.0d0) * ((-1.0d0) * z)
                          else
                              tmp = i * y
                          end if
                          code = tmp
                      end function
                      
                      assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                      	double tmp;
                      	if (t_1 <= -5e+307) {
                      		tmp = i * y;
                      	} else if (t_1 <= 200.0) {
                      		tmp = -1.0 * (-1.0 * z);
                      	} else {
                      		tmp = i * y;
                      	}
                      	return tmp;
                      }
                      
                      [x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
                      def code(x, y, z, t, a, b, c, i):
                      	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                      	tmp = 0
                      	if t_1 <= -5e+307:
                      		tmp = i * y
                      	elif t_1 <= 200.0:
                      		tmp = -1.0 * (-1.0 * z)
                      	else:
                      		tmp = i * y
                      	return tmp
                      
                      x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                      	tmp = 0.0
                      	if (t_1 <= -5e+307)
                      		tmp = Float64(i * y);
                      	elseif (t_1 <= 200.0)
                      		tmp = Float64(-1.0 * Float64(-1.0 * z));
                      	else
                      		tmp = Float64(i * y);
                      	end
                      	return tmp
                      end
                      
                      x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                      	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                      	tmp = 0.0;
                      	if (t_1 <= -5e+307)
                      		tmp = i * y;
                      	elseif (t_1 <= 200.0)
                      		tmp = -1.0 * (-1.0 * z);
                      	else
                      		tmp = i * y;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(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]}, If[LessEqual[t$95$1, -5e+307], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 200.0], N[(-1.0 * N[(-1.0 * z), $MachinePrecision]), $MachinePrecision], N[(i * y), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                      \\
                      \begin{array}{l}
                      t_1 := \left(\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\\
                      \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+307}:\\
                      \;\;\;\;i \cdot y\\
                      
                      \mathbf{elif}\;t\_1 \leq 200:\\
                      \;\;\;\;-1 \cdot \left(-1 \cdot z\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;i \cdot y\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -5e307 or 200 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                        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. lift-+.f64N/A

                            \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                          2. lift-+.f64N/A

                            \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                          3. +-commutativeN/A

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

                            \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                          5. lift-*.f64N/A

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

                            \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                          7. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                          8. lift-+.f64N/A

                            \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                          9. +-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                          10. lift-+.f64N/A

                            \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                          11. associate-+r+N/A

                            \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                          12. associate-+r+N/A

                            \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                          13. lower-+.f64N/A

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

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

                          \[\leadsto \color{blue}{i \cdot y} \]
                        5. Step-by-step derivation
                          1. lower-*.f6423.9

                            \[\leadsto i \cdot \color{blue}{y} \]
                        6. Applied rewrites23.9%

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

                        if -5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 200

                        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. Taylor expanded in a around -inf

                          \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        3. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                          2. lower-*.f64N/A

                            \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                          3. lower--.f64N/A

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

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

                          \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]
                        6. Step-by-step derivation
                          1. lower-*.f6423.1

                            \[\leadsto -1 \cdot \left(-1 \cdot z\right) \]
                        7. Applied rewrites23.1%

                          \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{z}\right) \]
                      3. Recombined 2 regimes into one program.
                      4. Add Preprocessing

                      Alternative 17: 23.9% accurate, 9.5× speedup?

                      \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ i \cdot y \end{array} \]
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      (FPCore (x y z t a b c i) :precision binary64 (* i y))
                      assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	return i * y;
                      }
                      
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t, a, b, c, i)
                      use fmin_fmax_functions
                          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 = i * y
                      end function
                      
                      assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	return i * y;
                      }
                      
                      [x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
                      def code(x, y, z, t, a, b, c, i):
                      	return i * y
                      
                      x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                      function code(x, y, z, t, a, b, c, i)
                      	return Float64(i * y)
                      end
                      
                      x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
                      function tmp = code(x, y, z, t, a, b, c, i)
                      	tmp = i * y;
                      end
                      
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(i * y), $MachinePrecision]
                      
                      \begin{array}{l}
                      [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                      \\
                      i \cdot y
                      \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. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
                        2. lift-+.f64N/A

                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                        3. +-commutativeN/A

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

                          \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                        5. lift-*.f64N/A

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

                          \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        7. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                        8. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                        9. +-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                        10. lift-+.f64N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                        11. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                        12. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                        13. lower-+.f64N/A

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

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

                        \[\leadsto \color{blue}{i \cdot y} \]
                      5. Step-by-step derivation
                        1. lower-*.f6423.9

                          \[\leadsto i \cdot \color{blue}{y} \]
                      6. Applied rewrites23.9%

                        \[\leadsto \color{blue}{i \cdot y} \]
                      7. Add Preprocessing

                      Alternative 18: 2.9% accurate, 12.8× speedup?

                      \[\begin{array}{l} [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\ \\ -\left(-t\right) \end{array} \]
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      (FPCore (x y z t a b c i) :precision binary64 (- (- t)))
                      assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	return -(-t);
                      }
                      
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t, a, b, c, i)
                      use fmin_fmax_functions
                          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 = -(-t)
                      end function
                      
                      assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	return -(-t);
                      }
                      
                      [x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i])
                      def code(x, y, z, t, a, b, c, i):
                      	return -(-t)
                      
                      x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i])
                      function code(x, y, z, t, a, b, c, i)
                      	return Float64(-Float64(-t))
                      end
                      
                      x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
                      function tmp = code(x, y, z, t, a, b, c, i)
                      	tmp = -(-t);
                      end
                      
                      NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := (-(-t))
                      
                      \begin{array}{l}
                      [x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
                      \\
                      -\left(-t\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. Taylor expanded in a around -inf

                        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)\right)} \]
                        2. lower-*.f64N/A

                          \[\leadsto -1 \cdot \left(a \cdot \color{blue}{\left(-1 \cdot \frac{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{a} - 1\right)}\right) \]
                        3. lower--.f64N/A

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

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

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{t}\right) \]
                      6. Step-by-step derivation
                        1. lower-*.f642.9

                          \[\leadsto -1 \cdot \left(-1 \cdot t\right) \]
                      7. Applied rewrites2.9%

                        \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{t}\right) \]
                      8. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot t\right)} \]
                        2. mul-1-negN/A

                          \[\leadsto \mathsf{neg}\left(-1 \cdot t\right) \]
                        3. lower-neg.f642.9

                          \[\leadsto --1 \cdot t \]
                        4. lift-*.f64N/A

                          \[\leadsto --1 \cdot t \]
                        5. mul-1-negN/A

                          \[\leadsto -\left(\mathsf{neg}\left(t\right)\right) \]
                        6. lower-neg.f642.9

                          \[\leadsto -\left(-t\right) \]
                      9. Applied rewrites2.9%

                        \[\leadsto \color{blue}{-\left(-t\right)} \]
                      10. Add Preprocessing

                      Reproduce

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