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

Percentage Accurate: 99.8% → 99.8%
Time: 6.3s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 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.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}
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. Add Preprocessing

Alternative 2: 53.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{+253}:\\
\;\;\;\;z + \log c \cdot b\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{+61}:\\
\;\;\;\;\left(t + z\right) + \log y \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -inf.0

    1. Initial program 100.0%

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

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

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

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

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

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(t + z\right) + b \cdot \color{blue}{\log c} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(t + z\right) + \log c \cdot b \]
      2. lift-log.f64N/A

        \[\leadsto \left(t + z\right) + \log c \cdot b \]
      3. lift-*.f6454.7

        \[\leadsto \left(t + z\right) + \log c \cdot b \]
    7. Applied rewrites54.7%

      \[\leadsto \left(t + z\right) + \log c \cdot \color{blue}{b} \]
    8. Taylor expanded in z around inf

      \[\leadsto z + \color{blue}{\log c} \cdot b \]
    9. Step-by-step derivation
      1. Applied rewrites35.6%

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

      if -1.9999999999999999e253 < (+.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)) < -3.9999999999999998e61

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t + z\right) + x \cdot \color{blue}{\log y} \]
      6. Step-by-step derivation
        1. *-commutativeN/A

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

          \[\leadsto \left(t + z\right) + \log y \cdot x \]
        3. lift-*.f6452.6

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

        \[\leadsto \left(t + z\right) + \log y \cdot \color{blue}{x} \]

      if -3.9999999999999998e61 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
        4. lower-fma.f6488.9

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

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

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

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

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

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

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

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

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

      Alternative 3: 44.5% accurate, 0.3× speedup?

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

        1. Initial program 100.0%

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

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

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

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

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + z\right) + b \cdot \color{blue}{\log c} \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(t + z\right) + \log c \cdot b \]
          2. lift-log.f64N/A

            \[\leadsto \left(t + z\right) + \log c \cdot b \]
          3. lift-*.f6454.7

            \[\leadsto \left(t + z\right) + \log c \cdot b \]
        7. Applied rewrites54.7%

          \[\leadsto \left(t + z\right) + \log c \cdot \color{blue}{b} \]
        8. Taylor expanded in z around inf

          \[\leadsto z + \color{blue}{\log c} \cdot b \]
        9. Step-by-step derivation
          1. Applied rewrites35.6%

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

          if -1.9999999999999999e253 < (+.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.99999999999999973e33

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(t + z\right) + x \cdot \color{blue}{\log y} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

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

              \[\leadsto \left(t + z\right) + \log y \cdot x \]
            3. lift-*.f6452.4

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

            \[\leadsto \left(t + z\right) + \log y \cdot \color{blue}{x} \]

          if -4.99999999999999973e33 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
            4. lower-fma.f6488.7

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

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

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

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

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

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

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

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

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

          Alternative 4: 45.6% accurate, 0.3× speedup?

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

            1. Initial program 100.0%

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

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

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

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

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

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(t + z\right) + b \cdot \color{blue}{\log c} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left(t + z\right) + \log c \cdot b \]
              2. lift-log.f64N/A

                \[\leadsto \left(t + z\right) + \log c \cdot b \]
              3. lift-*.f6454.7

                \[\leadsto \left(t + z\right) + \log c \cdot b \]
            7. Applied rewrites54.7%

              \[\leadsto \left(t + z\right) + \log c \cdot \color{blue}{b} \]

            if -2.00000000000000003e205 < (+.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.99999999999999973e33

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(t + z\right) + x \cdot \color{blue}{\log y} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

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

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

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

              \[\leadsto \left(t + z\right) + \log y \cdot \color{blue}{x} \]
            8. Taylor expanded in z around inf

              \[\leadsto z + \color{blue}{\log y} \cdot x \]
            9. Step-by-step derivation
              1. Applied rewrites34.9%

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

              if -4.99999999999999973e33 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                4. lower-fma.f6488.7

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

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

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

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

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

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

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

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

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

              Alternative 5: 40.2% accurate, 0.3× speedup?

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

                1. Initial program 100.0%

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

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

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

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

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(t + z\right) + b \cdot \color{blue}{\log c} \]
                6. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(t + z\right) + \log c \cdot b \]
                  2. lift-log.f64N/A

                    \[\leadsto \left(t + z\right) + \log c \cdot b \]
                  3. lift-*.f6454.7

                    \[\leadsto \left(t + z\right) + \log c \cdot b \]
                7. Applied rewrites54.7%

                  \[\leadsto \left(t + z\right) + \log c \cdot \color{blue}{b} \]
                8. Taylor expanded in z around inf

                  \[\leadsto z + \color{blue}{\log c} \cdot b \]
                9. Step-by-step derivation
                  1. Applied rewrites35.6%

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

                  if -1.9999999999999999e253 < (+.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.99999999999999973e33

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(t + z\right) + x \cdot \color{blue}{\log y} \]
                  6. Step-by-step derivation
                    1. *-commutativeN/A

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

                      \[\leadsto \left(t + z\right) + \log y \cdot x \]
                    3. lift-*.f6452.4

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

                    \[\leadsto \left(t + z\right) + \log y \cdot \color{blue}{x} \]
                  8. Taylor expanded in z around inf

                    \[\leadsto z + \color{blue}{\log y} \cdot x \]
                  9. Step-by-step derivation
                    1. Applied rewrites34.1%

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

                    if -4.99999999999999973e33 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                      4. lower-fma.f6488.7

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

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

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

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

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

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

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

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

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

                    Alternative 6: 28.3% accurate, 0.3× speedup?

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

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

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

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

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

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

                      1. Initial program 99.8%

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

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

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

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

                        1. Initial program 99.8%

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

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

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

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

                          1. Initial program 100.0%

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

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

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

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

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(t + z\right) + b \cdot \color{blue}{\log c} \]
                          6. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \left(t + z\right) + \log c \cdot b \]
                            2. lift-log.f64N/A

                              \[\leadsto \left(t + z\right) + \log c \cdot b \]
                            3. lift-*.f6453.0

                              \[\leadsto \left(t + z\right) + \log c \cdot b \]
                          7. Applied rewrites53.0%

                            \[\leadsto \left(t + z\right) + \log c \cdot \color{blue}{b} \]
                          8. Taylor expanded in z around inf

                            \[\leadsto z + \color{blue}{\log c} \cdot b \]
                          9. Step-by-step derivation
                            1. Applied rewrites34.5%

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

                            if -4.99999999999999973e33 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                              4. lower-fma.f6488.7

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

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

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

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

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

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

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

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

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

                            Alternative 8: 33.5% accurate, 0.5× speedup?

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

                              1. Initial program 100.0%

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

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

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

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

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

                              1. Initial program 99.8%

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

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

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

                                if -4.99999999999999973e33 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                  4. lower-fma.f6488.7

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

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

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

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

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

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

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

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

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

                                Alternative 9: 61.8% 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 -5 \cdot 10^{+33}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, t + a\right)\right)\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b c i)
                                 :precision binary64
                                 (if (<=
                                      (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
                                      -5e+33)
                                   (fma y i (fma (log c) (- b 0.5) z))
                                   (fma y i (fma (log c) (- b 0.5) (+ t a)))))
                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	double tmp;
                                	if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -5e+33) {
                                		tmp = fma(y, i, fma(log(c), (b - 0.5), z));
                                	} else {
                                		tmp = fma(y, i, fma(log(c), (b - 0.5), (t + a)));
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y, z, t, a, b, c, i)
                                	tmp = 0.0
                                	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -5e+33)
                                		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), z));
                                	else
                                		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), Float64(t + a)));
                                	end
                                	return tmp
                                end
                                
                                code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -5e+33], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(t + a), $MachinePrecision]), $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 -5 \cdot 10^{+33}:\\
                                \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, t + a\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -4.99999999999999973e33

                                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, z\right)\right) \]
                                      13. lift--.f6454.0

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

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

                                    if -4.99999999999999973e33 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 10: 54.0% accurate, 0.7× speedup?

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

                                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\color{blue}{\log c}, b - \frac{1}{2}, z\right)\right) \]
                                          13. lift--.f6454.0

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

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

                                        if -4.99999999999999973e33 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                          4. lower-fma.f6488.7

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

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

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

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

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

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

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

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

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

                                        Alternative 11: 45.8% accurate, 0.9× speedup?

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

                                          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \left(t + z\right) + i \cdot \color{blue}{y} \]
                                          6. Step-by-step derivation
                                            1. lower-*.f6455.2

                                              \[\leadsto \left(t + z\right) + i \cdot y \]
                                          7. Applied rewrites55.2%

                                            \[\leadsto \left(t + z\right) + i \cdot \color{blue}{y} \]

                                          if -4.99999999999999973e33 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                            4. lower-fma.f6488.7

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

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

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

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

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

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

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

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

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

                                          Alternative 12: 38.3% accurate, 1.0× speedup?

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

                                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                              4. lower-fma.f6489.2

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{z}\right) \]
                                            8. Step-by-step derivation
                                              1. Applied rewrites39.6%

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

                                              if -4.99999999999999973e33 < (+.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.7%

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                4. lower-fma.f6488.7

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

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

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

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

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

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

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

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

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

                                              Alternative 13: 15.8% accurate, 1.0× speedup?

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

                                                1. Initial program 99.9%

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

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

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

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

                                                  1. Initial program 99.7%

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

                                                    \[\leadsto \color{blue}{a} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites15.8%

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

                                                  Alternative 14: 92.4% accurate, 1.0× speedup?

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

                                                    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -6.39999999999999972e112 < x < 3.80000000000000012e160

                                                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                      4. lower-fma.f6496.3

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

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

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

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

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

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

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

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

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

                                                    Alternative 15: 91.3% accurate, 1.0× speedup?

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

                                                      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                        4. lower-fma.f6466.2

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - \frac{1}{2}, \log y \cdot x\right)\right) \]
                                                        3. lift-*.f6481.4

                                                          \[\leadsto \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot \color{blue}{x}\right)\right) \]
                                                      9. Applied rewrites81.4%

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

                                                      if -3.99999999999999963e187 < x < 6.5999999999999999e223

                                                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                        4. lower-fma.f6493.2

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

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

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

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

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

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

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

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

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

                                                      Alternative 16: 90.6% accurate, 1.0× speedup?

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

                                                        1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                          4. lower-fma.f6466.1

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{x \cdot \log y}\right) \]
                                                        8. Step-by-step derivation
                                                          1. *-commutativeN/A

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

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

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

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

                                                        if -6.6000000000000004e189 < x < 2.8e198

                                                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                          4. lower-fma.f6493.9

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

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

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

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

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

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

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

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

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

                                                          if 2.8e198 < x

                                                          1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 17: 90.0% accurate, 1.0× speedup?

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

                                                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if 2.69999999999999994e155 < a

                                                          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                            4. lower-fma.f6487.6

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

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

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

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

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

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

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

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

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

                                                          Alternative 18: 88.5% accurate, 1.0× speedup?

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

                                                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              if 2.69999999999999994e155 < a

                                                              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                                4. lower-fma.f6487.6

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

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

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

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

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

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

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

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

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

                                                              Alternative 19: 90.3% accurate, 1.7× speedup?

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

                                                                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                                  4. lower-fma.f6466.0

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

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

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

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

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

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

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

                                                                  \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{x \cdot \log y}\right) \]
                                                                8. Step-by-step derivation
                                                                  1. *-commutativeN/A

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

                                                                    \[\leadsto \mathsf{fma}\left(y, i, \log y \cdot x\right) \]
                                                                  3. lift-*.f6475.8

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

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

                                                                if -6.6000000000000004e189 < x < 1.2999999999999999e231

                                                                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \color{blue}{\left(\left(\left(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + 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(\mathsf{fma}\left(x, \frac{\log y}{z}, 1\right) \cdot z + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right) \]
                                                                  4. lower-fma.f6493.0

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

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

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

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

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

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

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

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

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

                                                                Alternative 20: 15.9% accurate, 234.0× speedup?

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

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

                                                                  \[\leadsto \color{blue}{a} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites15.9%

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

                                                                  Reproduce

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