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

Percentage Accurate: 99.8% → 99.8%
Time: 6.4s
Alternatives: 13
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

      \[\leadsto \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) \]
    4. lower-fma.f6499.8

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

      \[\leadsto \mathsf{fma}\left(y, i, \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) \]
    6. lift-+.f64N/A

      \[\leadsto \mathsf{fma}\left(y, i, \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) \]
    7. associate-+l+N/A

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

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

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

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

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

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

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

Alternative 2: 94.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ a + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\right)\right)\right) \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (+ a (+ z (fma i y (fma x (log y) (* (log c) (- b 0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return a + (z + fma(i, y, fma(x, log(y), (log(c) * (b - 0.5)))));
}
function code(x, y, z, t, a, b, c, i)
	return Float64(a + Float64(z + fma(i, y, fma(x, log(y), Float64(log(c) * Float64(b - 0.5))))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(z + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
a + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \left(b - 0.5\right)\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. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, -0.5, \mathsf{fma}\left(\log y, x, z\right)\right) + a\right) + t\right)\\ \mathbf{if}\;x \leq -9 \cdot 10^{+101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{+33}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\right) + t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (fma y i (+ (+ (fma (log c) -0.5 (fma (log y) x z)) a) t))))
   (if (<= x -9e+101)
     t_1
     (if (<= x 2.1e+33) (fma y i (+ (+ (fma (log c) (- b 0.5) z) a) t)) 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), -0.5, fma(log(y), x, z)) + a) + t));
	double tmp;
	if (x <= -9e+101) {
		tmp = t_1;
	} else if (x <= 2.1e+33) {
		tmp = fma(y, i, ((fma(log(c), (b - 0.5), z) + a) + t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = fma(y, i, Float64(Float64(fma(log(c), -0.5, fma(log(y), x, z)) + a) + t))
	tmp = 0.0
	if (x <= -9e+101)
		tmp = t_1;
	elseif (x <= 2.1e+33)
		tmp = fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + a) + t));
	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[(N[(N[Log[c], $MachinePrecision] * -0.5 + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9e+101], t$95$1, If[LessEqual[x, 2.1e+33], N[(y * i + N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 2.1 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\right) + t\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.0000000000000004e101 or 2.1000000000000001e33 < 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. +-commutativeN/A

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

        \[\leadsto \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) \]
      4. lower-fma.f6499.8

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

        \[\leadsto \mathsf{fma}\left(y, i, \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) \]
      6. lift-+.f64N/A

        \[\leadsto \mathsf{fma}\left(y, i, \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) \]
      7. associate-+l+N/A

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

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

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

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

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

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

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

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

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

      if -9.0000000000000004e101 < x < 2.1000000000000001e33

      1. Initial program 99.8%

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

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

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

          \[\leadsto \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) \]
        4. lower-fma.f6499.8

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

          \[\leadsto \mathsf{fma}\left(y, i, \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) \]
        6. lift-+.f64N/A

          \[\leadsto \mathsf{fma}\left(y, i, \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) \]
        7. associate-+l+N/A

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

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

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

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

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

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

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

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

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

      Alternative 4: 86.4% accurate, 1.0× speedup?

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto a + \left(z + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, \log c \cdot \frac{-1}{2}\right)\right)\right) \]
        6. Step-by-step derivation
          1. Applied rewrites69.1%

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

          if -1.1599999999999999e104 < x < 2.2000000000000002e69

          1. Initial program 99.8%

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

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

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

              \[\leadsto \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) \]
            4. lower-fma.f6499.8

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

              \[\leadsto \mathsf{fma}\left(y, i, \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) \]
            6. lift-+.f64N/A

              \[\leadsto \mathsf{fma}\left(y, i, \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) \]
            7. associate-+l+N/A

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

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

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

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

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

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

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

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

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

          Alternative 5: 84.3% accurate, 1.1× speedup?

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

            1. Initial program 99.8%

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

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

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

                \[\leadsto \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) \]
              4. lower-fma.f6499.8

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

                \[\leadsto \mathsf{fma}\left(y, i, \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) \]
              6. lift-+.f64N/A

                \[\leadsto \mathsf{fma}\left(y, i, \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) \]
              7. associate-+l+N/A

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

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

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

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

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

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

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

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

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

              if -3.40000000000000023e116 < z

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 76.2% accurate, 1.2× speedup?

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

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 7.2e91 < y

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto a + \left(z + \mathsf{fma}\left(i, y, b \cdot \log c\right)\right) \]
              9. Step-by-step derivation
                1. lower-log.f6467.9

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

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

            Alternative 7: 74.7% accurate, 1.2× speedup?

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

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

                  \[\leadsto \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) \]
                4. lower-fma.f6499.8

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

                  \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                6. lift-+.f64N/A

                  \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                7. associate-+l+N/A

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

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

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

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

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

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

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

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

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

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

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

              if -7.00000000000000041e154 < x < 2.79999999999999989e221

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 72.3% accurate, 1.3× speedup?

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

              1. Initial program 99.8%

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

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

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

                  \[\leadsto \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) \]
                4. lower-fma.f6499.8

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

                  \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                6. lift-+.f64N/A

                  \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                7. associate-+l+N/A

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

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

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

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

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

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

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

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

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

                if 2.79999999999999989e221 < 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. +-commutativeN/A

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

                    \[\leadsto \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) \]
                  4. lower-fma.f6499.8

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

                    \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                  6. lift-+.f64N/A

                    \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                  7. associate-+l+N/A

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

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 70.7% accurate, 1.4× speedup?

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

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

                    \[\leadsto \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) \]
                  4. lower-fma.f6499.8

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

                    \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                  6. lift-+.f64N/A

                    \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                  7. associate-+l+N/A

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

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

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

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

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

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

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

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

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

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

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

                if -7.00000000000000041e154 < x < 2.79999999999999989e221

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto a + \left(z + \mathsf{fma}\left(i, y, b \cdot \log c\right)\right) \]
                9. Step-by-step derivation
                  1. lower-log.f6467.9

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

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

              Alternative 10: 43.5% 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 -50:\\ \;\;\;\;\mathsf{fma}\left(y, i, \frac{z}{a} \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, 1 \cdot 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))
                    -50.0)
                 (fma y i (* (/ z a) a))
                 (fma y i (* 1.0 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)) <= -50.0) {
              		tmp = fma(y, i, ((z / a) * a));
              	} else {
              		tmp = fma(y, i, (1.0 * 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)) <= -50.0)
              		tmp = fma(y, i, Float64(Float64(z / a) * a));
              	else
              		tmp = fma(y, i, Float64(1.0 * 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], -50.0], N[(y * i + N[(N[(z / a), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(1.0 * 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 -50:\\
              \;\;\;\;\mathsf{fma}\left(y, i, \frac{z}{a} \cdot a\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(y, i, 1 \cdot 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)) < -50

                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 \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 \]
                  3. +-commutativeN/A

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

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

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

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

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

                  \[\leadsto \color{blue}{1} \cdot a + y \cdot i \]
                5. Step-by-step derivation
                  1. Applied rewrites38.4%

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                  3. Applied rewrites38.4%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                  4. Taylor expanded in z around inf

                    \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{\frac{z}{a}} \cdot a\right) \]
                  5. Step-by-step derivation
                    1. lower-/.f6431.4

                      \[\leadsto \mathsf{fma}\left(y, i, \frac{z}{\color{blue}{a}} \cdot a\right) \]
                  6. Applied rewrites31.4%

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

                  if -50 < (+.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 \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 \]
                    3. +-commutativeN/A

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

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

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

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

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

                    \[\leadsto \color{blue}{1} \cdot a + y \cdot i \]
                  5. Step-by-step derivation
                    1. Applied rewrites38.4%

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                    3. Applied rewrites38.4%

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

                  Alternative 11: 38.4% accurate, 2.2× speedup?

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

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

                        \[\leadsto \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) \]
                      4. lower-fma.f6499.8

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

                        \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                      6. lift-+.f64N/A

                        \[\leadsto \mathsf{fma}\left(y, i, \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) \]
                      7. associate-+l+N/A

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

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

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

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

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

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

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

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

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

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

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

                    if -5.0999999999999999e154 < x < 5.3999999999999999e165

                    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 \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 \]
                      3. +-commutativeN/A

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

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

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

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

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

                      \[\leadsto \color{blue}{1} \cdot a + y \cdot i \]
                    5. Step-by-step derivation
                      1. Applied rewrites38.4%

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

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

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

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                      3. Applied rewrites38.4%

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

                    Alternative 12: 34.7% accurate, 4.2× speedup?

                    \[\begin{array}{l} \\ \mathsf{fma}\left(y, i, 1 \cdot a\right) \end{array} \]
                    (FPCore (x y z t a b c i) :precision binary64 (fma y i (* 1.0 a)))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	return fma(y, i, (1.0 * a));
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	return fma(y, i, Float64(1.0 * a))
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(1.0 * a), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    \mathsf{fma}\left(y, i, 1 \cdot a\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 99.8%

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

                        \[\leadsto \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 \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 \]
                      3. +-commutativeN/A

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

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

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

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

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

                      \[\leadsto \color{blue}{1} \cdot a + y \cdot i \]
                    5. Step-by-step derivation
                      1. Applied rewrites38.4%

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

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

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

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                      3. Applied rewrites38.4%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                      4. Add Preprocessing

                      Alternative 13: 16.5% accurate, 37.6× speedup?

                      \[\begin{array}{l} \\ t \end{array} \]
                      (FPCore (x y z t a b c i) :precision binary64 t)
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	return t;
                      }
                      
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(x, y, z, t, a, b, c, i)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          real(8), intent (in) :: a
                          real(8), intent (in) :: b
                          real(8), intent (in) :: c
                          real(8), intent (in) :: i
                          code = t
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	return t;
                      }
                      
                      def code(x, y, z, t, a, b, c, i):
                      	return t
                      
                      function code(x, y, z, t, a, b, c, i)
                      	return t
                      end
                      
                      function tmp = code(x, y, z, t, a, b, c, i)
                      	tmp = t;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := t
                      
                      \begin{array}{l}
                      
                      \\
                      t
                      \end{array}
                      
                      Derivation
                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{t} \]
                      11. Step-by-step derivation
                        1. Applied rewrites16.5%

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

                        Reproduce

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