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

Percentage Accurate: 99.8% → 99.8%
Time: 7.5s
Alternatives: 18
Speedup: 1.1×

Specification

?
\[\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 \]
(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]
\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

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 18 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?

\[\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 \]
(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]
\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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 94.3% accurate, 0.8× speedup?

\[\begin{array}{l} t_1 := \log c \cdot \left(b - 0.5\right)\\ t_2 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\ t_3 := t\_2 + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, t\_1\right)\right)\\ \mathbf{if}\;x \leq -4.4 \cdot 10^{+197}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+110}:\\ \;\;\;\;t\_2 + \left(\mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right) + \left(\mathsf{min}\left(z, a\right) + \mathsf{fma}\left(i, y, t\_1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (log c) (- b 0.5)))
        (t_2 (fmax t (fmax z a)))
        (t_3 (+ t_2 (fma i y (fma x (log y) t_1)))))
   (if (<= x -4.4e+197)
     t_3
     (if (<= x 5.4e+110)
       (+ t_2 (+ (fmin t (fmax z a)) (+ (fmin z a) (fma i y t_1))))
       t_3))))
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 = fmax(t, fmax(z, a));
	double t_3 = t_2 + fma(i, y, fma(x, log(y), t_1));
	double tmp;
	if (x <= -4.4e+197) {
		tmp = t_3;
	} else if (x <= 5.4e+110) {
		tmp = t_2 + (fmin(t, fmax(z, a)) + (fmin(z, a) + fma(i, y, t_1)));
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(c) * Float64(b - 0.5))
	t_2 = fmax(t, fmax(z, a))
	t_3 = Float64(t_2 + fma(i, y, fma(x, log(y), t_1)))
	tmp = 0.0
	if (x <= -4.4e+197)
		tmp = t_3;
	elseif (x <= 5.4e+110)
		tmp = Float64(t_2 + Float64(fmin(t, fmax(z, a)) + Float64(fmin(z, a) + fma(i, y, t_1))));
	else
		tmp = t_3;
	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[Max[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(i * y + N[(x * N[Log[y], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.4e+197], t$95$3, If[LessEqual[x, 5.4e+110], N[(t$95$2 + N[(N[Min[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision] + N[(N[Min[z, a], $MachinePrecision] + N[(i * y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
t_2 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\
t_3 := t\_2 + \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, t\_1\right)\right)\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{+197}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq 5.4 \cdot 10^{+110}:\\
\;\;\;\;t\_2 + \left(\mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right) + \left(\mathsf{min}\left(z, a\right) + \mathsf{fma}\left(i, y, t\_1\right)\right)\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.39999999999999979e197 or 5.40000000000000019e110 < x

    1. Initial program 99.8%

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

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

        \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

        \[\leadsto 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) \]
    4. Applied rewrites84.1%

      \[\leadsto \color{blue}{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)} \]
    5. Taylor expanded in t 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.2%

        \[\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.2%

      \[\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)} \]

    if -4.39999999999999979e197 < x < 5.40000000000000019e110

    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)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 93.6% accurate, 0.7× speedup?

\[\begin{array}{l} t_1 := \log c \cdot \left(b - 0.5\right)\\ t_2 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\ t_3 := \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, t\_1\right)\right)\\ t_4 := \mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right)\\ \mathbf{if}\;x \leq -4.4 \cdot 10^{+197}:\\ \;\;\;\;t\_2 + t\_3\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{+110}:\\ \;\;\;\;t\_2 + \left(t\_4 + \left(\mathsf{min}\left(z, a\right) + \mathsf{fma}\left(i, y, t\_1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2 + \left(t\_4 + t\_3\right)\\ \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (log c) (- b 0.5)))
        (t_2 (fmax t (fmax z a)))
        (t_3 (fma i y (fma x (log y) t_1)))
        (t_4 (fmin t (fmax z a))))
   (if (<= x -4.4e+197)
     (+ t_2 t_3)
     (if (<= x 5.4e+110)
       (+ t_2 (+ t_4 (+ (fmin z a) (fma i y t_1))))
       (+ t_2 (+ t_4 t_3))))))
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 = fmax(t, fmax(z, a));
	double t_3 = fma(i, y, fma(x, log(y), t_1));
	double t_4 = fmin(t, fmax(z, a));
	double tmp;
	if (x <= -4.4e+197) {
		tmp = t_2 + t_3;
	} else if (x <= 5.4e+110) {
		tmp = t_2 + (t_4 + (fmin(z, a) + fma(i, y, t_1)));
	} else {
		tmp = t_2 + (t_4 + t_3);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(log(c) * Float64(b - 0.5))
	t_2 = fmax(t, fmax(z, a))
	t_3 = fma(i, y, fma(x, log(y), t_1))
	t_4 = fmin(t, fmax(z, a))
	tmp = 0.0
	if (x <= -4.4e+197)
		tmp = Float64(t_2 + t_3);
	elseif (x <= 5.4e+110)
		tmp = Float64(t_2 + Float64(t_4 + Float64(fmin(z, a) + fma(i, y, t_1))));
	else
		tmp = Float64(t_2 + Float64(t_4 + t_3));
	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[Max[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(i * y + N[(x * N[Log[y], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Min[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -4.4e+197], N[(t$95$2 + t$95$3), $MachinePrecision], If[LessEqual[x, 5.4e+110], N[(t$95$2 + N[(t$95$4 + N[(N[Min[z, a], $MachinePrecision] + N[(i * y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(t$95$4 + t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
t_2 := \mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\\
t_3 := \mathsf{fma}\left(i, y, \mathsf{fma}\left(x, \log y, t\_1\right)\right)\\
t_4 := \mathsf{min}\left(t, \mathsf{max}\left(z, a\right)\right)\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{+197}:\\
\;\;\;\;t\_2 + t\_3\\

\mathbf{elif}\;x \leq 5.4 \cdot 10^{+110}:\\
\;\;\;\;t\_2 + \left(t\_4 + \left(\mathsf{min}\left(z, a\right) + \mathsf{fma}\left(i, y, t\_1\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2 + \left(t\_4 + t\_3\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.39999999999999979e197

    1. Initial program 99.8%

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

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

        \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

        \[\leadsto 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) \]
    4. Applied rewrites84.1%

      \[\leadsto \color{blue}{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)} \]
    5. Taylor expanded in t 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.2%

        \[\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.2%

      \[\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)} \]

    if -4.39999999999999979e197 < x < 5.40000000000000019e110

    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)} \]

    if 5.40000000000000019e110 < x

    1. Initial program 99.8%

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

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

        \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

        \[\leadsto 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) \]
    4. Applied rewrites84.1%

      \[\leadsto \color{blue}{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)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 87.6% accurate, 1.2× speedup?

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.45000000000000003e210

    1. Initial program 99.8%

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

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

        \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

        \[\leadsto 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) \]
    4. Applied rewrites84.1%

      \[\leadsto \color{blue}{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)} \]
    5. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.45000000000000003e210 < x

    1. Initial program 99.8%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Taylor expanded in 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)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 87.1% accurate, 1.3× speedup?

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.45000000000000003e210

    1. Initial program 99.8%

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

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

        \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

        \[\leadsto 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) \]
    4. Applied rewrites84.1%

      \[\leadsto \color{blue}{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)} \]
    5. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

      \[\leadsto a + \left(t + \mathsf{fma}\left(x, \log y, \log c \cdot \frac{-1}{2}\right)\right) \]
    9. Step-by-step derivation
      1. Applied rewrites46.3%

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

      if -2.45000000000000003e210 < x

      1. Initial program 99.8%

        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
      2. Taylor expanded in 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)} \]
    10. Recombined 2 regimes into one program.
    11. Add Preprocessing

    Alternative 6: 86.2% accurate, 1.3× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.9999999999999996e253 < x

      1. Initial program 99.8%

        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
      2. Taylor expanded in 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)} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 7: 86.2% accurate, 1.3× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -5.9999999999999996e253 < x

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 80.1% accurate, 1.0× speedup?

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

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

            \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

            \[\leadsto 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) \]
        4. Applied rewrites84.1%

          \[\leadsto \color{blue}{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)} \]
        5. Taylor expanded in x around 0

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

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

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

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

        if -5.89999999999999996e165 < b < 2.8e96

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 73.0% accurate, 1.0× speedup?

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

            1. Initial program 99.8%

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

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

                \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

                \[\leadsto 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) \]
            4. Applied rewrites84.1%

              \[\leadsto \color{blue}{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)} \]
            5. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto a + \left(t + \log c \cdot \left(b - 0.5\right)\right) \]
            10. Applied rewrites46.1%

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

            if -8.7999999999999999e195 < b < 4.2000000000000001e120

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(y, i, \frac{b \cdot \left(t \cdot \color{blue}{\log c}\right)}{t}\right) \]
                  3. lower-log.f6434.5%

                    \[\leadsto \mathsf{fma}\left(y, i, \frac{b \cdot \left(t \cdot \log c\right)}{t}\right) \]
                8. Applied rewrites34.5%

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

              Alternative 10: 65.5% accurate, 0.1× speedup?

              \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := \mathsf{fma}\left(y, i, \frac{b \cdot \left(t\_3 \cdot \log c\right)}{t\_3}\right)\\ t_5 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_6 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_5\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_6 \leq -5 \cdot 10^{+278}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_6 \leq -2 \cdot 10^{+62}:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_6 \leq 10^{+308}:\\ \;\;\;\;t\_5 + \left(t\_3 + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (fmin (fmin z t) a))
                      (t_2 (fmax (fmin z t) a))
                      (t_3 (fmin (fmax z t) t_2))
                      (t_4 (fma y i (/ (* b (* t_3 (log c))) t_3)))
                      (t_5 (fmax (fmax z t) t_2))
                      (t_6
                       (+
                        (+ (+ (+ (+ (* x (log y)) t_1) t_3) t_5) (* (- b 0.5) (log c)))
                        (* y i))))
                 (if (<= t_6 -5e+278)
                   t_4
                   (if (<= t_6 -2e+62)
                     (- (* -1.0 t_1))
                     (if (<= t_6 1e+308) (+ t_5 (+ t_3 (* (log c) (- b 0.5)))) t_4)))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = fmin(fmin(z, t), a);
              	double t_2 = fmax(fmin(z, t), a);
              	double t_3 = fmin(fmax(z, t), t_2);
              	double t_4 = fma(y, i, ((b * (t_3 * log(c))) / t_3));
              	double t_5 = fmax(fmax(z, t), t_2);
              	double t_6 = (((((x * log(y)) + t_1) + t_3) + t_5) + ((b - 0.5) * log(c))) + (y * i);
              	double tmp;
              	if (t_6 <= -5e+278) {
              		tmp = t_4;
              	} else if (t_6 <= -2e+62) {
              		tmp = -(-1.0 * t_1);
              	} else if (t_6 <= 1e+308) {
              		tmp = t_5 + (t_3 + (log(c) * (b - 0.5)));
              	} else {
              		tmp = t_4;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = fmin(fmin(z, t), a)
              	t_2 = fmax(fmin(z, t), a)
              	t_3 = fmin(fmax(z, t), t_2)
              	t_4 = fma(y, i, Float64(Float64(b * Float64(t_3 * log(c))) / t_3))
              	t_5 = fmax(fmax(z, t), t_2)
              	t_6 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + t_3) + t_5) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
              	tmp = 0.0
              	if (t_6 <= -5e+278)
              		tmp = t_4;
              	elseif (t_6 <= -2e+62)
              		tmp = Float64(-Float64(-1.0 * t_1));
              	elseif (t_6 <= 1e+308)
              		tmp = Float64(t_5 + Float64(t_3 + Float64(log(c) * Float64(b - 0.5))));
              	else
              		tmp = t_4;
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(y * i + N[(N[(b * N[(t$95$3 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] + t$95$5), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, -5e+278], t$95$4, If[LessEqual[t$95$6, -2e+62], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$6, 1e+308], N[(t$95$5 + N[(t$95$3 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]
              
              \begin{array}{l}
              t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
              t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
              t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
              t_4 := \mathsf{fma}\left(y, i, \frac{b \cdot \left(t\_3 \cdot \log c\right)}{t\_3}\right)\\
              t_5 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
              t_6 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_5\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
              \mathbf{if}\;t\_6 \leq -5 \cdot 10^{+278}:\\
              \;\;\;\;t\_4\\
              
              \mathbf{elif}\;t\_6 \leq -2 \cdot 10^{+62}:\\
              \;\;\;\;--1 \cdot t\_1\\
              
              \mathbf{elif}\;t\_6 \leq 10^{+308}:\\
              \;\;\;\;t\_5 + \left(t\_3 + \log c \cdot \left(b - 0.5\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_4\\
              
              
              \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)) < -5.00000000000000029e278 or 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. Step-by-step derivation
                  1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(y, i, \frac{b \cdot \left(t \cdot \color{blue}{\log c}\right)}{t}\right) \]
                  3. lower-log.f6434.5%

                    \[\leadsto \mathsf{fma}\left(y, i, \frac{b \cdot \left(t \cdot \log c\right)}{t}\right) \]
                8. Applied rewrites34.5%

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

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

                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 y around -inf

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

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

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

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

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

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

                  \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                  \[\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.f6415.6%

                    \[\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.f6415.6%

                    \[\leadsto -\left(-a\right) \]
                9. Applied rewrites15.6%

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

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

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

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

                if -2.00000000000000007e62 < (+.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 0

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

                    \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

                    \[\leadsto 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) \]
                4. Applied rewrites84.1%

                  \[\leadsto \color{blue}{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)} \]
                5. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto a + \left(t + \log c \cdot \left(b - 0.5\right)\right) \]
                10. Applied rewrites46.1%

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

              Alternative 11: 65.5% accurate, 0.1× speedup?

              \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_5 \leq -\infty:\\ \;\;\;\;1 \cdot t\_3 + y \cdot i\\ \mathbf{elif}\;t\_5 \leq -2 \cdot 10^{+62}:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_5 \leq 10^{+308}:\\ \;\;\;\;t\_4 + \left(t\_3 + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t\_4}{y}\right)\right)\\ \end{array} \]
              (FPCore (x y z t a b c i)
               :precision binary64
               (let* ((t_1 (fmin (fmin z t) a))
                      (t_2 (fmax (fmin z t) a))
                      (t_3 (fmin (fmax z t) t_2))
                      (t_4 (fmax (fmax z t) t_2))
                      (t_5
                       (+
                        (+ (+ (+ (+ (* x (log y)) t_1) t_3) t_4) (* (- b 0.5) (log c)))
                        (* y i))))
                 (if (<= t_5 (- INFINITY))
                   (+ (* 1.0 t_3) (* y i))
                   (if (<= t_5 -2e+62)
                     (- (* -1.0 t_1))
                     (if (<= t_5 1e+308)
                       (+ t_4 (+ t_3 (* (log c) (- b 0.5))))
                       (* -1.0 (* y (fma -1.0 i (* -1.0 (/ t_4 y))))))))))
              double code(double x, double y, double z, double t, double a, double b, double c, double i) {
              	double t_1 = fmin(fmin(z, t), a);
              	double t_2 = fmax(fmin(z, t), a);
              	double t_3 = fmin(fmax(z, t), t_2);
              	double t_4 = fmax(fmax(z, t), t_2);
              	double t_5 = (((((x * log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * log(c))) + (y * i);
              	double tmp;
              	if (t_5 <= -((double) INFINITY)) {
              		tmp = (1.0 * t_3) + (y * i);
              	} else if (t_5 <= -2e+62) {
              		tmp = -(-1.0 * t_1);
              	} else if (t_5 <= 1e+308) {
              		tmp = t_4 + (t_3 + (log(c) * (b - 0.5)));
              	} else {
              		tmp = -1.0 * (y * fma(-1.0, i, (-1.0 * (t_4 / y))));
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b, c, i)
              	t_1 = fmin(fmin(z, t), a)
              	t_2 = fmax(fmin(z, t), a)
              	t_3 = fmin(fmax(z, t), t_2)
              	t_4 = fmax(fmax(z, t), t_2)
              	t_5 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + t_3) + t_4) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
              	tmp = 0.0
              	if (t_5 <= Float64(-Inf))
              		tmp = Float64(Float64(1.0 * t_3) + Float64(y * i));
              	elseif (t_5 <= -2e+62)
              		tmp = Float64(-Float64(-1.0 * t_1));
              	elseif (t_5 <= 1e+308)
              		tmp = Float64(t_4 + Float64(t_3 + Float64(log(c) * Float64(b - 0.5))));
              	else
              		tmp = Float64(-1.0 * Float64(y * fma(-1.0, i, Float64(-1.0 * Float64(t_4 / y)))));
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] + t$95$4), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], N[(N[(1.0 * t$95$3), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, -2e+62], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$5, 1e+308], N[(t$95$4 + N[(t$95$3 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(y * N[(-1.0 * i + N[(-1.0 * N[(t$95$4 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
              
              \begin{array}{l}
              t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
              t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
              t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
              t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
              t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
              \mathbf{if}\;t\_5 \leq -\infty:\\
              \;\;\;\;1 \cdot t\_3 + y \cdot i\\
              
              \mathbf{elif}\;t\_5 \leq -2 \cdot 10^{+62}:\\
              \;\;\;\;--1 \cdot t\_1\\
              
              \mathbf{elif}\;t\_5 \leq 10^{+308}:\\
              \;\;\;\;t\_4 + \left(t\_3 + \log c \cdot \left(b - 0.5\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{t\_4}{y}\right)\right)\\
              
              
              \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. Step-by-step derivation
                  1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \color{blue}{1} \cdot t + y \cdot i \]

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

                  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 y around -inf

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

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

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

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

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

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

                    \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                    \[\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.f6415.6%

                      \[\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.f6415.6%

                      \[\leadsto -\left(-a\right) \]
                  9. Applied rewrites15.6%

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

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

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

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

                  if -2.00000000000000007e62 < (+.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 0

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

                      \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

                      \[\leadsto 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) \]
                  4. Applied rewrites84.1%

                    \[\leadsto \color{blue}{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)} \]
                  5. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto a + \left(t + \log c \cdot \left(b - 0.5\right)\right) \]
                  10. Applied rewrites46.1%

                    \[\leadsto a + \left(t + \log c \cdot \left(b - \color{blue}{0.5}\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 y around -inf

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

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

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

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

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

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

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

                    \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                  6. Step-by-step derivation
                    1. lower-/.f6432.5%

                      \[\leadsto -1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a}{y}\right)\right) \]
                  7. Applied rewrites32.5%

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

                Alternative 12: 62.6% accurate, 0.1× speedup?

                \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_5 \leq -\infty:\\ \;\;\;\;1 \cdot t\_3 + y \cdot i\\ \mathbf{elif}\;t\_5 \leq -2 \cdot 10^{+62}:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_5 \leq 4 \cdot 10^{+307}:\\ \;\;\;\;t\_4 + \left(t\_3 + \log c \cdot \left(b - 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_4}{t\_3} \cdot t\_3 + y \cdot i\\ \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (let* ((t_1 (fmin (fmin z t) a))
                        (t_2 (fmax (fmin z t) a))
                        (t_3 (fmin (fmax z t) t_2))
                        (t_4 (fmax (fmax z t) t_2))
                        (t_5
                         (+
                          (+ (+ (+ (+ (* x (log y)) t_1) t_3) t_4) (* (- b 0.5) (log c)))
                          (* y i))))
                   (if (<= t_5 (- INFINITY))
                     (+ (* 1.0 t_3) (* y i))
                     (if (<= t_5 -2e+62)
                       (- (* -1.0 t_1))
                       (if (<= t_5 4e+307)
                         (+ t_4 (+ t_3 (* (log c) (- b 0.5))))
                         (+ (* (/ t_4 t_3) t_3) (* y i)))))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = fmin(fmin(z, t), a);
                	double t_2 = fmax(fmin(z, t), a);
                	double t_3 = fmin(fmax(z, t), t_2);
                	double t_4 = fmax(fmax(z, t), t_2);
                	double t_5 = (((((x * log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                	double tmp;
                	if (t_5 <= -((double) INFINITY)) {
                		tmp = (1.0 * t_3) + (y * i);
                	} else if (t_5 <= -2e+62) {
                		tmp = -(-1.0 * t_1);
                	} else if (t_5 <= 4e+307) {
                		tmp = t_4 + (t_3 + (log(c) * (b - 0.5)));
                	} else {
                		tmp = ((t_4 / t_3) * t_3) + (y * i);
                	}
                	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 = fmin(fmin(z, t), a);
                	double t_2 = fmax(fmin(z, t), a);
                	double t_3 = fmin(fmax(z, t), t_2);
                	double t_4 = fmax(fmax(z, t), t_2);
                	double t_5 = (((((x * Math.log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * Math.log(c))) + (y * i);
                	double tmp;
                	if (t_5 <= -Double.POSITIVE_INFINITY) {
                		tmp = (1.0 * t_3) + (y * i);
                	} else if (t_5 <= -2e+62) {
                		tmp = -(-1.0 * t_1);
                	} else if (t_5 <= 4e+307) {
                		tmp = t_4 + (t_3 + (Math.log(c) * (b - 0.5)));
                	} else {
                		tmp = ((t_4 / t_3) * t_3) + (y * i);
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b, c, i):
                	t_1 = fmin(fmin(z, t), a)
                	t_2 = fmax(fmin(z, t), a)
                	t_3 = fmin(fmax(z, t), t_2)
                	t_4 = fmax(fmax(z, t), t_2)
                	t_5 = (((((x * math.log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * math.log(c))) + (y * i)
                	tmp = 0
                	if t_5 <= -math.inf:
                		tmp = (1.0 * t_3) + (y * i)
                	elif t_5 <= -2e+62:
                		tmp = -(-1.0 * t_1)
                	elif t_5 <= 4e+307:
                		tmp = t_4 + (t_3 + (math.log(c) * (b - 0.5)))
                	else:
                		tmp = ((t_4 / t_3) * t_3) + (y * i)
                	return tmp
                
                function code(x, y, z, t, a, b, c, i)
                	t_1 = fmin(fmin(z, t), a)
                	t_2 = fmax(fmin(z, t), a)
                	t_3 = fmin(fmax(z, t), t_2)
                	t_4 = fmax(fmax(z, t), t_2)
                	t_5 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + t_3) + t_4) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                	tmp = 0.0
                	if (t_5 <= Float64(-Inf))
                		tmp = Float64(Float64(1.0 * t_3) + Float64(y * i));
                	elseif (t_5 <= -2e+62)
                		tmp = Float64(-Float64(-1.0 * t_1));
                	elseif (t_5 <= 4e+307)
                		tmp = Float64(t_4 + Float64(t_3 + Float64(log(c) * Float64(b - 0.5))));
                	else
                		tmp = Float64(Float64(Float64(t_4 / t_3) * t_3) + Float64(y * i));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b, c, i)
                	t_1 = min(min(z, t), a);
                	t_2 = max(min(z, t), a);
                	t_3 = min(max(z, t), t_2);
                	t_4 = max(max(z, t), t_2);
                	t_5 = (((((x * log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                	tmp = 0.0;
                	if (t_5 <= -Inf)
                		tmp = (1.0 * t_3) + (y * i);
                	elseif (t_5 <= -2e+62)
                		tmp = -(-1.0 * t_1);
                	elseif (t_5 <= 4e+307)
                		tmp = t_4 + (t_3 + (log(c) * (b - 0.5)));
                	else
                		tmp = ((t_4 / t_3) * t_3) + (y * i);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] + t$95$4), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], N[(N[(1.0 * t$95$3), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, -2e+62], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$5, 4e+307], N[(t$95$4 + N[(t$95$3 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$4 / t$95$3), $MachinePrecision] * t$95$3), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]]]]]
                
                \begin{array}{l}
                t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                \mathbf{if}\;t\_5 \leq -\infty:\\
                \;\;\;\;1 \cdot t\_3 + y \cdot i\\
                
                \mathbf{elif}\;t\_5 \leq -2 \cdot 10^{+62}:\\
                \;\;\;\;--1 \cdot t\_1\\
                
                \mathbf{elif}\;t\_5 \leq 4 \cdot 10^{+307}:\\
                \;\;\;\;t\_4 + \left(t\_3 + \log c \cdot \left(b - 0.5\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{t\_4}{t\_3} \cdot t\_3 + y \cdot i\\
                
                
                \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. Step-by-step derivation
                    1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{1} \cdot t + y \cdot i \]

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

                    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 y around -inf

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

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

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

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

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

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

                      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                      \[\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.f6415.6%

                        \[\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.f6415.6%

                        \[\leadsto -\left(-a\right) \]
                    9. Applied rewrites15.6%

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

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

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

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

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

                    1. Initial program 99.8%

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

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

                        \[\leadsto a + \color{blue}{\left(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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(t + \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.1%

                        \[\leadsto 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) \]
                    4. Applied rewrites84.1%

                      \[\leadsto \color{blue}{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)} \]
                    5. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto a + \left(t + \log c \cdot \left(b - 0.5\right)\right) \]
                    10. Applied rewrites46.1%

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

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{a}{t}} \cdot t + y \cdot i \]
                    5. Step-by-step derivation
                      1. lower-/.f6431.9%

                        \[\leadsto \frac{a}{\color{blue}{t}} \cdot t + y \cdot i \]
                    6. Applied rewrites31.9%

                      \[\leadsto \color{blue}{\frac{a}{t}} \cdot t + y \cdot i \]
                  6. Recombined 4 regimes into one program.
                  7. Add Preprocessing

                  Alternative 13: 57.6% accurate, 0.1× speedup?

                  \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_5 := \mathsf{fma}\left(y, i, \frac{t\_4 \cdot t\_3}{t\_3}\right)\\ t_6 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_6 \leq -\infty:\\ \;\;\;\;1 \cdot t\_3 + y \cdot i\\ \mathbf{elif}\;t\_6 \leq -1 \cdot 10^{+103}:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+237}:\\ \;\;\;\;t\_5\\ \mathbf{elif}\;t\_6 \leq 4 \cdot 10^{+303}:\\ \;\;\;\;-\left(-t\_4\right)\\ \mathbf{else}:\\ \;\;\;\;t\_5\\ \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (let* ((t_1 (fmin (fmin z t) a))
                          (t_2 (fmax (fmin z t) a))
                          (t_3 (fmin (fmax z t) t_2))
                          (t_4 (fmax (fmax z t) t_2))
                          (t_5 (fma y i (/ (* t_4 t_3) t_3)))
                          (t_6
                           (+
                            (+ (+ (+ (+ (* x (log y)) t_1) t_3) t_4) (* (- b 0.5) (log c)))
                            (* y i))))
                     (if (<= t_6 (- INFINITY))
                       (+ (* 1.0 t_3) (* y i))
                       (if (<= t_6 -1e+103)
                         (- (* -1.0 t_1))
                         (if (<= t_6 2e+237) t_5 (if (<= t_6 4e+303) (- (- t_4)) t_5))))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = fmin(fmin(z, t), a);
                  	double t_2 = fmax(fmin(z, t), a);
                  	double t_3 = fmin(fmax(z, t), t_2);
                  	double t_4 = fmax(fmax(z, t), t_2);
                  	double t_5 = fma(y, i, ((t_4 * t_3) / t_3));
                  	double t_6 = (((((x * log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                  	double tmp;
                  	if (t_6 <= -((double) INFINITY)) {
                  		tmp = (1.0 * t_3) + (y * i);
                  	} else if (t_6 <= -1e+103) {
                  		tmp = -(-1.0 * t_1);
                  	} else if (t_6 <= 2e+237) {
                  		tmp = t_5;
                  	} else if (t_6 <= 4e+303) {
                  		tmp = -(-t_4);
                  	} else {
                  		tmp = t_5;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = fmin(fmin(z, t), a)
                  	t_2 = fmax(fmin(z, t), a)
                  	t_3 = fmin(fmax(z, t), t_2)
                  	t_4 = fmax(fmax(z, t), t_2)
                  	t_5 = fma(y, i, Float64(Float64(t_4 * t_3) / t_3))
                  	t_6 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + t_3) + t_4) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                  	tmp = 0.0
                  	if (t_6 <= Float64(-Inf))
                  		tmp = Float64(Float64(1.0 * t_3) + Float64(y * i));
                  	elseif (t_6 <= -1e+103)
                  		tmp = Float64(-Float64(-1.0 * t_1));
                  	elseif (t_6 <= 2e+237)
                  		tmp = t_5;
                  	elseif (t_6 <= 4e+303)
                  		tmp = Float64(-Float64(-t_4));
                  	else
                  		tmp = t_5;
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(y * i + N[(N[(t$95$4 * t$95$3), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] + t$95$4), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, (-Infinity)], N[(N[(1.0 * t$95$3), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, -1e+103], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$6, 2e+237], t$95$5, If[LessEqual[t$95$6, 4e+303], (-(-t$95$4)), t$95$5]]]]]]]]]]
                  
                  \begin{array}{l}
                  t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                  t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                  t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                  t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                  t_5 := \mathsf{fma}\left(y, i, \frac{t\_4 \cdot t\_3}{t\_3}\right)\\
                  t_6 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                  \mathbf{if}\;t\_6 \leq -\infty:\\
                  \;\;\;\;1 \cdot t\_3 + y \cdot i\\
                  
                  \mathbf{elif}\;t\_6 \leq -1 \cdot 10^{+103}:\\
                  \;\;\;\;--1 \cdot t\_1\\
                  
                  \mathbf{elif}\;t\_6 \leq 2 \cdot 10^{+237}:\\
                  \;\;\;\;t\_5\\
                  
                  \mathbf{elif}\;t\_6 \leq 4 \cdot 10^{+303}:\\
                  \;\;\;\;-\left(-t\_4\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_5\\
                  
                  
                  \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. Step-by-step derivation
                      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{1} \cdot t + y \cdot i \]

                      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)) < -1e103

                      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 y around -inf

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

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

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

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

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

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

                        \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                        \[\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.f6415.6%

                          \[\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.f6415.6%

                          \[\leadsto -\left(-a\right) \]
                      9. Applied rewrites15.6%

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

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

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

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

                      if -1e103 < (+.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.99999999999999988e237 or 4e303 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(y, i, \frac{\color{blue}{a \cdot t}}{t}\right) \]
                      7. Step-by-step derivation
                        1. lower-*.f6433.7%

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

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

                      if 1.99999999999999988e237 < (+.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)) < 4e303

                      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 y around -inf

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

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

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

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

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

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

                        \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                        \[\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.f6415.6%

                          \[\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.f6415.6%

                          \[\leadsto -\left(-a\right) \]
                      9. Applied rewrites15.6%

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

                    Alternative 14: 56.9% accurate, 0.1× speedup?

                    \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_5 \leq -\infty:\\ \;\;\;\;1 \cdot t\_3 + y \cdot i\\ \mathbf{elif}\;t\_5 \leq -1 \cdot 10^{+103}:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_5 \leq 4 \cdot 10^{+295}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \frac{t\_4 \cdot t\_3}{t\_3}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_4}{t\_3} \cdot t\_3 + y \cdot i\\ \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1 (fmin (fmin z t) a))
                            (t_2 (fmax (fmin z t) a))
                            (t_3 (fmin (fmax z t) t_2))
                            (t_4 (fmax (fmax z t) t_2))
                            (t_5
                             (+
                              (+ (+ (+ (+ (* x (log y)) t_1) t_3) t_4) (* (- b 0.5) (log c)))
                              (* y i))))
                       (if (<= t_5 (- INFINITY))
                         (+ (* 1.0 t_3) (* y i))
                         (if (<= t_5 -1e+103)
                           (- (* -1.0 t_1))
                           (if (<= t_5 4e+295)
                             (fma y i (/ (* t_4 t_3) t_3))
                             (+ (* (/ t_4 t_3) t_3) (* y i)))))))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = fmin(fmin(z, t), a);
                    	double t_2 = fmax(fmin(z, t), a);
                    	double t_3 = fmin(fmax(z, t), t_2);
                    	double t_4 = fmax(fmax(z, t), t_2);
                    	double t_5 = (((((x * log(y)) + t_1) + t_3) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                    	double tmp;
                    	if (t_5 <= -((double) INFINITY)) {
                    		tmp = (1.0 * t_3) + (y * i);
                    	} else if (t_5 <= -1e+103) {
                    		tmp = -(-1.0 * t_1);
                    	} else if (t_5 <= 4e+295) {
                    		tmp = fma(y, i, ((t_4 * t_3) / t_3));
                    	} else {
                    		tmp = ((t_4 / t_3) * t_3) + (y * i);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = fmin(fmin(z, t), a)
                    	t_2 = fmax(fmin(z, t), a)
                    	t_3 = fmin(fmax(z, t), t_2)
                    	t_4 = fmax(fmax(z, t), t_2)
                    	t_5 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + t_3) + t_4) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                    	tmp = 0.0
                    	if (t_5 <= Float64(-Inf))
                    		tmp = Float64(Float64(1.0 * t_3) + Float64(y * i));
                    	elseif (t_5 <= -1e+103)
                    		tmp = Float64(-Float64(-1.0 * t_1));
                    	elseif (t_5 <= 4e+295)
                    		tmp = fma(y, i, Float64(Float64(t_4 * t_3) / t_3));
                    	else
                    		tmp = Float64(Float64(Float64(t_4 / t_3) * t_3) + Float64(y * i));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] + t$95$4), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], N[(N[(1.0 * t$95$3), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, -1e+103], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$5, 4e+295], N[(y * i + N[(N[(t$95$4 * t$95$3), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$4 / t$95$3), $MachinePrecision] * t$95$3), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]]]]]
                    
                    \begin{array}{l}
                    t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                    t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                    t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                    t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                    t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                    \mathbf{if}\;t\_5 \leq -\infty:\\
                    \;\;\;\;1 \cdot t\_3 + y \cdot i\\
                    
                    \mathbf{elif}\;t\_5 \leq -1 \cdot 10^{+103}:\\
                    \;\;\;\;--1 \cdot t\_1\\
                    
                    \mathbf{elif}\;t\_5 \leq 4 \cdot 10^{+295}:\\
                    \;\;\;\;\mathsf{fma}\left(y, i, \frac{t\_4 \cdot t\_3}{t\_3}\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{t\_4}{t\_3} \cdot t\_3 + y \cdot i\\
                    
                    
                    \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. Step-by-step derivation
                        1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{1} \cdot t + y \cdot i \]

                        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)) < -1e103

                        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 y around -inf

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

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

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

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

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

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

                          \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                          \[\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.f6415.6%

                            \[\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.f6415.6%

                            \[\leadsto -\left(-a\right) \]
                        9. Applied rewrites15.6%

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

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

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

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

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

                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(y, i, \frac{\color{blue}{a \cdot t}}{t}\right) \]
                        7. Step-by-step derivation
                          1. lower-*.f6433.7%

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

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

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

                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\frac{a}{t}} \cdot t + y \cdot i \]
                        5. Step-by-step derivation
                          1. lower-/.f6431.9%

                            \[\leadsto \frac{a}{\color{blue}{t}} \cdot t + y \cdot i \]
                        6. Applied rewrites31.9%

                          \[\leadsto \color{blue}{\frac{a}{t}} \cdot t + y \cdot i \]
                      6. Recombined 4 regimes into one program.
                      7. Add Preprocessing

                      Alternative 15: 56.9% accurate, 0.2× speedup?

                      \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_4 := 1 \cdot t\_3 + y \cdot i\\ t_5 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ t_6 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_5\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_6 \leq -\infty:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_6 \leq -2 \cdot 10^{+17}:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_6 \leq 10^{+308}:\\ \;\;\;\;-\left(-t\_5\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \]
                      (FPCore (x y z t a b c i)
                       :precision binary64
                       (let* ((t_1 (fmin (fmin z t) a))
                              (t_2 (fmax (fmin z t) a))
                              (t_3 (fmin (fmax z t) t_2))
                              (t_4 (+ (* 1.0 t_3) (* y i)))
                              (t_5 (fmax (fmax z t) t_2))
                              (t_6
                               (+
                                (+ (+ (+ (+ (* x (log y)) t_1) t_3) t_5) (* (- b 0.5) (log c)))
                                (* y i))))
                         (if (<= t_6 (- INFINITY))
                           t_4
                           (if (<= t_6 -2e+17)
                             (- (* -1.0 t_1))
                             (if (<= t_6 1e+308) (- (- t_5)) t_4)))))
                      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                      	double t_1 = fmin(fmin(z, t), a);
                      	double t_2 = fmax(fmin(z, t), a);
                      	double t_3 = fmin(fmax(z, t), t_2);
                      	double t_4 = (1.0 * t_3) + (y * i);
                      	double t_5 = fmax(fmax(z, t), t_2);
                      	double t_6 = (((((x * log(y)) + t_1) + t_3) + t_5) + ((b - 0.5) * log(c))) + (y * i);
                      	double tmp;
                      	if (t_6 <= -((double) INFINITY)) {
                      		tmp = t_4;
                      	} else if (t_6 <= -2e+17) {
                      		tmp = -(-1.0 * t_1);
                      	} else if (t_6 <= 1e+308) {
                      		tmp = -(-t_5);
                      	} else {
                      		tmp = t_4;
                      	}
                      	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 = fmin(fmin(z, t), a);
                      	double t_2 = fmax(fmin(z, t), a);
                      	double t_3 = fmin(fmax(z, t), t_2);
                      	double t_4 = (1.0 * t_3) + (y * i);
                      	double t_5 = fmax(fmax(z, t), t_2);
                      	double t_6 = (((((x * Math.log(y)) + t_1) + t_3) + t_5) + ((b - 0.5) * Math.log(c))) + (y * i);
                      	double tmp;
                      	if (t_6 <= -Double.POSITIVE_INFINITY) {
                      		tmp = t_4;
                      	} else if (t_6 <= -2e+17) {
                      		tmp = -(-1.0 * t_1);
                      	} else if (t_6 <= 1e+308) {
                      		tmp = -(-t_5);
                      	} else {
                      		tmp = t_4;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b, c, i):
                      	t_1 = fmin(fmin(z, t), a)
                      	t_2 = fmax(fmin(z, t), a)
                      	t_3 = fmin(fmax(z, t), t_2)
                      	t_4 = (1.0 * t_3) + (y * i)
                      	t_5 = fmax(fmax(z, t), t_2)
                      	t_6 = (((((x * math.log(y)) + t_1) + t_3) + t_5) + ((b - 0.5) * math.log(c))) + (y * i)
                      	tmp = 0
                      	if t_6 <= -math.inf:
                      		tmp = t_4
                      	elif t_6 <= -2e+17:
                      		tmp = -(-1.0 * t_1)
                      	elif t_6 <= 1e+308:
                      		tmp = -(-t_5)
                      	else:
                      		tmp = t_4
                      	return tmp
                      
                      function code(x, y, z, t, a, b, c, i)
                      	t_1 = fmin(fmin(z, t), a)
                      	t_2 = fmax(fmin(z, t), a)
                      	t_3 = fmin(fmax(z, t), t_2)
                      	t_4 = Float64(Float64(1.0 * t_3) + Float64(y * i))
                      	t_5 = fmax(fmax(z, t), t_2)
                      	t_6 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + t_3) + t_5) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                      	tmp = 0.0
                      	if (t_6 <= Float64(-Inf))
                      		tmp = t_4;
                      	elseif (t_6 <= -2e+17)
                      		tmp = Float64(-Float64(-1.0 * t_1));
                      	elseif (t_6 <= 1e+308)
                      		tmp = Float64(-Float64(-t_5));
                      	else
                      		tmp = t_4;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b, c, i)
                      	t_1 = min(min(z, t), a);
                      	t_2 = max(min(z, t), a);
                      	t_3 = min(max(z, t), t_2);
                      	t_4 = (1.0 * t_3) + (y * i);
                      	t_5 = max(max(z, t), t_2);
                      	t_6 = (((((x * log(y)) + t_1) + t_3) + t_5) + ((b - 0.5) * log(c))) + (y * i);
                      	tmp = 0.0;
                      	if (t_6 <= -Inf)
                      		tmp = t_4;
                      	elseif (t_6 <= -2e+17)
                      		tmp = -(-1.0 * t_1);
                      	elseif (t_6 <= 1e+308)
                      		tmp = -(-t_5);
                      	else
                      		tmp = t_4;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(N[(1.0 * t$95$3), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision] + t$95$5), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, (-Infinity)], t$95$4, If[LessEqual[t$95$6, -2e+17], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$6, 1e+308], (-(-t$95$5)), t$95$4]]]]]]]]]
                      
                      \begin{array}{l}
                      t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                      t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                      t_3 := \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                      t_4 := 1 \cdot t\_3 + y \cdot i\\
                      t_5 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                      t_6 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + t\_3\right) + t\_5\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                      \mathbf{if}\;t\_6 \leq -\infty:\\
                      \;\;\;\;t\_4\\
                      
                      \mathbf{elif}\;t\_6 \leq -2 \cdot 10^{+17}:\\
                      \;\;\;\;--1 \cdot t\_1\\
                      
                      \mathbf{elif}\;t\_6 \leq 10^{+308}:\\
                      \;\;\;\;-\left(-t\_5\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_4\\
                      
                      
                      \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 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. Step-by-step derivation
                          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{1} \cdot t + y \cdot i \]

                          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)) < -2e17

                          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 y around -inf

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

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

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

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

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

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

                            \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                            \[\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.f6415.6%

                              \[\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.f6415.6%

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites15.6%

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

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

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

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

                          if -2e17 < (+.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 y around -inf

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

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

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

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

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

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

                            \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                            \[\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.f6415.6%

                              \[\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.f6415.6%

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites15.6%

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

                        Alternative 16: 55.9% accurate, 0.2× speedup?

                        \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := --1 \cdot \left(i \cdot y\right)\\ t_3 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_3\right)\\ t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_3\right)\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ \mathbf{if}\;t\_5 \leq -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_5 \leq -2 \cdot 10^{+17}:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{elif}\;t\_5 \leq 10^{+308}:\\ \;\;\;\;-\left(-t\_4\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
                        (FPCore (x y z t a b c i)
                         :precision binary64
                         (let* ((t_1 (fmin (fmin z t) a))
                                (t_2 (- (* -1.0 (* i y))))
                                (t_3 (fmax (fmin z t) a))
                                (t_4 (fmax (fmax z t) t_3))
                                (t_5
                                 (+
                                  (+
                                   (+ (+ (+ (* x (log y)) t_1) (fmin (fmax z t) t_3)) t_4)
                                   (* (- b 0.5) (log c)))
                                  (* y i))))
                           (if (<= t_5 (- INFINITY))
                             t_2
                             (if (<= t_5 -2e+17)
                               (- (* -1.0 t_1))
                               (if (<= t_5 1e+308) (- (- t_4)) t_2)))))
                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	double t_1 = fmin(fmin(z, t), a);
                        	double t_2 = -(-1.0 * (i * y));
                        	double t_3 = fmax(fmin(z, t), a);
                        	double t_4 = fmax(fmax(z, t), t_3);
                        	double t_5 = (((((x * log(y)) + t_1) + fmin(fmax(z, t), t_3)) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                        	double tmp;
                        	if (t_5 <= -((double) INFINITY)) {
                        		tmp = t_2;
                        	} else if (t_5 <= -2e+17) {
                        		tmp = -(-1.0 * t_1);
                        	} else if (t_5 <= 1e+308) {
                        		tmp = -(-t_4);
                        	} else {
                        		tmp = t_2;
                        	}
                        	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 = fmin(fmin(z, t), a);
                        	double t_2 = -(-1.0 * (i * y));
                        	double t_3 = fmax(fmin(z, t), a);
                        	double t_4 = fmax(fmax(z, t), t_3);
                        	double t_5 = (((((x * Math.log(y)) + t_1) + fmin(fmax(z, t), t_3)) + t_4) + ((b - 0.5) * Math.log(c))) + (y * i);
                        	double tmp;
                        	if (t_5 <= -Double.POSITIVE_INFINITY) {
                        		tmp = t_2;
                        	} else if (t_5 <= -2e+17) {
                        		tmp = -(-1.0 * t_1);
                        	} else if (t_5 <= 1e+308) {
                        		tmp = -(-t_4);
                        	} else {
                        		tmp = t_2;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b, c, i):
                        	t_1 = fmin(fmin(z, t), a)
                        	t_2 = -(-1.0 * (i * y))
                        	t_3 = fmax(fmin(z, t), a)
                        	t_4 = fmax(fmax(z, t), t_3)
                        	t_5 = (((((x * math.log(y)) + t_1) + fmin(fmax(z, t), t_3)) + t_4) + ((b - 0.5) * math.log(c))) + (y * i)
                        	tmp = 0
                        	if t_5 <= -math.inf:
                        		tmp = t_2
                        	elif t_5 <= -2e+17:
                        		tmp = -(-1.0 * t_1)
                        	elif t_5 <= 1e+308:
                        		tmp = -(-t_4)
                        	else:
                        		tmp = t_2
                        	return tmp
                        
                        function code(x, y, z, t, a, b, c, i)
                        	t_1 = fmin(fmin(z, t), a)
                        	t_2 = Float64(-Float64(-1.0 * Float64(i * y)))
                        	t_3 = fmax(fmin(z, t), a)
                        	t_4 = fmax(fmax(z, t), t_3)
                        	t_5 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + fmin(fmax(z, t), t_3)) + t_4) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                        	tmp = 0.0
                        	if (t_5 <= Float64(-Inf))
                        		tmp = t_2;
                        	elseif (t_5 <= -2e+17)
                        		tmp = Float64(-Float64(-1.0 * t_1));
                        	elseif (t_5 <= 1e+308)
                        		tmp = Float64(-Float64(-t_4));
                        	else
                        		tmp = t_2;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b, c, i)
                        	t_1 = min(min(z, t), a);
                        	t_2 = -(-1.0 * (i * y));
                        	t_3 = max(min(z, t), a);
                        	t_4 = max(max(z, t), t_3);
                        	t_5 = (((((x * log(y)) + t_1) + min(max(z, t), t_3)) + t_4) + ((b - 0.5) * log(c))) + (y * i);
                        	tmp = 0.0;
                        	if (t_5 <= -Inf)
                        		tmp = t_2;
                        	elseif (t_5 <= -2e+17)
                        		tmp = -(-1.0 * t_1);
                        	elseif (t_5 <= 1e+308)
                        		tmp = -(-t_4);
                        	else
                        		tmp = t_2;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = (-N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision])}, Block[{t$95$3 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$4 = N[Max[N[Max[z, t], $MachinePrecision], t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[Min[N[Max[z, t], $MachinePrecision], t$95$3], $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, (-Infinity)], t$95$2, If[LessEqual[t$95$5, -2e+17], (-N[(-1.0 * t$95$1), $MachinePrecision]), If[LessEqual[t$95$5, 1e+308], (-(-t$95$4)), t$95$2]]]]]]]]
                        
                        \begin{array}{l}
                        t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                        t_2 := --1 \cdot \left(i \cdot y\right)\\
                        t_3 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                        t_4 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_3\right)\\
                        t_5 := \left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_3\right)\right) + t\_4\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                        \mathbf{if}\;t\_5 \leq -\infty:\\
                        \;\;\;\;t\_2\\
                        
                        \mathbf{elif}\;t\_5 \leq -2 \cdot 10^{+17}:\\
                        \;\;\;\;--1 \cdot t\_1\\
                        
                        \mathbf{elif}\;t\_5 \leq 10^{+308}:\\
                        \;\;\;\;-\left(-t\_4\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_2\\
                        
                        
                        \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 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 y around -inf

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

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

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

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

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

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

                            \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                            \[\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.f6415.6%

                              \[\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.f6415.6%

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites15.6%

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

                            \[\leadsto --1 \cdot \left(i \cdot y\right) \]
                          11. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto --1 \cdot \left(i \cdot y\right) \]
                            2. lower-*.f6424.7%

                              \[\leadsto --1 \cdot \left(i \cdot y\right) \]
                          12. Applied rewrites24.7%

                            \[\leadsto --1 \cdot \left(i \cdot y\right) \]

                          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)) < -2e17

                          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 y around -inf

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

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

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

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

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

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

                            \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                            \[\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.f6415.6%

                              \[\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.f6415.6%

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites15.6%

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

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

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

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

                          if -2e17 < (+.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 y around -inf

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

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

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

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

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

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

                            \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                            \[\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.f6415.6%

                              \[\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.f6415.6%

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites15.6%

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

                        Alternative 17: 44.4% accurate, 0.4× speedup?

                        \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\ t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\ \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -2 \cdot 10^{+17}:\\ \;\;\;\;--1 \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;-\left(-t\_3\right)\\ \end{array} \]
                        (FPCore (x y z t a b c i)
                         :precision binary64
                         (let* ((t_1 (fmin (fmin z t) a))
                                (t_2 (fmax (fmin z t) a))
                                (t_3 (fmax (fmax z t) t_2)))
                           (if (<=
                                (+
                                 (+
                                  (+ (+ (+ (* x (log y)) t_1) (fmin (fmax z t) t_2)) t_3)
                                  (* (- b 0.5) (log c)))
                                 (* y i))
                                -2e+17)
                             (- (* -1.0 t_1))
                             (- (- t_3)))))
                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	double t_1 = fmin(fmin(z, t), a);
                        	double t_2 = fmax(fmin(z, t), a);
                        	double t_3 = fmax(fmax(z, t), t_2);
                        	double tmp;
                        	if (((((((x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * log(c))) + (y * i)) <= -2e+17) {
                        		tmp = -(-1.0 * t_1);
                        	} else {
                        		tmp = -(-t_3);
                        	}
                        	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) :: t_2
                            real(8) :: t_3
                            real(8) :: tmp
                            t_1 = fmin(fmin(z, t), a)
                            t_2 = fmax(fmin(z, t), a)
                            t_3 = fmax(fmax(z, t), t_2)
                            if (((((((x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-2d+17)) then
                                tmp = -((-1.0d0) * t_1)
                            else
                                tmp = -(-t_3)
                            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 = fmin(fmin(z, t), a);
                        	double t_2 = fmax(fmin(z, t), a);
                        	double t_3 = fmax(fmax(z, t), t_2);
                        	double tmp;
                        	if (((((((x * Math.log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -2e+17) {
                        		tmp = -(-1.0 * t_1);
                        	} else {
                        		tmp = -(-t_3);
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a, b, c, i):
                        	t_1 = fmin(fmin(z, t), a)
                        	t_2 = fmax(fmin(z, t), a)
                        	t_3 = fmax(fmax(z, t), t_2)
                        	tmp = 0
                        	if ((((((x * math.log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + ((b - 0.5) * math.log(c))) + (y * i)) <= -2e+17:
                        		tmp = -(-1.0 * t_1)
                        	else:
                        		tmp = -(-t_3)
                        	return tmp
                        
                        function code(x, y, z, t, a, b, c, i)
                        	t_1 = fmin(fmin(z, t), a)
                        	t_2 = fmax(fmin(z, t), a)
                        	t_3 = fmax(fmax(z, t), t_2)
                        	tmp = 0.0
                        	if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + t_1) + fmin(fmax(z, t), t_2)) + t_3) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -2e+17)
                        		tmp = Float64(-Float64(-1.0 * t_1));
                        	else
                        		tmp = Float64(-Float64(-t_3));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a, b, c, i)
                        	t_1 = min(min(z, t), a);
                        	t_2 = max(min(z, t), a);
                        	t_3 = max(max(z, t), t_2);
                        	tmp = 0.0;
                        	if (((((((x * log(y)) + t_1) + min(max(z, t), t_2)) + t_3) + ((b - 0.5) * log(c))) + (y * i)) <= -2e+17)
                        		tmp = -(-1.0 * t_1);
                        	else
                        		tmp = -(-t_3);
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[Min[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[z, t], $MachinePrecision], a], $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[Min[N[Max[z, t], $MachinePrecision], t$95$2], $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -2e+17], (-N[(-1.0 * t$95$1), $MachinePrecision]), (-(-t$95$3))]]]]
                        
                        \begin{array}{l}
                        t_1 := \mathsf{min}\left(\mathsf{min}\left(z, t\right), a\right)\\
                        t_2 := \mathsf{max}\left(\mathsf{min}\left(z, t\right), a\right)\\
                        t_3 := \mathsf{max}\left(\mathsf{max}\left(z, t\right), t\_2\right)\\
                        \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + t\_1\right) + \mathsf{min}\left(\mathsf{max}\left(z, t\right), t\_2\right)\right) + t\_3\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -2 \cdot 10^{+17}:\\
                        \;\;\;\;--1 \cdot t\_1\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;-\left(-t\_3\right)\\
                        
                        
                        \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)) < -2e17

                          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 y around -inf

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

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

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

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

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

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

                            \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                            \[\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.f6415.6%

                              \[\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.f6415.6%

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites15.6%

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

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

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

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

                          if -2e17 < (+.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 y around -inf

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

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

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

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

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

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

                            \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                            \[\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.f6415.6%

                              \[\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.f6415.6%

                              \[\leadsto -\left(-a\right) \]
                          9. Applied rewrites15.6%

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

                        Alternative 18: 22.5% accurate, 4.2× speedup?

                        \[-\left(-\mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\right) \]
                        (FPCore (x y z t a b c i) :precision binary64 (- (- (fmax t (fmax z a)))))
                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	return -(-fmax(t, fmax(z, 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 = -(-fmax(t, fmax(z, a)))
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                        	return -(-fmax(t, fmax(z, a)));
                        }
                        
                        def code(x, y, z, t, a, b, c, i):
                        	return -(-fmax(t, fmax(z, a)))
                        
                        function code(x, y, z, t, a, b, c, i)
                        	return Float64(-Float64(-fmax(t, fmax(z, a))))
                        end
                        
                        function tmp = code(x, y, z, t, a, b, c, i)
                        	tmp = -(-max(t, max(z, a)));
                        end
                        
                        code[x_, y_, z_, t_, a_, b_, c_, i_] := (-(-N[Max[t, N[Max[z, a], $MachinePrecision]], $MachinePrecision]))
                        
                        -\left(-\mathsf{max}\left(t, \mathsf{max}\left(z, a\right)\right)\right)
                        
                        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 y around -inf

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

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

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

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

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

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

                          \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, i, -1 \cdot \frac{a + \left(t + \left(z + \mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \log c \cdot \left(b - 0.5\right)\right)\right)\right)}{y}\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-*.f6415.6%

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

                          \[\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.f6415.6%

                            \[\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.f6415.6%

                            \[\leadsto -\left(-a\right) \]
                        9. Applied rewrites15.6%

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

                        Reproduce

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