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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
    14. *-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. Applied rewrites99.8%

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

Alternative 2: 86.9% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -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. Taylor expanded in a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 85.0% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(t\_1 + t\right) + a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -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. Taylor expanded in a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 84.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+158}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)\\

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

\mathbf{else}:\\
\;\;\;\;\left(\left(z + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -6.7999999999999998e158

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
      14. *-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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

    if -6.7999999999999998e158 < b < 3.2999999999999997e160

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.2999999999999997e160 < b

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(z + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
      7. Recombined 3 regimes into one program.
      8. Add Preprocessing

      Alternative 6: 84.3% accurate, 1.2× speedup?

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
          14. *-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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

        if 4.4999999999999999e230 < x

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 7: 80.8% accurate, 1.5× speedup?

      \[\begin{array}{l} \\ \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right) \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (fma y i (+ (+ (fma (log c) (- b 0.5) z) t) a)))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	return fma(y, i, ((fma(log(c), (b - 0.5), z) + t) + a));
      }
      
      function code(x, y, z, t, a, b, c, i)
      	return fma(y, i, Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a))
      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] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      \mathsf{fma}\left(y, i, \left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\right)
      \end{array}
      
      Derivation
      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
        14. *-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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 71.2% accurate, 1.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(z + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
        2. Add Preprocessing

        Alternative 9: 69.3% accurate, 1.1× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
            14. *-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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -1e206 < (-.f64 b #s(literal 1/2 binary64)) < 4.99999999999999994e203

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 10: 64.2% accurate, 1.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log c \cdot b\\ \mathbf{if}\;b \leq -3.8 \cdot 10^{+266}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+214}:\\ \;\;\;\;\left(\left(z + a\right) + -0.5 \cdot \log c\right) + y \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c i)
             :precision binary64
             (let* ((t_1 (* (log c) b)))
               (if (<= b -3.8e+266)
                 t_1
                 (if (<= b 1.2e+214) (+ (+ (+ z a) (* -0.5 (log c))) (* y i)) t_1))))
            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double t_1 = log(c) * b;
            	double tmp;
            	if (b <= -3.8e+266) {
            		tmp = t_1;
            	} else if (b <= 1.2e+214) {
            		tmp = ((z + a) + (-0.5 * log(c))) + (y * i);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a, b, c, i)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8), intent (in) :: c
                real(8), intent (in) :: i
                real(8) :: t_1
                real(8) :: tmp
                t_1 = log(c) * b
                if (b <= (-3.8d+266)) then
                    tmp = t_1
                else if (b <= 1.2d+214) then
                    tmp = ((z + a) + ((-0.5d0) * log(c))) + (y * i)
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
            	double t_1 = Math.log(c) * b;
            	double tmp;
            	if (b <= -3.8e+266) {
            		tmp = t_1;
            	} else if (b <= 1.2e+214) {
            		tmp = ((z + a) + (-0.5 * Math.log(c))) + (y * i);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b, c, i):
            	t_1 = math.log(c) * b
            	tmp = 0
            	if b <= -3.8e+266:
            		tmp = t_1
            	elif b <= 1.2e+214:
            		tmp = ((z + a) + (-0.5 * math.log(c))) + (y * i)
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t, a, b, c, i)
            	t_1 = Float64(log(c) * b)
            	tmp = 0.0
            	if (b <= -3.8e+266)
            		tmp = t_1;
            	elseif (b <= 1.2e+214)
            		tmp = Float64(Float64(Float64(z + a) + Float64(-0.5 * log(c))) + Float64(y * i));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b, c, i)
            	t_1 = log(c) * b;
            	tmp = 0.0;
            	if (b <= -3.8e+266)
            		tmp = t_1;
            	elseif (b <= 1.2e+214)
            		tmp = ((z + a) + (-0.5 * log(c))) + (y * i);
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -3.8e+266], t$95$1, If[LessEqual[b, 1.2e+214], N[(N[(N[(z + a), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \log c \cdot b\\
            \mathbf{if}\;b \leq -3.8 \cdot 10^{+266}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;b \leq 1.2 \cdot 10^{+214}:\\
            \;\;\;\;\left(\left(z + a\right) + -0.5 \cdot \log c\right) + y \cdot i\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if b < -3.7999999999999997e266 or 1.2e214 < b

              1. Initial program 99.8%

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

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

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

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

                  \[\leadsto \log c \cdot b \]
              4. Applied rewrites16.6%

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

              if -3.7999999999999997e266 < b < 1.2e214

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 11: 58.7% accurate, 1.4× speedup?

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

                  1. Initial program 99.8%

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

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

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

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

                      \[\leadsto \log c \cdot b \]
                  4. Applied rewrites16.6%

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

                  if -2.0000000000000001e276 < (-.f64 b #s(literal 1/2 binary64)) < 5.0000000000000002e205

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
                    14. *-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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 12: 26.9% accurate, 2.2× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \log c \cdot b\\ \mathbf{if}\;b \leq -4.9 \cdot 10^{+154}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{+160}:\\ \;\;\;\;x \cdot \log y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (let* ((t_1 (* (log c) b)))
                     (if (<= b -4.9e+154) t_1 (if (<= b 3.3e+160) (* x (log y)) t_1))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = log(c) * b;
                  	double tmp;
                  	if (b <= -4.9e+154) {
                  		tmp = t_1;
                  	} else if (b <= 3.3e+160) {
                  		tmp = x * log(y);
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b, c, i)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8), intent (in) :: c
                      real(8), intent (in) :: i
                      real(8) :: t_1
                      real(8) :: tmp
                      t_1 = log(c) * b
                      if (b <= (-4.9d+154)) then
                          tmp = t_1
                      else if (b <= 3.3d+160) then
                          tmp = x * log(y)
                      else
                          tmp = t_1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = Math.log(c) * b;
                  	double tmp;
                  	if (b <= -4.9e+154) {
                  		tmp = t_1;
                  	} else if (b <= 3.3e+160) {
                  		tmp = x * Math.log(y);
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b, c, i):
                  	t_1 = math.log(c) * b
                  	tmp = 0
                  	if b <= -4.9e+154:
                  		tmp = t_1
                  	elif b <= 3.3e+160:
                  		tmp = x * math.log(y)
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = Float64(log(c) * b)
                  	tmp = 0.0
                  	if (b <= -4.9e+154)
                  		tmp = t_1;
                  	elseif (b <= 3.3e+160)
                  		tmp = Float64(x * log(y));
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b, c, i)
                  	t_1 = log(c) * b;
                  	tmp = 0.0;
                  	if (b <= -4.9e+154)
                  		tmp = t_1;
                  	elseif (b <= 3.3e+160)
                  		tmp = x * log(y);
                  	else
                  		tmp = t_1;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -4.9e+154], t$95$1, If[LessEqual[b, 3.3e+160], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \log c \cdot b\\
                  \mathbf{if}\;b \leq -4.9 \cdot 10^{+154}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;b \leq 3.3 \cdot 10^{+160}:\\
                  \;\;\;\;x \cdot \log y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if b < -4.9000000000000002e154 or 3.2999999999999997e160 < b

                    1. Initial program 99.8%

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

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

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

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

                        \[\leadsto \log c \cdot b \]
                    4. Applied rewrites16.6%

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

                    if -4.9000000000000002e154 < b < 3.2999999999999997e160

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
                      14. *-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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 13: 16.7% accurate, 3.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
                    14. *-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. Applied rewrites99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{x \cdot \log y} \]
                  10. Add Preprocessing

                  Reproduce

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