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

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

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
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 19 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
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.9% accurate, 1.0× 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 \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i} \]
    2. lift-+.f64N/A

      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
    3. 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 \]
    4. 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 \]
    5. 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 \]
    6. 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 \]
    7. 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 \]
    8. 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 \]
    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-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 \]
    11. +-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)} \]
    12. lift-*.f64N/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. Add Preprocessing

Alternative 2: 48.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 -5:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;\left(\log y \cdot x + t\right) + 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)) z) t) a) (* (- b 0.5) (log c)))
          (* y i))))
   (if (<= t_1 -5.0)
     (fma y i z)
     (if (<= t_1 5e+306) (+ (+ (* (log y) x) t) 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)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
	double tmp;
	if (t_1 <= -5.0) {
		tmp = fma(y, i, z);
	} else if (t_1 <= 5e+306) {
		tmp = ((log(y) * x) + t) + a;
	} else {
		tmp = fma(y, i, (log(c) * b));
	}
	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 <= -5.0)
		tmp = fma(y, i, z);
	elseif (t_1 <= 5e+306)
		tmp = Float64(Float64(Float64(log(y) * x) + t) + 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[(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, -5.0], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$1, 5e+306], N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision], N[(y * i + N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\left(\log y \cdot x + t\right) + 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)) < -5

    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 rewrites38.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.f6438.5

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

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

      if -5 < (+.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.99999999999999993e306

      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 b around 0

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

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

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

        \[\leadsto \color{blue}{\left(\left(\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(\log y, x, i \cdot y\right)\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. *-commutativeN/A

          \[\leadsto \left(\log y \cdot x + t\right) + a \]
        2. lower-*.f64N/A

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

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

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

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

      1. Initial program 99.8%

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

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

          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
        3. 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 \]
        4. 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 \]
        5. 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 \]
        6. 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 \]
        7. 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 \]
        8. 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 \]
        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-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 \]
        11. +-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)} \]
        12. lift-*.f64N/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 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, 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, \color{blue}{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.2

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

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

    Alternative 3: 48.6% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_1 \leq -5:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;\left(\log y \cdot x + t\right) + 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 -5.0)
         (fma y i z)
         (if (<= t_1 5e+306) (+ (+ (* (log y) x) t) 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 <= -5.0) {
    		tmp = fma(y, i, z);
    	} else if (t_1 <= 5e+306) {
    		tmp = ((log(y) * x) + t) + 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 <= -5.0)
    		tmp = fma(y, i, z);
    	elseif (t_1 <= 5e+306)
    		tmp = Float64(Float64(Float64(log(y) * x) + t) + 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, -5.0], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$1, 5e+306], N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + t), $MachinePrecision] + 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 -5:\\
    \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\
    \;\;\;\;\left(\log y \cdot x + t\right) + 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)) < -5

      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 rewrites38.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.f6438.5

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

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

        if -5 < (+.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.99999999999999993e306

        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 b around 0

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

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

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

          \[\leadsto \color{blue}{\left(\left(\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(\log y, x, i \cdot y\right)\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. *-commutativeN/A

            \[\leadsto \left(\log y \cdot x + t\right) + a \]
          2. lower-*.f64N/A

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

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

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

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

        1. Initial program 99.8%

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

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

            \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
          3. 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 \]
          4. 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 \]
          5. 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 \]
          6. 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 \]
          7. 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 \]
          8. 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 \]
          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-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 \]
          11. +-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)} \]
          12. lift-*.f64N/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. *-commutative88.4

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

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

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

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

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

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

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

      Alternative 4: 41.2% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_1 \leq -5:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;\log y \cdot x + 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 -5.0)
           (fma y i z)
           (if (<= t_1 5e+306) (+ (* (log y) x) 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 <= -5.0) {
      		tmp = fma(y, i, z);
      	} else if (t_1 <= 5e+306) {
      		tmp = (log(y) * x) + 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 <= -5.0)
      		tmp = fma(y, i, z);
      	elseif (t_1 <= 5e+306)
      		tmp = Float64(Float64(log(y) * x) + 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, -5.0], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$1, 5e+306], N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] + 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 -5:\\
      \;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
      
      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\
      \;\;\;\;\log y \cdot x + 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)) < -5

        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 rewrites38.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.f6438.5

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

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

          if -5 < (+.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.99999999999999993e306

          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 b around 0

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

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

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

            \[\leadsto \color{blue}{\left(\left(\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(\log y, x, i \cdot y\right)\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. *-commutativeN/A

              \[\leadsto \log y \cdot x + a \]
            2. lower-*.f64N/A

              \[\leadsto \log y \cdot x + a \]
            3. lift-log.f6436.1

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

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

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

          1. Initial program 99.8%

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

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

              \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
            3. 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 \]
            4. 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 \]
            5. 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 \]
            6. 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 \]
            7. 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 \]
            8. 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 \]
            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-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 \]
            11. +-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)} \]
            12. lift-*.f64N/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. *-commutative88.4

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

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

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

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

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

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

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

        Alternative 5: 48.3% accurate, 0.5× 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:\\ \;\;\;\;\left(z + t\right) + 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 t) 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 + t) + 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(Float64(z + t) + 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[(N[(z + t), $MachinePrecision] + 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:\\
        \;\;\;\;\left(z + t\right) + 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.4

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

            \[\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 b around 0

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

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

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

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

            \[\leadsto \left(z + t\right) + a \]
          6. Step-by-step derivation
            1. Applied rewrites52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 57.1% accurate, 0.5× 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 5 \cdot 10^{+302}:\\ \;\;\;\;\left(z + t\right) + a\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c i)
           :precision binary64
           (let* ((t_1
                   (+
                    (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                    (* y i))))
             (if (<= t_1 (- INFINITY))
               (* i y)
               (if (<= t_1 5e+302) (+ (+ z t) a) (* i y)))))
          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
          	double tmp;
          	if (t_1 <= -((double) INFINITY)) {
          		tmp = i * y;
          	} else if (t_1 <= 5e+302) {
          		tmp = (z + t) + a;
          	} else {
          		tmp = i * y;
          	}
          	return tmp;
          }
          
          public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
          	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
          	double tmp;
          	if (t_1 <= -Double.POSITIVE_INFINITY) {
          		tmp = i * y;
          	} else if (t_1 <= 5e+302) {
          		tmp = (z + t) + a;
          	} else {
          		tmp = i * y;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b, c, i):
          	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
          	tmp = 0
          	if t_1 <= -math.inf:
          		tmp = i * y
          	elif t_1 <= 5e+302:
          		tmp = (z + t) + a
          	else:
          		tmp = i * y
          	return tmp
          
          function code(x, y, z, t, a, b, c, i)
          	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
          	tmp = 0.0
          	if (t_1 <= Float64(-Inf))
          		tmp = Float64(i * y);
          	elseif (t_1 <= 5e+302)
          		tmp = Float64(Float64(z + t) + a);
          	else
          		tmp = Float64(i * y);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b, c, i)
          	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
          	tmp = 0.0;
          	if (t_1 <= -Inf)
          		tmp = i * y;
          	elseif (t_1 <= 5e+302)
          		tmp = (z + t) + a;
          	else
          		tmp = i * y;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], N[(N[(z + t), $MachinePrecision] + a), $MachinePrecision], N[(i * y), $MachinePrecision]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
          \mathbf{if}\;t\_1 \leq -\infty:\\
          \;\;\;\;i \cdot y\\
          
          \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\
          \;\;\;\;\left(z + t\right) + a\\
          
          \mathbf{else}:\\
          \;\;\;\;i \cdot y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -inf.0 or 5e302 < (+.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.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 inf

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

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

              \[\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)) < 5e302

            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 b around 0

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

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

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

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

              \[\leadsto \left(z + t\right) + a \]
            6. Step-by-step derivation
              1. Applied rewrites52.3%

                \[\leadsto \left(z + t\right) + a \]
            7. Recombined 2 regimes into one program.
            8. Add Preprocessing

            Alternative 7: 42.8% accurate, 0.5× 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 5 \cdot 10^{+302}:\\ \;\;\;\;z + a\\ \mathbf{else}:\\ \;\;\;\;i \cdot y\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c i)
             :precision binary64
             (let* ((t_1
                     (+
                      (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
                      (* y i))))
               (if (<= t_1 (- INFINITY)) (* i y) (if (<= t_1 5e+302) (+ z a) (* i y)))))
            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
            	double tmp;
            	if (t_1 <= -((double) INFINITY)) {
            		tmp = i * y;
            	} else if (t_1 <= 5e+302) {
            		tmp = z + a;
            	} else {
            		tmp = i * y;
            	}
            	return tmp;
            }
            
            public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
            	double tmp;
            	if (t_1 <= -Double.POSITIVE_INFINITY) {
            		tmp = i * y;
            	} else if (t_1 <= 5e+302) {
            		tmp = z + a;
            	} else {
            		tmp = i * y;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b, c, i):
            	t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
            	tmp = 0
            	if t_1 <= -math.inf:
            		tmp = i * y
            	elif t_1 <= 5e+302:
            		tmp = z + a
            	else:
            		tmp = i * y
            	return tmp
            
            function code(x, y, z, t, a, b, c, i)
            	t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
            	tmp = 0.0
            	if (t_1 <= Float64(-Inf))
            		tmp = Float64(i * y);
            	elseif (t_1 <= 5e+302)
            		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)
            	t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
            	tmp = 0.0;
            	if (t_1 <= -Inf)
            		tmp = i * y;
            	elseif (t_1 <= 5e+302)
            		tmp = z + a;
            	else
            		tmp = i * y;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], N[(z + a), $MachinePrecision], N[(i * y), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
            \mathbf{if}\;t\_1 \leq -\infty:\\
            \;\;\;\;i \cdot y\\
            
            \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\
            \;\;\;\;z + a\\
            
            \mathbf{else}:\\
            \;\;\;\;i \cdot y\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -inf.0 or 5e302 < (+.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.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 inf

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

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

                \[\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)) < 5e302

              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 b around 0

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

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

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

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

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

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

              Alternative 8: 54.6% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -5000000000:\\ \;\;\;\;\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))
                    -5000000000.0)
                 (fma y i (fma (log c) (- b 0.5) z))
                 (fma y i (fma (log c) (- b 0.5) a))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double tmp;
              	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -5000000000.0) {
              		tmp = fma(y, i, fma(log(c), (b - 0.5), z));
              	} else {
              		tmp = fma(y, i, fma(log(c), (b - 0.5), a));
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i)
              	tmp = 0.0
              	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -5000000000.0)
              		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), z));
              	else
              		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), a));
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -5000000000.0], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -5000000000:\\
              \;\;\;\;\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)) < -5e9

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

                    \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                  3. 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 \]
                  4. 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 \]
                  5. 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 \]
                  6. 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 \]
                  7. 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 \]
                  8. 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 \]
                  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-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 \]
                  11. +-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)} \]
                  12. lift-*.f64N/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 -5e9 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                1. Initial program 99.8%

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

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

                    \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                  3. 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 \]
                  4. 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 \]
                  5. 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 \]
                  6. 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 \]
                  7. 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 \]
                  8. 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 \]
                  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-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 \]
                  11. +-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)} \]
                  12. lift-*.f64N/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. +-commutative54.5

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

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

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

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

                  \[\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 9: 47.0% accurate, 0.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -5000000000:\\ \;\;\;\;\mathsf{fma}\left(y, i, z\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))
                    -5000000000.0)
                 (fma y i 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)) <= -5000000000.0) {
              		tmp = fma(y, i, 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)) <= -5000000000.0)
              		tmp = fma(y, i, 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], -5000000000.0], N[(y * i + z), $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 -5000000000:\\
              \;\;\;\;\mathsf{fma}\left(y, i, z\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)) < -5e9

                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 rewrites39.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.f6439.1

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

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

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

                  1. Initial program 99.8%

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

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

                      \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                    3. 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 \]
                    4. 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 \]
                    5. 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 \]
                    6. 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 \]
                    7. 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 \]
                    8. 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 \]
                    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-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 \]
                    11. +-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)} \]
                    12. lift-*.f64N/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. +-commutative54.5

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

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

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

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

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

                Alternative 10: 38.5% accurate, 1.0× 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 -5:\\ \;\;\;\;\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))
                      -5.0)
                   (fma y i z)
                   (fma y i a)))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double tmp;
                	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -5.0) {
                		tmp = fma(y, i, z);
                	} else {
                		tmp = fma(y, i, a);
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a, b, c, i)
                	tmp = 0.0
                	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -5.0)
                		tmp = fma(y, i, z);
                	else
                		tmp = fma(y, i, a);
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -5.0], N[(y * i + z), $MachinePrecision], N[(y * i + a), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -5:\\
                \;\;\;\;\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)) < -5

                  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 rewrites38.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.f6438.5

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

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

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

                    1. Initial program 99.8%

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

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

                        \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                      3. 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 \]
                      4. 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 \]
                      5. 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 \]
                      6. 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 \]
                      7. 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 \]
                      8. 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 \]
                      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-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 \]
                      11. +-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)} \]
                      12. lift-*.f64N/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 11: 16.8% accurate, 1.0× 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 -5:\\ \;\;\;\;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))
                        -5.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)) <= -5.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)) <= (-5.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)) <= -5.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)) <= -5.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)) <= -5.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)) <= -5.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], -5.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 -5:\\
                  \;\;\;\;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)) < -5

                    1. Initial program 99.9%

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

                      \[\leadsto \color{blue}{z} \]
                    3. Step-by-step derivation
                      1. Applied rewrites17.3%

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

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

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

                      Alternative 12: 92.6% accurate, 1.0× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\log c, -0.5, \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(i, y, z\right)\right)\right) + a\\ \mathbf{if}\;x \leq -2.3 \cdot 10^{+201}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 6.2 \cdot 10^{+169}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\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 (log c) -0.5 (fma x (log y) (fma i y z))) a)))
                         (if (<= x -2.3e+201)
                           t_1
                           (if (<= x 6.2e+169)
                             (+ (+ (+ (fma (log c) (- b 0.5) z) t) a) (* 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(log(c), -0.5, fma(x, log(y), fma(i, y, z))) + a;
                      	double tmp;
                      	if (x <= -2.3e+201) {
                      		tmp = t_1;
                      	} else if (x <= 6.2e+169) {
                      		tmp = ((fma(log(c), (b - 0.5), z) + t) + a) + (y * i);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = Float64(fma(log(c), -0.5, fma(x, log(y), fma(i, y, z))) + a)
                      	tmp = 0.0
                      	if (x <= -2.3e+201)
                      		tmp = t_1;
                      	elseif (x <= 6.2e+169)
                      		tmp = Float64(Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a) + 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[(N[(N[Log[c], $MachinePrecision] * -0.5 + N[(x * N[Log[y], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]}, If[LessEqual[x, -2.3e+201], t$95$1, If[LessEqual[x, 6.2e+169], N[(N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \mathsf{fma}\left(\log c, -0.5, \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(i, y, z\right)\right)\right) + a\\
                      \mathbf{if}\;x \leq -2.3 \cdot 10^{+201}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;x \leq 6.2 \cdot 10^{+169}:\\
                      \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right) + y \cdot i\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -2.3000000000000001e201 or 6.2e169 < 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 b around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\log c, \frac{-1}{2}, \mathsf{fma}\left(x, \log y, i \cdot y + z\right)\right) + a \]
                          16. lower-fma.f6486.0

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

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

                        if -2.3000000000000001e201 < x < 6.2e169

                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 13: 91.4% accurate, 1.0× speedup?

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

                        1. Initial program 99.7%

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

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

                            \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                          3. 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 \]
                          4. 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 \]
                          5. 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 \]
                          6. 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 \]
                          7. 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 \]
                          8. 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 \]
                          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-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 \]
                          11. +-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)} \]
                          12. lift-*.f64N/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, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \color{blue}{x \cdot \log y}\right)\right) \]
                        5. Step-by-step derivation
                          1. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                          if -2.25000000000000001e204 < x < 7.00000000000000038e169

                          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                          if 7.00000000000000038e169 < 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 b around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, \log c, \mathsf{fma}\left(x, \log y, i \cdot y\right)\right) + a \]
                            4. lift-*.f6477.5

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

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

                        Alternative 14: 90.9% accurate, 1.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b, \log y \cdot x\right)\right)\\ \mathbf{if}\;x \leq -2.25 \cdot 10^{+204}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+125}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\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 (fma (log c) b (* (log y) x)))))
                           (if (<= x -2.25e+204)
                             t_1
                             (if (<= x 9.5e+125)
                               (+ (+ (+ (fma (log c) (- b 0.5) z) t) a) (* 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, fma(log(c), b, (log(y) * x)));
                        	double tmp;
                        	if (x <= -2.25e+204) {
                        		tmp = t_1;
                        	} else if (x <= 9.5e+125) {
                        		tmp = ((fma(log(c), (b - 0.5), z) + t) + a) + (y * i);
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b, c, i)
                        	t_1 = fma(y, i, fma(log(c), b, Float64(log(y) * x)))
                        	tmp = 0.0
                        	if (x <= -2.25e+204)
                        		tmp = t_1;
                        	elseif (x <= 9.5e+125)
                        		tmp = Float64(Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a) + 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[c], $MachinePrecision] * b + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.25e+204], t$95$1, If[LessEqual[x, 9.5e+125], N[(N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b, \log y \cdot x\right)\right)\\
                        \mathbf{if}\;x \leq -2.25 \cdot 10^{+204}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;x \leq 9.5 \cdot 10^{+125}:\\
                        \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right) + y \cdot i\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if x < -2.25000000000000001e204 or 9.50000000000000041e125 < x

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -2.25000000000000001e204 < x < 9.50000000000000041e125

                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 15: 90.2% accurate, 1.7× speedup?

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

                            1. Initial program 99.7%

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

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

                                \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                              3. 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 \]
                              4. 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 \]
                              5. 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 \]
                              6. 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 \]
                              7. 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 \]
                              8. 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 \]
                              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-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 \]
                              11. +-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)} \]
                              12. lift-*.f64N/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, 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, \color{blue}{x} \cdot \log y\right) \]
                              7. *-commutativeN/A

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

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

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

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

                            if -2.6000000000000001e204 < x < 9.4999999999999995e169

                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                            if 9.4999999999999995e169 < 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 x around inf

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

                                \[\leadsto \log y \cdot \color{blue}{x} + y \cdot i \]
                              2. lower-*.f64N/A

                                \[\leadsto \log y \cdot \color{blue}{x} + y \cdot i \]
                              3. lift-log.f6470.5

                                \[\leadsto \log y \cdot x + y \cdot i \]
                            4. Applied rewrites70.5%

                              \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                          3. Recombined 3 regimes into one program.
                          4. Add Preprocessing

                          Alternative 16: 90.2% accurate, 1.7× speedup?

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

                            1. Initial program 99.7%

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

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

                                \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                              3. 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 \]
                              4. 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 \]
                              5. 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 \]
                              6. 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 \]
                              7. 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 \]
                              8. 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 \]
                              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-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 \]
                              11. +-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)} \]
                              12. lift-*.f64N/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, 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, \color{blue}{x} \cdot \log y\right) \]
                              7. *-commutativeN/A

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

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

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

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

                            if -2.6000000000000001e204 < x < 9.4999999999999995e169

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

                                \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                              3. 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 \]
                              4. 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 \]
                              5. 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 \]
                              6. 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 \]
                              7. 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 \]
                              8. 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 \]
                              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-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 \]
                              11. +-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)} \]
                              12. lift-*.f64N/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, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \left(a + t\right) + \color{blue}{z}\right)\right) \]
                            5. Step-by-step derivation
                              1. Applied rewrites94.1%

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

                              if 9.4999999999999995e169 < 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 x around inf

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

                                  \[\leadsto \log y \cdot \color{blue}{x} + y \cdot i \]
                                2. lower-*.f64N/A

                                  \[\leadsto \log y \cdot \color{blue}{x} + y \cdot i \]
                                3. lift-log.f6470.5

                                  \[\leadsto \log y \cdot x + y \cdot i \]
                              4. Applied rewrites70.5%

                                \[\leadsto \color{blue}{\log y \cdot x} + y \cdot i \]
                            6. Recombined 3 regimes into one program.
                            7. Add Preprocessing

                            Alternative 17: 88.7% accurate, 1.8× speedup?

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

                              1. Initial program 99.7%

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

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

                                  \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                                3. 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 \]
                                4. 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 \]
                                5. 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 \]
                                6. 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 \]
                                7. 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 \]
                                8. 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 \]
                                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-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 \]
                                11. +-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)} \]
                                12. lift-*.f64N/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, 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, \color{blue}{x} \cdot \log y\right) \]
                                7. *-commutativeN/A

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

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

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

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

                              if -2.6000000000000001e204 < x < 9.4999999999999995e169

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

                                  \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                                3. 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 \]
                                4. 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 \]
                                5. 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 \]
                                6. 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 \]
                                7. 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 \]
                                8. 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 \]
                                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-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 \]
                                11. +-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)} \]
                                12. lift-*.f64N/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}, \left(a + t\right) + \color{blue}{z \cdot \left(1 + \frac{x \cdot \log y}{z}\right)}\right)\right) \]
                              5. Step-by-step derivation
                                1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 9.4999999999999995e169 < 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 x around inf

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

                                      \[\leadsto \log y \cdot \color{blue}{x} + y \cdot i \]
                                    2. lower-*.f64N/A

                                      \[\leadsto \log y \cdot \color{blue}{x} + y \cdot i \]
                                    3. lift-log.f6470.5

                                      \[\leadsto \log y \cdot x + y \cdot i \]
                                  4. Applied rewrites70.5%

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

                                Alternative 18: 31.0% accurate, 58.5× 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 b around 0

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

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

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

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

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

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

                                  Alternative 19: 16.4% accurate, 234.0× 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.4%

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

                                    Reproduce

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