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

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

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 99.8% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 2: 99.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \left(a + t\right) + \mathsf{fma}\left(\log y, x, z\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(Float64(a + 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[(N[(a + t), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

      \[\leadsto \left(\left(\color{blue}{\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 \]
    6. lift-+.f64N/A

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
    14. *-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. Applied rewrites99.8%

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

Alternative 3: 86.2% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 86.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - 0.5\right) \cdot \log c\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{+80}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, \left(a + t\right) + z\right)\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+197}:\\ \;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, -0.5, a + \mathsf{fma}\left(\log y, x, z\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right) + z\right) + t\right) + a\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (* (- b 0.5) (log c))))
   (if (<= t_1 -4e+80)
     (fma y i (fma (log c) (- b 0.5) (+ (+ a t) z)))
     (if (<= t_1 1e+197)
       (fma y i (fma (log c) -0.5 (+ a (fma (log y) x z))))
       (+ (+ (+ (fma (log c) (- b 0.5) (* i y)) z) t) a)))))
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 (t_1 <= -4e+80) {
		tmp = fma(y, i, fma(log(c), (b - 0.5), ((a + t) + z)));
	} else if (t_1 <= 1e+197) {
		tmp = fma(y, i, fma(log(c), -0.5, (a + fma(log(y), x, z))));
	} else {
		tmp = ((fma(log(c), (b - 0.5), (i * y)) + z) + t) + a;
	}
	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 (t_1 <= -4e+80)
		tmp = fma(y, i, fma(log(c), Float64(b - 0.5), Float64(Float64(a + t) + z)));
	elseif (t_1 <= 1e+197)
		tmp = fma(y, i, fma(log(c), -0.5, Float64(a + fma(log(y), x, z))));
	else
		tmp = Float64(Float64(Float64(fma(log(c), Float64(b - 0.5), Float64(i * y)) + z) + t) + a);
	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[t$95$1, -4e+80], N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[(a + t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+197], N[(y * i + N[(N[Log[c], $MachinePrecision] * -0.5 + N[(a + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 10^{+197}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, -0.5, a + \mathsf{fma}\left(\log y, x, z\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -4e80

    1. Initial program 99.8%

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

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

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

        \[\leadsto \left(\left(\color{blue}{\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 \]
      6. lift-+.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
      14. *-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. Applied rewrites99.8%

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

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

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

      if -4e80 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999995e196

      1. Initial program 99.8%

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

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

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

          \[\leadsto \left(\left(\color{blue}{\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 \]
        6. lift-+.f64N/A

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
        14. *-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. Applied rewrites99.8%

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

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

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

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

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

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 84.7% accurate, 1.0× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -6e51 < i < 9.19999999999999965e-29

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 9.19999999999999965e-29 < i

          1. Initial program 99.8%

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

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

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

              \[\leadsto \left(\left(\color{blue}{\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 \]
            6. lift-+.f64N/A

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
            14. *-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. Applied rewrites99.8%

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

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

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

          Alternative 6: 81.9% accurate, 1.0× speedup?

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

            1. Initial program 99.8%

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

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

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

                \[\leadsto \left(\left(\color{blue}{\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 \]
              6. lift-+.f64N/A

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
              14. *-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. Applied rewrites99.8%

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

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

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

              if -1.36e75 < z

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 81.5% accurate, 1.1× speedup?

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

              1. Initial program 99.8%

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

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

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

                  \[\leadsto \left(\left(\color{blue}{\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 \]
                6. lift-+.f64N/A

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
                14. *-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. Applied rewrites99.8%

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

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

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

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

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

                  if -1.36e75 < z

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 8: 77.1% accurate, 1.1× speedup?

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

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

                      \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                    2. lower-*.f64N/A

                      \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                    3. lift-log.f6426.8

                      \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                  7. Applied rewrites26.8%

                    \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]

                  if -1.64999999999999992e211 < x < 3.89999999999999985e262

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 3.89999999999999985e262 < x

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \log y \cdot \color{blue}{x} \]
                    3. lift-log.f6416.9

                      \[\leadsto \log y \cdot x \]
                  10. Applied rewrites16.9%

                    \[\leadsto \color{blue}{\log y \cdot x} \]
                3. Recombined 3 regimes into one program.
                4. Add Preprocessing

                Alternative 9: 75.0% accurate, 1.2× speedup?

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

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

                      \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                    2. lower-*.f64N/A

                      \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                    3. lift-log.f6426.8

                      \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                  7. Applied rewrites26.8%

                    \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]

                  if -1.64999999999999992e211 < x < 3.89999999999999985e262

                  1. Initial program 99.8%

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

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

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

                      \[\leadsto \left(\left(\color{blue}{\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 \]
                    6. lift-+.f64N/A

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{i \cdot y + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - \frac{1}{2}\right) \cdot \log c\right)} \]
                    14. *-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. Applied rewrites99.8%

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

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

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

                    if 3.89999999999999985e262 < x

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \log y \cdot \color{blue}{x} \]
                      3. lift-log.f6416.9

                        \[\leadsto \log y \cdot x \]
                    10. Applied rewrites16.9%

                      \[\leadsto \color{blue}{\log y \cdot x} \]
                  6. Recombined 3 regimes into one program.
                  7. Add Preprocessing

                  Alternative 10: 71.9% accurate, 1.2× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

                        \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                      2. lower-*.f64N/A

                        \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                      3. lift-log.f6426.8

                        \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                    7. Applied rewrites26.8%

                      \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]

                    if -1.64999999999999992e211 < x < 3.89999999999999985e262

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 3.89999999999999985e262 < x

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \log y \cdot \color{blue}{x} \]
                      3. lift-log.f6416.9

                        \[\leadsto \log y \cdot x \]
                    10. Applied rewrites16.9%

                      \[\leadsto \color{blue}{\log y \cdot x} \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 11: 32.6% accurate, 0.3× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \log y\\ t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\ t_3 := -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+300}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+45}:\\ \;\;\;\;-\left(\left(-\frac{t\_1}{z}\right) - 1\right) \cdot z\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;-\left(-a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b c i)
                   :precision binary64
                   (let* ((t_1 (* x (log y)))
                          (t_2 (+ (+ (+ (+ (+ t_1 z) t) a) (* (- b 0.5) (log c))) (* y i)))
                          (t_3 (- (* (- (- (/ (* i y) z)) 1.0) z))))
                     (if (<= t_2 -2e+300)
                       t_3
                       (if (<= t_2 2e+45)
                         (- (* (- (- (/ t_1 z)) 1.0) z))
                         (if (<= t_2 2e+307) (- (- a)) t_3)))))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = x * log(y);
                  	double t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                  	double t_3 = -((-((i * y) / z) - 1.0) * z);
                  	double tmp;
                  	if (t_2 <= -2e+300) {
                  		tmp = t_3;
                  	} else if (t_2 <= 2e+45) {
                  		tmp = -((-(t_1 / z) - 1.0) * z);
                  	} else if (t_2 <= 2e+307) {
                  		tmp = -(-a);
                  	} else {
                  		tmp = t_3;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b, c, i)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8), intent (in) :: c
                      real(8), intent (in) :: i
                      real(8) :: t_1
                      real(8) :: t_2
                      real(8) :: t_3
                      real(8) :: tmp
                      t_1 = x * log(y)
                      t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                      t_3 = -((-((i * y) / z) - 1.0d0) * z)
                      if (t_2 <= (-2d+300)) then
                          tmp = t_3
                      else if (t_2 <= 2d+45) then
                          tmp = -((-(t_1 / z) - 1.0d0) * z)
                      else if (t_2 <= 2d+307) then
                          tmp = -(-a)
                      else
                          tmp = t_3
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = x * Math.log(y);
                  	double t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                  	double t_3 = -((-((i * y) / z) - 1.0) * z);
                  	double tmp;
                  	if (t_2 <= -2e+300) {
                  		tmp = t_3;
                  	} else if (t_2 <= 2e+45) {
                  		tmp = -((-(t_1 / z) - 1.0) * z);
                  	} else if (t_2 <= 2e+307) {
                  		tmp = -(-a);
                  	} else {
                  		tmp = t_3;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b, c, i):
                  	t_1 = x * math.log(y)
                  	t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
                  	t_3 = -((-((i * y) / z) - 1.0) * z)
                  	tmp = 0
                  	if t_2 <= -2e+300:
                  		tmp = t_3
                  	elif t_2 <= 2e+45:
                  		tmp = -((-(t_1 / z) - 1.0) * z)
                  	elif t_2 <= 2e+307:
                  		tmp = -(-a)
                  	else:
                  		tmp = t_3
                  	return tmp
                  
                  function code(x, y, z, t, a, b, c, i)
                  	t_1 = Float64(x * log(y))
                  	t_2 = Float64(Float64(Float64(Float64(Float64(t_1 + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i))
                  	t_3 = Float64(-Float64(Float64(Float64(-Float64(Float64(i * y) / z)) - 1.0) * z))
                  	tmp = 0.0
                  	if (t_2 <= -2e+300)
                  		tmp = t_3;
                  	elseif (t_2 <= 2e+45)
                  		tmp = Float64(-Float64(Float64(Float64(-Float64(t_1 / z)) - 1.0) * z));
                  	elseif (t_2 <= 2e+307)
                  		tmp = Float64(-Float64(-a));
                  	else
                  		tmp = t_3;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b, c, i)
                  	t_1 = x * log(y);
                  	t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
                  	t_3 = -((-((i * y) / z) - 1.0) * z);
                  	tmp = 0.0;
                  	if (t_2 <= -2e+300)
                  		tmp = t_3;
                  	elseif (t_2 <= 2e+45)
                  		tmp = -((-(t_1 / z) - 1.0) * z);
                  	elseif (t_2 <= 2e+307)
                  		tmp = -(-a);
                  	else
                  		tmp = t_3;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t$95$1 + 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$3 = (-N[(N[((-N[(N[(i * y), $MachinePrecision] / z), $MachinePrecision]) - 1.0), $MachinePrecision] * z), $MachinePrecision])}, If[LessEqual[t$95$2, -2e+300], t$95$3, If[LessEqual[t$95$2, 2e+45], (-N[(N[((-N[(t$95$1 / z), $MachinePrecision]) - 1.0), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[t$95$2, 2e+307], (-(-a)), t$95$3]]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := x \cdot \log y\\
                  t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
                  t_3 := -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z\\
                  \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+300}:\\
                  \;\;\;\;t\_3\\
                  
                  \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+45}:\\
                  \;\;\;\;-\left(\left(-\frac{t\_1}{z}\right) - 1\right) \cdot z\\
                  
                  \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+307}:\\
                  \;\;\;\;-\left(-a\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_3\\
                  
                  
                  \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)) < -2.0000000000000001e300 or 1.99999999999999997e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z \]

                    if -2.0000000000000001e300 < (+.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.9999999999999999e45

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

                        \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                      2. lower-*.f64N/A

                        \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                      3. lift-log.f6426.8

                        \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                    7. Applied rewrites26.8%

                      \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]

                    if 1.9999999999999999e45 < (+.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.99999999999999997e307

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot a \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      2. lower-neg.f6416.4

                        \[\leadsto -\left(-a\right) \]
                    7. Applied rewrites16.4%

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

                  Alternative 12: 32.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\\ t_2 := -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+301}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -50:\\ \;\;\;\;-\left(\left(-\frac{b \cdot \log c}{z}\right) - 1\right) \cdot z\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;-\left(-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 (- (* (- (- (/ (* i y) z)) 1.0) z))))
                     (if (<= t_1 -2e+301)
                       t_2
                       (if (<= t_1 -50.0)
                         (- (* (- (- (/ (* b (log c)) z)) 1.0) z))
                         (if (<= t_1 2e+307) (- (- 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 = -((-((i * y) / z) - 1.0) * z);
                  	double tmp;
                  	if (t_1 <= -2e+301) {
                  		tmp = t_2;
                  	} else if (t_1 <= -50.0) {
                  		tmp = -((-((b * log(c)) / z) - 1.0) * z);
                  	} else if (t_1 <= 2e+307) {
                  		tmp = -(-a);
                  	} else {
                  		tmp = t_2;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b, c, i)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8), intent (in) :: c
                      real(8), intent (in) :: i
                      real(8) :: t_1
                      real(8) :: t_2
                      real(8) :: tmp
                      t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                      t_2 = -((-((i * y) / z) - 1.0d0) * z)
                      if (t_1 <= (-2d+301)) then
                          tmp = t_2
                      else if (t_1 <= (-50.0d0)) then
                          tmp = -((-((b * log(c)) / z) - 1.0d0) * z)
                      else if (t_1 <= 2d+307) then
                          tmp = -(-a)
                      else
                          tmp = t_2
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                  	double t_2 = -((-((i * y) / z) - 1.0) * z);
                  	double tmp;
                  	if (t_1 <= -2e+301) {
                  		tmp = t_2;
                  	} else if (t_1 <= -50.0) {
                  		tmp = -((-((b * Math.log(c)) / z) - 1.0) * z);
                  	} else if (t_1 <= 2e+307) {
                  		tmp = -(-a);
                  	} else {
                  		tmp = t_2;
                  	}
                  	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)
                  	t_2 = -((-((i * y) / z) - 1.0) * z)
                  	tmp = 0
                  	if t_1 <= -2e+301:
                  		tmp = t_2
                  	elif t_1 <= -50.0:
                  		tmp = -((-((b * math.log(c)) / z) - 1.0) * z)
                  	elif t_1 <= 2e+307:
                  		tmp = -(-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 = Float64(-Float64(Float64(Float64(-Float64(Float64(i * y) / z)) - 1.0) * z))
                  	tmp = 0.0
                  	if (t_1 <= -2e+301)
                  		tmp = t_2;
                  	elseif (t_1 <= -50.0)
                  		tmp = Float64(-Float64(Float64(Float64(-Float64(Float64(b * log(c)) / z)) - 1.0) * z));
                  	elseif (t_1 <= 2e+307)
                  		tmp = Float64(-Float64(-a));
                  	else
                  		tmp = t_2;
                  	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);
                  	t_2 = -((-((i * y) / z) - 1.0) * z);
                  	tmp = 0.0;
                  	if (t_1 <= -2e+301)
                  		tmp = t_2;
                  	elseif (t_1 <= -50.0)
                  		tmp = -((-((b * log(c)) / z) - 1.0) * z);
                  	elseif (t_1 <= 2e+307)
                  		tmp = -(-a);
                  	else
                  		tmp = t_2;
                  	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]}, Block[{t$95$2 = (-N[(N[((-N[(N[(i * y), $MachinePrecision] / z), $MachinePrecision]) - 1.0), $MachinePrecision] * z), $MachinePrecision])}, If[LessEqual[t$95$1, -2e+301], t$95$2, If[LessEqual[t$95$1, -50.0], (-N[(N[((-N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]) - 1.0), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[t$95$1, 2e+307], (-(-a)), 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 := -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z\\
                  \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+301}:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{elif}\;t\_1 \leq -50:\\
                  \;\;\;\;-\left(\left(-\frac{b \cdot \log c}{z}\right) - 1\right) \cdot z\\
                  
                  \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\
                  \;\;\;\;-\left(-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)) < -2.00000000000000011e301 or 1.99999999999999997e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z \]

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                        \[\leadsto -\left(\left(-\frac{b \cdot \log c}{z}\right) - 1\right) \cdot z \]
                      3. lift-log.f6426.2

                        \[\leadsto -\left(\left(-\frac{b \cdot \log c}{z}\right) - 1\right) \cdot z \]
                    7. Applied rewrites26.2%

                      \[\leadsto -\left(\left(-\frac{b \cdot \log c}{z}\right) - 1\right) \cdot z \]

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot a \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      2. lower-neg.f6416.4

                        \[\leadsto -\left(-a\right) \]
                    7. Applied rewrites16.4%

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

                  Alternative 13: 32.0% 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 := -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+301}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -50:\\ \;\;\;\;-\left(\left(-b \cdot \frac{\log c}{z}\right) - 1\right) \cdot z\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\ \;\;\;\;-\left(-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 (- (* (- (- (/ (* i y) z)) 1.0) z))))
                     (if (<= t_1 -2e+301)
                       t_2
                       (if (<= t_1 -50.0)
                         (- (* (- (- (* b (/ (log c) z))) 1.0) z))
                         (if (<= t_1 2e+307) (- (- 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 = -((-((i * y) / z) - 1.0) * z);
                  	double tmp;
                  	if (t_1 <= -2e+301) {
                  		tmp = t_2;
                  	} else if (t_1 <= -50.0) {
                  		tmp = -((-(b * (log(c) / z)) - 1.0) * z);
                  	} else if (t_1 <= 2e+307) {
                  		tmp = -(-a);
                  	} else {
                  		tmp = t_2;
                  	}
                  	return tmp;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b, c, i)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8), intent (in) :: c
                      real(8), intent (in) :: i
                      real(8) :: t_1
                      real(8) :: t_2
                      real(8) :: tmp
                      t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
                      t_2 = -((-((i * y) / z) - 1.0d0) * z)
                      if (t_1 <= (-2d+301)) then
                          tmp = t_2
                      else if (t_1 <= (-50.0d0)) then
                          tmp = -((-(b * (log(c) / z)) - 1.0d0) * z)
                      else if (t_1 <= 2d+307) then
                          tmp = -(-a)
                      else
                          tmp = t_2
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
                  	double t_2 = -((-((i * y) / z) - 1.0) * z);
                  	double tmp;
                  	if (t_1 <= -2e+301) {
                  		tmp = t_2;
                  	} else if (t_1 <= -50.0) {
                  		tmp = -((-(b * (Math.log(c) / z)) - 1.0) * z);
                  	} else if (t_1 <= 2e+307) {
                  		tmp = -(-a);
                  	} else {
                  		tmp = t_2;
                  	}
                  	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)
                  	t_2 = -((-((i * y) / z) - 1.0) * z)
                  	tmp = 0
                  	if t_1 <= -2e+301:
                  		tmp = t_2
                  	elif t_1 <= -50.0:
                  		tmp = -((-(b * (math.log(c) / z)) - 1.0) * z)
                  	elif t_1 <= 2e+307:
                  		tmp = -(-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 = Float64(-Float64(Float64(Float64(-Float64(Float64(i * y) / z)) - 1.0) * z))
                  	tmp = 0.0
                  	if (t_1 <= -2e+301)
                  		tmp = t_2;
                  	elseif (t_1 <= -50.0)
                  		tmp = Float64(-Float64(Float64(Float64(-Float64(b * Float64(log(c) / z))) - 1.0) * z));
                  	elseif (t_1 <= 2e+307)
                  		tmp = Float64(-Float64(-a));
                  	else
                  		tmp = t_2;
                  	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);
                  	t_2 = -((-((i * y) / z) - 1.0) * z);
                  	tmp = 0.0;
                  	if (t_1 <= -2e+301)
                  		tmp = t_2;
                  	elseif (t_1 <= -50.0)
                  		tmp = -((-(b * (log(c) / z)) - 1.0) * z);
                  	elseif (t_1 <= 2e+307)
                  		tmp = -(-a);
                  	else
                  		tmp = t_2;
                  	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]}, Block[{t$95$2 = (-N[(N[((-N[(N[(i * y), $MachinePrecision] / z), $MachinePrecision]) - 1.0), $MachinePrecision] * z), $MachinePrecision])}, If[LessEqual[t$95$1, -2e+301], t$95$2, If[LessEqual[t$95$1, -50.0], (-N[(N[((-N[(b * N[(N[Log[c], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]) - 1.0), $MachinePrecision] * z), $MachinePrecision]), If[LessEqual[t$95$1, 2e+307], (-(-a)), 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 := -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z\\
                  \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+301}:\\
                  \;\;\;\;t\_2\\
                  
                  \mathbf{elif}\;t\_1 \leq -50:\\
                  \;\;\;\;-\left(\left(-b \cdot \frac{\log c}{z}\right) - 1\right) \cdot z\\
                  
                  \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\
                  \;\;\;\;-\left(-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)) < -2.00000000000000011e301 or 1.99999999999999997e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i))

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z \]

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

                        \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                      2. lower-*.f64N/A

                        \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                      3. lift-log.f6426.8

                        \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                    7. Applied rewrites26.8%

                      \[\leadsto -\left(\left(-\frac{x \cdot \log y}{z}\right) - 1\right) \cdot z \]
                    8. Taylor expanded in b around inf

                      \[\leadsto -\left(\left(-\frac{b \cdot \log c}{z}\right) - 1\right) \cdot z \]
                    9. Step-by-step derivation
                      1. associate-/l*N/A

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

                        \[\leadsto -\left(\left(-b \cdot \frac{\log c}{z}\right) - 1\right) \cdot z \]
                      3. lower-/.f64N/A

                        \[\leadsto -\left(\left(-b \cdot \frac{\log c}{z}\right) - 1\right) \cdot z \]
                      4. lift-log.f6426.3

                        \[\leadsto -\left(\left(-b \cdot \frac{\log c}{z}\right) - 1\right) \cdot z \]
                    10. Applied rewrites26.3%

                      \[\leadsto -\left(\left(-b \cdot \frac{\log c}{z}\right) - 1\right) \cdot z \]

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot a \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      2. lower-neg.f6416.4

                        \[\leadsto -\left(-a\right) \]
                    7. Applied rewrites16.4%

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

                  Alternative 14: 32.0% accurate, 0.4× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -\left(\left(-\frac{i \cdot y}{z}\right) - 1\right) \cdot z \]

                    if -90 < (+.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.99999999999999997e307

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot a \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      2. lower-neg.f6416.4

                        \[\leadsto -\left(-a\right) \]
                    7. Applied rewrites16.4%

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

                  Alternative 15: 30.9% accurate, 0.3× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot \left(i \cdot y\right) \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(i \cdot y\right)\right) \]
                      2. lower-neg.f64N/A

                        \[\leadsto -\left(-i \cdot y\right) \]
                      3. lower-*.f6423.6

                        \[\leadsto -\left(-i \cdot y\right) \]
                    7. Applied rewrites23.6%

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

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto -\left(\left(-\frac{a}{z}\right) - 1\right) \cdot z \]
                    6. Step-by-step derivation
                      1. lower-/.f6426.2

                        \[\leadsto -\left(\left(-\frac{a}{z}\right) - 1\right) \cdot z \]
                    7. Applied rewrites26.2%

                      \[\leadsto -\left(\left(-\frac{a}{z}\right) - 1\right) \cdot z \]

                    if -2e8 < (+.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.99999999999999997e307

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot a \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      2. lower-neg.f6416.4

                        \[\leadsto -\left(-a\right) \]
                    7. Applied rewrites16.4%

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

                  Alternative 16: 27.8% accurate, 0.3× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot \left(i \cdot y\right) \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(i \cdot y\right)\right) \]
                      2. lower-neg.f64N/A

                        \[\leadsto -\left(-i \cdot y\right) \]
                      3. lower-*.f6423.6

                        \[\leadsto -\left(-i \cdot y\right) \]
                    7. Applied rewrites23.6%

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

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

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot z \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(z\right)\right) \]
                      2. lower-neg.f6416.3

                        \[\leadsto -\left(-z\right) \]
                    7. Applied rewrites16.3%

                      \[\leadsto -\left(-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.99999999999999997e307

                    1. Initial program 99.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot a \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      2. lower-neg.f6416.4

                        \[\leadsto -\left(-a\right) \]
                    7. Applied rewrites16.4%

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

                  Alternative 17: 16.4% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -50:\\ \;\;\;\;-\left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;-\left(-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)
                     (- (- 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 = Float64(-Float64(-z));
                  	else
                  		tmp = Float64(-Float64(-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:\\
                  \;\;\;\;-\left(-z\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;-\left(-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. Taylor expanded in z around -inf

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

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

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

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

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

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

                      \[\leadsto --1 \cdot z \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(z\right)\right) \]
                      2. lower-neg.f6416.3

                        \[\leadsto -\left(-z\right) \]
                    7. Applied rewrites16.3%

                      \[\leadsto -\left(-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.8%

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

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

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

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

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

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

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

                      \[\leadsto --1 \cdot a \]
                    6. Step-by-step derivation
                      1. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                      2. lower-neg.f6416.4

                        \[\leadsto -\left(-a\right) \]
                    7. Applied rewrites16.4%

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

                  Alternative 18: 16.0% accurate, 12.8× speedup?

                  \[\begin{array}{l} \\ -\left(-a\right) \end{array} \]
                  (FPCore (x y z t a b c i) :precision binary64 (- (- a)))
                  double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	return -(-a);
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a, b, c, i)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      real(8), intent (in) :: b
                      real(8), intent (in) :: c
                      real(8), intent (in) :: i
                      code = -(-a)
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                  	return -(-a);
                  }
                  
                  def code(x, y, z, t, a, b, c, i):
                  	return -(-a)
                  
                  function code(x, y, z, t, a, b, c, i)
                  	return Float64(-Float64(-a))
                  end
                  
                  function tmp = code(x, y, z, t, a, b, c, i)
                  	tmp = -(-a);
                  end
                  
                  code[x_, y_, z_, t_, a_, b_, c_, i_] := (-(-a))
                  
                  \begin{array}{l}
                  
                  \\
                  -\left(-a\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 99.8%

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

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

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

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

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

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

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

                    \[\leadsto --1 \cdot a \]
                  6. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto -\left(\mathsf{neg}\left(a\right)\right) \]
                    2. lower-neg.f6416.4

                      \[\leadsto -\left(-a\right) \]
                  7. Applied rewrites16.4%

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

                  Reproduce

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