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

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

\\
\left(\mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(\log y, x, z\right)\right) + \left(a + t\right)\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. Step-by-step derivation
    1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.6% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 79.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -3.8 \cdot 10^{+78}:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(i, y, t\_1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;a + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, t\_1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2e225

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -4.2e225 < z < -3.7999999999999999e78

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.7999999999999999e78 < z

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 78.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.9999999999999999e61 < b < 3.99999999999999979e183

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 3.99999999999999979e183 < b

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 77.3% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -1.9999999999999999e61 < b < 9.5e194

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 9.5e194 < b

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 77.3% accurate, 1.2× speedup?

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

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.9999999999999999e61 < b < 9.5e194

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 9.5e194 < b

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 7: 75.9% accurate, 1.2× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -1.9999999999999999e61 < b < 9.5e194

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 8: 74.8% accurate, 0.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto a + \left(t + \left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                        3. lower--.f6462.2

                          \[\leadsto a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right) \]
                      7. Applied rewrites62.2%

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

                      if -9.99999999999999928e224 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 5.00000000000000034e173

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 5.00000000000000034e173 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 9: 74.5% accurate, 1.1× speedup?

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

                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto a + \left(t + \left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                          3. lower--.f6462.2

                            \[\leadsto a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right) \]
                        7. Applied rewrites62.2%

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

                        if -9.99999999999999907e214 < (-.f64 b #s(literal 1/2 binary64)) < 9.99999999999999977e194

                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 74.0% accurate, 0.4× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq 10^{+308}:\\ \;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-\left(-i\right) \cdot \frac{y}{z}\right) \cdot z\\ \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 1e+308)
                               (+ a (+ t (+ z (* (log c) (- b 0.5)))))
                               (* (- (* (- i) (/ y z))) z)))))
                        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 <= 1e+308) {
                        		tmp = a + (t + (z + (log(c) * (b - 0.5))));
                        	} else {
                        		tmp = -(-i * (y / z)) * z;
                        	}
                        	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 <= 1e+308) {
                        		tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
                        	} else {
                        		tmp = -(-i * (y / z)) * z;
                        	}
                        	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 <= 1e+308:
                        		tmp = a + (t + (z + (math.log(c) * (b - 0.5))))
                        	else:
                        		tmp = -(-i * (y / z)) * z
                        	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 <= 1e+308)
                        		tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))));
                        	else
                        		tmp = Float64(Float64(-Float64(Float64(-i) * Float64(y / z))) * z);
                        	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 <= 1e+308)
                        		tmp = a + (t + (z + (log(c) * (b - 0.5))));
                        	else
                        		tmp = -(-i * (y / z)) * z;
                        	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, 1e+308], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-N[((-i) * N[(y / z), $MachinePrecision]), $MachinePrecision]) * z), $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 10^{+308}:\\
                        \;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(-\left(-i\right) \cdot \frac{y}{z}\right) \cdot z\\
                        
                        
                        \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 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{i \cdot y} \]
                          8. Step-by-step derivation
                            1. lower-*.f6424.0

                              \[\leadsto i \cdot \color{blue}{y} \]
                          9. Applied rewrites24.0%

                            \[\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)) < 1e308

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto a + \left(t + \left(z + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right) \]
                            3. lower--.f6462.2

                              \[\leadsto a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right) \]
                          7. Applied rewrites62.2%

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

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

                              \[\leadsto -1 \cdot \left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \]
                            3. lower-*.f6420.4

                              \[\leadsto -1 \cdot \left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \]
                          7. Applied rewrites20.4%

                            \[\leadsto -1 \cdot \left(z \cdot \left(-1 \cdot \color{blue}{\frac{i \cdot y}{z}}\right)\right) \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto \mathsf{neg}\left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \]
                            3. lift-*.f64N/A

                              \[\leadsto \mathsf{neg}\left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \]
                            4. *-commutativeN/A

                              \[\leadsto \mathsf{neg}\left(\left(-1 \cdot \frac{i \cdot y}{z}\right) \cdot z\right) \]
                            5. distribute-lft-neg-inN/A

                              \[\leadsto \left(\mathsf{neg}\left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \cdot \color{blue}{z} \]
                            6. lower-*.f64N/A

                              \[\leadsto \left(\mathsf{neg}\left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \cdot \color{blue}{z} \]
                          9. Applied rewrites20.2%

                            \[\leadsto \left(-\left(-i\right) \cdot \frac{y}{z}\right) \cdot \color{blue}{z} \]
                        3. Recombined 3 regimes into one program.
                        4. Add Preprocessing

                        Alternative 11: 29.1% 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 -50:\\ \;\;\;\;--1 \cdot z\\ \mathbf{elif}\;t\_1 \leq 10^{+308}:\\ \;\;\;\;-\left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-\left(-i\right) \cdot \frac{y}{z}\right) \cdot z\\ \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 -50.0)
                               (- (* -1.0 z))
                               (if (<= t_1 1e+308) (- (- a)) (* (- (* (- i) (/ y z))) z))))))
                        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 <= -50.0) {
                        		tmp = -(-1.0 * z);
                        	} else if (t_1 <= 1e+308) {
                        		tmp = -(-a);
                        	} else {
                        		tmp = -(-i * (y / z)) * z;
                        	}
                        	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 <= -50.0) {
                        		tmp = -(-1.0 * z);
                        	} else if (t_1 <= 1e+308) {
                        		tmp = -(-a);
                        	} else {
                        		tmp = -(-i * (y / z)) * z;
                        	}
                        	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 <= -50.0:
                        		tmp = -(-1.0 * z)
                        	elif t_1 <= 1e+308:
                        		tmp = -(-a)
                        	else:
                        		tmp = -(-i * (y / z)) * z
                        	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 <= -50.0)
                        		tmp = Float64(-Float64(-1.0 * z));
                        	elseif (t_1 <= 1e+308)
                        		tmp = Float64(-Float64(-a));
                        	else
                        		tmp = Float64(Float64(-Float64(Float64(-i) * Float64(y / z))) * z);
                        	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 <= -50.0)
                        		tmp = -(-1.0 * z);
                        	elseif (t_1 <= 1e+308)
                        		tmp = -(-a);
                        	else
                        		tmp = -(-i * (y / z)) * z;
                        	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, -50.0], (-N[(-1.0 * z), $MachinePrecision]), If[LessEqual[t$95$1, 1e+308], (-(-a)), N[((-N[((-i) * N[(y / z), $MachinePrecision]), $MachinePrecision]) * z), $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 -50:\\
                        \;\;\;\;--1 \cdot z\\
                        
                        \mathbf{elif}\;t\_1 \leq 10^{+308}:\\
                        \;\;\;\;-\left(-a\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(-\left(-i\right) \cdot \frac{y}{z}\right) \cdot z\\
                        
                        
                        \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 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{i \cdot y} \]
                          8. Step-by-step derivation
                            1. lower-*.f6424.0

                              \[\leadsto i \cdot \color{blue}{y} \]
                          9. Applied rewrites24.0%

                            \[\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)) < -50

                          1. Initial program 99.8%

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

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

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

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

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

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

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          6. Step-by-step derivation
                            1. lower-*.f6417.1

                              \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                          7. Applied rewrites17.1%

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                            3. lower-neg.f6417.1

                              \[\leadsto --1 \cdot a \]
                            4. lift-*.f64N/A

                              \[\leadsto --1 \cdot a \]
                            5. mul-1-negN/A

                              \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                            6. lower-neg.f6417.1

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites17.1%

                            \[\leadsto -\left(-a\right) \]
                          10. Taylor expanded in z around inf

                            \[\leadsto --1 \cdot z \]
                          11. Step-by-step derivation
                            1. lower-*.f6416.4

                              \[\leadsto --1 \cdot z \]
                          12. Applied rewrites16.4%

                            \[\leadsto --1 \cdot z \]

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

                          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}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{z} - 1\right)\right)} \]
                          3. Step-by-step derivation
                            1. lower-*.f64N/A

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

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

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

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

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          6. Step-by-step derivation
                            1. lower-*.f6417.1

                              \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                          7. Applied rewrites17.1%

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                            3. lower-neg.f6417.1

                              \[\leadsto --1 \cdot a \]
                            4. lift-*.f64N/A

                              \[\leadsto --1 \cdot a \]
                            5. mul-1-negN/A

                              \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                            6. lower-neg.f6417.1

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites17.1%

                            \[\leadsto -\left(-a\right) \]

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

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

                              \[\leadsto -1 \cdot \left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \]
                            3. lower-*.f6420.4

                              \[\leadsto -1 \cdot \left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \]
                          7. Applied rewrites20.4%

                            \[\leadsto -1 \cdot \left(z \cdot \left(-1 \cdot \color{blue}{\frac{i \cdot y}{z}}\right)\right) \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto -1 \cdot \color{blue}{\left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto \mathsf{neg}\left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \]
                            3. lift-*.f64N/A

                              \[\leadsto \mathsf{neg}\left(z \cdot \left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \]
                            4. *-commutativeN/A

                              \[\leadsto \mathsf{neg}\left(\left(-1 \cdot \frac{i \cdot y}{z}\right) \cdot z\right) \]
                            5. distribute-lft-neg-inN/A

                              \[\leadsto \left(\mathsf{neg}\left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \cdot \color{blue}{z} \]
                            6. lower-*.f64N/A

                              \[\leadsto \left(\mathsf{neg}\left(-1 \cdot \frac{i \cdot y}{z}\right)\right) \cdot \color{blue}{z} \]
                          9. Applied rewrites20.2%

                            \[\leadsto \left(-\left(-i\right) \cdot \frac{y}{z}\right) \cdot \color{blue}{z} \]
                        3. Recombined 4 regimes into one program.
                        4. Add Preprocessing

                        Alternative 12: 28.9% 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 -50:\\ \;\;\;\;--1 \cdot z\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;-\left(-a\right)\\ \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 -50.0)
                               (- (* -1.0 z))
                               (if (<= t_1 5e+305) (- (- 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 <= -50.0) {
                        		tmp = -(-1.0 * z);
                        	} else if (t_1 <= 5e+305) {
                        		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 <= -50.0) {
                        		tmp = -(-1.0 * z);
                        	} else if (t_1 <= 5e+305) {
                        		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 <= -50.0:
                        		tmp = -(-1.0 * z)
                        	elif t_1 <= 5e+305:
                        		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 <= -50.0)
                        		tmp = Float64(-Float64(-1.0 * z));
                        	elseif (t_1 <= 5e+305)
                        		tmp = Float64(-Float64(-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 <= -50.0)
                        		tmp = -(-1.0 * z);
                        	elseif (t_1 <= 5e+305)
                        		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, -50.0], (-N[(-1.0 * z), $MachinePrecision]), If[LessEqual[t$95$1, 5e+305], (-(-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 -50:\\
                        \;\;\;\;--1 \cdot z\\
                        
                        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\
                        \;\;\;\;-\left(-a\right)\\
                        
                        \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 5.00000000000000009e305 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{i \cdot y} \]
                          8. Step-by-step derivation
                            1. lower-*.f6424.0

                              \[\leadsto i \cdot \color{blue}{y} \]
                          9. Applied rewrites24.0%

                            \[\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)) < -50

                          1. Initial program 99.8%

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

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

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

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

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

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

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          6. Step-by-step derivation
                            1. lower-*.f6417.1

                              \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                          7. Applied rewrites17.1%

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                            3. lower-neg.f6417.1

                              \[\leadsto --1 \cdot a \]
                            4. lift-*.f64N/A

                              \[\leadsto --1 \cdot a \]
                            5. mul-1-negN/A

                              \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                            6. lower-neg.f6417.1

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites17.1%

                            \[\leadsto -\left(-a\right) \]
                          10. Taylor expanded in z around inf

                            \[\leadsto --1 \cdot z \]
                          11. Step-by-step derivation
                            1. lower-*.f6416.4

                              \[\leadsto --1 \cdot z \]
                          12. Applied rewrites16.4%

                            \[\leadsto --1 \cdot z \]

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

                          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}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{z} - 1\right)\right)} \]
                          3. Step-by-step derivation
                            1. lower-*.f64N/A

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

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

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

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

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          6. Step-by-step derivation
                            1. lower-*.f6417.1

                              \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                          7. Applied rewrites17.1%

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                            3. lower-neg.f6417.1

                              \[\leadsto --1 \cdot a \]
                            4. lift-*.f64N/A

                              \[\leadsto --1 \cdot a \]
                            5. mul-1-negN/A

                              \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                            6. lower-neg.f6417.1

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites17.1%

                            \[\leadsto -\left(-a\right) \]
                        3. Recombined 3 regimes into one program.
                        4. Add Preprocessing

                        Alternative 13: 26.8% accurate, 0.4× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_1 \leq 500:\\ \;\;\;\;i \cdot y\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;-\left(-a\right)\\ \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 500.0) (* i y) (if (<= t_1 5e+305) (- (- 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 <= 500.0) {
                        		tmp = i * y;
                        	} else if (t_1 <= 5e+305) {
                        		tmp = -(-a);
                        	} else {
                        		tmp = i * y;
                        	}
                        	return tmp;
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x, y, z, t, a, b, c, i)
                        use fmin_fmax_functions
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8), intent (in) :: c
                            real(8), intent (in) :: i
                            real(8) :: t_1
                            real(8) :: tmp
                            t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                            if (t_1 <= 500.0d0) then
                                tmp = i * y
                            else if (t_1 <= 5d+305) then
                                tmp = -(-a)
                            else
                                tmp = i * y
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                        	double tmp;
                        	if (t_1 <= 500.0) {
                        		tmp = i * y;
                        	} else if (t_1 <= 5e+305) {
                        		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 <= 500.0:
                        		tmp = i * y
                        	elif t_1 <= 5e+305:
                        		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 <= 500.0)
                        		tmp = Float64(i * y);
                        	elseif (t_1 <= 5e+305)
                        		tmp = Float64(-Float64(-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 <= 500.0)
                        		tmp = i * y;
                        	elseif (t_1 <= 5e+305)
                        		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, 500.0], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 5e+305], (-(-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 500:\\
                        \;\;\;\;i \cdot y\\
                        
                        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\
                        \;\;\;\;-\left(-a\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;i \cdot y\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 500 or 5.00000000000000009e305 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{i \cdot y} \]
                          8. Step-by-step derivation
                            1. lower-*.f6424.0

                              \[\leadsto i \cdot \color{blue}{y} \]
                          9. Applied rewrites24.0%

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

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

                          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}{-1 \cdot \left(z \cdot \left(-1 \cdot \frac{a + \left(t + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)}{z} - 1\right)\right)} \]
                          3. Step-by-step derivation
                            1. lower-*.f64N/A

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

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

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

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

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          6. Step-by-step derivation
                            1. lower-*.f6417.1

                              \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                          7. Applied rewrites17.1%

                            \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                          8. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                            3. lower-neg.f6417.1

                              \[\leadsto --1 \cdot a \]
                            4. lift-*.f64N/A

                              \[\leadsto --1 \cdot a \]
                            5. mul-1-negN/A

                              \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                            6. lower-neg.f6417.1

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites17.1%

                            \[\leadsto -\left(-a\right) \]
                        3. Recombined 2 regimes into one program.
                        4. Add Preprocessing

                        Alternative 14: 17.1% accurate, 12.8× speedup?

                        \[\begin{array}{l} \\ -\left(-a\right) \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 Float64(-Float64(-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}
                        
                        \\
                        -\left(-a\right)
                        \end{array}
                        
                        Derivation
                        1. Initial program 99.8%

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

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

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

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

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

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

                          \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                        6. Step-by-step derivation
                          1. lower-*.f6417.1

                            \[\leadsto -1 \cdot \left(-1 \cdot a\right) \]
                        7. Applied rewrites17.1%

                          \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{a}\right) \]
                        8. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto -1 \cdot \color{blue}{\left(-1 \cdot a\right)} \]
                          2. mul-1-negN/A

                            \[\leadsto \mathsf{neg}\left(-1 \cdot a\right) \]
                          3. lower-neg.f6417.1

                            \[\leadsto --1 \cdot a \]
                          4. lift-*.f64N/A

                            \[\leadsto --1 \cdot a \]
                          5. mul-1-negN/A

                            \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                          6. lower-neg.f6417.1

                            \[\leadsto -\left(-a\right) \]
                        9. Applied rewrites17.1%

                          \[\leadsto -\left(-a\right) \]
                        10. Add Preprocessing

                        Reproduce

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