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

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

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
  2. Add Preprocessing
  3. 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.4

      \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 45.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -100:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, z\right)\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -1.00000000000000002e306 or 2.0000000000000001e299 < (+.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 97.3%

      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
    2. Add Preprocessing
    3. 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.f6497.3

        \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{x \cdot \log y}\right) \]
    6. Step-by-step derivation
      1. Applied rewrites94.7%

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

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\log c \cdot \sqrt{b - \frac{1}{2}}, \sqrt{b - \frac{1}{2}}, \color{blue}{z}\right) \]
      6. Step-by-step derivation
        1. Applied rewrites13.9%

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

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

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

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

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

            \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
          6. add-sqr-sqrtN/A

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

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

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

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

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

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\log c \cdot \sqrt{b - \frac{1}{2}}, \sqrt{b - \frac{1}{2}}, \color{blue}{z}\right) \]
        6. Step-by-step derivation
          1. Applied rewrites14.0%

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

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

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

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

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

              \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
            6. add-sqr-sqrtN/A

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

              \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + z \]
            8. lower-fma.f6442.1

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

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

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

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

          Alternative 3: 44.3% accurate, 0.3× speedup?

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

            1. Initial program 99.9%

              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
            2. Add Preprocessing
            3. 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.9

                \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                  6. add-sqr-sqrtN/A

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

                    \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + z \]
                  8. lower-fma.f6442.5

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

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

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\log c \cdot \sqrt{b - \frac{1}{2}}, \sqrt{b - \frac{1}{2}}, \color{blue}{z}\right) \]
                6. Step-by-step derivation
                  1. Applied rewrites14.0%

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

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

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

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

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

                      \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                    6. add-sqr-sqrtN/A

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

                      \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + z \]
                    8. lower-fma.f6442.1

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

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

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

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

                    if 2.0000000000000001e299 < (+.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 95.8%

                      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                    2. Add Preprocessing
                    3. 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.f6495.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 4: 44.2% accurate, 0.3× speedup?

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

                      1. Initial program 99.9%

                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                      2. Add Preprocessing
                      3. 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.9

                          \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -4.9999999999999999e294 < (+.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)) < -2e6

                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\log c \cdot \sqrt{b - \frac{1}{2}}, \sqrt{b - \frac{1}{2}}, \color{blue}{z}\right) \]
                        6. Step-by-step derivation
                          1. Applied rewrites12.5%

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

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

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

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

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

                              \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                            6. add-sqr-sqrtN/A

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

                              \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + z \]
                            8. lower-fma.f6441.2

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

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

                            \[\leadsto \mathsf{fma}\left(\color{blue}{b}, \log c, z\right) \]
                          5. Step-by-step derivation
                            1. Applied rewrites40.6%

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

                            if -2e6 < (+.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.0000000000000001e299

                            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                                6. add-sqr-sqrtN/A

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

                                  \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + z \]
                                8. lower-fma.f6443.2

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

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

                                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{a}\right) \]
                              5. Step-by-step derivation
                                1. Applied rewrites35.7%

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

                                if 2.0000000000000001e299 < (+.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 95.8%

                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                2. Add Preprocessing
                                3. 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.f6495.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 5: 41.1% accurate, 0.3× speedup?

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

                                  1. Initial program 99.9%

                                    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                  2. Add Preprocessing
                                  3. 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.9

                                      \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -4.9999999999999999e294 < (+.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.99999999999999983e29

                                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(\log c \cdot \sqrt{b - \frac{1}{2}}, \sqrt{b - \frac{1}{2}}, \color{blue}{z}\right) \]
                                    6. Step-by-step derivation
                                      1. Applied rewrites12.8%

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

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

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

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

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

                                          \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                                        6. add-sqr-sqrtN/A

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

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

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

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

                                        \[\leadsto \mathsf{fma}\left(\color{blue}{b}, \log c, z\right) \]
                                      5. Step-by-step derivation
                                        1. Applied rewrites40.9%

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

                                        if -1.99999999999999983e29 < (+.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)) < 200

                                        1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(\log c \cdot \sqrt{b - \frac{1}{2}}, \sqrt{b - \frac{1}{2}}, \color{blue}{z}\right) \]
                                        6. Step-by-step derivation
                                          1. Applied rewrites0.0%

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

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

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

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

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

                                              \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                                            6. add-sqr-sqrtN/A

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

                                              \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + z \]
                                            8. lower-fma.f6481.3

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

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

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

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

                                            if 200 < (+.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.1%

                                              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                            2. Add Preprocessing
                                            3. 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.1

                                                \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 6: 28.2% accurate, 0.3× speedup?

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

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

                                                \[\leadsto \color{blue}{i \cdot y} \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites94.0%

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

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

                                                1. Initial program 99.8%

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

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

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

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

                                                  1. Initial program 99.8%

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

                                                    \[\leadsto \color{blue}{a} \]
                                                  4. Step-by-step derivation
                                                    1. Applied rewrites14.6%

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

                                                  Alternative 7: 57.4% accurate, 0.4× speedup?

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

                                                    1. Initial program 99.8%

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

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

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

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

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

                                                        if 5.00000000000000011e63 < (+.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.0000000000000001e299

                                                        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(\log c \cdot \sqrt{b - \frac{1}{2}}, \sqrt{b - \frac{1}{2}}, \color{blue}{z}\right) \]
                                                        6. Step-by-step derivation
                                                          1. Applied rewrites14.0%

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

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

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

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

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

                                                              \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                                                            6. add-sqr-sqrtN/A

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

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

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

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

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

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

                                                            if 2.0000000000000001e299 < (+.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 95.8%

                                                              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                            2. Add Preprocessing
                                                            3. 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.f6495.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{x \cdot \log y}\right) \]
                                                            6. Step-by-step derivation
                                                              1. Applied rewrites91.9%

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

                                                            Alternative 8: 49.7% accurate, 0.4× speedup?

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

                                                              1. Initial program 99.8%

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

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

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

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

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

                                                                  if -2e6 < (+.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.0000000000000001e299

                                                                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                                                                      6. add-sqr-sqrtN/A

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

                                                                        \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + z \]
                                                                      8. lower-fma.f6443.2

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

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

                                                                      \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{a}\right) \]
                                                                    5. Step-by-step derivation
                                                                      1. Applied rewrites35.7%

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

                                                                      if 2.0000000000000001e299 < (+.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 95.8%

                                                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                      2. Add Preprocessing
                                                                      3. 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.f6495.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \mathsf{fma}\left(y, i, \color{blue}{x \cdot \log y}\right) \]
                                                                      6. Step-by-step derivation
                                                                        1. Applied rewrites91.9%

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

                                                                      Alternative 9: 38.8% accurate, 0.4× speedup?

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

                                                                        1. Initial program 99.8%

                                                                          \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                        2. Add Preprocessing
                                                                        3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if -1.99999999999999983e29 < (+.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)) < 200

                                                                          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto \mathsf{fma}\left(\log c \cdot \sqrt{b - \frac{1}{2}}, \sqrt{b - \frac{1}{2}}, \color{blue}{z}\right) \]
                                                                          6. Step-by-step derivation
                                                                            1. Applied rewrites0.0%

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

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

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

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

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

                                                                                \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                                                                              6. add-sqr-sqrtN/A

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

                                                                                \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + z \]
                                                                              8. lower-fma.f6481.3

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

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

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

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

                                                                              if 200 < (+.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.1%

                                                                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                              2. Add Preprocessing
                                                                              3. 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.1

                                                                                  \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              Alternative 10: 34.0% accurate, 0.5× speedup?

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

                                                                                1. Initial program 100.0%

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

                                                                                  \[\leadsto \color{blue}{i \cdot y} \]
                                                                                4. Step-by-step derivation
                                                                                  1. Applied rewrites100.0%

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

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

                                                                                  1. Initial program 99.8%

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

                                                                                    \[\leadsto \color{blue}{z} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. Applied rewrites16.5%

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

                                                                                    if -1e114 < (+.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.2%

                                                                                      \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                    2. Add Preprocessing
                                                                                    3. 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.2

                                                                                        \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    Alternative 11: 61.7% accurate, 0.7× speedup?

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

                                                                                      1. Initial program 99.8%

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

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

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

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

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

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

                                                                                          1. Initial program 99.1%

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

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

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

                                                                                          Alternative 12: 37.6% accurate, 1.0× speedup?

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

                                                                                            1. Initial program 99.8%

                                                                                              \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                            2. Add Preprocessing
                                                                                            3. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                              1. Initial program 99.1%

                                                                                                \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                              2. Add Preprocessing
                                                                                              3. 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.1

                                                                                                  \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                              Alternative 13: 16.5% accurate, 1.0× speedup?

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

                                                                                                1. Initial program 99.8%

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

                                                                                                  \[\leadsto \color{blue}{z} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. Applied rewrites14.2%

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

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

                                                                                                  1. Initial program 99.1%

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

                                                                                                    \[\leadsto \color{blue}{a} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. Applied rewrites12.6%

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

                                                                                                  Alternative 14: 75.8% accurate, 1.0× speedup?

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

                                                                                                    1. Initial program 99.4%

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

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

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

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

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

                                                                                                        if 1.54999999999999996e94 < a < 6.9999999999999994e213

                                                                                                        1. Initial program 99.8%

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

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

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

                                                                                                          if 6.9999999999999994e213 < a

                                                                                                          1. Initial program 99.8%

                                                                                                            \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                                          2. Add Preprocessing
                                                                                                          3. 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.f64100.0

                                                                                                              \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                          Alternative 15: 75.6% accurate, 1.0× speedup?

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

                                                                                                            1. Initial program 99.4%

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

                                                                                                              \[\leadsto \color{blue}{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. Applied rewrites89.7%

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

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

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

                                                                                                                if 1.54999999999999993e149 < a

                                                                                                                1. Initial program 99.8%

                                                                                                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                                                2. Add Preprocessing
                                                                                                                3. 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.9

                                                                                                                    \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                Alternative 16: 90.5% accurate, 1.0× speedup?

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

                                                                                                                  1. Initial program 99.7%

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

                                                                                                                    \[\leadsto \color{blue}{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                                                                                                  4. Step-by-step derivation
                                                                                                                    1. Applied rewrites99.7%

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

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

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

                                                                                                                      if -1.74999999999999996e216 < x < 6.59999999999999984e136

                                                                                                                      1. Initial program 99.8%

                                                                                                                        \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                                                      2. Add Preprocessing
                                                                                                                      3. 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.9

                                                                                                                          \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                        if 6.59999999999999984e136 < x

                                                                                                                        1. Initial program 97.0%

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

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

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

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

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

                                                                                                                          Alternative 17: 89.6% accurate, 1.1× speedup?

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

                                                                                                                            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                              \[\leadsto \mathsf{fma}\left(\log c \cdot \sqrt{b - \frac{1}{2}}, \sqrt{b - \frac{1}{2}}, \color{blue}{z}\right) \]
                                                                                                                            6. Step-by-step derivation
                                                                                                                              1. Applied rewrites4.7%

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

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

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

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

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

                                                                                                                                  \[\leadsto \log c \cdot \left(\sqrt{b - \frac{1}{2}} \cdot \color{blue}{\sqrt{b - \frac{1}{2}}}\right) + z \]
                                                                                                                                6. add-sqr-sqrtN/A

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

                                                                                                                                  \[\leadsto \color{blue}{\left(b - \frac{1}{2}\right) \cdot \log c} + z \]
                                                                                                                                8. lower-fma.f6412.7

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

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

                                                                                                                                \[\leadsto \mathsf{fma}\left(b - \frac{1}{2}, \log c, \color{blue}{x \cdot \log y}\right) \]
                                                                                                                              5. Step-by-step derivation
                                                                                                                                1. Applied rewrites80.3%

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

                                                                                                                                if -2.5000000000000001e205 < x < 6.59999999999999984e136

                                                                                                                                1. Initial program 99.8%

                                                                                                                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                                                                2. Add Preprocessing
                                                                                                                                3. 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.9

                                                                                                                                    \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                  if 6.59999999999999984e136 < x

                                                                                                                                  1. Initial program 97.0%

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

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

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

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

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

                                                                                                                                    Alternative 18: 90.6% accurate, 1.7× speedup?

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

                                                                                                                                      1. Initial program 98.1%

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

                                                                                                                                        \[\leadsto \color{blue}{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                                                                                                                      4. Step-by-step derivation
                                                                                                                                        1. Applied rewrites89.6%

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

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

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

                                                                                                                                          if -1.1e216 < x < 6.59999999999999984e136

                                                                                                                                          1. Initial program 99.8%

                                                                                                                                            \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                                                                          2. Add Preprocessing
                                                                                                                                          3. 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.9

                                                                                                                                              \[\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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+216} \lor \neg \left(x \leq 6.6 \cdot 10^{+136}\right):\\ \;\;\;\;\mathsf{fma}\left(i, y, z\right) + \log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \left(t + z\right)\right)\right)\\ \end{array} \]
                                                                                                                                          9. Add Preprocessing

                                                                                                                                          Alternative 19: 90.6% accurate, 1.7× speedup?

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

                                                                                                                                            1. Initial program 98.1%

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

                                                                                                                                              \[\leadsto \color{blue}{t + \left(z + \left(i \cdot y + \left(x \cdot \log y + \log c \cdot \left(b - \frac{1}{2}\right)\right)\right)\right)} \]
                                                                                                                                            4. Step-by-step derivation
                                                                                                                                              1. Applied rewrites89.6%

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

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

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

                                                                                                                                                if -1.1e216 < x < 6.59999999999999984e136

                                                                                                                                                1. Initial program 99.8%

                                                                                                                                                  \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \]
                                                                                                                                                2. Add Preprocessing
                                                                                                                                                3. 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)} \]
                                                                                                                                                4. Step-by-step derivation
                                                                                                                                                  1. Applied rewrites95.1%

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

                                                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+216} \lor \neg \left(x \leq 6.6 \cdot 10^{+136}\right):\\ \;\;\;\;\mathsf{fma}\left(i, y, z\right) + \log y \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(a + t\right) + \mathsf{fma}\left(\log c, b - 0.5, \mathsf{fma}\left(i, y, z\right)\right)\\ \end{array} \]
                                                                                                                                                7. Add Preprocessing

                                                                                                                                                Alternative 20: 16.5% accurate, 234.0× speedup?

                                                                                                                                                \[\begin{array}{l} \\ a \end{array} \]
                                                                                                                                                (FPCore (x y z t a b c i) :precision binary64 a)
                                                                                                                                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                                                                                	return a;
                                                                                                                                                }
                                                                                                                                                
                                                                                                                                                module fmin_fmax_functions
                                                                                                                                                    implicit none
                                                                                                                                                    private
                                                                                                                                                    public fmax
                                                                                                                                                    public fmin
                                                                                                                                                
                                                                                                                                                    interface fmax
                                                                                                                                                        module procedure fmax88
                                                                                                                                                        module procedure fmax44
                                                                                                                                                        module procedure fmax84
                                                                                                                                                        module procedure fmax48
                                                                                                                                                    end interface
                                                                                                                                                    interface fmin
                                                                                                                                                        module procedure fmin88
                                                                                                                                                        module procedure fmin44
                                                                                                                                                        module procedure fmin84
                                                                                                                                                        module procedure fmin48
                                                                                                                                                    end interface
                                                                                                                                                contains
                                                                                                                                                    real(8) function fmax88(x, y) result (res)
                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(4) function fmax44(x, y) result (res)
                                                                                                                                                        real(4), intent (in) :: x
                                                                                                                                                        real(4), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmax84(x, y) result(res)
                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                        real(4), intent (in) :: y
                                                                                                                                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmax48(x, y) result(res)
                                                                                                                                                        real(4), intent (in) :: x
                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmin88(x, y) result (res)
                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(4) function fmin44(x, y) result (res)
                                                                                                                                                        real(4), intent (in) :: x
                                                                                                                                                        real(4), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmin84(x, y) result(res)
                                                                                                                                                        real(8), intent (in) :: x
                                                                                                                                                        real(4), intent (in) :: y
                                                                                                                                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                    real(8) function fmin48(x, y) result(res)
                                                                                                                                                        real(4), intent (in) :: x
                                                                                                                                                        real(8), intent (in) :: y
                                                                                                                                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                    end function
                                                                                                                                                end module
                                                                                                                                                
                                                                                                                                                real(8) function code(x, y, z, t, a, b, c, i)
                                                                                                                                                use fmin_fmax_functions
                                                                                                                                                    real(8), intent (in) :: x
                                                                                                                                                    real(8), intent (in) :: y
                                                                                                                                                    real(8), intent (in) :: z
                                                                                                                                                    real(8), intent (in) :: t
                                                                                                                                                    real(8), intent (in) :: a
                                                                                                                                                    real(8), intent (in) :: b
                                                                                                                                                    real(8), intent (in) :: c
                                                                                                                                                    real(8), intent (in) :: i
                                                                                                                                                    code = a
                                                                                                                                                end function
                                                                                                                                                
                                                                                                                                                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                                                                                                                                	return a;
                                                                                                                                                }
                                                                                                                                                
                                                                                                                                                def code(x, y, z, t, a, b, c, i):
                                                                                                                                                	return a
                                                                                                                                                
                                                                                                                                                function code(x, y, z, t, a, b, c, i)
                                                                                                                                                	return a
                                                                                                                                                end
                                                                                                                                                
                                                                                                                                                function tmp = code(x, y, z, t, a, b, c, i)
                                                                                                                                                	tmp = a;
                                                                                                                                                end
                                                                                                                                                
                                                                                                                                                code[x_, y_, z_, t_, a_, b_, c_, i_] := a
                                                                                                                                                
                                                                                                                                                \begin{array}{l}
                                                                                                                                                
                                                                                                                                                \\
                                                                                                                                                a
                                                                                                                                                \end{array}
                                                                                                                                                
                                                                                                                                                Derivation
                                                                                                                                                1. Initial program 99.4%

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

                                                                                                                                                  \[\leadsto \color{blue}{a} \]
                                                                                                                                                4. Step-by-step derivation
                                                                                                                                                  1. Applied rewrites14.9%

                                                                                                                                                    \[\leadsto \color{blue}{a} \]
                                                                                                                                                  2. Add Preprocessing

                                                                                                                                                  Reproduce

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