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

Percentage Accurate: 99.9% → 99.9%
Time: 5.9s
Alternatives: 17
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
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)
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
    code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\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 17 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.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
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)
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
    code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b):
	return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.9% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.6% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1e30 or 5.0000000000000002e70 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + y\right) + x \]
      4. *-commutativeN/A

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

        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
      6. lift--.f6486.2

        \[\leadsto \mathsf{fma}\left(a - 0.5, b, y\right) + x \]
    5. Applied rewrites86.2%

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

    if -1e30 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.0000000000000002e70

    1. Initial program 99.8%

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

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

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

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

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

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

        \[\leadsto \left(\left(y + x\right) + z\right) - z \cdot \log t \]
      6. *-commutativeN/A

        \[\leadsto \left(\left(y + x\right) + z\right) - \log t \cdot \color{blue}{z} \]
      7. lower-*.f64N/A

        \[\leadsto \left(\left(y + x\right) + z\right) - \log t \cdot \color{blue}{z} \]
      8. lift-log.f6493.7

        \[\leadsto \left(\left(y + x\right) + z\right) - \log t \cdot z \]
    5. Applied rewrites93.7%

      \[\leadsto \color{blue}{\left(\left(y + x\right) + z\right) - \log t \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 94.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq 5.2 \cdot 10^{-18}:\\
\;\;\;\;\left(y + x\right) + \left(a - 0.5\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.00000000000000005e54 or 5.2000000000000001e-18 < z

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \color{blue}{a} \cdot b \]
    7. Step-by-step derivation
      1. Applied rewrites91.4%

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

      if -5.00000000000000005e54 < z < 5.2000000000000001e-18

      1. Initial program 100.0%

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

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

          \[\leadsto \left(y + \color{blue}{x}\right) + \left(a - \frac{1}{2}\right) \cdot b \]
        2. lower-+.f6497.0

          \[\leadsto \left(y + \color{blue}{x}\right) + \left(a - 0.5\right) \cdot b \]
      5. Applied rewrites97.0%

        \[\leadsto \color{blue}{\left(y + x\right)} + \left(a - 0.5\right) \cdot b \]
    8. Recombined 2 regimes into one program.
    9. Add Preprocessing

    Alternative 4: 21.5% accurate, 1.0× speedup?

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

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x} \]
      4. Step-by-step derivation
        1. Applied rewrites21.0%

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

        if -4.9999999999999997e-245 < (+.f64 (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t))) (*.f64 (-.f64 a #s(literal 1/2 binary64)) b))

        1. Initial program 99.9%

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

          \[\leadsto \color{blue}{y} \]
        4. Step-by-step derivation
          1. Applied rewrites21.9%

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

        Alternative 5: 89.4% accurate, 1.0× speedup?

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

          1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \color{blue}{a} \cdot b \]
          7. Step-by-step derivation
            1. Applied rewrites93.3%

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

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

                \[\leadsto \left(z \cdot \left(1 - \log t\right) + x\right) + a \cdot b \]
              2. *-commutativeN/A

                \[\leadsto \left(\left(1 - \log t\right) \cdot z + x\right) + a \cdot b \]
              3. lower-fma.f64N/A

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

                \[\leadsto \mathsf{fma}\left(1 - \log t, z, x\right) + a \cdot b \]
              5. lift--.f6480.6

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

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

            if -3.29999999999999985e83 < z < 7.30000000000000014e49

            1. Initial program 100.0%

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

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

                \[\leadsto \left(y + \color{blue}{x}\right) + \left(a - \frac{1}{2}\right) \cdot b \]
              2. lower-+.f6495.6

                \[\leadsto \left(y + \color{blue}{x}\right) + \left(a - 0.5\right) \cdot b \]
            5. Applied rewrites95.6%

              \[\leadsto \color{blue}{\left(y + x\right)} + \left(a - 0.5\right) \cdot b \]

            if 7.30000000000000014e49 < z

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \color{blue}{a} \cdot b \]
            7. Step-by-step derivation
              1. Applied rewrites92.3%

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

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

                  \[\leadsto \left(y + \left(1 - \log t\right) \cdot z\right) + a \cdot b \]
                2. +-commutativeN/A

                  \[\leadsto \left(\left(1 - \log t\right) \cdot z + y\right) + a \cdot b \]
                3. lift-log.f64N/A

                  \[\leadsto \left(\left(1 - \log t\right) \cdot z + y\right) + a \cdot b \]
                4. lift--.f64N/A

                  \[\leadsto \left(\left(1 - \log t\right) \cdot z + y\right) + a \cdot b \]
                5. lift-fma.f6479.7

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

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

            Alternative 6: 89.3% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - \log t, z, x\right) + a \cdot b\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+83}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+45}:\\ \;\;\;\;\left(y + x\right) + \left(a - 0.5\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (let* ((t_1 (+ (fma (- 1.0 (log t)) z x) (* a b))))
               (if (<= z -3.3e+83) t_1 (if (<= z 4e+45) (+ (+ y x) (* (- a 0.5) b)) t_1))))
            double code(double x, double y, double z, double t, double a, double b) {
            	double t_1 = fma((1.0 - log(t)), z, x) + (a * b);
            	double tmp;
            	if (z <= -3.3e+83) {
            		tmp = t_1;
            	} else if (z <= 4e+45) {
            		tmp = (y + x) + ((a - 0.5) * b);
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            function code(x, y, z, t, a, b)
            	t_1 = Float64(fma(Float64(1.0 - log(t)), z, x) + Float64(a * b))
            	tmp = 0.0
            	if (z <= -3.3e+83)
            		tmp = t_1;
            	elseif (z <= 4e+45)
            		tmp = Float64(Float64(y + x) + Float64(Float64(a - 0.5) * b));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z + x), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+83], t$95$1, If[LessEqual[z, 4e+45], N[(N[(y + x), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \mathsf{fma}\left(1 - \log t, z, x\right) + a \cdot b\\
            \mathbf{if}\;z \leq -3.3 \cdot 10^{+83}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 4 \cdot 10^{+45}:\\
            \;\;\;\;\left(y + x\right) + \left(a - 0.5\right) \cdot b\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -3.29999999999999985e83 or 3.9999999999999997e45 < z

              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \color{blue}{a} \cdot b \]
              7. Step-by-step derivation
                1. Applied rewrites92.7%

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

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

                    \[\leadsto \left(z \cdot \left(1 - \log t\right) + x\right) + a \cdot b \]
                  2. *-commutativeN/A

                    \[\leadsto \left(\left(1 - \log t\right) \cdot z + x\right) + a \cdot b \]
                  3. lower-fma.f64N/A

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

                    \[\leadsto \mathsf{fma}\left(1 - \log t, z, x\right) + a \cdot b \]
                  5. lift--.f6479.7

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

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

                if -3.29999999999999985e83 < z < 3.9999999999999997e45

                1. Initial program 100.0%

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

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

                    \[\leadsto \left(y + \color{blue}{x}\right) + \left(a - \frac{1}{2}\right) \cdot b \]
                  2. lower-+.f6495.8

                    \[\leadsto \left(y + \color{blue}{x}\right) + \left(a - 0.5\right) \cdot b \]
                5. Applied rewrites95.8%

                  \[\leadsto \color{blue}{\left(y + x\right)} + \left(a - 0.5\right) \cdot b \]
              8. Recombined 2 regimes into one program.
              9. Add Preprocessing

              Alternative 7: 57.5% accurate, 1.0× speedup?

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

                1. Initial program 99.9%

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

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

                    \[\leadsto \color{blue}{x} + \left(a - 0.5\right) \cdot b \]
                  2. Step-by-step derivation
                    1. lift-+.f64N/A

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

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

                      \[\leadsto x + \color{blue}{\left(a - \frac{1}{2}\right) \cdot b} \]
                    4. +-commutativeN/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, x\right)} \]
                    6. lift--.f6453.2

                      \[\leadsto \mathsf{fma}\left(\color{blue}{a - 0.5}, b, x\right) \]
                  3. Applied rewrites53.2%

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

                  if -1e18 < (-.f64 (+.f64 (+.f64 x y) z) (*.f64 z (log.f64 t)))

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto y + \left(a - \frac{1}{2}\right) \cdot b \]
                  7. Step-by-step derivation
                    1. Applied rewrites60.7%

                      \[\leadsto y + \left(a - 0.5\right) \cdot b \]
                    2. Step-by-step derivation
                      1. lift-+.f64N/A

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

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

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

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

                        \[\leadsto \color{blue}{\mathsf{fma}\left(a - \frac{1}{2}, b, y\right)} \]
                      6. lift--.f6460.7

                        \[\leadsto \mathsf{fma}\left(\color{blue}{a - 0.5}, b, y\right) \]
                    3. Applied rewrites60.7%

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

                  Alternative 8: 82.7% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - \log t\right) \cdot z\\ \mathbf{if}\;z \leq -3.2 \cdot 10^{+178}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{+279}:\\ \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (* (- 1.0 (log t)) z)))
                     (if (<= z -3.2e+178)
                       t_1
                       (if (<= z 3.8e+279) (+ (fma (- a 0.5) b y) x) t_1))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = (1.0 - log(t)) * z;
                  	double tmp;
                  	if (z <= -3.2e+178) {
                  		tmp = t_1;
                  	} else if (z <= 3.8e+279) {
                  		tmp = fma((a - 0.5), b, y) + x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(Float64(1.0 - log(t)) * z)
                  	tmp = 0.0
                  	if (z <= -3.2e+178)
                  		tmp = t_1;
                  	elseif (z <= 3.8e+279)
                  		tmp = Float64(fma(Float64(a - 0.5), b, y) + x);
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -3.2e+178], t$95$1, If[LessEqual[z, 3.8e+279], N[(N[(N[(a - 0.5), $MachinePrecision] * b + y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(1 - \log t\right) \cdot z\\
                  \mathbf{if}\;z \leq -3.2 \cdot 10^{+178}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;z \leq 3.8 \cdot 10^{+279}:\\
                  \;\;\;\;\mathsf{fma}\left(a - 0.5, b, y\right) + x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -3.2e178 or 3.80000000000000014e279 < z

                    1. Initial program 99.6%

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

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

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

                        \[\leadsto \left(1 - \log t\right) \cdot \color{blue}{z} \]
                      3. lower--.f64N/A

                        \[\leadsto \left(1 - \log t\right) \cdot z \]
                      4. lift-log.f6467.0

                        \[\leadsto \left(1 - \log t\right) \cdot z \]
                    5. Applied rewrites67.0%

                      \[\leadsto \color{blue}{\left(1 - \log t\right) \cdot z} \]

                    if -3.2e178 < z < 3.80000000000000014e279

                    1. Initial program 99.9%

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

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

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

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

                        \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + y\right) + x \]
                      4. *-commutativeN/A

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

                        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                      6. lift--.f6485.1

                        \[\leadsto \mathsf{fma}\left(a - 0.5, b, y\right) + x \]
                    5. Applied rewrites85.1%

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

                  Alternative 9: 64.0% accurate, 3.4× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+87}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+162}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (let* ((t_1 (* (- a 0.5) b)))
                     (if (<= t_1 -1e+87) t_1 (if (<= t_1 2e+162) (+ y x) t_1))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = (a - 0.5) * b;
                  	double tmp;
                  	if (t_1 <= -1e+87) {
                  		tmp = t_1;
                  	} else if (t_1 <= 2e+162) {
                  		tmp = y + x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	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)
                  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) :: t_1
                      real(8) :: tmp
                      t_1 = (a - 0.5d0) * b
                      if (t_1 <= (-1d+87)) then
                          tmp = t_1
                      else if (t_1 <= 2d+162) then
                          tmp = y + x
                      else
                          tmp = t_1
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a, double b) {
                  	double t_1 = (a - 0.5) * b;
                  	double tmp;
                  	if (t_1 <= -1e+87) {
                  		tmp = t_1;
                  	} else if (t_1 <= 2e+162) {
                  		tmp = y + x;
                  	} else {
                  		tmp = t_1;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a, b):
                  	t_1 = (a - 0.5) * b
                  	tmp = 0
                  	if t_1 <= -1e+87:
                  		tmp = t_1
                  	elif t_1 <= 2e+162:
                  		tmp = y + x
                  	else:
                  		tmp = t_1
                  	return tmp
                  
                  function code(x, y, z, t, a, b)
                  	t_1 = Float64(Float64(a - 0.5) * b)
                  	tmp = 0.0
                  	if (t_1 <= -1e+87)
                  		tmp = t_1;
                  	elseif (t_1 <= 2e+162)
                  		tmp = Float64(y + x);
                  	else
                  		tmp = t_1;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a, b)
                  	t_1 = (a - 0.5) * b;
                  	tmp = 0.0;
                  	if (t_1 <= -1e+87)
                  		tmp = t_1;
                  	elseif (t_1 <= 2e+162)
                  		tmp = y + x;
                  	else
                  		tmp = t_1;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+87], t$95$1, If[LessEqual[t$95$1, 2e+162], N[(y + x), $MachinePrecision], t$95$1]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(a - 0.5\right) \cdot b\\
                  \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+87}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+162}:\\
                  \;\;\;\;y + x\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -9.9999999999999996e86 or 1.9999999999999999e162 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                    1. Initial program 99.9%

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

                      \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

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

                        \[\leadsto \left(a - \frac{1}{2}\right) \cdot \color{blue}{b} \]
                      3. lift--.f6471.9

                        \[\leadsto \left(a - 0.5\right) \cdot b \]
                    5. Applied rewrites71.9%

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

                    if -9.9999999999999996e86 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.9999999999999999e162

                    1. Initial program 99.8%

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

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

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

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

                        \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + y\right) + x \]
                      4. *-commutativeN/A

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

                        \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                      6. lift--.f6469.3

                        \[\leadsto \mathsf{fma}\left(a - 0.5, b, y\right) + x \]
                    5. Applied rewrites69.3%

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

                      \[\leadsto y + x \]
                    7. Step-by-step derivation
                      1. Applied rewrites58.2%

                        \[\leadsto y + x \]
                    8. Recombined 2 regimes into one program.
                    9. Add Preprocessing

                    Alternative 10: 57.0% accurate, 3.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a - 0.5\right) \cdot b\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+205}:\\ \;\;\;\;b \cdot a\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+262}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;b \cdot a\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b)
                     :precision binary64
                     (let* ((t_1 (* (- a 0.5) b)))
                       (if (<= t_1 -2e+205) (* b a) (if (<= t_1 2e+262) (+ y x) (* b a)))))
                    double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = (a - 0.5) * b;
                    	double tmp;
                    	if (t_1 <= -2e+205) {
                    		tmp = b * a;
                    	} else if (t_1 <= 2e+262) {
                    		tmp = y + x;
                    	} else {
                    		tmp = b * 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)
                    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) :: t_1
                        real(8) :: tmp
                        t_1 = (a - 0.5d0) * b
                        if (t_1 <= (-2d+205)) then
                            tmp = b * a
                        else if (t_1 <= 2d+262) then
                            tmp = y + x
                        else
                            tmp = b * a
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b) {
                    	double t_1 = (a - 0.5) * b;
                    	double tmp;
                    	if (t_1 <= -2e+205) {
                    		tmp = b * a;
                    	} else if (t_1 <= 2e+262) {
                    		tmp = y + x;
                    	} else {
                    		tmp = b * a;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a, b):
                    	t_1 = (a - 0.5) * b
                    	tmp = 0
                    	if t_1 <= -2e+205:
                    		tmp = b * a
                    	elif t_1 <= 2e+262:
                    		tmp = y + x
                    	else:
                    		tmp = b * a
                    	return tmp
                    
                    function code(x, y, z, t, a, b)
                    	t_1 = Float64(Float64(a - 0.5) * b)
                    	tmp = 0.0
                    	if (t_1 <= -2e+205)
                    		tmp = Float64(b * a);
                    	elseif (t_1 <= 2e+262)
                    		tmp = Float64(y + x);
                    	else
                    		tmp = Float64(b * a);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a, b)
                    	t_1 = (a - 0.5) * b;
                    	tmp = 0.0;
                    	if (t_1 <= -2e+205)
                    		tmp = b * a;
                    	elseif (t_1 <= 2e+262)
                    		tmp = y + x;
                    	else
                    		tmp = b * a;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+205], N[(b * a), $MachinePrecision], If[LessEqual[t$95$1, 2e+262], N[(y + x), $MachinePrecision], N[(b * a), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(a - 0.5\right) \cdot b\\
                    \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+205}:\\
                    \;\;\;\;b \cdot a\\
                    
                    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+262}:\\
                    \;\;\;\;y + x\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;b \cdot a\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.00000000000000003e205 or 2e262 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b)

                      1. Initial program 100.0%

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

                        \[\leadsto \color{blue}{a \cdot b} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto b \cdot \color{blue}{a} \]
                        2. lower-*.f6471.3

                          \[\leadsto b \cdot \color{blue}{a} \]
                      5. Applied rewrites71.3%

                        \[\leadsto \color{blue}{b \cdot a} \]

                      if -2.00000000000000003e205 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 2e262

                      1. Initial program 99.8%

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

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

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

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

                          \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + y\right) + x \]
                        4. *-commutativeN/A

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

                          \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                        6. lift--.f6472.3

                          \[\leadsto \mathsf{fma}\left(a - 0.5, b, y\right) + x \]
                      5. Applied rewrites72.3%

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

                        \[\leadsto y + x \]
                      7. Step-by-step derivation
                        1. Applied rewrites52.4%

                          \[\leadsto y + x \]
                      8. Recombined 2 regimes into one program.
                      9. Add Preprocessing

                      Alternative 11: 50.1% accurate, 4.7× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x + y \leq -5 \cdot 10^{+34}:\\ \;\;\;\;x + a \cdot b\\ \mathbf{elif}\;x + y \leq 10^{+50}:\\ \;\;\;\;\left(a - 0.5\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;y + a \cdot b\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (if (<= (+ x y) -5e+34)
                         (+ x (* a b))
                         (if (<= (+ x y) 1e+50) (* (- a 0.5) b) (+ y (* a b)))))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if ((x + y) <= -5e+34) {
                      		tmp = x + (a * b);
                      	} else if ((x + y) <= 1e+50) {
                      		tmp = (a - 0.5) * b;
                      	} else {
                      		tmp = y + (a * b);
                      	}
                      	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)
                      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) :: tmp
                          if ((x + y) <= (-5d+34)) then
                              tmp = x + (a * b)
                          else if ((x + y) <= 1d+50) then
                              tmp = (a - 0.5d0) * b
                          else
                              tmp = y + (a * b)
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if ((x + y) <= -5e+34) {
                      		tmp = x + (a * b);
                      	} else if ((x + y) <= 1e+50) {
                      		tmp = (a - 0.5) * b;
                      	} else {
                      		tmp = y + (a * b);
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a, b):
                      	tmp = 0
                      	if (x + y) <= -5e+34:
                      		tmp = x + (a * b)
                      	elif (x + y) <= 1e+50:
                      		tmp = (a - 0.5) * b
                      	else:
                      		tmp = y + (a * b)
                      	return tmp
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if (Float64(x + y) <= -5e+34)
                      		tmp = Float64(x + Float64(a * b));
                      	elseif (Float64(x + y) <= 1e+50)
                      		tmp = Float64(Float64(a - 0.5) * b);
                      	else
                      		tmp = Float64(y + Float64(a * b));
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a, b)
                      	tmp = 0.0;
                      	if ((x + y) <= -5e+34)
                      		tmp = x + (a * b);
                      	elseif ((x + y) <= 1e+50)
                      		tmp = (a - 0.5) * b;
                      	else
                      		tmp = y + (a * b);
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -5e+34], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 1e+50], N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;x + y \leq -5 \cdot 10^{+34}:\\
                      \;\;\;\;x + a \cdot b\\
                      
                      \mathbf{elif}\;x + y \leq 10^{+50}:\\
                      \;\;\;\;\left(a - 0.5\right) \cdot b\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;y + a \cdot b\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if (+.f64 x y) < -4.9999999999999998e34

                        1. Initial program 99.9%

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

                          \[\leadsto \color{blue}{x} + \left(a - \frac{1}{2}\right) \cdot b \]
                        4. Step-by-step derivation
                          1. Applied rewrites55.9%

                            \[\leadsto \color{blue}{x} + \left(a - 0.5\right) \cdot b \]
                          2. Taylor expanded in a around inf

                            \[\leadsto x + \color{blue}{a} \cdot b \]
                          3. Step-by-step derivation
                            1. Applied rewrites48.1%

                              \[\leadsto x + \color{blue}{a} \cdot b \]

                            if -4.9999999999999998e34 < (+.f64 x y) < 1.0000000000000001e50

                            1. Initial program 99.8%

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

                              \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                            4. Step-by-step derivation
                              1. *-commutativeN/A

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

                                \[\leadsto \left(a - \frac{1}{2}\right) \cdot \color{blue}{b} \]
                              3. lift--.f6453.3

                                \[\leadsto \left(a - 0.5\right) \cdot b \]
                            5. Applied rewrites53.3%

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

                            if 1.0000000000000001e50 < (+.f64 x y)

                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(\mathsf{fma}\left(1 - \log t, z, y\right) + x\right) + \color{blue}{a} \cdot b \]
                            7. Step-by-step derivation
                              1. Applied rewrites90.9%

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

                                \[\leadsto \color{blue}{y} + a \cdot b \]
                              3. Step-by-step derivation
                                1. Applied rewrites49.1%

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

                              Alternative 12: 46.0% accurate, 4.7× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x + y \leq -5 \cdot 10^{+34}:\\ \;\;\;\;x + a \cdot b\\ \mathbf{elif}\;x + y \leq 10^{+220}:\\ \;\;\;\;\left(a - 0.5\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                              (FPCore (x y z t a b)
                               :precision binary64
                               (if (<= (+ x y) -5e+34)
                                 (+ x (* a b))
                                 (if (<= (+ x y) 1e+220) (* (- a 0.5) b) y)))
                              double code(double x, double y, double z, double t, double a, double b) {
                              	double tmp;
                              	if ((x + y) <= -5e+34) {
                              		tmp = x + (a * b);
                              	} else if ((x + y) <= 1e+220) {
                              		tmp = (a - 0.5) * b;
                              	} else {
                              		tmp = y;
                              	}
                              	return tmp;
                              }
                              
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x, y, z, t, a, b)
                              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) :: tmp
                                  if ((x + y) <= (-5d+34)) then
                                      tmp = x + (a * b)
                                  else if ((x + y) <= 1d+220) then
                                      tmp = (a - 0.5d0) * b
                                  else
                                      tmp = y
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a, double b) {
                              	double tmp;
                              	if ((x + y) <= -5e+34) {
                              		tmp = x + (a * b);
                              	} else if ((x + y) <= 1e+220) {
                              		tmp = (a - 0.5) * b;
                              	} else {
                              		tmp = y;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b):
                              	tmp = 0
                              	if (x + y) <= -5e+34:
                              		tmp = x + (a * b)
                              	elif (x + y) <= 1e+220:
                              		tmp = (a - 0.5) * b
                              	else:
                              		tmp = y
                              	return tmp
                              
                              function code(x, y, z, t, a, b)
                              	tmp = 0.0
                              	if (Float64(x + y) <= -5e+34)
                              		tmp = Float64(x + Float64(a * b));
                              	elseif (Float64(x + y) <= 1e+220)
                              		tmp = Float64(Float64(a - 0.5) * b);
                              	else
                              		tmp = y;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a, b)
                              	tmp = 0.0;
                              	if ((x + y) <= -5e+34)
                              		tmp = x + (a * b);
                              	elseif ((x + y) <= 1e+220)
                              		tmp = (a - 0.5) * b;
                              	else
                              		tmp = y;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -5e+34], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 1e+220], N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision], y]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;x + y \leq -5 \cdot 10^{+34}:\\
                              \;\;\;\;x + a \cdot b\\
                              
                              \mathbf{elif}\;x + y \leq 10^{+220}:\\
                              \;\;\;\;\left(a - 0.5\right) \cdot b\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;y\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if (+.f64 x y) < -4.9999999999999998e34

                                1. Initial program 99.9%

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

                                  \[\leadsto \color{blue}{x} + \left(a - \frac{1}{2}\right) \cdot b \]
                                4. Step-by-step derivation
                                  1. Applied rewrites55.9%

                                    \[\leadsto \color{blue}{x} + \left(a - 0.5\right) \cdot b \]
                                  2. Taylor expanded in a around inf

                                    \[\leadsto x + \color{blue}{a} \cdot b \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites48.1%

                                      \[\leadsto x + \color{blue}{a} \cdot b \]

                                    if -4.9999999999999998e34 < (+.f64 x y) < 1e220

                                    1. Initial program 99.8%

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

                                      \[\leadsto \color{blue}{b \cdot \left(a - \frac{1}{2}\right)} \]
                                    4. Step-by-step derivation
                                      1. *-commutativeN/A

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

                                        \[\leadsto \left(a - \frac{1}{2}\right) \cdot \color{blue}{b} \]
                                      3. lift--.f6447.3

                                        \[\leadsto \left(a - 0.5\right) \cdot b \]
                                    5. Applied rewrites47.3%

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

                                    if 1e220 < (+.f64 x y)

                                    1. Initial program 99.9%

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

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

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

                                    Alternative 13: 77.0% accurate, 5.7× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, b, y + x\right)\\ \mathbf{if}\;a \leq -2.55 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 0.000205:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b)
                                     :precision binary64
                                     (let* ((t_1 (fma a b (+ y x))))
                                       (if (<= a -2.55e+28) t_1 (if (<= a 0.000205) (+ (fma -0.5 b y) x) t_1))))
                                    double code(double x, double y, double z, double t, double a, double b) {
                                    	double t_1 = fma(a, b, (y + x));
                                    	double tmp;
                                    	if (a <= -2.55e+28) {
                                    		tmp = t_1;
                                    	} else if (a <= 0.000205) {
                                    		tmp = fma(-0.5, b, y) + x;
                                    	} else {
                                    		tmp = t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a, b)
                                    	t_1 = fma(a, b, Float64(y + x))
                                    	tmp = 0.0
                                    	if (a <= -2.55e+28)
                                    		tmp = t_1;
                                    	elseif (a <= 0.000205)
                                    		tmp = Float64(fma(-0.5, b, y) + x);
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * b + N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.55e+28], t$95$1, If[LessEqual[a, 0.000205], N[(N[(-0.5 * b + y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \mathsf{fma}\left(a, b, y + x\right)\\
                                    \mathbf{if}\;a \leq -2.55 \cdot 10^{+28}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    \mathbf{elif}\;a \leq 0.000205:\\
                                    \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right) + x\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if a < -2.5500000000000002e28 or 2.05e-4 < a

                                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(y + x\right) + a \cdot b \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites82.0%

                                            \[\leadsto \left(y + x\right) + a \cdot b \]
                                          2. Step-by-step derivation
                                            1. lift-+.f64N/A

                                              \[\leadsto \color{blue}{\left(y + x\right) + a \cdot b} \]
                                            2. +-commutativeN/A

                                              \[\leadsto \color{blue}{a \cdot b + \left(y + x\right)} \]
                                            3. lift-*.f64N/A

                                              \[\leadsto \color{blue}{a \cdot b} + \left(y + x\right) \]
                                            4. lower-fma.f6482.0

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(a, b, y + x\right)} \]
                                          3. Applied rewrites82.0%

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

                                          if -2.5500000000000002e28 < a < 2.05e-4

                                          1. Initial program 99.8%

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

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

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

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

                                              \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + y\right) + x \]
                                            4. *-commutativeN/A

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

                                              \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                                            6. lift--.f6473.7

                                              \[\leadsto \mathsf{fma}\left(a - 0.5, b, y\right) + x \]
                                          5. Applied rewrites73.7%

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

                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, y\right) + x \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites72.1%

                                              \[\leadsto \mathsf{fma}\left(-0.5, b, y\right) + x \]
                                          8. Recombined 2 regimes into one program.
                                          9. Add Preprocessing

                                          Alternative 14: 68.7% accurate, 5.7× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + a \cdot b\\ \mathbf{if}\;a \leq -3.7 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+23}:\\ \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a b)
                                           :precision binary64
                                           (let* ((t_1 (+ x (* a b))))
                                             (if (<= a -3.7e+28) t_1 (if (<= a 6e+23) (+ (fma -0.5 b y) x) t_1))))
                                          double code(double x, double y, double z, double t, double a, double b) {
                                          	double t_1 = x + (a * b);
                                          	double tmp;
                                          	if (a <= -3.7e+28) {
                                          		tmp = t_1;
                                          	} else if (a <= 6e+23) {
                                          		tmp = fma(-0.5, b, y) + x;
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x, y, z, t, a, b)
                                          	t_1 = Float64(x + Float64(a * b))
                                          	tmp = 0.0
                                          	if (a <= -3.7e+28)
                                          		tmp = t_1;
                                          	elseif (a <= 6e+23)
                                          		tmp = Float64(fma(-0.5, b, y) + x);
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e+28], t$95$1, If[LessEqual[a, 6e+23], N[(N[(-0.5 * b + y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_1 := x + a \cdot b\\
                                          \mathbf{if}\;a \leq -3.7 \cdot 10^{+28}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;a \leq 6 \cdot 10^{+23}:\\
                                          \;\;\;\;\mathsf{fma}\left(-0.5, b, y\right) + x\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if a < -3.6999999999999999e28 or 6.0000000000000002e23 < a

                                            1. Initial program 99.9%

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

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

                                                \[\leadsto \color{blue}{x} + \left(a - 0.5\right) \cdot b \]
                                              2. Taylor expanded in a around inf

                                                \[\leadsto x + \color{blue}{a} \cdot b \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites66.2%

                                                  \[\leadsto x + \color{blue}{a} \cdot b \]

                                                if -3.6999999999999999e28 < a < 6.0000000000000002e23

                                                1. Initial program 99.8%

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

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

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

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

                                                    \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + y\right) + x \]
                                                  4. *-commutativeN/A

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

                                                    \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                                                  6. lift--.f6473.6

                                                    \[\leadsto \mathsf{fma}\left(a - 0.5, b, y\right) + x \]
                                                5. Applied rewrites73.6%

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

                                                  \[\leadsto \mathsf{fma}\left(\frac{-1}{2}, b, y\right) + x \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites70.9%

                                                    \[\leadsto \mathsf{fma}\left(-0.5, b, y\right) + x \]
                                                8. Recombined 2 regimes into one program.
                                                9. Add Preprocessing

                                                Alternative 15: 78.0% accurate, 9.7× speedup?

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

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

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

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

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

                                                    \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + y\right) + x \]
                                                  4. *-commutativeN/A

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

                                                    \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                                                  6. lift--.f6478.0

                                                    \[\leadsto \mathsf{fma}\left(a - 0.5, b, y\right) + x \]
                                                5. Applied rewrites78.0%

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(a - 0.5, b, y\right) + x} \]
                                                6. Add Preprocessing

                                                Alternative 16: 41.5% accurate, 31.5× speedup?

                                                \[\begin{array}{l} \\ y + x \end{array} \]
                                                (FPCore (x y z t a b) :precision binary64 (+ y x))
                                                double code(double x, double y, double z, double t, double a, double b) {
                                                	return y + x;
                                                }
                                                
                                                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)
                                                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
                                                    code = y + x
                                                end function
                                                
                                                public static double code(double x, double y, double z, double t, double a, double b) {
                                                	return y + x;
                                                }
                                                
                                                def code(x, y, z, t, a, b):
                                                	return y + x
                                                
                                                function code(x, y, z, t, a, b)
                                                	return Float64(y + x)
                                                end
                                                
                                                function tmp = code(x, y, z, t, a, b)
                                                	tmp = y + x;
                                                end
                                                
                                                code[x_, y_, z_, t_, a_, b_] := N[(y + x), $MachinePrecision]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                y + x
                                                \end{array}
                                                
                                                Derivation
                                                1. Initial program 99.9%

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

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

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

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

                                                    \[\leadsto \left(b \cdot \left(a - \frac{1}{2}\right) + y\right) + x \]
                                                  4. *-commutativeN/A

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

                                                    \[\leadsto \mathsf{fma}\left(a - \frac{1}{2}, b, y\right) + x \]
                                                  6. lift--.f6478.0

                                                    \[\leadsto \mathsf{fma}\left(a - 0.5, b, y\right) + x \]
                                                5. Applied rewrites78.0%

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

                                                  \[\leadsto y + x \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites41.5%

                                                    \[\leadsto y + x \]
                                                  2. Add Preprocessing

                                                  Alternative 17: 21.2% accurate, 126.0× speedup?

                                                  \[\begin{array}{l} \\ x \end{array} \]
                                                  (FPCore (x y z t a b) :precision binary64 x)
                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                  	return x;
                                                  }
                                                  
                                                  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)
                                                  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
                                                      code = x
                                                  end function
                                                  
                                                  public static double code(double x, double y, double z, double t, double a, double b) {
                                                  	return x;
                                                  }
                                                  
                                                  def code(x, y, z, t, a, b):
                                                  	return x
                                                  
                                                  function code(x, y, z, t, a, b)
                                                  	return x
                                                  end
                                                  
                                                  function tmp = code(x, y, z, t, a, b)
                                                  	tmp = x;
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_, b_] := x
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  x
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Initial program 99.9%

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

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

                                                      \[\leadsto \color{blue}{x} \]
                                                    2. Add Preprocessing

                                                    Developer Target 1: 99.6% accurate, 0.4× speedup?

                                                    \[\begin{array}{l} \\ \left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b \end{array} \]
                                                    (FPCore (x y z t a b)
                                                     :precision binary64
                                                     (+
                                                      (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t))))
                                                      (* (- a 0.5) b)))
                                                    double code(double x, double y, double z, double t, double a, double b) {
                                                    	return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
                                                    }
                                                    
                                                    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)
                                                    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
                                                        code = ((x + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
                                                    end function
                                                    
                                                    public static double code(double x, double y, double z, double t, double a, double b) {
                                                    	return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
                                                    }
                                                    
                                                    def code(x, y, z, t, a, b):
                                                    	return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
                                                    
                                                    function code(x, y, z, t, a, b)
                                                    	return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b))
                                                    end
                                                    
                                                    function tmp = code(x, y, z, t, a, b)
                                                    	tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b);
                                                    end
                                                    
                                                    code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
                                                    \end{array}
                                                    

                                                    Reproduce

                                                    ?
                                                    herbie shell --seed 2025091 
                                                    (FPCore (x y z t a b)
                                                      :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
                                                      :precision binary64
                                                    
                                                      :alt
                                                      (! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
                                                    
                                                      (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))