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

Percentage Accurate: 99.8% → 99.8%
Time: 6.8s
Alternatives: 24
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 24 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} \\ \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \left(a + t\right) + \mathsf{fma}\left(\log y, x, z\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (fma y i (fma (log c) (- b 0.5) (+ (+ a t) (fma (log y) x z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return fma(y, i, fma(log(c), (b - 0.5), ((a + t) + fma(log(y), x, z))));
}
function code(x, y, z, t, a, b, c, i)
	return fma(y, i, fma(log(c), Float64(b - 0.5), Float64(Float64(a + t) + fma(log(y), x, z))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[(a + t), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \left(a + t\right) + \mathsf{fma}\left(\log y, x, z\right)\right)\right)
\end{array}
Derivation
  1. Initial program 99.8%

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
    4. lift-+.f64N/A

      \[\leadsto \left(\color{blue}{\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 \]
    5. lift-+.f64N/A

      \[\leadsto \left(\left(\color{blue}{\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 \]
    6. lift-+.f64N/A

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

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

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

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

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

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

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

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

Alternative 2: 92.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ \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 500:\\ \;\;\;\;\left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\_1\right)\right) + z\right) + t\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t\_1 + a\right) + b \cdot \log c\right) + y \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (log y) x)))
   (if (<=
        (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
        500.0)
     (+ (+ (fma i y (fma (log c) (- b 0.5) t_1)) z) t)
     (+ (+ (+ t_1 a) (* b (log c))) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = log(y) * x;
	double tmp;
	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= 500.0) {
		tmp = (fma(i, y, fma(log(c), (b - 0.5), t_1)) + z) + t;
	} else {
		tmp = ((t_1 + a) + (b * log(c))) + (y * i);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(y) * x)
	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)) <= 500.0)
		tmp = Float64(Float64(fma(i, y, fma(log(c), Float64(b - 0.5), t_1)) + z) + t);
	else
		tmp = Float64(Float64(Float64(t_1 + a) + Float64(b * log(c))) + Float64(y * i));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, 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], 500.0], N[(N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision], N[(N[(N[(t$95$1 + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \log y \cdot x\\
\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 500:\\
\;\;\;\;\left(\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, t\_1\right)\right) + z\right) + t\\

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


\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)) < 500

    1. Initial program 99.9%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 500 < (+.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.7%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in t around inf

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

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

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

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

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

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

            \[\leadsto \left(\left(\log y \cdot \color{blue}{x} + a\right) + b \cdot \log c\right) + y \cdot i \]
          3. lift-log.f6470.7

            \[\leadsto \left(\left(\log y \cdot x + a\right) + b \cdot \log c\right) + y \cdot i \]
        4. Applied rewrites70.7%

          \[\leadsto \left(\left(\color{blue}{\log y \cdot x} + a\right) + b \cdot \log c\right) + y \cdot i \]
      4. Recombined 2 regimes into one program.
      5. Add Preprocessing

      Alternative 3: 91.7% accurate, 1.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ \mathbf{if}\;x \leq -2.6 \cdot 10^{+148}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, t\_1\right) + z\right) + t\right) + a\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t\_1 + a\right) + b \cdot \log c\right) + y \cdot i\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (let* ((t_1 (* (log y) x)))
         (if (<= x -2.6e+148)
           (+ (+ (+ (fma (log c) (- b 0.5) t_1) z) t) a)
           (if (<= x 1.55e+94)
             (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))
             (+ (+ (+ t_1 a) (* b (log c))) (* y i))))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double t_1 = log(y) * x;
      	double tmp;
      	if (x <= -2.6e+148) {
      		tmp = ((fma(log(c), (b - 0.5), t_1) + z) + t) + a;
      	} else if (x <= 1.55e+94) {
      		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
      	} else {
      		tmp = ((t_1 + a) + (b * log(c))) + (y * i);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b, c, i)
      	t_1 = Float64(log(y) * x)
      	tmp = 0.0
      	if (x <= -2.6e+148)
      		tmp = Float64(Float64(Float64(fma(log(c), Float64(b - 0.5), t_1) + z) + t) + a);
      	elseif (x <= 1.55e+94)
      		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a));
      	else
      		tmp = Float64(Float64(Float64(t_1 + a) + Float64(b * log(c))) + Float64(y * i));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -2.6e+148], N[(N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t$95$1), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[x, 1.55e+94], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$1 + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \log y \cdot x\\
      \mathbf{if}\;x \leq -2.6 \cdot 10^{+148}:\\
      \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, t\_1\right) + z\right) + t\right) + a\\
      
      \mathbf{elif}\;x \leq 1.55 \cdot 10^{+94}:\\
      \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(t\_1 + a\right) + b \cdot \log c\right) + y \cdot i\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x < -2.6e148

        1. Initial program 99.5%

          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
        2. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.6e148 < x < 1.54999999999999996e94

        1. Initial program 99.9%

          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
          4. lift-+.f64N/A

            \[\leadsto \left(\color{blue}{\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 \]
          5. lift-+.f64N/A

            \[\leadsto \left(\left(\color{blue}{\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 \]
          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
          14. lift--.f6497.4

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

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

        if 1.54999999999999996e94 < x

        1. Initial program 99.7%

          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
        2. Taylor expanded in t around inf

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

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

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

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

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

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

                \[\leadsto \left(\left(\log y \cdot \color{blue}{x} + a\right) + b \cdot \log c\right) + y \cdot i \]
              3. lift-log.f6479.3

                \[\leadsto \left(\left(\log y \cdot x + a\right) + b \cdot \log c\right) + y \cdot i \]
            4. Applied rewrites79.3%

              \[\leadsto \left(\left(\color{blue}{\log y \cdot x} + a\right) + b \cdot \log c\right) + y \cdot i \]
          4. Recombined 3 regimes into one program.
          5. Add Preprocessing

          Alternative 4: 90.5% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\log y \cdot x + a\right) + b \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;x \leq -4.6 \cdot 10^{+102}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{+94}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (let* ((t_1 (+ (+ (+ (* (log y) x) a) (* b (log c))) (* y i))))
             (if (<= x -4.6e+102)
               t_1
               (if (<= x 1.55e+94)
                 (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))
                 t_1))))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = (((log(y) * x) + a) + (b * log(c))) + (y * i);
          	double tmp;
          	if (x <= -4.6e+102) {
          		tmp = t_1;
          	} else if (x <= 1.55e+94) {
          		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(Float64(Float64(Float64(log(y) * x) + a) + Float64(b * log(c))) + Float64(y * i))
          	tmp = 0.0
          	if (x <= -4.6e+102)
          		tmp = t_1;
          	elseif (x <= 1.55e+94)
          		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.6e+102], t$95$1, If[LessEqual[x, 1.55e+94], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(\left(\log y \cdot x + a\right) + b \cdot \log c\right) + y \cdot i\\
          \mathbf{if}\;x \leq -4.6 \cdot 10^{+102}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;x \leq 1.55 \cdot 10^{+94}:\\
          \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < -4.5999999999999998e102 or 1.54999999999999996e94 < x

            1. Initial program 99.7%

              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
            2. Taylor expanded in t around inf

              \[\leadsto \left(\left(\color{blue}{t} + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
            3. Step-by-step derivation
              1. Applied rewrites47.7%

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

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

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

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

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

                    \[\leadsto \left(\left(\log y \cdot \color{blue}{x} + a\right) + b \cdot \log c\right) + y \cdot i \]
                  3. lift-log.f6479.5

                    \[\leadsto \left(\left(\log y \cdot x + a\right) + b \cdot \log c\right) + y \cdot i \]
                4. Applied rewrites79.5%

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

                if -4.5999999999999998e102 < x < 1.54999999999999996e94

                1. Initial program 99.9%

                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                2. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                  4. lift-+.f64N/A

                    \[\leadsto \left(\color{blue}{\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 \]
                  5. lift-+.f64N/A

                    \[\leadsto \left(\left(\color{blue}{\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 \]
                  6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                  14. lift--.f6498.3

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

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

              Alternative 5: 90.5% accurate, 1.1× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log y \cdot x\\ \mathbf{if}\;x \leq -7.6 \cdot 10^{+221}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, t\_1\right)\right)\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t\_1 + b \cdot \log c\right) + y \cdot i\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (* (log y) x)))
                 (if (<= x -7.6e+221)
                   (fma y i (fma (log c) (- b 0.5) t_1))
                   (if (<= x 5.6e+144)
                     (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))
                     (+ (+ t_1 (* b (log c))) (* y i))))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = log(y) * x;
              	double tmp;
              	if (x <= -7.6e+221) {
              		tmp = fma(y, i, fma(log(c), (b - 0.5), t_1));
              	} else if (x <= 5.6e+144) {
              		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
              	} else {
              		tmp = (t_1 + (b * log(c))) + (y * i);
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = Float64(log(y) * x)
              	tmp = 0.0
              	if (x <= -7.6e+221)
              		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), t_1));
              	elseif (x <= 5.6e+144)
              		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a));
              	else
              		tmp = Float64(Float64(t_1 + Float64(b * log(c))) + Float64(y * i));
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -7.6e+221], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.6e+144], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \log y \cdot x\\
              \mathbf{if}\;x \leq -7.6 \cdot 10^{+221}:\\
              \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, t\_1\right)\right)\\
              
              \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\
              \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(t\_1 + b \cdot \log c\right) + y \cdot i\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if x < -7.60000000000000068e221

                1. Initial program 99.3%

                  \[\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 \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                  4. lift-+.f64N/A

                    \[\leadsto \left(\color{blue}{\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 \]
                  5. lift-+.f64N/A

                    \[\leadsto \left(\left(\color{blue}{\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 \]
                  6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \log y \cdot \color{blue}{x}\right)\right) \]
                  7. lift-log.f6483.5

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

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

                if -7.60000000000000068e221 < x < 5.60000000000000013e144

                1. Initial program 99.9%

                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                2. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                  4. lift-+.f64N/A

                    \[\leadsto \left(\color{blue}{\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 \]
                  5. lift-+.f64N/A

                    \[\leadsto \left(\left(\color{blue}{\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 \]
                  6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                  14. lift--.f6494.1

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

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

                if 5.60000000000000013e144 < x

                1. Initial program 99.7%

                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                2. Taylor expanded in t around inf

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

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

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

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

                      \[\leadsto \left(\color{blue}{x \cdot \log y} + b \cdot \log c\right) + y \cdot i \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

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

                        \[\leadsto \left(\log y \cdot \color{blue}{x} + b \cdot \log c\right) + y \cdot i \]
                      3. lift-log.f6474.1

                        \[\leadsto \left(\log y \cdot x + b \cdot \log c\right) + y \cdot i \]
                    4. Applied rewrites74.1%

                      \[\leadsto \left(\color{blue}{\log y \cdot x} + b \cdot \log c\right) + y \cdot i \]
                  4. Recombined 3 regimes into one program.
                  5. Add Preprocessing

                  Alternative 6: 89.1% accurate, 1.1× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\log y \cdot x + b \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;x \leq -7.6 \cdot 10^{+221}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (let* ((t_1 (+ (+ (* (log y) x) (* b (log c))) (* y i))))
                     (if (<= x -7.6e+221)
                       t_1
                       (if (<= x 5.6e+144)
                         (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))
                         t_1))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = ((log(y) * x) + (b * log(c))) + (y * i);
                  	double tmp;
                  	if (x <= -7.6e+221) {
                  		tmp = t_1;
                  	} else if (x <= 5.6e+144) {
                  		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = Float64(Float64(Float64(log(y) * x) + Float64(b * log(c))) + Float64(y * i))
                  	tmp = 0.0
                  	if (x <= -7.6e+221)
                  		tmp = t_1;
                  	elseif (x <= 5.6e+144)
                  		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a));
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.6e+221], t$95$1, If[LessEqual[x, 5.6e+144], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(\log y \cdot x + b \cdot \log c\right) + y \cdot i\\
                  \mathbf{if}\;x \leq -7.6 \cdot 10^{+221}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\
                  \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < -7.60000000000000068e221 or 5.60000000000000013e144 < x

                    1. Initial program 99.6%

                      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                    2. Taylor expanded in t around inf

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

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

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

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

                          \[\leadsto \left(\color{blue}{x \cdot \log y} + b \cdot \log c\right) + y \cdot i \]
                        3. Step-by-step derivation
                          1. *-commutativeN/A

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

                            \[\leadsto \left(\log y \cdot \color{blue}{x} + b \cdot \log c\right) + y \cdot i \]
                          3. lift-log.f6477.2

                            \[\leadsto \left(\log y \cdot x + b \cdot \log c\right) + y \cdot i \]
                        4. Applied rewrites77.2%

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

                        if -7.60000000000000068e221 < x < 5.60000000000000013e144

                        1. Initial program 99.9%

                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                          4. lift-+.f64N/A

                            \[\leadsto \left(\color{blue}{\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 \]
                          5. lift-+.f64N/A

                            \[\leadsto \left(\left(\color{blue}{\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 \]
                          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                          14. lift--.f6494.1

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

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

                      Alternative 7: 78.2% accurate, 1.2× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, i, \log y \cdot x\right)\\ \mathbf{if}\;x \leq -2.36 \cdot 10^{+222}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (fma y i (* (log y) x))))
                         (if (<= x -2.36e+222)
                           t_1
                           (if (<= x 5.6e+144)
                             (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a))
                             t_1))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = fma(y, i, (log(y) * x));
                      	double tmp;
                      	if (x <= -2.36e+222) {
                      		tmp = t_1;
                      	} else if (x <= 5.6e+144) {
                      		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = fma(y, i, Float64(log(y) * x))
                      	tmp = 0.0
                      	if (x <= -2.36e+222)
                      		tmp = t_1;
                      	elseif (x <= 5.6e+144)
                      		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * i + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.36e+222], t$95$1, If[LessEqual[x, 5.6e+144], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \mathsf{fma}\left(y, i, \log y \cdot x\right)\\
                      \mathbf{if}\;x \leq -2.36 \cdot 10^{+222}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\
                      \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -2.36e222 or 5.60000000000000013e144 < x

                        1. Initial program 99.6%

                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                          4. lift-+.f64N/A

                            \[\leadsto \left(\color{blue}{\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 \]
                          5. lift-+.f64N/A

                            \[\leadsto \left(\left(\color{blue}{\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 \]
                          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{x \cdot \log y}\right) \]
                        5. Step-by-step derivation
                          1. +-commutativeN/A

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

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          4. +-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          5. associate-+l+N/A

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          6. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          7. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot \color{blue}{x}\right) \]
                          8. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot \color{blue}{x}\right) \]
                          9. lift-log.f6470.2

                            \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot x\right) \]
                        6. Applied rewrites70.2%

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

                        if -2.36e222 < x < 5.60000000000000013e144

                        1. Initial program 99.9%

                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                          4. lift-+.f64N/A

                            \[\leadsto \left(\color{blue}{\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 \]
                          5. lift-+.f64N/A

                            \[\leadsto \left(\left(\color{blue}{\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 \]
                          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                          14. lift--.f6494.0

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

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

                      Alternative 8: 76.3% accurate, 1.2× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, i, \log y \cdot x\right)\\ \mathbf{if}\;x \leq -2.36 \cdot 10^{+222}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\ \;\;\;\;\left(\left(z + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (fma y i (* (log y) x))))
                         (if (<= x -2.36e+222)
                           t_1
                           (if (<= x 5.6e+144) (+ (+ (+ z a) (* (- b 0.5) (log c))) (* y i)) t_1))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = fma(y, i, (log(y) * x));
                      	double tmp;
                      	if (x <= -2.36e+222) {
                      		tmp = t_1;
                      	} else if (x <= 5.6e+144) {
                      		tmp = ((z + a) + ((b - 0.5) * log(c))) + (y * i);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = fma(y, i, Float64(log(y) * x))
                      	tmp = 0.0
                      	if (x <= -2.36e+222)
                      		tmp = t_1;
                      	elseif (x <= 5.6e+144)
                      		tmp = Float64(Float64(Float64(z + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * i + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.36e+222], t$95$1, If[LessEqual[x, 5.6e+144], N[(N[(N[(z + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \mathsf{fma}\left(y, i, \log y \cdot x\right)\\
                      \mathbf{if}\;x \leq -2.36 \cdot 10^{+222}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\
                      \;\;\;\;\left(\left(z + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -2.36e222 or 5.60000000000000013e144 < x

                        1. Initial program 99.6%

                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                          4. lift-+.f64N/A

                            \[\leadsto \left(\color{blue}{\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 \]
                          5. lift-+.f64N/A

                            \[\leadsto \left(\left(\color{blue}{\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 \]
                          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{x \cdot \log y}\right) \]
                        5. Step-by-step derivation
                          1. +-commutativeN/A

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

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          4. +-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          5. associate-+l+N/A

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          6. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                          7. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot \color{blue}{x}\right) \]
                          8. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot \color{blue}{x}\right) \]
                          9. lift-log.f6470.2

                            \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot x\right) \]
                        6. Applied rewrites70.2%

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

                        if -2.36e222 < x < 5.60000000000000013e144

                        1. Initial program 99.9%

                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                        2. Taylor expanded in z around inf

                          \[\leadsto \left(\left(\color{blue}{z} + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                        3. Step-by-step derivation
                          1. Applied rewrites77.9%

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

                        Alternative 9: 75.4% accurate, 1.3× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, i, \log y \cdot x\right)\\ \mathbf{if}\;x \leq -2.36 \cdot 10^{+222}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\ \;\;\;\;\left(\left(z + a\right) + b \cdot \log c\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b c i)
                         :precision binary64
                         (let* ((t_1 (fma y i (* (log y) x))))
                           (if (<= x -2.36e+222)
                             t_1
                             (if (<= x 5.6e+144) (+ (+ (+ z a) (* b (log c))) (* y i)) t_1))))
                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	double t_1 = fma(y, i, (log(y) * x));
                        	double tmp;
                        	if (x <= -2.36e+222) {
                        		tmp = t_1;
                        	} else if (x <= 5.6e+144) {
                        		tmp = ((z + a) + (b * log(c))) + (y * i);
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b, c, i)
                        	t_1 = fma(y, i, Float64(log(y) * x))
                        	tmp = 0.0
                        	if (x <= -2.36e+222)
                        		tmp = t_1;
                        	elseif (x <= 5.6e+144)
                        		tmp = Float64(Float64(Float64(z + a) + Float64(b * log(c))) + Float64(y * i));
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * i + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.36e+222], t$95$1, If[LessEqual[x, 5.6e+144], N[(N[(N[(z + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \mathsf{fma}\left(y, i, \log y \cdot x\right)\\
                        \mathbf{if}\;x \leq -2.36 \cdot 10^{+222}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;x \leq 5.6 \cdot 10^{+144}:\\
                        \;\;\;\;\left(\left(z + a\right) + b \cdot \log c\right) + y \cdot i\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if x < -2.36e222 or 5.60000000000000013e144 < x

                          1. Initial program 99.6%

                            \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                          2. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                            4. lift-+.f64N/A

                              \[\leadsto \left(\color{blue}{\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 \]
                            5. lift-+.f64N/A

                              \[\leadsto \left(\left(\color{blue}{\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 \]
                            6. lift-+.f64N/A

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{x \cdot \log y}\right) \]
                          5. Step-by-step derivation
                            1. +-commutativeN/A

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

                              \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                            3. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                            4. +-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                            5. associate-+l+N/A

                              \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                            6. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(y, i, x \cdot \log y\right) \]
                            7. *-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot \color{blue}{x}\right) \]
                            8. lower-*.f64N/A

                              \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot \color{blue}{x}\right) \]
                            9. lift-log.f6470.2

                              \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot x\right) \]
                          6. Applied rewrites70.2%

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

                          if -2.36e222 < x < 5.60000000000000013e144

                          1. Initial program 99.9%

                            \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                          2. Taylor expanded in t around inf

                            \[\leadsto \left(\left(\color{blue}{t} + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                          3. Step-by-step derivation
                            1. Applied rewrites76.7%

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

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

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

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

                                  \[\leadsto \left(\left(\color{blue}{z} + a\right) + b \cdot \log c\right) + y \cdot i \]
                              4. Recombined 2 regimes into one program.
                              5. Add Preprocessing

                              Alternative 10: 74.6% accurate, 0.6× speedup?

                              \[\begin{array}{l} \\ \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 500:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t + a\right) + b \cdot \log c\right) + y \cdot i\\ \end{array} \end{array} \]
                              (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))
                                    500.0)
                                 (fma y i (fma (log c) (- b 0.5) z))
                                 (+ (+ (+ t a) (* b (log c))) (* y 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)) <= 500.0) {
                              		tmp = fma(y, i, fma(log(c), (b - 0.5), z));
                              	} else {
                              		tmp = ((t + a) + (b * log(c))) + (y * i);
                              	}
                              	return tmp;
                              }
                              
                              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)) <= 500.0)
                              		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), z));
                              	else
                              		tmp = Float64(Float64(Float64(t + a) + Float64(b * log(c))) + Float64(y * i));
                              	end
                              	return tmp
                              end
                              
                              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], 500.0], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \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 500:\\
                              \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(\left(t + a\right) + b \cdot \log c\right) + y \cdot i\\
                              
                              
                              \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)) < 500

                                1. Initial program 99.9%

                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                2. Step-by-step derivation
                                  1. lift-*.f64N/A

                                    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                  4. lift-+.f64N/A

                                    \[\leadsto \left(\color{blue}{\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 \]
                                  5. lift-+.f64N/A

                                    \[\leadsto \left(\left(\color{blue}{\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 \]
                                  6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                  2. *-commutative55.9

                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                  3. +-commutative55.9

                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                  4. associate-+l+55.9

                                    \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                6. Applied rewrites55.9%

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

                                if 500 < (+.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.7%

                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                2. Taylor expanded in t around inf

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

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

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

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

                                  Alternative 11: 73.8% accurate, 0.6× speedup?

                                  \[\begin{array}{l} \\ \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 -200:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right)\\ \end{array} \end{array} \]
                                  (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))
                                        -200.0)
                                     (fma y i (fma (log c) (- b 0.5) z))
                                     (fma y i (fma (log c) (- b 0.5) a))))
                                  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)) <= -200.0) {
                                  		tmp = fma(y, i, fma(log(c), (b - 0.5), z));
                                  	} else {
                                  		tmp = fma(y, i, fma(log(c), (b - 0.5), a));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  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)) <= -200.0)
                                  		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), z));
                                  	else
                                  		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), a));
                                  	end
                                  	return tmp
                                  end
                                  
                                  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], -200.0], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \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 -200:\\
                                  \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right)\\
                                  
                                  
                                  \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)) < -200

                                    1. Initial program 99.9%

                                      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                    2. Step-by-step derivation
                                      1. lift-*.f64N/A

                                        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                      4. lift-+.f64N/A

                                        \[\leadsto \left(\color{blue}{\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 \]
                                      5. lift-+.f64N/A

                                        \[\leadsto \left(\left(\color{blue}{\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 \]
                                      6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                      2. *-commutative54.9

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                      3. +-commutative54.9

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                      4. associate-+l+54.9

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                    6. Applied rewrites54.9%

                                      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \color{blue}{z}\right)\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.7%

                                      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                    2. Step-by-step derivation
                                      1. lift-*.f64N/A

                                        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                      4. lift-+.f64N/A

                                        \[\leadsto \left(\color{blue}{\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 \]
                                      5. lift-+.f64N/A

                                        \[\leadsto \left(\left(\color{blue}{\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 \]
                                      6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right) \]
                                      2. *-commutative56.0

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right) \]
                                      3. +-commutative56.0

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right) \]
                                      4. associate-+l+56.0

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right) \]
                                    6. Applied rewrites56.0%

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

                                  Alternative 12: 71.2% accurate, 0.6× speedup?

                                  \[\begin{array}{l} \\ \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^{+43}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b, z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right)\\ \end{array} \end{array} \]
                                  (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+43)
                                     (fma y i (fma (log c) b z))
                                     (fma y i (fma (log c) (- b 0.5) a))))
                                  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+43) {
                                  		tmp = fma(y, i, fma(log(c), b, z));
                                  	} else {
                                  		tmp = fma(y, i, fma(log(c), (b - 0.5), a));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  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+43)
                                  		tmp = fma(y, i, fma(log(c), b, z));
                                  	else
                                  		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), a));
                                  	end
                                  	return tmp
                                  end
                                  
                                  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+43], N[(y * i + N[(N[Log[c], $MachinePrecision] * b + z), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \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^{+43}:\\
                                  \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b, z\right)\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right)\\
                                  
                                  
                                  \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)) < -1.00000000000000001e43

                                    1. Initial program 99.9%

                                      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                    2. Step-by-step derivation
                                      1. lift-*.f64N/A

                                        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                      4. lift-+.f64N/A

                                        \[\leadsto \left(\color{blue}{\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 \]
                                      5. lift-+.f64N/A

                                        \[\leadsto \left(\left(\color{blue}{\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 \]
                                      6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                      2. *-commutative54.7

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                      3. +-commutative54.7

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                      4. associate-+l+54.7

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                    6. Applied rewrites54.7%

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

                                      \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, \color{blue}{b}, z\right)\right) \]
                                    8. Step-by-step derivation
                                      1. Applied rewrites54.7%

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

                                      if -1.00000000000000001e43 < (+.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.7%

                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                      2. Step-by-step derivation
                                        1. lift-*.f64N/A

                                          \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                        4. lift-+.f64N/A

                                          \[\leadsto \left(\color{blue}{\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 \]
                                        5. lift-+.f64N/A

                                          \[\leadsto \left(\left(\color{blue}{\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 \]
                                        6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right) \]
                                        2. *-commutative56.4

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right) \]
                                        3. +-commutative56.4

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right) \]
                                        4. associate-+l+56.4

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a\right)\right) \]
                                      6. Applied rewrites56.4%

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

                                    Alternative 13: 62.1% accurate, 0.7× speedup?

                                    \[\begin{array}{l} \\ \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 500:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b, z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \log c \cdot b + a\right)\\ \end{array} \end{array} \]
                                    (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))
                                          500.0)
                                       (fma y i (fma (log c) b z))
                                       (fma y i (+ (* (log c) b) a))))
                                    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)) <= 500.0) {
                                    		tmp = fma(y, i, fma(log(c), b, z));
                                    	} else {
                                    		tmp = fma(y, i, ((log(c) * b) + a));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    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)) <= 500.0)
                                    		tmp = fma(y, i, fma(log(c), b, z));
                                    	else
                                    		tmp = fma(y, i, Float64(Float64(log(c) * b) + a));
                                    	end
                                    	return tmp
                                    end
                                    
                                    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], 500.0], N[(y * i + N[(N[Log[c], $MachinePrecision] * b + z), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \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 500:\\
                                    \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b, z\right)\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\mathsf{fma}\left(y, i, \log c \cdot b + a\right)\\
                                    
                                    
                                    \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)) < 500

                                      1. Initial program 99.9%

                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                      2. Step-by-step derivation
                                        1. lift-*.f64N/A

                                          \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                        4. lift-+.f64N/A

                                          \[\leadsto \left(\color{blue}{\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 \]
                                        5. lift-+.f64N/A

                                          \[\leadsto \left(\left(\color{blue}{\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 \]
                                        6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                        2. *-commutative55.9

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                        3. +-commutative55.9

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                        4. associate-+l+55.9

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                      6. Applied rewrites55.9%

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

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, \color{blue}{b}, z\right)\right) \]
                                      8. Step-by-step derivation
                                        1. Applied rewrites52.7%

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

                                        if 500 < (+.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.7%

                                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                        2. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                          4. lift-+.f64N/A

                                            \[\leadsto \left(\color{blue}{\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 \]
                                          5. lift-+.f64N/A

                                            \[\leadsto \left(\left(\color{blue}{\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 \]
                                          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                                          14. lift--.f6483.3

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, b \cdot \log c + a\right) \]
                                        8. Step-by-step derivation
                                          1. *-commutativeN/A

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

                                            \[\leadsto \mathsf{fma}\left(y, i, \log c \cdot b + a\right) \]
                                          3. lift-*.f6454.9

                                            \[\leadsto \mathsf{fma}\left(y, i, \log c \cdot b + a\right) \]
                                        9. Applied rewrites54.9%

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

                                      Alternative 14: 58.1% accurate, 1.6× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b, z\right)\right)\\ \mathbf{if}\;b \leq -3.3 \cdot 10^{+161}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{+184}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(z + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b c i)
                                       :precision binary64
                                       (let* ((t_1 (fma y i (fma (log c) b z))))
                                         (if (<= b -3.3e+161) t_1 (if (<= b 3.5e+184) (fma y i (+ (+ z t) a)) t_1))))
                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                      	double t_1 = fma(y, i, fma(log(c), b, z));
                                      	double tmp;
                                      	if (b <= -3.3e+161) {
                                      		tmp = t_1;
                                      	} else if (b <= 3.5e+184) {
                                      		tmp = fma(y, i, ((z + t) + a));
                                      	} else {
                                      		tmp = t_1;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(x, y, z, t, a, b, c, i)
                                      	t_1 = fma(y, i, fma(log(c), b, z))
                                      	tmp = 0.0
                                      	if (b <= -3.3e+161)
                                      		tmp = t_1;
                                      	elseif (b <= 3.5e+184)
                                      		tmp = fma(y, i, Float64(Float64(z + t) + a));
                                      	else
                                      		tmp = t_1;
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * i + N[(N[Log[c], $MachinePrecision] * b + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.3e+161], t$95$1, If[LessEqual[b, 3.5e+184], N[(y * i + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b, z\right)\right)\\
                                      \mathbf{if}\;b \leq -3.3 \cdot 10^{+161}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;b \leq 3.5 \cdot 10^{+184}:\\
                                      \;\;\;\;\mathsf{fma}\left(y, i, \left(z + t\right) + a\right)\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if b < -3.29999999999999997e161 or 3.49999999999999978e184 < b

                                        1. Initial program 99.6%

                                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                        2. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                          4. lift-+.f64N/A

                                            \[\leadsto \left(\color{blue}{\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 \]
                                          5. lift-+.f64N/A

                                            \[\leadsto \left(\left(\color{blue}{\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 \]
                                          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                          2. *-commutative77.9

                                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                          3. +-commutative77.9

                                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) \]
                                          4. associate-+l+77.9

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

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

                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, \color{blue}{b}, z\right)\right) \]
                                        8. Step-by-step derivation
                                          1. Applied rewrites77.9%

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

                                          if -3.29999999999999997e161 < b < 3.49999999999999978e184

                                          1. Initial program 99.9%

                                            \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                          2. Step-by-step derivation
                                            1. lift-*.f64N/A

                                              \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                            4. lift-+.f64N/A

                                              \[\leadsto \left(\color{blue}{\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 \]
                                            5. lift-+.f64N/A

                                              \[\leadsto \left(\left(\color{blue}{\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 \]
                                            6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                                            14. lift--.f6481.3

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

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

                                            \[\leadsto \mathsf{fma}\left(y, i, \left(z + t\right) + a\right) \]
                                          8. Step-by-step derivation
                                            1. Applied rewrites74.7%

                                              \[\leadsto \mathsf{fma}\left(y, i, \left(z + t\right) + a\right) \]
                                          9. Recombined 2 regimes into one program.
                                          10. Add Preprocessing

                                          Alternative 15: 55.6% accurate, 1.7× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, i, \log c \cdot b\right)\\ \mathbf{if}\;b \leq -4.4 \cdot 10^{+161}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{+184}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(z + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a b c i)
                                           :precision binary64
                                           (let* ((t_1 (fma y i (* (log c) b))))
                                             (if (<= b -4.4e+161) t_1 (if (<= b 3.6e+184) (fma y i (+ (+ z t) a)) t_1))))
                                          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                          	double t_1 = fma(y, i, (log(c) * b));
                                          	double tmp;
                                          	if (b <= -4.4e+161) {
                                          		tmp = t_1;
                                          	} else if (b <= 3.6e+184) {
                                          		tmp = fma(y, i, ((z + t) + a));
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x, y, z, t, a, b, c, i)
                                          	t_1 = fma(y, i, Float64(log(c) * b))
                                          	tmp = 0.0
                                          	if (b <= -4.4e+161)
                                          		tmp = t_1;
                                          	elseif (b <= 3.6e+184)
                                          		tmp = fma(y, i, Float64(Float64(z + t) + a));
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * i + N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.4e+161], t$95$1, If[LessEqual[b, 3.6e+184], N[(y * i + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_1 := \mathsf{fma}\left(y, i, \log c \cdot b\right)\\
                                          \mathbf{if}\;b \leq -4.4 \cdot 10^{+161}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;b \leq 3.6 \cdot 10^{+184}:\\
                                          \;\;\;\;\mathsf{fma}\left(y, i, \left(z + t\right) + a\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if b < -4.4e161 or 3.60000000000000014e184 < b

                                            1. Initial program 99.6%

                                              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                            2. Step-by-step derivation
                                              1. lift-*.f64N/A

                                                \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                              4. lift-+.f64N/A

                                                \[\leadsto \left(\color{blue}{\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 \]
                                              5. lift-+.f64N/A

                                                \[\leadsto \left(\left(\color{blue}{\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 \]
                                              6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(y, i, b \cdot \log c\right) \]
                                              3. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(y, i, b \cdot \log c\right) \]
                                              4. +-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(y, i, b \cdot \log c\right) \]
                                              5. associate-+l+N/A

                                                \[\leadsto \mathsf{fma}\left(y, i, b \cdot \log c\right) \]
                                              6. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(y, i, b \cdot \log c\right) \]
                                              7. *-commutativeN/A

                                                \[\leadsto \mathsf{fma}\left(y, i, \log c \cdot \color{blue}{b}\right) \]
                                              8. lift-log.f64N/A

                                                \[\leadsto \mathsf{fma}\left(y, i, \log c \cdot b\right) \]
                                              9. lift-*.f6470.7

                                                \[\leadsto \mathsf{fma}\left(y, i, \log c \cdot \color{blue}{b}\right) \]
                                            6. Applied rewrites70.7%

                                              \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log c \cdot b}\right) \]

                                            if -4.4e161 < b < 3.60000000000000014e184

                                            1. Initial program 99.9%

                                              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                            2. Step-by-step derivation
                                              1. lift-*.f64N/A

                                                \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                              4. lift-+.f64N/A

                                                \[\leadsto \left(\color{blue}{\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 \]
                                              5. lift-+.f64N/A

                                                \[\leadsto \left(\left(\color{blue}{\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 \]
                                              6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                                              14. lift--.f6481.3

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

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

                                              \[\leadsto \mathsf{fma}\left(y, i, \left(z + t\right) + a\right) \]
                                            8. Step-by-step derivation
                                              1. Applied rewrites74.7%

                                                \[\leadsto \mathsf{fma}\left(y, i, \left(z + t\right) + a\right) \]
                                            9. Recombined 2 regimes into one program.
                                            10. Add Preprocessing

                                            Alternative 16: 55.4% accurate, 0.9× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log c \cdot b\\ t_2 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+187}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+227}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(z + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a b c i)
                                             :precision binary64
                                             (let* ((t_1 (* (log c) b)) (t_2 (* (- b 0.5) (log c))))
                                               (if (<= t_2 -1e+187) t_1 (if (<= t_2 1e+227) (fma y i (+ (+ z t) a)) t_1))))
                                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                            	double t_1 = log(c) * b;
                                            	double t_2 = (b - 0.5) * log(c);
                                            	double tmp;
                                            	if (t_2 <= -1e+187) {
                                            		tmp = t_1;
                                            	} else if (t_2 <= 1e+227) {
                                            		tmp = fma(y, i, ((z + t) + a));
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(x, y, z, t, a, b, c, i)
                                            	t_1 = Float64(log(c) * b)
                                            	t_2 = Float64(Float64(b - 0.5) * log(c))
                                            	tmp = 0.0
                                            	if (t_2 <= -1e+187)
                                            		tmp = t_1;
                                            	elseif (t_2 <= 1e+227)
                                            		tmp = fma(y, i, Float64(Float64(z + t) + a));
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+187], t$95$1, If[LessEqual[t$95$2, 1e+227], N[(y * i + N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            t_1 := \log c \cdot b\\
                                            t_2 := \left(b - 0.5\right) \cdot \log c\\
                                            \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+187}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            \mathbf{elif}\;t\_2 \leq 10^{+227}:\\
                                            \;\;\;\;\mathsf{fma}\left(y, i, \left(z + t\right) + a\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)) < -9.99999999999999907e186 or 1.0000000000000001e227 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

                                              1. Initial program 99.6%

                                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                              2. Taylor expanded in b around inf

                                                \[\leadsto \color{blue}{b \cdot \log c} \]
                                              3. Step-by-step derivation
                                                1. *-commutativeN/A

                                                  \[\leadsto \log c \cdot \color{blue}{b} \]
                                                2. lower-*.f64N/A

                                                  \[\leadsto \log c \cdot \color{blue}{b} \]
                                                3. lift-log.f6460.3

                                                  \[\leadsto \log c \cdot b \]
                                              4. Applied rewrites60.3%

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

                                              if -9.99999999999999907e186 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 1.0000000000000001e227

                                              1. Initial program 99.9%

                                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                              2. Step-by-step derivation
                                                1. lift-*.f64N/A

                                                  \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                                4. lift-+.f64N/A

                                                  \[\leadsto \left(\color{blue}{\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 \]
                                                5. lift-+.f64N/A

                                                  \[\leadsto \left(\left(\color{blue}{\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 \]
                                                6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                                                14. lift--.f6481.7

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

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

                                                \[\leadsto \mathsf{fma}\left(y, i, \left(z + t\right) + a\right) \]
                                              8. Step-by-step derivation
                                                1. Applied rewrites73.4%

                                                  \[\leadsto \mathsf{fma}\left(y, i, \left(z + t\right) + a\right) \]
                                              9. Recombined 2 regimes into one program.
                                              10. Add Preprocessing

                                              Alternative 17: 53.8% accurate, 0.9× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log c \cdot b\\ t_2 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+187}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+227}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z + a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                              (FPCore (x y z t a b c i)
                                               :precision binary64
                                               (let* ((t_1 (* (log c) b)) (t_2 (* (- b 0.5) (log c))))
                                                 (if (<= t_2 -1e+187) t_1 (if (<= t_2 1e+227) (fma y i (+ z a)) t_1))))
                                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                              	double t_1 = log(c) * b;
                                              	double t_2 = (b - 0.5) * log(c);
                                              	double tmp;
                                              	if (t_2 <= -1e+187) {
                                              		tmp = t_1;
                                              	} else if (t_2 <= 1e+227) {
                                              		tmp = fma(y, i, (z + a));
                                              	} else {
                                              		tmp = t_1;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(x, y, z, t, a, b, c, i)
                                              	t_1 = Float64(log(c) * b)
                                              	t_2 = Float64(Float64(b - 0.5) * log(c))
                                              	tmp = 0.0
                                              	if (t_2 <= -1e+187)
                                              		tmp = t_1;
                                              	elseif (t_2 <= 1e+227)
                                              		tmp = fma(y, i, Float64(z + a));
                                              	else
                                              		tmp = t_1;
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+187], t$95$1, If[LessEqual[t$95$2, 1e+227], N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              t_1 := \log c \cdot b\\
                                              t_2 := \left(b - 0.5\right) \cdot \log c\\
                                              \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+187}:\\
                                              \;\;\;\;t\_1\\
                                              
                                              \mathbf{elif}\;t\_2 \leq 10^{+227}:\\
                                              \;\;\;\;\mathsf{fma}\left(y, i, z + a\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)) < -9.99999999999999907e186 or 1.0000000000000001e227 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

                                                1. Initial program 99.6%

                                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                2. Taylor expanded in b around inf

                                                  \[\leadsto \color{blue}{b \cdot \log c} \]
                                                3. Step-by-step derivation
                                                  1. *-commutativeN/A

                                                    \[\leadsto \log c \cdot \color{blue}{b} \]
                                                  2. lower-*.f64N/A

                                                    \[\leadsto \log c \cdot \color{blue}{b} \]
                                                  3. lift-log.f6460.3

                                                    \[\leadsto \log c \cdot b \]
                                                4. Applied rewrites60.3%

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

                                                if -9.99999999999999907e186 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 1.0000000000000001e227

                                                1. Initial program 99.9%

                                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                2. Step-by-step derivation
                                                  1. lift-*.f64N/A

                                                    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                                  4. lift-+.f64N/A

                                                    \[\leadsto \left(\color{blue}{\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 \]
                                                  5. lift-+.f64N/A

                                                    \[\leadsto \left(\left(\color{blue}{\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 \]
                                                  6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                                                  14. lift--.f6481.7

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

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

                                                  \[\leadsto \mathsf{fma}\left(y, i, z + a\right) \]
                                                8. Step-by-step derivation
                                                  1. Applied rewrites57.7%

                                                    \[\leadsto \mathsf{fma}\left(y, i, z + a\right) \]
                                                9. Recombined 2 regimes into one program.
                                                10. Add Preprocessing

                                                Alternative 18: 52.6% accurate, 4.3× speedup?

                                                \[\begin{array}{l} \\ \mathsf{fma}\left(y, i, z + a\right) \end{array} \]
                                                (FPCore (x y z t a b c i) :precision binary64 (fma y i (+ z a)))
                                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                	return fma(y, i, (z + a));
                                                }
                                                
                                                function code(x, y, z, t, a, b, c, i)
                                                	return fma(y, i, Float64(z + a))
                                                end
                                                
                                                code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(z + a), $MachinePrecision]), $MachinePrecision]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \mathsf{fma}\left(y, i, z + a\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 \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                                  4. lift-+.f64N/A

                                                    \[\leadsto \left(\color{blue}{\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 \]
                                                  5. lift-+.f64N/A

                                                    \[\leadsto \left(\left(\color{blue}{\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 \]
                                                  6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                                                  14. lift--.f6483.7

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

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

                                                  \[\leadsto \mathsf{fma}\left(y, i, z + a\right) \]
                                                8. Step-by-step derivation
                                                  1. Applied rewrites52.6%

                                                    \[\leadsto \mathsf{fma}\left(y, i, z + a\right) \]
                                                  2. Add Preprocessing

                                                  Alternative 19: 45.5% accurate, 0.8× speedup?

                                                  \[\begin{array}{l} \\ \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 -200:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, t + a\right)\\ \end{array} \end{array} \]
                                                  (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))
                                                        -200.0)
                                                     (fma y i z)
                                                     (fma y i (+ t a))))
                                                  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)) <= -200.0) {
                                                  		tmp = fma(y, i, z);
                                                  	} else {
                                                  		tmp = fma(y, i, (t + a));
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  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)) <= -200.0)
                                                  		tmp = fma(y, i, z);
                                                  	else
                                                  		tmp = fma(y, i, Float64(t + a));
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  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], -200.0], N[(y * i + z), $MachinePrecision], N[(y * i + N[(t + a), $MachinePrecision]), $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \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 -200:\\
                                                  \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\mathsf{fma}\left(y, i, t + a\right)\\
                                                  
                                                  
                                                  \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)) < -200

                                                    1. Initial program 99.9%

                                                      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                    2. Step-by-step derivation
                                                      1. lift-*.f64N/A

                                                        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                                      4. lift-+.f64N/A

                                                        \[\leadsto \left(\color{blue}{\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 \]
                                                      5. lift-+.f64N/A

                                                        \[\leadsto \left(\left(\color{blue}{\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 \]
                                                      6. lift-+.f64N/A

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

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{z}\right) \]
                                                    5. Step-by-step derivation
                                                      1. +-commutative39.3

                                                        \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                      2. +-commutative39.3

                                                        \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                      3. *-commutative39.3

                                                        \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                      4. +-commutative39.3

                                                        \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                      5. associate-+l+39.3

                                                        \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                      6. *-commutative39.3

                                                        \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                    6. Applied rewrites39.3%

                                                      \[\leadsto \mathsf{fma}\left(y, i, \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.7%

                                                      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                    2. Step-by-step derivation
                                                      1. lift-*.f64N/A

                                                        \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                                      4. lift-+.f64N/A

                                                        \[\leadsto \left(\color{blue}{\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 \]
                                                      5. lift-+.f64N/A

                                                        \[\leadsto \left(\left(\color{blue}{\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 \]
                                                      6. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + t\right) + a\right) \]
                                                      14. lift--.f6483.7

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

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

                                                      \[\leadsto \mathsf{fma}\left(y, i, t + a\right) \]
                                                    8. Step-by-step derivation
                                                      1. Applied rewrites51.5%

                                                        \[\leadsto \mathsf{fma}\left(y, i, t + a\right) \]
                                                    9. Recombined 2 regimes into one program.
                                                    10. Add Preprocessing

                                                    Alternative 20: 38.8% accurate, 0.8× speedup?

                                                    \[\begin{array}{l} \\ \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 -200:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, a\right)\\ \end{array} \end{array} \]
                                                    (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))
                                                          -200.0)
                                                       (fma y i z)
                                                       (fma y i a)))
                                                    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)) <= -200.0) {
                                                    		tmp = fma(y, i, z);
                                                    	} else {
                                                    		tmp = fma(y, i, a);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    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)) <= -200.0)
                                                    		tmp = fma(y, i, z);
                                                    	else
                                                    		tmp = fma(y, i, a);
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    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], -200.0], N[(y * i + z), $MachinePrecision], N[(y * i + a), $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \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 -200:\\
                                                    \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
                                                    
                                                    
                                                    \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)) < -200

                                                      1. Initial program 99.9%

                                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                      2. Step-by-step derivation
                                                        1. lift-*.f64N/A

                                                          \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                                        4. lift-+.f64N/A

                                                          \[\leadsto \left(\color{blue}{\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 \]
                                                        5. lift-+.f64N/A

                                                          \[\leadsto \left(\left(\color{blue}{\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 \]
                                                        6. lift-+.f64N/A

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

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

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

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

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

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{z}\right) \]
                                                      5. Step-by-step derivation
                                                        1. +-commutative39.3

                                                          \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                        2. +-commutative39.3

                                                          \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                        3. *-commutative39.3

                                                          \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                        4. +-commutative39.3

                                                          \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                        5. associate-+l+39.3

                                                          \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                        6. *-commutative39.3

                                                          \[\leadsto \mathsf{fma}\left(y, i, z\right) \]
                                                      6. Applied rewrites39.3%

                                                        \[\leadsto \mathsf{fma}\left(y, i, \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.7%

                                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                      2. Step-by-step derivation
                                                        1. lift-*.f64N/A

                                                          \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                                        4. lift-+.f64N/A

                                                          \[\leadsto \left(\color{blue}{\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 \]
                                                        5. lift-+.f64N/A

                                                          \[\leadsto \left(\left(\color{blue}{\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 \]
                                                        6. lift-+.f64N/A

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

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

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

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

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

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{a}\right) \]
                                                      5. Step-by-step derivation
                                                        1. +-commutative38.4

                                                          \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                        2. +-commutative38.4

                                                          \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                        3. *-commutative38.4

                                                          \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                        4. +-commutative38.4

                                                          \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                        5. associate-+l+38.4

                                                          \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                        6. *-commutative38.4

                                                          \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                      6. Applied rewrites38.4%

                                                        \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{a}\right) \]
                                                    3. Recombined 2 regimes into one program.
                                                    4. Add Preprocessing

                                                    Alternative 21: 34.2% accurate, 0.4× speedup?

                                                    \[\begin{array}{l} \\ \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 -2 \cdot 10^{+61}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, a\right)\\ \end{array} \end{array} \]
                                                    (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 -2e+61) z (fma y i a)))))
                                                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                    	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                                                    	double tmp;
                                                    	if (t_1 <= -5e+307) {
                                                    		tmp = i * y;
                                                    	} else if (t_1 <= -2e+61) {
                                                    		tmp = z;
                                                    	} else {
                                                    		tmp = fma(y, i, a);
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    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 <= -2e+61)
                                                    		tmp = z;
                                                    	else
                                                    		tmp = fma(y, i, a);
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    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, -2e+61], z, N[(y * i + a), $MachinePrecision]]]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \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 -2 \cdot 10^{+61}:\\
                                                    \;\;\;\;z\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\mathsf{fma}\left(y, i, a\right)\\
                                                    
                                                    
                                                    \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 100.0%

                                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                      2. Taylor expanded in y around inf

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

                                                          \[\leadsto i \cdot \color{blue}{y} \]
                                                      4. Applied rewrites91.1%

                                                        \[\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)) < -1.9999999999999999e61

                                                      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 inf

                                                        \[\leadsto \color{blue}{z} \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites20.0%

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

                                                        if -1.9999999999999999e61 < (+.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.7%

                                                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                        2. Step-by-step derivation
                                                          1. lift-*.f64N/A

                                                            \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + \color{blue}{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. 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 \]
                                                          4. lift-+.f64N/A

                                                            \[\leadsto \left(\color{blue}{\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 \]
                                                          5. lift-+.f64N/A

                                                            \[\leadsto \left(\left(\color{blue}{\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 \]
                                                          6. lift-+.f64N/A

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

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{a}\right) \]
                                                        5. Step-by-step derivation
                                                          1. +-commutative38.1

                                                            \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                          2. +-commutative38.1

                                                            \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                          3. *-commutative38.1

                                                            \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                          4. +-commutative38.1

                                                            \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                          5. associate-+l+38.1

                                                            \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                          6. *-commutative38.1

                                                            \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                                        6. Applied rewrites38.1%

                                                          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{a}\right) \]
                                                      4. Recombined 3 regimes into one program.
                                                      5. Add Preprocessing

                                                      Alternative 22: 28.9% accurate, 0.3× speedup?

                                                      \[\begin{array}{l} \\ \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:\\ \;\;\;\;z\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+306}:\\ \;\;\;\;a\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                                                      (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) z (if (<= t_1 4e+306) a (* i y))))))
                                                      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 = z;
                                                      	} else if (t_1 <= 4e+306) {
                                                      		tmp = a;
                                                      	} else {
                                                      		tmp = i * y;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      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 = z
                                                          else if (t_1 <= 4d+306) then
                                                              tmp = a
                                                          else
                                                              tmp = i * y
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      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 = z;
                                                      	} else if (t_1 <= 4e+306) {
                                                      		tmp = a;
                                                      	} else {
                                                      		tmp = i * y;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      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 = z
                                                      	elif t_1 <= 4e+306:
                                                      		tmp = a
                                                      	else:
                                                      		tmp = i * y
                                                      	return tmp
                                                      
                                                      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 = z;
                                                      	elseif (t_1 <= 4e+306)
                                                      		tmp = a;
                                                      	else
                                                      		tmp = Float64(i * y);
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      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 = z;
                                                      	elseif (t_1 <= 4e+306)
                                                      		tmp = a;
                                                      	else
                                                      		tmp = i * y;
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      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], z, If[LessEqual[t$95$1, 4e+306], a, N[(i * y), $MachinePrecision]]]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \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:\\
                                                      \;\;\;\;z\\
                                                      
                                                      \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+306}:\\
                                                      \;\;\;\;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 4.00000000000000007e306 < (+.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.6%

                                                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                        2. Taylor expanded in y around inf

                                                          \[\leadsto \color{blue}{i \cdot y} \]
                                                        3. Step-by-step derivation
                                                          1. lower-*.f6489.6

                                                            \[\leadsto i \cdot \color{blue}{y} \]
                                                        4. Applied rewrites89.6%

                                                          \[\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 z around inf

                                                          \[\leadsto \color{blue}{z} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites19.6%

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

                                                          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)) < 4.00000000000000007e306

                                                          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}{a} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites18.1%

                                                              \[\leadsto \color{blue}{a} \]
                                                          4. Recombined 3 regimes into one program.
                                                          5. Add Preprocessing

                                                          Alternative 23: 16.6% accurate, 0.9× speedup?

                                                          \[\begin{array}{l} \\ \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 -200:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                                                          (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))
                                                                -200.0)
                                                             z
                                                             a))
                                                          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)) <= -200.0) {
                                                          		tmp = z;
                                                          	} else {
                                                          		tmp = a;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          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) :: tmp
                                                              if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-200.0d0)) then
                                                                  tmp = z
                                                              else
                                                                  tmp = a
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                          	double tmp;
                                                          	if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -200.0) {
                                                          		tmp = z;
                                                          	} else {
                                                          		tmp = a;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x, y, z, t, a, b, c, i):
                                                          	tmp = 0
                                                          	if ((((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)) <= -200.0:
                                                          		tmp = z
                                                          	else:
                                                          		tmp = a
                                                          	return tmp
                                                          
                                                          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)) <= -200.0)
                                                          		tmp = z;
                                                          	else
                                                          		tmp = a;
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x, y, z, t, a, b, c, i)
                                                          	tmp = 0.0;
                                                          	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -200.0)
                                                          		tmp = z;
                                                          	else
                                                          		tmp = a;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          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], -200.0], z, a]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \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 -200:\\
                                                          \;\;\;\;z\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;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)) < -200

                                                            1. Initial program 99.9%

                                                              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                            2. Taylor expanded in z around inf

                                                              \[\leadsto \color{blue}{z} \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites17.4%

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

                                                              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.7%

                                                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                              2. Taylor expanded in a around inf

                                                                \[\leadsto \color{blue}{a} \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites15.9%

                                                                  \[\leadsto \color{blue}{a} \]
                                                              4. Recombined 2 regimes into one program.
                                                              5. Add Preprocessing

                                                              Alternative 24: 15.8% accurate, 37.6× speedup?

                                                              \[\begin{array}{l} \\ a \end{array} \]
                                                              (FPCore (x y z t a b c i) :precision binary64 a)
                                                              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                              	return a;
                                                              }
                                                              
                                                              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 = a
                                                              end function
                                                              
                                                              public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                              	return a;
                                                              }
                                                              
                                                              def code(x, y, z, t, a, b, c, i):
                                                              	return a
                                                              
                                                              function code(x, y, z, t, a, b, c, i)
                                                              	return a
                                                              end
                                                              
                                                              function tmp = code(x, y, z, t, a, b, c, i)
                                                              	tmp = a;
                                                              end
                                                              
                                                              code[x_, y_, z_, t_, a_, b_, c_, i_] := a
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              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. Taylor expanded in a around inf

                                                                \[\leadsto \color{blue}{a} \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites15.8%

                                                                  \[\leadsto \color{blue}{a} \]
                                                                2. Add Preprocessing

                                                                Reproduce

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