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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

      \[\leadsto y \cdot i + \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)} \]
    4. +-commutativeN/A

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

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

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

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

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

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

Alternative 4: 90.9% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 88.2% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.95000000000000004e93

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.95000000000000004e93 < z

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 88.1% accurate, 1.1× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \left(z + x \cdot \color{blue}{\log y}\right)\right)\right) \]
        5. lower-log.f6476.7

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \mathsf{fma}\left(\log y, \color{blue}{x}, t + z\right)\right) \]
        8. lower-+.f6476.7

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

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

      if 6.4e15 < y

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 7: 85.8% accurate, 1.2× speedup?

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 6.4e15 < y

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 8: 85.8% accurate, 1.2× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \left(z + x \cdot \color{blue}{\log y}\right)\right)\right) \]
            5. lower-log.f6476.7

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \mathsf{fma}\left(\log y, \color{blue}{x}, t + z\right)\right) \]
            8. lower-+.f6476.7

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

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

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

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

            if -1.5500000000000001e211 < x < 3.49999999999999987e202

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 3.49999999999999987e202 < x

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                3. lower-log.f6432.0

                  \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
              6. Applied rewrites32.0%

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

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

                  \[\leadsto \color{blue}{\frac{x \cdot \log y}{a} \cdot a} + y \cdot i \]
                3. lower-fma.f6432.0

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                6. lower-*.f6432.0

                  \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
              8. Applied rewrites32.0%

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

            Alternative 9: 85.1% accurate, 1.2× speedup?

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

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \left(z + x \cdot \color{blue}{\log y}\right)\right)\right) \]
                5. lower-log.f6476.7

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \mathsf{fma}\left(\log y, \color{blue}{x}, t + z\right)\right) \]
                8. lower-+.f6476.7

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

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

                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \mathsf{fma}\left(\log y, x, t\right)\right) \]
              10. Step-by-step derivation
                1. Applied rewrites62.0%

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

                if -6.2000000000000003e218 < x < 3.49999999999999987e202

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 3.49999999999999987e202 < x

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                    3. lower-log.f6432.0

                      \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                  6. Applied rewrites32.0%

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

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

                      \[\leadsto \color{blue}{\frac{x \cdot \log y}{a} \cdot a} + y \cdot i \]
                    3. lower-fma.f6432.0

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                    6. lower-*.f6432.0

                      \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                  8. Applied rewrites32.0%

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

                Alternative 10: 81.4% accurate, 1.2× speedup?

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

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                    3. lower-log.f6432.0

                      \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                  6. Applied rewrites32.0%

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

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

                      \[\leadsto \color{blue}{\frac{x \cdot \log y}{a} \cdot a} + y \cdot i \]
                    3. lower-fma.f6432.0

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                    6. lower-*.f6432.0

                      \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                  8. Applied rewrites32.0%

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

                  if -3.0499999999999999e212 < x < 3.49999999999999987e202

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 77.2% accurate, 1.2× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                      3. lower-log.f6432.0

                        \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                    6. Applied rewrites32.0%

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

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

                        \[\leadsto \color{blue}{\frac{x \cdot \log y}{a} \cdot a} + y \cdot i \]
                      3. lower-fma.f6432.0

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                      6. lower-*.f6432.0

                        \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                    8. Applied rewrites32.0%

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

                    if -3.0499999999999999e212 < x < 3.49999999999999987e202

                    1. Initial program 99.8%

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

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

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

                        \[\leadsto y \cdot i + \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)} \]
                      4. +-commutativeN/A

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

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

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

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

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

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

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

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

                    Alternative 12: 75.5% accurate, 1.2× speedup?

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

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                        3. lower-log.f6432.0

                          \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                      6. Applied rewrites32.0%

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

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

                          \[\leadsto \color{blue}{\frac{x \cdot \log y}{a} \cdot a} + y \cdot i \]
                        3. lower-fma.f6432.0

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                        6. lower-*.f6432.0

                          \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                      8. Applied rewrites32.0%

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

                      if -3.0499999999999999e212 < x < 3.49999999999999987e202

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 13: 72.2% accurate, 1.5× speedup?

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

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \left(z + x \cdot \color{blue}{\log y}\right)\right)\right) \]
                        5. lower-log.f6476.7

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

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

                        \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \color{blue}{z}\right)\right) \]
                      8. Step-by-step derivation
                        1. lower-+.f6461.3

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

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

                      if 1.36e-11 < y

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 14: 72.1% accurate, 0.4× speedup?

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{a \cdot \left(x \cdot \color{blue}{\log y}\right)}{a} + y \cdot i \]
                            3. lower-log.f6434.5

                              \[\leadsto \frac{a \cdot \left(x \cdot \log y\right)}{a} + y \cdot i \]
                          8. Applied rewrites34.5%

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

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

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

                              \[\leadsto \color{blue}{y \cdot i} + \frac{a \cdot \left(x \cdot \log y\right)}{a} \]
                            4. lower-fma.f6434.5

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

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

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

                              \[\leadsto \mathsf{fma}\left(y, i, \frac{a \cdot \left(\log y \cdot \color{blue}{x}\right)}{a}\right) \]
                            8. associate-*r*N/A

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

                              \[\leadsto \mathsf{fma}\left(y, i, \frac{\left(a \cdot \log y\right) \cdot \color{blue}{x}}{a}\right) \]
                            10. lower-*.f6434.4

                              \[\leadsto \mathsf{fma}\left(y, i, \frac{\left(a \cdot \log y\right) \cdot x}{a}\right) \]
                          10. Applied rewrites34.4%

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

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \left(z + x \cdot \color{blue}{\log y}\right)\right)\right) \]
                            5. lower-log.f6476.7

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

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

                            \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \color{blue}{z}\right)\right) \]
                          8. Step-by-step derivation
                            1. lower-+.f6461.3

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

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

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                            3. lower-log.f6432.0

                              \[\leadsto \frac{x \cdot \log y}{a} \cdot a + y \cdot i \]
                          6. Applied rewrites32.0%

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

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

                              \[\leadsto \color{blue}{\frac{x \cdot \log y}{a} \cdot a} + y \cdot i \]
                            3. lower-fma.f6432.0

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                            6. lower-*.f6432.0

                              \[\leadsto \mathsf{fma}\left(\frac{\log y \cdot x}{a}, a, y \cdot i\right) \]
                          8. Applied rewrites32.0%

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

                        Alternative 15: 70.0% accurate, 0.4× speedup?

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{a \cdot \left(x \cdot \color{blue}{\log y}\right)}{a} + y \cdot i \]
                            3. lower-log.f6434.5

                              \[\leadsto \frac{a \cdot \left(x \cdot \log y\right)}{a} + y \cdot i \]
                          8. Applied rewrites34.5%

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

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

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

                              \[\leadsto \color{blue}{y \cdot i} + \frac{a \cdot \left(x \cdot \log y\right)}{a} \]
                            4. lower-fma.f6434.5

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

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

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

                              \[\leadsto \mathsf{fma}\left(y, i, \frac{a \cdot \left(\log y \cdot \color{blue}{x}\right)}{a}\right) \]
                            8. associate-*r*N/A

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

                              \[\leadsto \mathsf{fma}\left(y, i, \frac{\left(a \cdot \log y\right) \cdot \color{blue}{x}}{a}\right) \]
                            10. lower-*.f6434.4

                              \[\leadsto \mathsf{fma}\left(y, i, \frac{\left(a \cdot \log y\right) \cdot x}{a}\right) \]
                          10. Applied rewrites34.4%

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

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \left(z + x \cdot \color{blue}{\log y}\right)\right)\right) \]
                            5. lower-log.f6476.7

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

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

                            \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \color{blue}{z}\right)\right) \]
                          8. Step-by-step derivation
                            1. lower-+.f6461.3

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

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

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 16: 65.1% accurate, 1.6× speedup?

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

                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \left(z + x \cdot \color{blue}{\log y}\right)\right)\right) \]
                              5. lower-log.f6476.7

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

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

                              \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, a + \left(t + \color{blue}{z}\right)\right) \]
                            8. Step-by-step derivation
                              1. lower-+.f6461.3

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

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

                            if 2.25e13 < y

                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 17: 44.6% accurate, 0.7× speedup?

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

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{\color{blue}{a \cdot z}}{a} + y \cdot i \]
                              7. Step-by-step derivation
                                1. lower-*.f6433.9

                                  \[\leadsto \frac{a \cdot \color{blue}{z}}{a} + y \cdot i \]
                              8. Applied rewrites33.9%

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

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

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

                                  \[\leadsto \color{blue}{y \cdot i} + \frac{a \cdot z}{a} \]
                                4. lower-fma.f6433.9

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

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

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

                              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 18: 41.3% accurate, 0.7× speedup?

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

                                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 19: 38.8% accurate, 2.2× speedup?

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

                                        \[\leadsto b \cdot \color{blue}{\log c} \]
                                      2. lower-log.f6416.9

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

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

                                    if -8.9999999999999995e232 < b < 4.8000000000000001e172

                                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 20: 36.2% accurate, 2.8× speedup?

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

                                      1. Initial program 99.8%

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

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

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

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

                                          \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right)} \]
                                        5. lift-*.f64N/A

                                          \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + y \cdot i\right) \]
                                        6. +-commutativeN/A

                                          \[\leadsto \left(b - \frac{1}{2}\right) \cdot \log c + \color{blue}{\left(y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                                        7. lower-fma.f64N/A

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)\right)} \]
                                        8. lift-+.f64N/A

                                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)}\right) \]
                                        9. +-commutativeN/A

                                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)}\right) \]
                                        10. lift-+.f64N/A

                                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \left(a + \color{blue}{\left(\left(x \cdot \log y + z\right) + t\right)}\right)\right) \]
                                        11. associate-+r+N/A

                                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, y \cdot i + \color{blue}{\left(\left(a + \left(x \cdot \log y + z\right)\right) + t\right)}\right) \]
                                        12. associate-+r+N/A

                                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                                        13. lower-+.f64N/A

                                          \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{\left(y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\right) + t}\right) \]
                                      3. Applied rewrites99.8%

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, a + \mathsf{fma}\left(\log y, x, z\right)\right) + t\right)} \]
                                      4. Taylor expanded in x around inf

                                        \[\leadsto \color{blue}{x \cdot \log y} \]
                                      5. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto x \cdot \color{blue}{\log y} \]
                                        2. lower-log.f6416.6

                                          \[\leadsto x \cdot \log y \]
                                      6. Applied rewrites16.6%

                                        \[\leadsto \color{blue}{x \cdot \log y} \]

                                      if -1.8e153 < x

                                      1. Initial program 99.8%

                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                      2. Step-by-step derivation
                                        1. lift-+.f64N/A

                                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                                        2. lift-+.f64N/A

                                          \[\leadsto \left(\color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)} + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                        3. +-commutativeN/A

                                          \[\leadsto \left(\color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)} + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                        4. associate-+l+N/A

                                          \[\leadsto \color{blue}{\left(a + \left(\left(\left(x \cdot \log y + z\right) + t\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right)} + y \cdot i \]
                                        5. sum-to-multN/A

                                          \[\leadsto \color{blue}{\left(1 + \frac{\left(\left(x \cdot \log y + z\right) + t\right) + \left(b - \frac{1}{2}\right) \cdot \log c}{a}\right) \cdot a} + y \cdot i \]
                                        6. lower-special-*.f64N/A

                                          \[\leadsto \color{blue}{\left(1 + \frac{\left(\left(x \cdot \log y + z\right) + t\right) + \left(b - \frac{1}{2}\right) \cdot \log c}{a}\right) \cdot a} + y \cdot i \]
                                      3. Applied rewrites73.0%

                                        \[\leadsto \color{blue}{\left(1 + \frac{\mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right) + z}{a}\right) \cdot a} + y \cdot i \]
                                      4. Taylor expanded in a around inf

                                        \[\leadsto \color{blue}{1} \cdot a + y \cdot i \]
                                      5. Step-by-step derivation
                                        1. Applied rewrites38.8%

                                          \[\leadsto \color{blue}{1} \cdot a + y \cdot i \]
                                        2. Step-by-step derivation
                                          1. lift-+.f64N/A

                                            \[\leadsto \color{blue}{1 \cdot a + y \cdot i} \]
                                          2. +-commutativeN/A

                                            \[\leadsto \color{blue}{y \cdot i + 1 \cdot a} \]
                                          3. lift-*.f64N/A

                                            \[\leadsto \color{blue}{y \cdot i} + 1 \cdot a \]
                                          4. lower-fma.f6438.8

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                                        3. Applied rewrites38.8%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                                      6. Recombined 2 regimes into one program.
                                      7. Add Preprocessing

                                      Alternative 21: 34.9% accurate, 4.2× speedup?

                                      \[\begin{array}{l} \\ \mathsf{fma}\left(y, i, 1 \cdot a\right) \end{array} \]
                                      (FPCore (x y z t a b c i) :precision binary64 (fma y i (* 1.0 a)))
                                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                      	return fma(y, i, (1.0 * a));
                                      }
                                      
                                      function code(x, y, z, t, a, b, c, i)
                                      	return fma(y, i, Float64(1.0 * a))
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(1.0 * a), $MachinePrecision]), $MachinePrecision]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \mathsf{fma}\left(y, i, 1 \cdot a\right)
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 99.8%

                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                      2. Step-by-step derivation
                                        1. lift-+.f64N/A

                                          \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} + y \cdot i \]
                                        2. lift-+.f64N/A

                                          \[\leadsto \left(\color{blue}{\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right)} + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                        3. +-commutativeN/A

                                          \[\leadsto \left(\color{blue}{\left(a + \left(\left(x \cdot \log y + z\right) + t\right)\right)} + \left(b - \frac{1}{2}\right) \cdot \log c\right) + y \cdot i \]
                                        4. associate-+l+N/A

                                          \[\leadsto \color{blue}{\left(a + \left(\left(\left(x \cdot \log y + z\right) + t\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)\right)} + y \cdot i \]
                                        5. sum-to-multN/A

                                          \[\leadsto \color{blue}{\left(1 + \frac{\left(\left(x \cdot \log y + z\right) + t\right) + \left(b - \frac{1}{2}\right) \cdot \log c}{a}\right) \cdot a} + y \cdot i \]
                                        6. lower-special-*.f64N/A

                                          \[\leadsto \color{blue}{\left(1 + \frac{\left(\left(x \cdot \log y + z\right) + t\right) + \left(b - \frac{1}{2}\right) \cdot \log c}{a}\right) \cdot a} + y \cdot i \]
                                      3. Applied rewrites73.0%

                                        \[\leadsto \color{blue}{\left(1 + \frac{\mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, t\right)\right) + z}{a}\right) \cdot a} + y \cdot i \]
                                      4. Taylor expanded in a around inf

                                        \[\leadsto \color{blue}{1} \cdot a + y \cdot i \]
                                      5. Step-by-step derivation
                                        1. Applied rewrites38.8%

                                          \[\leadsto \color{blue}{1} \cdot a + y \cdot i \]
                                        2. Step-by-step derivation
                                          1. lift-+.f64N/A

                                            \[\leadsto \color{blue}{1 \cdot a + y \cdot i} \]
                                          2. +-commutativeN/A

                                            \[\leadsto \color{blue}{y \cdot i + 1 \cdot a} \]
                                          3. lift-*.f64N/A

                                            \[\leadsto \color{blue}{y \cdot i} + 1 \cdot a \]
                                          4. lower-fma.f6438.8

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                                        3. Applied rewrites38.8%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y, i, 1 \cdot a\right)} \]
                                        4. Add Preprocessing

                                        Reproduce

                                        ?
                                        herbie shell --seed 2025154 
                                        (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)))