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

Percentage Accurate: 99.8% → 99.8%
Time: 7.0s
Alternatives: 23
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 23 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: 90.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \left(\left(\mathsf{fma}\left(\log y, x, z\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
 (+ (+ (+ (fma (log y) x z) 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 ((fma(log(y), x, z) + a) + ((b - 0.5) * log(c))) + (y * i);
}
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(fma(log(y), x, z) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[Log[y], $MachinePrecision] * x + z), $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(\mathsf{fma}\left(\log y, x, z\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Derivation
  1. Initial program 99.8%

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

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

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

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

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

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

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

Alternative 3: 90.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\log c, b - 0.5, z\right)\\ \mathbf{if}\;x \leq -2.65 \cdot 10^{+126}:\\ \;\;\;\;\left(\frac{t\_1}{x} + \log y\right) \cdot x + a\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+115}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(t\_1 + t\right) + a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\log c, b, \mathsf{fma}\left(x, \log y, z\right)\right) + a\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma (log c) (- b 0.5) z)))
   (if (<= x -2.65e+126)
     (+ (* (+ (/ t_1 x) (log y)) x) a)
     (if (<= x 4e+115)
       (fma y i (+ (+ t_1 t) a))
       (+ (fma (log c) b (fma x (log y) z)) a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = fma(log(c), (b - 0.5), z);
	double tmp;
	if (x <= -2.65e+126) {
		tmp = (((t_1 / x) + log(y)) * x) + a;
	} else if (x <= 4e+115) {
		tmp = fma(y, i, ((t_1 + t) + a));
	} else {
		tmp = fma(log(c), b, fma(x, log(y), z)) + a;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(log(c), Float64(b - 0.5), z)
	tmp = 0.0
	if (x <= -2.65e+126)
		tmp = Float64(Float64(Float64(Float64(t_1 / x) + log(y)) * x) + a);
	elseif (x <= 4e+115)
		tmp = fma(y, i, Float64(Float64(t_1 + t) + a));
	else
		tmp = Float64(fma(log(c), b, fma(x, log(y), z)) + a);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[x, -2.65e+126], N[(N[(N[(N[(t$95$1 / x), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[x, 4e+115], N[(y * i + N[(N[(t$95$1 + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * b + N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log c, b - 0.5, z\right)\\
\mathbf{if}\;x \leq -2.65 \cdot 10^{+126}:\\
\;\;\;\;\left(\frac{t\_1}{x} + \log y\right) \cdot x + a\\

\mathbf{elif}\;x \leq 4 \cdot 10^{+115}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(t\_1 + t\right) + a\right)\\

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


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

    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 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.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \left(\log y + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right) + a \]
    9. Step-by-step derivation
      1. associate-+r+N/A

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

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

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

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

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

        \[\leadsto \left(\log y + \left(\frac{z}{x} + \frac{\log c \cdot \left(b - \frac{1}{2}\right)}{x}\right)\right) \cdot x + a \]
    10. Applied rewrites72.9%

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

    if -2.65000000000000014e126 < x < 4.0000000000000001e115

    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.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.6

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

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

    if 4.0000000000000001e115 < 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 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.f6481.7

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\log c, b - \frac{1}{2}, \mathsf{fma}\left(x, \log y, z\right)\right) + a \]
      12. lift-log.f6471.1

        \[\leadsto \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(x, \log y, z\right)\right) + a \]
    7. Applied rewrites71.1%

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

      \[\leadsto \mathsf{fma}\left(\log c, b, \mathsf{fma}\left(x, \log y, z\right)\right) + a \]
    9. Step-by-step derivation
      1. Applied rewrites71.1%

        \[\leadsto \mathsf{fma}\left(\log c, b, \mathsf{fma}\left(x, \log y, z\right)\right) + a \]
    10. Recombined 3 regimes into one program.
    11. Add Preprocessing

    Alternative 4: 89.9% accurate, 1.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\log c, b, \mathsf{fma}\left(x, \log y, z\right)\right) + a\\ \mathbf{if}\;x \leq -2.65 \cdot 10^{+126}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4 \cdot 10^{+115}:\\ \;\;\;\;\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 (log c) b (fma x (log y) z)) a)))
       (if (<= x -2.65e+126)
         t_1
         (if (<= x 4e+115) (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(log(c), b, fma(x, log(y), z)) + a;
    	double tmp;
    	if (x <= -2.65e+126) {
    		tmp = t_1;
    	} else if (x <= 4e+115) {
    		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(fma(log(c), b, fma(x, log(y), z)) + a)
    	tmp = 0.0
    	if (x <= -2.65e+126)
    		tmp = t_1;
    	elseif (x <= 4e+115)
    		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[Log[c], $MachinePrecision] * b + N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[x, -2.65e+126], t$95$1, If[LessEqual[x, 4e+115], 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(\log c, b, \mathsf{fma}\left(x, \log y, z\right)\right) + a\\
    \mathbf{if}\;x \leq -2.65 \cdot 10^{+126}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 4 \cdot 10^{+115}:\\
    \;\;\;\;\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.65000000000000014e126 or 4.0000000000000001e115 < 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 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.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\log c, b, \mathsf{fma}\left(x, \log y, z\right)\right) + a \]
      9. Step-by-step derivation
        1. Applied rewrites72.0%

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

        if -2.65000000000000014e126 < x < 4.0000000000000001e115

        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.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.6

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

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

      Alternative 5: 89.9% accurate, 1.0× speedup?

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

        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 t around inf

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

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

          if 2.84999999999999983e115 < a

          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.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--.f6490.3

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

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

        Alternative 6: 84.1% 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 -4 \cdot 10^{+198}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{+195}:\\ \;\;\;\;\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 -4e+198)
             t_1
             (if (<= x 7.8e+195)
               (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 <= -4e+198) {
        		tmp = t_1;
        	} else if (x <= 7.8e+195) {
        		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 <= -4e+198)
        		tmp = t_1;
        	elseif (x <= 7.8e+195)
        		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, -4e+198], t$95$1, If[LessEqual[x, 7.8e+195], 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 -4 \cdot 10^{+198}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;x \leq 7.8 \cdot 10^{+195}:\\
        \;\;\;\;\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.00000000000000007e198 or 7.7999999999999995e195 < 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.7%

            \[\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. lift-log.f64N/A

              \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot x\right) \]
            9. lift-*.f6473.1

              \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot \color{blue}{x}\right) \]
          6. Applied rewrites73.1%

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

          if -4.00000000000000007e198 < x < 7.7999999999999995e195

          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.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.4

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

            \[\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 7: 76.4% 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 -4 \cdot 10^{+198}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{+195}:\\ \;\;\;\;\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 -4e+198)
             t_1
             (if (<= x 7.8e+195) (+ (+ (+ 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 <= -4e+198) {
        		tmp = t_1;
        	} else if (x <= 7.8e+195) {
        		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 <= -4e+198)
        		tmp = t_1;
        	elseif (x <= 7.8e+195)
        		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, -4e+198], t$95$1, If[LessEqual[x, 7.8e+195], 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 -4 \cdot 10^{+198}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;x \leq 7.8 \cdot 10^{+195}:\\
        \;\;\;\;\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 < -4.00000000000000007e198 or 7.7999999999999995e195 < 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.7%

            \[\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. lift-log.f64N/A

              \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot x\right) \]
            9. lift-*.f6473.1

              \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot \color{blue}{x}\right) \]
          6. Applied rewrites73.1%

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

          if -4.00000000000000007e198 < x < 7.7999999999999995e195

          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 \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.1%

              \[\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 8: 64.6% accurate, 0.6× speedup?

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

            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.6

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

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

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

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

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

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

            1. Initial program 99.8%

              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
            2. Taylor expanded in 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 \]
            4. Recombined 2 regimes into one program.
            5. Add Preprocessing

            Alternative 9: 63.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 2 \cdot 10^{+18}:\\ \;\;\;\;\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))
                  2e+18)
               (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)) <= 2e+18) {
            		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)) <= 2e+18)
            		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], 2e+18], 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 2 \cdot 10^{+18}:\\
            \;\;\;\;\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)) < 2e18

              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.6

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

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

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

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

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

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

              1. Initial program 99.8%

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

                  \[\leadsto \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. +-commutative53.8

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

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

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

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

                \[\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 10: 61.5% accurate, 0.4× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(x \cdot \log y + z\right) + t\right) + a\\ t_2 := \left(t\_1 + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_2 \leq -20000:\\ \;\;\;\;t\_1\\ \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
             (let* ((t_1 (+ (+ (+ (* x (log y)) z) t) a))
                    (t_2 (+ (+ t_1 (* (- b 0.5) (log c))) (* y i))))
               (if (<= t_2 (- INFINITY))
                 (* i y)
                 (if (<= t_2 -20000.0) t_1 (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 t_1 = (((x * log(y)) + z) + t) + a;
            	double t_2 = (t_1 + ((b - 0.5) * log(c))) + (y * i);
            	double tmp;
            	if (t_2 <= -((double) INFINITY)) {
            		tmp = i * y;
            	} else if (t_2 <= -20000.0) {
            		tmp = t_1;
            	} else {
            		tmp = fma(y, i, fma(log(c), (b - 0.5), a));
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b, c, i)
            	t_1 = Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a)
            	t_2 = Float64(Float64(t_1 + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
            	tmp = 0.0
            	if (t_2 <= Float64(-Inf))
            		tmp = Float64(i * y);
            	elseif (t_2 <= -20000.0)
            		tmp = t_1;
            	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_] := Block[{t$95$1 = N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$2, -20000.0], t$95$1, N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(\left(x \cdot \log y + z\right) + t\right) + a\\
            t_2 := \left(t\_1 + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
            \mathbf{if}\;t\_2 \leq -\infty:\\
            \;\;\;\;i \cdot y\\
            
            \mathbf{elif}\;t\_2 \leq -20000:\\
            \;\;\;\;t\_1\\
            
            \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 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)) < -inf.0

              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-*.f6496.0

                  \[\leadsto i \cdot \color{blue}{y} \]
              4. Applied rewrites96.0%

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

              if -inf.0 < (+.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)) < -2e4

              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 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.f6486.8

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

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

                \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
              6. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
                2. lift-log.f6469.0

                  \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
              7. Applied rewrites69.0%

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

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

              1. Initial program 99.8%

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

                  \[\leadsto \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. +-commutative55.0

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

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

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

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

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

            Alternative 11: 54.2% accurate, 1.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(x \cdot \log y + z\right) + t\right) + a\\ \mathbf{if}\;y \leq 1.32 \cdot 10^{-185}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{-109}:\\ \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+150}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\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)))
               (if (<= y 1.32e-185)
                 t_1
                 (if (<= y 1.55e-109)
                   (+ (fma (log c) (- b 0.5) z) a)
                   (if (<= y 1.9e+150) t_1 (fma y i z))))))
            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;
            	double tmp;
            	if (y <= 1.32e-185) {
            		tmp = t_1;
            	} else if (y <= 1.55e-109) {
            		tmp = fma(log(c), (b - 0.5), z) + a;
            	} else if (y <= 1.9e+150) {
            		tmp = t_1;
            	} else {
            		tmp = fma(y, i, z);
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b, c, i)
            	t_1 = Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a)
            	tmp = 0.0
            	if (y <= 1.32e-185)
            		tmp = t_1;
            	elseif (y <= 1.55e-109)
            		tmp = Float64(fma(log(c), Float64(b - 0.5), z) + a);
            	elseif (y <= 1.9e+150)
            		tmp = t_1;
            	else
            		tmp = fma(y, i, z);
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[y, 1.32e-185], t$95$1, If[LessEqual[y, 1.55e-109], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[y, 1.9e+150], t$95$1, N[(y * i + z), $MachinePrecision]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(\left(x \cdot \log y + z\right) + t\right) + a\\
            \mathbf{if}\;y \leq 1.32 \cdot 10^{-185}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;y \leq 1.55 \cdot 10^{-109}:\\
            \;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\
            
            \mathbf{elif}\;y \leq 1.9 \cdot 10^{+150}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if y < 1.32e-185 or 1.55e-109 < y < 1.89999999999999995e150

              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 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.f6485.7

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

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

                \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
              6. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
                2. lift-log.f6466.4

                  \[\leadsto \left(\left(x \cdot \log y + z\right) + t\right) + a \]
              7. Applied rewrites66.4%

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

              if 1.32e-185 < y < 1.55e-109

              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 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.f6497.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + a \]
              9. Step-by-step derivation
                1. Applied rewrites60.3%

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

                if 1.89999999999999995e150 < y

                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} + y \cdot i \]
                3. Step-by-step derivation
                  1. Applied rewrites31.1%

                    \[\leadsto \color{blue}{z} + y \cdot i \]
                  2. Step-by-step derivation
                    1. lift-+.f64N/A

                      \[\leadsto \color{blue}{z + y \cdot i} \]
                    2. +-commutativeN/A

                      \[\leadsto \color{blue}{y \cdot i + z} \]
                    3. lift-*.f64N/A

                      \[\leadsto \color{blue}{y \cdot i} + z \]
                    4. lower-fma.f6431.1

                      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                  3. Applied rewrites31.1%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                4. Recombined 3 regimes into one program.
                5. Add Preprocessing

                Alternative 12: 51.6% accurate, 0.3× speedup?

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

                  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} + y \cdot i \]
                  3. Step-by-step derivation
                    1. Applied rewrites40.5%

                      \[\leadsto \color{blue}{z} + y \cdot i \]
                    2. Step-by-step derivation
                      1. lift-+.f64N/A

                        \[\leadsto \color{blue}{z + y \cdot i} \]
                      2. +-commutativeN/A

                        \[\leadsto \color{blue}{y \cdot i + z} \]
                      3. lift-*.f64N/A

                        \[\leadsto \color{blue}{y \cdot i} + z \]
                      4. lower-fma.f6440.5

                        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                    3. Applied rewrites40.5%

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

                    if -4e203 < (+.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.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 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.f6486.0

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\log c, b - \frac{1}{2}, \mathsf{fma}\left(x, \log y, z\right)\right) + a \]
                      12. lift-log.f6469.8

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

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

                      \[\leadsto \mathsf{fma}\left(\log c, b - \frac{1}{2}, z\right) + a \]
                    9. Step-by-step derivation
                      1. Applied rewrites56.0%

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

                      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)) < 9.99999999999999986e306

                      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 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.f6487.9

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

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

                        \[\leadsto \left(x \cdot \log y + t\right) + a \]
                      6. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \left(x \cdot \log y + t\right) + a \]
                        2. lift-log.f6452.4

                          \[\leadsto \left(x \cdot \log y + t\right) + a \]
                      7. Applied rewrites52.4%

                        \[\leadsto \left(x \cdot \log y + t\right) + a \]

                      if 9.99999999999999986e306 < (+.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.2%

                        \[\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.2%

                        \[\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. lift-log.f64N/A

                          \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot x\right) \]
                        9. lift-*.f6492.6

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

                        \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\log y \cdot x}\right) \]
                    10. Recombined 4 regimes into one program.
                    11. Add Preprocessing

                    Alternative 13: 47.3% accurate, 0.4× speedup?

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

                      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} + y \cdot i \]
                      3. Step-by-step derivation
                        1. Applied rewrites37.2%

                          \[\leadsto \color{blue}{z} + y \cdot i \]
                        2. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{z + y \cdot i} \]
                          2. +-commutativeN/A

                            \[\leadsto \color{blue}{y \cdot i + z} \]
                          3. lift-*.f64N/A

                            \[\leadsto \color{blue}{y \cdot i} + z \]
                          4. lower-fma.f6437.2

                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                        3. Applied rewrites37.2%

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

                        if 2e18 < (+.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)) < 9.99999999999999986e306

                        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 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.f6487.7

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

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

                          \[\leadsto \left(x \cdot \log y + t\right) + a \]
                        6. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \left(x \cdot \log y + t\right) + a \]
                          2. lift-log.f6452.3

                            \[\leadsto \left(x \cdot \log y + t\right) + a \]
                        7. Applied rewrites52.3%

                          \[\leadsto \left(x \cdot \log y + t\right) + a \]

                        if 9.99999999999999986e306 < (+.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.2%

                          \[\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.2%

                          \[\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. lift-log.f64N/A

                            \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot x\right) \]
                          9. lift-*.f6492.6

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

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

                      Alternative 14: 40.4% accurate, 0.4× speedup?

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

                        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} + y \cdot i \]
                        3. Step-by-step derivation
                          1. Applied rewrites37.2%

                            \[\leadsto \color{blue}{z} + y \cdot i \]
                          2. Step-by-step derivation
                            1. lift-+.f64N/A

                              \[\leadsto \color{blue}{z + y \cdot i} \]
                            2. +-commutativeN/A

                              \[\leadsto \color{blue}{y \cdot i + z} \]
                            3. lift-*.f64N/A

                              \[\leadsto \color{blue}{y \cdot i} + z \]
                            4. lower-fma.f6437.2

                              \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                          3. Applied rewrites37.2%

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

                          if 2e18 < (+.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)) < 9.99999999999999986e306

                          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 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.f6487.7

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

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

                            \[\leadsto x \cdot \log y + a \]
                          6. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto x \cdot \log y + a \]
                            2. lift-log.f6435.4

                              \[\leadsto x \cdot \log y + a \]
                          7. Applied rewrites35.4%

                            \[\leadsto x \cdot \log y + a \]

                          if 9.99999999999999986e306 < (+.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.2%

                            \[\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.2%

                            \[\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. lift-log.f64N/A

                              \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot x\right) \]
                            9. lift-*.f6492.6

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

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

                        Alternative 15: 40.1% accurate, 0.4× speedup?

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

                          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} + y \cdot i \]
                          3. Step-by-step derivation
                            1. Applied rewrites37.2%

                              \[\leadsto \color{blue}{z} + y \cdot i \]
                            2. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{z + y \cdot i} \]
                              2. +-commutativeN/A

                                \[\leadsto \color{blue}{y \cdot i + z} \]
                              3. lift-*.f64N/A

                                \[\leadsto \color{blue}{y \cdot i} + z \]
                              4. lower-fma.f6437.2

                                \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                            3. Applied rewrites37.2%

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

                            if 2e18 < (+.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)) < 9.99999999999999986e306

                            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 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.f6487.7

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

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

                              \[\leadsto x \cdot \log y + a \]
                            6. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto x \cdot \log y + a \]
                              2. lift-log.f6435.4

                                \[\leadsto x \cdot \log y + a \]
                            7. Applied rewrites35.4%

                              \[\leadsto x \cdot \log y + a \]

                            if 9.99999999999999986e306 < (+.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.2%

                              \[\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.2%

                              \[\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. lower-*.f64N/A

                                \[\leadsto \mathsf{fma}\left(y, i, \log c \cdot \color{blue}{b}\right) \]
                              9. lift-log.f6491.0

                                \[\leadsto \mathsf{fma}\left(y, i, \log c \cdot b\right) \]
                            6. Applied rewrites91.0%

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

                          Alternative 16: 40.0% accurate, 0.4× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_2 \leq 2 \cdot 10^{+18}:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+303}:\\ \;\;\;\;t\_1 + a\\ \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)))
                                  (t_2 (+ (+ (+ (+ (+ t_1 z) t) a) (* (- b 0.5) (log c))) (* y i))))
                             (if (<= t_2 2e+18) (fma y i z) (if (<= t_2 5e+303) (+ t_1 a) (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);
                          	double t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                          	double tmp;
                          	if (t_2 <= 2e+18) {
                          		tmp = fma(y, i, z);
                          	} else if (t_2 <= 5e+303) {
                          		tmp = t_1 + a;
                          	} else {
                          		tmp = fma(y, i, a);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a, b, c, i)
                          	t_1 = Float64(x * log(y))
                          	t_2 = Float64(Float64(Float64(Float64(Float64(t_1 + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                          	tmp = 0.0
                          	if (t_2 <= 2e+18)
                          		tmp = fma(y, i, z);
                          	elseif (t_2 <= 5e+303)
                          		tmp = Float64(t_1 + a);
                          	else
                          		tmp = fma(y, i, a);
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t$95$1 + 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$2, 2e+18], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$2, 5e+303], N[(t$95$1 + a), $MachinePrecision], N[(y * i + a), $MachinePrecision]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := x \cdot \log y\\
                          t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                          \mathbf{if}\;t\_2 \leq 2 \cdot 10^{+18}:\\
                          \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
                          
                          \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+303}:\\
                          \;\;\;\;t\_1 + a\\
                          
                          \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)) < 2e18

                            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} + y \cdot i \]
                            3. Step-by-step derivation
                              1. Applied rewrites37.2%

                                \[\leadsto \color{blue}{z} + y \cdot i \]
                              2. Step-by-step derivation
                                1. lift-+.f64N/A

                                  \[\leadsto \color{blue}{z + y \cdot i} \]
                                2. +-commutativeN/A

                                  \[\leadsto \color{blue}{y \cdot i + z} \]
                                3. lift-*.f64N/A

                                  \[\leadsto \color{blue}{y \cdot i} + z \]
                                4. lower-fma.f6437.2

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                              3. Applied rewrites37.2%

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

                              if 2e18 < (+.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.9999999999999997e303

                              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 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.f6487.5

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

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

                                \[\leadsto x \cdot \log y + a \]
                              6. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto x \cdot \log y + a \]
                                2. lift-log.f6435.1

                                  \[\leadsto x \cdot \log y + a \]
                              7. Applied rewrites35.1%

                                \[\leadsto x \cdot \log y + a \]

                              if 4.9999999999999997e303 < (+.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.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 a around inf

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                6. *-commutative80.5

                                  \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                              6. Applied rewrites80.5%

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

                            Alternative 17: 39.9% 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 2 \cdot 10^{+18}:\\ \;\;\;\;\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))
                                  2e+18)
                               (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)) <= 2e+18) {
                            		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)) <= 2e+18)
                            		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], 2e+18], 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 2 \cdot 10^{+18}:\\
                            \;\;\;\;\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)) < 2e18

                              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} + y \cdot i \]
                              3. Step-by-step derivation
                                1. Applied rewrites37.2%

                                  \[\leadsto \color{blue}{z} + y \cdot i \]
                                2. Step-by-step derivation
                                  1. lift-+.f64N/A

                                    \[\leadsto \color{blue}{z + y \cdot i} \]
                                  2. +-commutativeN/A

                                    \[\leadsto \color{blue}{y \cdot i + z} \]
                                  3. lift-*.f64N/A

                                    \[\leadsto \color{blue}{y \cdot i} + z \]
                                  4. lower-fma.f6437.2

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, z\right)} \]
                                3. Applied rewrites37.2%

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

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

                                1. Initial program 99.8%

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

                                    \[\leadsto \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.5

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                6. Applied rewrites38.5%

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

                              Alternative 18: 39.8% 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 -\infty:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq -100:\\ \;\;\;\;z + a\\ \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 (- INFINITY))
                                   (* i y)
                                   (if (<= t_1 -100.0) (+ z a) (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 <= -((double) INFINITY)) {
                              		tmp = i * y;
                              	} else if (t_1 <= -100.0) {
                              		tmp = z + a;
                              	} 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 <= Float64(-Inf))
                              		tmp = Float64(i * y);
                              	elseif (t_1 <= -100.0)
                              		tmp = Float64(z + a);
                              	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, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -100.0], N[(z + a), $MachinePrecision], 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 -\infty:\\
                              \;\;\;\;i \cdot y\\
                              
                              \mathbf{elif}\;t\_1 \leq -100:\\
                              \;\;\;\;z + a\\
                              
                              \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)) < -inf.0

                                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-*.f6496.0

                                    \[\leadsto i \cdot \color{blue}{y} \]
                                4. Applied rewrites96.0%

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

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

                                1. Initial program 99.8%

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

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

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

                                  \[\leadsto z + a \]
                                6. Step-by-step derivation
                                  1. Applied rewrites34.4%

                                    \[\leadsto z + a \]

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

                                  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 a around inf

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                    6. *-commutative37.8

                                      \[\leadsto \mathsf{fma}\left(y, i, a\right) \]
                                  6. Applied rewrites37.8%

                                    \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{a}\right) \]
                                7. Recombined 3 regimes into one program.
                                8. Add Preprocessing

                                Alternative 19: 37.8% accurate, 4.9× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 5.8 \cdot 10^{+32}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b c i)
                                 :precision binary64
                                 (if (<= y 5.8e+32) (+ z a) (* i y)))
                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	double tmp;
                                	if (y <= 5.8e+32) {
                                		tmp = z + 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) :: tmp
                                    if (y <= 5.8d+32) then
                                        tmp = z + 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 tmp;
                                	if (y <= 5.8e+32) {
                                		tmp = z + a;
                                	} else {
                                		tmp = i * y;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t, a, b, c, i):
                                	tmp = 0
                                	if y <= 5.8e+32:
                                		tmp = z + a
                                	else:
                                		tmp = i * y
                                	return tmp
                                
                                function code(x, y, z, t, a, b, c, i)
                                	tmp = 0.0
                                	if (y <= 5.8e+32)
                                		tmp = Float64(z + a);
                                	else
                                		tmp = Float64(i * y);
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y, z, t, a, b, c, i)
                                	tmp = 0.0;
                                	if (y <= 5.8e+32)
                                		tmp = z + a;
                                	else
                                		tmp = i * y;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 5.8e+32], N[(z + a), $MachinePrecision], N[(i * y), $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;y \leq 5.8 \cdot 10^{+32}:\\
                                \;\;\;\;z + a\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;i \cdot y\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if y < 5.80000000000000006e32

                                  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 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.f6494.2

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

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

                                    \[\leadsto z + a \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites37.2%

                                      \[\leadsto z + a \]

                                    if 5.80000000000000006e32 < y

                                    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 y around inf

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

                                        \[\leadsto i \cdot \color{blue}{y} \]
                                    4. Applied rewrites44.4%

                                      \[\leadsto \color{blue}{i \cdot y} \]
                                  7. Recombined 2 regimes into one program.
                                  8. Add Preprocessing

                                  Alternative 20: 30.9% 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 -100:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;t + 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))
                                        -100.0)
                                     z
                                     (+ 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)) <= -100.0) {
                                  		tmp = z;
                                  	} else {
                                  		tmp = t + 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)) <= (-100.0d0)) then
                                          tmp = z
                                      else
                                          tmp = t + 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)) <= -100.0) {
                                  		tmp = z;
                                  	} else {
                                  		tmp = t + 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)) <= -100.0:
                                  		tmp = z
                                  	else:
                                  		tmp = 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)) <= -100.0)
                                  		tmp = z;
                                  	else
                                  		tmp = Float64(t + 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)) <= -100.0)
                                  		tmp = z;
                                  	else
                                  		tmp = t + 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], -100.0], z, N[(t + 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 -100:\\
                                  \;\;\;\;z\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t + 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)) < -100

                                    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 rewrites16.0%

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

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

                                      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 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.f6478.1

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

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

                                        \[\leadsto t + a \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites31.1%

                                          \[\leadsto t + a \]
                                      7. Recombined 2 regimes into one program.
                                      8. Add Preprocessing

                                      Alternative 21: 23.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 -100:\\ \;\;\;\;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))
                                            -100.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)) <= -100.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)) <= (-100.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)) <= -100.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)) <= -100.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)) <= -100.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)) <= -100.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], -100.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 -100:\\
                                      \;\;\;\;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)) < -100

                                        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 rewrites16.0%

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

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

                                          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 rewrites16.8%

                                              \[\leadsto \color{blue}{a} \]
                                          4. Recombined 2 regimes into one program.
                                          5. Add Preprocessing

                                          Alternative 22: 16.6% accurate, 10.1× speedup?

                                          \[\begin{array}{l} \\ z + a \end{array} \]
                                          (FPCore (x y z t a b c i) :precision binary64 (+ z a))
                                          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                          	return z + 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 = z + a
                                          end function
                                          
                                          public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                          	return z + a;
                                          }
                                          
                                          def code(x, y, z, t, a, b, c, i):
                                          	return z + a
                                          
                                          function code(x, y, z, t, a, b, c, i)
                                          	return Float64(z + a)
                                          end
                                          
                                          function tmp = code(x, y, z, t, a, b, c, i)
                                          	tmp = z + a;
                                          end
                                          
                                          code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z + a), $MachinePrecision]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          z + 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 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.f6477.7

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

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

                                            \[\leadsto z + a \]
                                          6. Step-by-step derivation
                                            1. Applied rewrites30.9%

                                              \[\leadsto z + a \]
                                            2. Add Preprocessing

                                            Alternative 23: 16.4% 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 rewrites16.6%

                                                \[\leadsto \color{blue}{a} \]
                                              2. Add Preprocessing

                                              Reproduce

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