Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2

Percentage Accurate: 95.0% → 96.3%
Time: 8.8s
Alternatives: 22
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 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: 95.0% accurate, 1.0× speedup?

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

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

Alternative 1: 96.3% accurate, 1.1× speedup?

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

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

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

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

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

      \[\leadsto \left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)} \]
  5. Applied rewrites96.9%

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

Alternative 2: 64.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.3 \cdot 10^{+108}:\\ \;\;\;\;\left(b - a\right) \cdot t\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-7}:\\ \;\;\;\;\left(b - z\right) \cdot y - \left(t - 1\right) \cdot a\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+116}:\\ \;\;\;\;x + \mathsf{fma}\left(y, b, \left(t - 2\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, x - a \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -2.3e+108)
   (* (- b a) t)
   (if (<= t -1.6e-7)
     (- (* (- b z) y) (* (- t 1.0) a))
     (if (<= t 4.9e-19)
       (+ (fma -2.0 b (+ z x)) a)
       (if (<= t 7e+116)
         (+ x (fma y b (* (- t 2.0) b)))
         (fma (- t 2.0) b (- x (* a t))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -2.3e+108) {
		tmp = (b - a) * t;
	} else if (t <= -1.6e-7) {
		tmp = ((b - z) * y) - ((t - 1.0) * a);
	} else if (t <= 4.9e-19) {
		tmp = fma(-2.0, b, (z + x)) + a;
	} else if (t <= 7e+116) {
		tmp = x + fma(y, b, ((t - 2.0) * b));
	} else {
		tmp = fma((t - 2.0), b, (x - (a * t)));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -2.3e+108)
		tmp = Float64(Float64(b - a) * t);
	elseif (t <= -1.6e-7)
		tmp = Float64(Float64(Float64(b - z) * y) - Float64(Float64(t - 1.0) * a));
	elseif (t <= 4.9e-19)
		tmp = Float64(fma(-2.0, b, Float64(z + x)) + a);
	elseif (t <= 7e+116)
		tmp = Float64(x + fma(y, b, Float64(Float64(t - 2.0) * b)));
	else
		tmp = fma(Float64(t - 2.0), b, Float64(x - Float64(a * t)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.3e+108], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t, -1.6e-7], N[(N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.9e-19], N[(N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 7e+116], N[(x + N[(y * b + N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+108}:\\
\;\;\;\;\left(b - a\right) \cdot t\\

\mathbf{elif}\;t \leq -1.6 \cdot 10^{-7}:\\
\;\;\;\;\left(b - z\right) \cdot y - \left(t - 1\right) \cdot a\\

\mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\

\mathbf{elif}\;t \leq 7 \cdot 10^{+116}:\\
\;\;\;\;x + \mathsf{fma}\left(y, b, \left(t - 2\right) \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x - a \cdot t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.2999999999999999e108

    1. Initial program 95.5%

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

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

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

        \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
      3. lower--.f6484.8

        \[\leadsto \left(b - a\right) \cdot t \]
    5. Applied rewrites84.8%

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

    if -2.2999999999999999e108 < t < -1.6e-7

    1. Initial program 96.9%

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

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

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

        \[\leadsto \left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)} \]
    5. Applied rewrites96.9%

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

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

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

        \[\leadsto \left(b - z\right) \cdot y - \left(t - \color{blue}{1}\right) \cdot a \]
      3. lower--.f6472.8

        \[\leadsto \left(b - z\right) \cdot y - \left(t - 1\right) \cdot a \]
    8. Applied rewrites72.8%

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

    if -1.6e-7 < t < 4.89999999999999993e-19

    1. Initial program 97.4%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right) \]
      7. +-commutativeN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right)\right) \]
      12. lower-neg.f6472.4

        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right) \]
    5. Applied rewrites72.4%

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

      \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) - \color{blue}{-1 \cdot a} \]
    7. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \color{blue}{a} \]
      2. metadata-evalN/A

        \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + 1 \cdot a \]
      3. *-lft-identityN/A

        \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
      4. lower-+.f64N/A

        \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
      5. associate-+r+N/A

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

        \[\leadsto \left(-2 \cdot b + \left(x + z\right)\right) + a \]
      7. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-2, b, x + z\right) + a \]
      8. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
      9. lower-+.f6472.4

        \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
    8. Applied rewrites72.4%

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

    if 4.89999999999999993e-19 < t < 6.99999999999999993e116

    1. Initial program 88.5%

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

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

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

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

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

          \[\leadsto x + b \cdot \color{blue}{\left(\left(y + t\right) - 2\right)} \]
        4. lift-+.f64N/A

          \[\leadsto x + b \cdot \left(\color{blue}{\left(y + t\right)} - 2\right) \]
        5. associate--l+N/A

          \[\leadsto x + b \cdot \color{blue}{\left(y + \left(t - 2\right)\right)} \]
        6. lift--.f64N/A

          \[\leadsto x + b \cdot \left(y + \color{blue}{\left(t - 2\right)}\right) \]
        7. distribute-rgt-inN/A

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

          \[\leadsto x + \color{blue}{\mathsf{fma}\left(y, b, \left(t - 2\right) \cdot b\right)} \]
        9. lower-*.f6481.2

          \[\leadsto x + \mathsf{fma}\left(y, b, \color{blue}{\left(t - 2\right) \cdot b}\right) \]
      3. Applied rewrites81.2%

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

      if 6.99999999999999993e116 < t

      1. Initial program 90.0%

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(t - 2, b, x - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right) \]
        7. +-commutativeN/A

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

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

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

          \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right)\right) \]
        11. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right)\right) \]
        12. lower-neg.f6492.6

          \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right) \]
      5. Applied rewrites92.6%

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

        \[\leadsto \mathsf{fma}\left(t - 2, b, x - a \cdot t\right) \]
      7. Step-by-step derivation
        1. lower-*.f6490.2

          \[\leadsto \mathsf{fma}\left(t - 2, b, x - a \cdot t\right) \]
      8. Applied rewrites90.2%

        \[\leadsto \mathsf{fma}\left(t - 2, b, x - a \cdot t\right) \]
    5. Recombined 5 regimes into one program.
    6. Add Preprocessing

    Alternative 3: 49.0% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - y\right) \cdot z\\ t_2 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{+33}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -3.6 \cdot 10^{-165}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-157}:\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-29}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+112}:\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (* (- 1.0 y) z)) (t_2 (* (- b a) t)))
       (if (<= t -2.5e+33)
         t_2
         (if (<= t -3.6e-165)
           t_1
           (if (<= t 3e-157)
             (fma y b x)
             (if (<= t 2e-29) t_1 (if (<= t 3.1e+112) (fma y b x) t_2)))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = (1.0 - y) * z;
    	double t_2 = (b - a) * t;
    	double tmp;
    	if (t <= -2.5e+33) {
    		tmp = t_2;
    	} else if (t <= -3.6e-165) {
    		tmp = t_1;
    	} else if (t <= 3e-157) {
    		tmp = fma(y, b, x);
    	} else if (t <= 2e-29) {
    		tmp = t_1;
    	} else if (t <= 3.1e+112) {
    		tmp = fma(y, b, x);
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(Float64(1.0 - y) * z)
    	t_2 = Float64(Float64(b - a) * t)
    	tmp = 0.0
    	if (t <= -2.5e+33)
    		tmp = t_2;
    	elseif (t <= -3.6e-165)
    		tmp = t_1;
    	elseif (t <= 3e-157)
    		tmp = fma(y, b, x);
    	elseif (t <= 2e-29)
    		tmp = t_1;
    	elseif (t <= 3.1e+112)
    		tmp = fma(y, b, x);
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -2.5e+33], t$95$2, If[LessEqual[t, -3.6e-165], t$95$1, If[LessEqual[t, 3e-157], N[(y * b + x), $MachinePrecision], If[LessEqual[t, 2e-29], t$95$1, If[LessEqual[t, 3.1e+112], N[(y * b + x), $MachinePrecision], t$95$2]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(1 - y\right) \cdot z\\
    t_2 := \left(b - a\right) \cdot t\\
    \mathbf{if}\;t \leq -2.5 \cdot 10^{+33}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t \leq -3.6 \cdot 10^{-165}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 3 \cdot 10^{-157}:\\
    \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\
    
    \mathbf{elif}\;t \leq 2 \cdot 10^{-29}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq 3.1 \cdot 10^{+112}:\\
    \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -2.49999999999999986e33 or 3.09999999999999983e112 < t

      1. Initial program 93.4%

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

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

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

          \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
        3. lower--.f6481.4

          \[\leadsto \left(b - a\right) \cdot t \]
      5. Applied rewrites81.4%

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

      if -2.49999999999999986e33 < t < -3.59999999999999984e-165 or 3e-157 < t < 1.99999999999999989e-29

      1. Initial program 97.1%

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

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

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

          \[\leadsto \left(1 - y\right) \cdot \color{blue}{z} \]
        3. lower--.f6447.2

          \[\leadsto \left(1 - y\right) \cdot z \]
      5. Applied rewrites47.2%

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

      if -3.59999999999999984e-165 < t < 3e-157 or 1.99999999999999989e-29 < t < 3.09999999999999983e112

      1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
          5. Step-by-step derivation
            1. Applied rewrites50.0%

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

          Alternative 4: 68.3% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 1\right) \cdot a\\ \mathbf{if}\;a \leq -2.5 \cdot 10^{+124}:\\ \;\;\;\;\left(x + z\right) - t\_1\\ \mathbf{elif}\;a \leq -0.014 \lor \neg \left(a \leq 9.2 \cdot 10^{-79}\right):\\ \;\;\;\;\left(b - z\right) \cdot y - t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, y - 1, x\right) + t \cdot b\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (let* ((t_1 (* (- t 1.0) a)))
             (if (<= a -2.5e+124)
               (- (+ x z) t_1)
               (if (or (<= a -0.014) (not (<= a 9.2e-79)))
                 (- (* (- b z) y) t_1)
                 (+ (fma (- z) (- y 1.0) x) (* t b))))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double t_1 = (t - 1.0) * a;
          	double tmp;
          	if (a <= -2.5e+124) {
          		tmp = (x + z) - t_1;
          	} else if ((a <= -0.014) || !(a <= 9.2e-79)) {
          		tmp = ((b - z) * y) - t_1;
          	} else {
          		tmp = fma(-z, (y - 1.0), x) + (t * b);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	t_1 = Float64(Float64(t - 1.0) * a)
          	tmp = 0.0
          	if (a <= -2.5e+124)
          		tmp = Float64(Float64(x + z) - t_1);
          	elseif ((a <= -0.014) || !(a <= 9.2e-79))
          		tmp = Float64(Float64(Float64(b - z) * y) - t_1);
          	else
          		tmp = Float64(fma(Float64(-z), Float64(y - 1.0), x) + Float64(t * b));
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -2.5e+124], N[(N[(x + z), $MachinePrecision] - t$95$1), $MachinePrecision], If[Or[LessEqual[a, -0.014], N[Not[LessEqual[a, 9.2e-79]], $MachinePrecision]], N[(N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[((-z) * N[(y - 1.0), $MachinePrecision] + x), $MachinePrecision] + N[(t * b), $MachinePrecision]), $MachinePrecision]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(t - 1\right) \cdot a\\
          \mathbf{if}\;a \leq -2.5 \cdot 10^{+124}:\\
          \;\;\;\;\left(x + z\right) - t\_1\\
          
          \mathbf{elif}\;a \leq -0.014 \lor \neg \left(a \leq 9.2 \cdot 10^{-79}\right):\\
          \;\;\;\;\left(b - z\right) \cdot y - t\_1\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(-z, y - 1, x\right) + t \cdot b\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if a < -2.4999999999999998e124

            1. Initial program 89.7%

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

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

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

                \[\leadsto \left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)} \]
            5. Applied rewrites89.7%

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

              \[\leadsto \left(x + z\right) - \left(\color{blue}{t} - 1\right) \cdot a \]
            7. Step-by-step derivation
              1. Applied rewrites89.3%

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

              if -2.4999999999999998e124 < a < -0.0140000000000000003 or 9.20000000000000047e-79 < a

              1. Initial program 94.3%

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

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

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

                  \[\leadsto \left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)} \]
              5. Applied rewrites96.2%

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

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

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

                  \[\leadsto \left(b - z\right) \cdot y - \left(t - \color{blue}{1}\right) \cdot a \]
                3. lower--.f6477.0

                  \[\leadsto \left(b - z\right) \cdot y - \left(t - 1\right) \cdot a \]
              8. Applied rewrites77.0%

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

              if -0.0140000000000000003 < a < 9.20000000000000047e-79

              1. Initial program 97.3%

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

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

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

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

                    \[\leadsto x + \color{blue}{t} \cdot b \]
                  2. Taylor expanded in a around 0

                    \[\leadsto \color{blue}{\left(x - z \cdot \left(y - 1\right)\right)} + t \cdot b \]
                  3. Step-by-step derivation
                    1. fp-cancel-sub-sign-invN/A

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

                      \[\leadsto \left(\left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right) + \color{blue}{x}\right) + t \cdot b \]
                    3. mul-1-negN/A

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

                      \[\leadsto \mathsf{fma}\left(-1 \cdot z, \color{blue}{y - 1}, x\right) + t \cdot b \]
                    5. mul-1-negN/A

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

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

                      \[\leadsto \mathsf{fma}\left(-z, y - \color{blue}{1}, x\right) + t \cdot b \]
                  4. Applied rewrites78.1%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(-z, y - 1, x\right)} + t \cdot b \]
                4. Recombined 3 regimes into one program.
                5. Final simplification79.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+124}:\\ \;\;\;\;\left(x + z\right) - \left(t - 1\right) \cdot a\\ \mathbf{elif}\;a \leq -0.014 \lor \neg \left(a \leq 9.2 \cdot 10^{-79}\right):\\ \;\;\;\;\left(b - z\right) \cdot y - \left(t - 1\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, y - 1, x\right) + t \cdot b\\ \end{array} \]
                6. Add Preprocessing

                Alternative 5: 81.6% accurate, 1.0× speedup?

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

                  1. Initial program 89.1%

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

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

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

                    if -1.9999999999999999e124 < b < 2.25000000000000005e-35

                    1. Initial program 97.3%

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

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

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

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

                        \[\leadsto x - \mathsf{fma}\left(t - 1, \color{blue}{a}, z \cdot \left(y - 1\right)\right) \]
                      4. lower--.f64N/A

                        \[\leadsto x - \mathsf{fma}\left(t - 1, a, z \cdot \left(y - 1\right)\right) \]
                      5. *-commutativeN/A

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

                        \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                      7. lower--.f6486.4

                        \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                    5. Applied rewrites86.4%

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

                    if 2.25000000000000005e-35 < b < 5.19999999999999996e53

                    1. Initial program 100.0%

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

                      \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                    4. Step-by-step derivation
                      1. Applied rewrites54.8%

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

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

                          \[\leadsto x + \color{blue}{t} \cdot b \]
                        2. Taylor expanded in a around 0

                          \[\leadsto \color{blue}{\left(x - z \cdot \left(y - 1\right)\right)} + t \cdot b \]
                        3. Step-by-step derivation
                          1. fp-cancel-sub-sign-invN/A

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

                            \[\leadsto \left(\left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right) + \color{blue}{x}\right) + t \cdot b \]
                          3. mul-1-negN/A

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

                            \[\leadsto \mathsf{fma}\left(-1 \cdot z, \color{blue}{y - 1}, x\right) + t \cdot b \]
                          5. mul-1-negN/A

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

                            \[\leadsto \mathsf{fma}\left(-z, \color{blue}{y} - 1, x\right) + t \cdot b \]
                          7. lower--.f6490.4

                            \[\leadsto \mathsf{fma}\left(-z, y - \color{blue}{1}, x\right) + t \cdot b \]
                        4. Applied rewrites90.4%

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

                        if 5.19999999999999996e53 < b

                        1. Initial program 91.3%

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

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

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

                            \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} + \left(\left(y + t\right) - 2\right) \cdot b \]
                          3. lower--.f6476.7

                            \[\leadsto \left(1 - t\right) \cdot a + \left(\left(y + t\right) - 2\right) \cdot b \]
                        5. Applied rewrites76.7%

                          \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} + \left(\left(y + t\right) - 2\right) \cdot b \]
                        6. Taylor expanded in t around 0

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

                            \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]
                        8. Recombined 4 regimes into one program.
                        9. Add Preprocessing

                        Alternative 6: 86.7% accurate, 1.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -800 \lor \neg \left(y \leq 1.65 \cdot 10^{+109}\right):\\ \;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (if (or (<= y -800.0) (not (<= y 1.65e+109)))
                           (+ (fma (- b z) y (fma (- t 2.0) b x)) z)
                           (fma (- t 2.0) b (- x (fma (- t 1.0) a (- z))))))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double tmp;
                        	if ((y <= -800.0) || !(y <= 1.65e+109)) {
                        		tmp = fma((b - z), y, fma((t - 2.0), b, x)) + z;
                        	} else {
                        		tmp = fma((t - 2.0), b, (x - fma((t - 1.0), a, -z)));
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b)
                        	tmp = 0.0
                        	if ((y <= -800.0) || !(y <= 1.65e+109))
                        		tmp = Float64(fma(Float64(b - z), y, fma(Float64(t - 2.0), b, x)) + z);
                        	else
                        		tmp = fma(Float64(t - 2.0), b, Float64(x - fma(Float64(t - 1.0), a, Float64(-z))));
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -800.0], N[Not[LessEqual[y, 1.65e+109]], $MachinePrecision]], N[(N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b + N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y \leq -800 \lor \neg \left(y \leq 1.65 \cdot 10^{+109}\right):\\
                        \;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if y < -800 or 1.6499999999999999e109 < y

                          1. Initial program 89.7%

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

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

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

                              \[\leadsto \left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)} \]
                          5. Applied rewrites94.8%

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

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

                              \[\leadsto x + \left(\left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right) + z\right) \]
                            2. associate-+r+N/A

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

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

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

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

                              \[\leadsto \left(\left(\left(b - z\right) \cdot y + \left(t - 2\right) \cdot b\right) + x\right) + z \]
                            7. associate-+r+N/A

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

                              \[\leadsto \left(\left(b - z\right) \cdot y + \left(\left(t - 2\right) \cdot b + x\right)\right) + z \]
                            9. lower-fma.f64N/A

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

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

                              \[\leadsto \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z \]
                            12. lower--.f6480.1

                              \[\leadsto \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z \]
                          8. Applied rewrites80.1%

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

                          if -800 < y < 1.6499999999999999e109

                          1. Initial program 98.1%

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right) \]
                            7. +-commutativeN/A

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

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

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

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right)\right) \]
                            11. mul-1-negN/A

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right)\right) \]
                            12. lower-neg.f6496.2

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right) \]
                          5. Applied rewrites96.2%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)} \]
                        3. Recombined 2 regimes into one program.
                        4. Final simplification90.1%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -800 \lor \neg \left(y \leq 1.65 \cdot 10^{+109}\right):\\ \;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 7: 65.0% accurate, 1.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t - 2, b, x - a \cdot t\right)\\ \mathbf{if}\;t \leq -2.2 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+116}:\\ \;\;\;\;x + \mathsf{fma}\left(y, b, \left(t - 2\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                        (FPCore (x y z t a b)
                         :precision binary64
                         (let* ((t_1 (fma (- t 2.0) b (- x (* a t)))))
                           (if (<= t -2.2e+33)
                             t_1
                             (if (<= t 4.9e-19)
                               (+ (fma -2.0 b (+ z x)) a)
                               (if (<= t 7e+116) (+ x (fma y b (* (- t 2.0) b))) t_1)))))
                        double code(double x, double y, double z, double t, double a, double b) {
                        	double t_1 = fma((t - 2.0), b, (x - (a * t)));
                        	double tmp;
                        	if (t <= -2.2e+33) {
                        		tmp = t_1;
                        	} else if (t <= 4.9e-19) {
                        		tmp = fma(-2.0, b, (z + x)) + a;
                        	} else if (t <= 7e+116) {
                        		tmp = x + fma(y, b, ((t - 2.0) * b));
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a, b)
                        	t_1 = fma(Float64(t - 2.0), b, Float64(x - Float64(a * t)))
                        	tmp = 0.0
                        	if (t <= -2.2e+33)
                        		tmp = t_1;
                        	elseif (t <= 4.9e-19)
                        		tmp = Float64(fma(-2.0, b, Float64(z + x)) + a);
                        	elseif (t <= 7e+116)
                        		tmp = Float64(x + fma(y, b, Float64(Float64(t - 2.0) * b)));
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 2.0), $MachinePrecision] * b + N[(x - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e+33], t$95$1, If[LessEqual[t, 4.9e-19], N[(N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 7e+116], N[(x + N[(y * b + N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \mathsf{fma}\left(t - 2, b, x - a \cdot t\right)\\
                        \mathbf{if}\;t \leq -2.2 \cdot 10^{+33}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\
                        \;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\
                        
                        \mathbf{elif}\;t \leq 7 \cdot 10^{+116}:\\
                        \;\;\;\;x + \mathsf{fma}\left(y, b, \left(t - 2\right) \cdot b\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if t < -2.19999999999999994e33 or 6.99999999999999993e116 < t

                          1. Initial program 94.3%

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right) \]
                            7. +-commutativeN/A

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

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

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

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right)\right) \]
                            11. mul-1-negN/A

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right)\right) \]
                            12. lower-neg.f6484.4

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right) \]
                          5. Applied rewrites84.4%

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

                            \[\leadsto \mathsf{fma}\left(t - 2, b, x - a \cdot t\right) \]
                          7. Step-by-step derivation
                            1. lower-*.f6482.6

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - a \cdot t\right) \]
                          8. Applied rewrites82.6%

                            \[\leadsto \mathsf{fma}\left(t - 2, b, x - a \cdot t\right) \]

                          if -2.19999999999999994e33 < t < 4.89999999999999993e-19

                          1. Initial program 96.8%

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right) \]
                            7. +-commutativeN/A

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

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

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

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right)\right) \]
                            11. mul-1-negN/A

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right)\right) \]
                            12. lower-neg.f6471.1

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right) \]
                          5. Applied rewrites71.1%

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

                            \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) - \color{blue}{-1 \cdot a} \]
                          7. Step-by-step derivation
                            1. fp-cancel-sub-sign-invN/A

                              \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \color{blue}{a} \]
                            2. metadata-evalN/A

                              \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + 1 \cdot a \]
                            3. *-lft-identityN/A

                              \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
                            4. lower-+.f64N/A

                              \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
                            5. associate-+r+N/A

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

                              \[\leadsto \left(-2 \cdot b + \left(x + z\right)\right) + a \]
                            7. lower-fma.f64N/A

                              \[\leadsto \mathsf{fma}\left(-2, b, x + z\right) + a \]
                            8. +-commutativeN/A

                              \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
                            9. lower-+.f6469.4

                              \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
                          8. Applied rewrites69.4%

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

                          if 4.89999999999999993e-19 < t < 6.99999999999999993e116

                          1. Initial program 88.5%

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

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

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

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

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

                                \[\leadsto x + b \cdot \color{blue}{\left(\left(y + t\right) - 2\right)} \]
                              4. lift-+.f64N/A

                                \[\leadsto x + b \cdot \left(\color{blue}{\left(y + t\right)} - 2\right) \]
                              5. associate--l+N/A

                                \[\leadsto x + b \cdot \color{blue}{\left(y + \left(t - 2\right)\right)} \]
                              6. lift--.f64N/A

                                \[\leadsto x + b \cdot \left(y + \color{blue}{\left(t - 2\right)}\right) \]
                              7. distribute-rgt-inN/A

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

                                \[\leadsto x + \color{blue}{\mathsf{fma}\left(y, b, \left(t - 2\right) \cdot b\right)} \]
                              9. lower-*.f6481.2

                                \[\leadsto x + \mathsf{fma}\left(y, b, \color{blue}{\left(t - 2\right) \cdot b}\right) \]
                            3. Applied rewrites81.2%

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

                          Alternative 8: 65.2% accurate, 1.0× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t - 2, b, x - a \cdot t\right)\\ \mathbf{if}\;t \leq -2.2 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+116}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (let* ((t_1 (fma (- t 2.0) b (- x (* a t)))))
                             (if (<= t -2.2e+33)
                               t_1
                               (if (<= t 4.9e-19)
                                 (+ (fma -2.0 b (+ z x)) a)
                                 (if (<= t 7e+116) (+ x (* (- (+ y t) 2.0) b)) t_1)))))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double t_1 = fma((t - 2.0), b, (x - (a * t)));
                          	double tmp;
                          	if (t <= -2.2e+33) {
                          		tmp = t_1;
                          	} else if (t <= 4.9e-19) {
                          		tmp = fma(-2.0, b, (z + x)) + a;
                          	} else if (t <= 7e+116) {
                          		tmp = x + (((y + t) - 2.0) * b);
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a, b)
                          	t_1 = fma(Float64(t - 2.0), b, Float64(x - Float64(a * t)))
                          	tmp = 0.0
                          	if (t <= -2.2e+33)
                          		tmp = t_1;
                          	elseif (t <= 4.9e-19)
                          		tmp = Float64(fma(-2.0, b, Float64(z + x)) + a);
                          	elseif (t <= 7e+116)
                          		tmp = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b));
                          	else
                          		tmp = t_1;
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 2.0), $MachinePrecision] * b + N[(x - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e+33], t$95$1, If[LessEqual[t, 4.9e-19], N[(N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 7e+116], N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \mathsf{fma}\left(t - 2, b, x - a \cdot t\right)\\
                          \mathbf{if}\;t \leq -2.2 \cdot 10^{+33}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\
                          \;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\
                          
                          \mathbf{elif}\;t \leq 7 \cdot 10^{+116}:\\
                          \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if t < -2.19999999999999994e33 or 6.99999999999999993e116 < t

                            1. Initial program 94.3%

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right) \]
                              7. +-commutativeN/A

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

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

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

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right)\right) \]
                              11. mul-1-negN/A

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right)\right) \]
                              12. lower-neg.f6484.4

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right) \]
                            5. Applied rewrites84.4%

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

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - a \cdot t\right) \]
                            7. Step-by-step derivation
                              1. lower-*.f6482.6

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - a \cdot t\right) \]
                            8. Applied rewrites82.6%

                              \[\leadsto \mathsf{fma}\left(t - 2, b, x - a \cdot t\right) \]

                            if -2.19999999999999994e33 < t < 4.89999999999999993e-19

                            1. Initial program 96.8%

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right) \]
                              7. +-commutativeN/A

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

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

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

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right)\right) \]
                              11. mul-1-negN/A

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right)\right) \]
                              12. lower-neg.f6471.1

                                \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right) \]
                            5. Applied rewrites71.1%

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

                              \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) - \color{blue}{-1 \cdot a} \]
                            7. Step-by-step derivation
                              1. fp-cancel-sub-sign-invN/A

                                \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \color{blue}{a} \]
                              2. metadata-evalN/A

                                \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + 1 \cdot a \]
                              3. *-lft-identityN/A

                                \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
                              4. lower-+.f64N/A

                                \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
                              5. associate-+r+N/A

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

                                \[\leadsto \left(-2 \cdot b + \left(x + z\right)\right) + a \]
                              7. lower-fma.f64N/A

                                \[\leadsto \mathsf{fma}\left(-2, b, x + z\right) + a \]
                              8. +-commutativeN/A

                                \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
                              9. lower-+.f6469.4

                                \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
                            8. Applied rewrites69.4%

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

                            if 4.89999999999999993e-19 < t < 6.99999999999999993e116

                            1. Initial program 88.5%

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

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

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

                            Alternative 9: 87.1% accurate, 1.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+33} \lor \neg \left(a \leq 5.2 \cdot 10^{+96}\right):\\ \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (if (or (<= a -3.5e+33) (not (<= a 5.2e+96)))
                               (- x (fma (- t 1.0) a (* (- y 1.0) z)))
                               (+ (fma (- b z) y (fma (- t 2.0) b x)) z)))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double tmp;
                            	if ((a <= -3.5e+33) || !(a <= 5.2e+96)) {
                            		tmp = x - fma((t - 1.0), a, ((y - 1.0) * z));
                            	} else {
                            		tmp = fma((b - z), y, fma((t - 2.0), b, x)) + z;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a, b)
                            	tmp = 0.0
                            	if ((a <= -3.5e+33) || !(a <= 5.2e+96))
                            		tmp = Float64(x - fma(Float64(t - 1.0), a, Float64(Float64(y - 1.0) * z)));
                            	else
                            		tmp = Float64(fma(Float64(b - z), y, fma(Float64(t - 2.0), b, x)) + z);
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.5e+33], N[Not[LessEqual[a, 5.2e+96]], $MachinePrecision]], N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;a \leq -3.5 \cdot 10^{+33} \lor \neg \left(a \leq 5.2 \cdot 10^{+96}\right):\\
                            \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if a < -3.5000000000000001e33 or 5.2e96 < a

                              1. Initial program 93.3%

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

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

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

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

                                  \[\leadsto x - \mathsf{fma}\left(t - 1, \color{blue}{a}, z \cdot \left(y - 1\right)\right) \]
                                4. lower--.f64N/A

                                  \[\leadsto x - \mathsf{fma}\left(t - 1, a, z \cdot \left(y - 1\right)\right) \]
                                5. *-commutativeN/A

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

                                  \[\leadsto x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right) \]
                                7. lower--.f6485.9

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

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

                              if -3.5000000000000001e33 < a < 5.2e96

                              1. Initial program 96.0%

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

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

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

                                  \[\leadsto \left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)} \]
                              5. Applied rewrites100.0%

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

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

                                  \[\leadsto x + \left(\left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right) + z\right) \]
                                2. associate-+r+N/A

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

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

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

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

                                  \[\leadsto \left(\left(\left(b - z\right) \cdot y + \left(t - 2\right) \cdot b\right) + x\right) + z \]
                                7. associate-+r+N/A

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

                                  \[\leadsto \left(\left(b - z\right) \cdot y + \left(\left(t - 2\right) \cdot b + x\right)\right) + z \]
                                9. lower-fma.f64N/A

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

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

                                  \[\leadsto \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z \]
                                12. lower--.f6489.6

                                  \[\leadsto \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z \]
                              8. Applied rewrites89.6%

                                \[\leadsto \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + \color{blue}{z} \]
                            3. Recombined 2 regimes into one program.
                            4. Final simplification88.1%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.5 \cdot 10^{+33} \lor \neg \left(a \leq 5.2 \cdot 10^{+96}\right):\\ \;\;\;\;x - \mathsf{fma}\left(t - 1, a, \left(y - 1\right) \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x\right)\right) + z\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 10: 54.7% accurate, 1.1× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -1.85 \cdot 10^{+25}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.05 \cdot 10^{-144}:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-29}:\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+112}:\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                            (FPCore (x y z t a b)
                             :precision binary64
                             (let* ((t_1 (* (- b a) t)))
                               (if (<= t -1.85e+25)
                                 t_1
                                 (if (<= t 5.05e-144)
                                   (fma (- y 2.0) b x)
                                   (if (<= t 2e-29)
                                     (* (- 1.0 y) z)
                                     (if (<= t 3.1e+112) (fma y b x) t_1))))))
                            double code(double x, double y, double z, double t, double a, double b) {
                            	double t_1 = (b - a) * t;
                            	double tmp;
                            	if (t <= -1.85e+25) {
                            		tmp = t_1;
                            	} else if (t <= 5.05e-144) {
                            		tmp = fma((y - 2.0), b, x);
                            	} else if (t <= 2e-29) {
                            		tmp = (1.0 - y) * z;
                            	} else if (t <= 3.1e+112) {
                            		tmp = fma(y, b, x);
                            	} else {
                            		tmp = t_1;
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a, b)
                            	t_1 = Float64(Float64(b - a) * t)
                            	tmp = 0.0
                            	if (t <= -1.85e+25)
                            		tmp = t_1;
                            	elseif (t <= 5.05e-144)
                            		tmp = fma(Float64(y - 2.0), b, x);
                            	elseif (t <= 2e-29)
                            		tmp = Float64(Float64(1.0 - y) * z);
                            	elseif (t <= 3.1e+112)
                            		tmp = fma(y, b, x);
                            	else
                            		tmp = t_1;
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.85e+25], t$95$1, If[LessEqual[t, 5.05e-144], N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision], If[LessEqual[t, 2e-29], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 3.1e+112], N[(y * b + x), $MachinePrecision], t$95$1]]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := \left(b - a\right) \cdot t\\
                            \mathbf{if}\;t \leq -1.85 \cdot 10^{+25}:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;t \leq 5.05 \cdot 10^{-144}:\\
                            \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
                            
                            \mathbf{elif}\;t \leq 2 \cdot 10^{-29}:\\
                            \;\;\;\;\left(1 - y\right) \cdot z\\
                            
                            \mathbf{elif}\;t \leq 3.1 \cdot 10^{+112}:\\
                            \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_1\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 regimes
                            2. if t < -1.8499999999999999e25 or 3.09999999999999983e112 < t

                              1. Initial program 93.4%

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

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

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

                                  \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                                3. lower--.f6480.7

                                  \[\leadsto \left(b - a\right) \cdot t \]
                              5. Applied rewrites80.7%

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

                              if -1.8499999999999999e25 < t < 5.0499999999999999e-144

                              1. Initial program 96.1%

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

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

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

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

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

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

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

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

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

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

                                  if 5.0499999999999999e-144 < t < 1.99999999999999989e-29

                                  1. Initial program 100.0%

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

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

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

                                      \[\leadsto \left(1 - y\right) \cdot \color{blue}{z} \]
                                    3. lower--.f6462.8

                                      \[\leadsto \left(1 - y\right) \cdot z \]
                                  5. Applied rewrites62.8%

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

                                  if 1.99999999999999989e-29 < t < 3.09999999999999983e112

                                  1. Initial program 92.0%

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

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

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

                                      \[\leadsto x + \left(\color{blue}{y} - 2\right) \cdot b \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites64.7%

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

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

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

                                          \[\leadsto \color{blue}{\left(y - 2\right) \cdot b} + x \]
                                        4. lower-fma.f6464.7

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(y - 2, b, x\right)} \]
                                      3. Applied rewrites64.7%

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

                                        \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
                                      5. Step-by-step derivation
                                        1. Applied rewrites64.9%

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

                                      Alternative 11: 46.1% accurate, 1.1× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - t\right) \cdot a\\ \mathbf{if}\;a \leq -4.1 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-18}:\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-80}:\\ \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+65}:\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a b)
                                       :precision binary64
                                       (let* ((t_1 (* (- 1.0 t) a)))
                                         (if (<= a -4.1e+68)
                                           t_1
                                           (if (<= a -1.4e-18)
                                             (fma y b x)
                                             (if (<= a 2.6e-80)
                                               (fma t b x)
                                               (if (<= a 1.5e+65) (* (- 1.0 y) z) t_1))))))
                                      double code(double x, double y, double z, double t, double a, double b) {
                                      	double t_1 = (1.0 - t) * a;
                                      	double tmp;
                                      	if (a <= -4.1e+68) {
                                      		tmp = t_1;
                                      	} else if (a <= -1.4e-18) {
                                      		tmp = fma(y, b, x);
                                      	} else if (a <= 2.6e-80) {
                                      		tmp = fma(t, b, x);
                                      	} else if (a <= 1.5e+65) {
                                      		tmp = (1.0 - y) * z;
                                      	} else {
                                      		tmp = t_1;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(x, y, z, t, a, b)
                                      	t_1 = Float64(Float64(1.0 - t) * a)
                                      	tmp = 0.0
                                      	if (a <= -4.1e+68)
                                      		tmp = t_1;
                                      	elseif (a <= -1.4e-18)
                                      		tmp = fma(y, b, x);
                                      	elseif (a <= 2.6e-80)
                                      		tmp = fma(t, b, x);
                                      	elseif (a <= 1.5e+65)
                                      		tmp = Float64(Float64(1.0 - y) * z);
                                      	else
                                      		tmp = t_1;
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -4.1e+68], t$95$1, If[LessEqual[a, -1.4e-18], N[(y * b + x), $MachinePrecision], If[LessEqual[a, 2.6e-80], N[(t * b + x), $MachinePrecision], If[LessEqual[a, 1.5e+65], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := \left(1 - t\right) \cdot a\\
                                      \mathbf{if}\;a \leq -4.1 \cdot 10^{+68}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;a \leq -1.4 \cdot 10^{-18}:\\
                                      \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\
                                      
                                      \mathbf{elif}\;a \leq 2.6 \cdot 10^{-80}:\\
                                      \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
                                      
                                      \mathbf{elif}\;a \leq 1.5 \cdot 10^{+65}:\\
                                      \;\;\;\;\left(1 - y\right) \cdot z\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 4 regimes
                                      2. if a < -4.0999999999999999e68 or 1.5000000000000001e65 < a

                                        1. Initial program 91.7%

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

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

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

                                            \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} \]
                                          3. lower--.f6469.5

                                            \[\leadsto \left(1 - t\right) \cdot a \]
                                        5. Applied rewrites69.5%

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

                                        if -4.0999999999999999e68 < a < -1.40000000000000006e-18

                                        1. Initial program 95.0%

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

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

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

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

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

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

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

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

                                                \[\leadsto \color{blue}{\mathsf{fma}\left(y - 2, b, x\right)} \]
                                            3. Applied rewrites57.0%

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

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
                                            5. Step-by-step derivation
                                              1. Applied rewrites52.1%

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

                                              if -1.40000000000000006e-18 < a < 2.6000000000000001e-80

                                              1. Initial program 97.2%

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

                                                \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites70.8%

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

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

                                                    \[\leadsto x + \color{blue}{t} \cdot b \]
                                                  2. Step-by-step derivation
                                                    1. lift-+.f64N/A

                                                      \[\leadsto \color{blue}{x + t \cdot b} \]
                                                    2. +-commutativeN/A

                                                      \[\leadsto \color{blue}{t \cdot b + x} \]
                                                    3. lift-*.f64N/A

                                                      \[\leadsto \color{blue}{t \cdot b} + x \]
                                                    4. lower-fma.f6452.3

                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(t, b, x\right)} \]
                                                  3. Applied rewrites52.3%

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

                                                  if 2.6000000000000001e-80 < a < 1.5000000000000001e65

                                                  1. Initial program 97.0%

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

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

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

                                                      \[\leadsto \left(1 - y\right) \cdot \color{blue}{z} \]
                                                    3. lower--.f6441.6

                                                      \[\leadsto \left(1 - y\right) \cdot z \]
                                                  5. Applied rewrites41.6%

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

                                                Alternative 12: 63.0% accurate, 1.1× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{+112}:\\ \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a b)
                                                 :precision binary64
                                                 (let* ((t_1 (* (- b a) t)))
                                                   (if (<= t -2.5e+33)
                                                     t_1
                                                     (if (<= t 4.9e-19)
                                                       (+ (fma -2.0 b (+ z x)) a)
                                                       (if (<= t 5.8e+112) (+ x (* (- (+ y t) 2.0) b)) t_1)))))
                                                double code(double x, double y, double z, double t, double a, double b) {
                                                	double t_1 = (b - a) * t;
                                                	double tmp;
                                                	if (t <= -2.5e+33) {
                                                		tmp = t_1;
                                                	} else if (t <= 4.9e-19) {
                                                		tmp = fma(-2.0, b, (z + x)) + a;
                                                	} else if (t <= 5.8e+112) {
                                                		tmp = x + (((y + t) - 2.0) * b);
                                                	} else {
                                                		tmp = t_1;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(x, y, z, t, a, b)
                                                	t_1 = Float64(Float64(b - a) * t)
                                                	tmp = 0.0
                                                	if (t <= -2.5e+33)
                                                		tmp = t_1;
                                                	elseif (t <= 4.9e-19)
                                                		tmp = Float64(fma(-2.0, b, Float64(z + x)) + a);
                                                	elseif (t <= 5.8e+112)
                                                		tmp = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b));
                                                	else
                                                		tmp = t_1;
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -2.5e+33], t$95$1, If[LessEqual[t, 4.9e-19], N[(N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 5.8e+112], N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_1 := \left(b - a\right) \cdot t\\
                                                \mathbf{if}\;t \leq -2.5 \cdot 10^{+33}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                \mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\
                                                \;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\
                                                
                                                \mathbf{elif}\;t \leq 5.8 \cdot 10^{+112}:\\
                                                \;\;\;\;x + \left(\left(y + t\right) - 2\right) \cdot b\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if t < -2.49999999999999986e33 or 5.8000000000000004e112 < t

                                                  1. Initial program 93.4%

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

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

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

                                                      \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                                                    3. lower--.f6481.4

                                                      \[\leadsto \left(b - a\right) \cdot t \]
                                                  5. Applied rewrites81.4%

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

                                                  if -2.49999999999999986e33 < t < 4.89999999999999993e-19

                                                  1. Initial program 96.8%

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(t - 2, b, x - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right) \]
                                                    7. +-commutativeN/A

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right)\right) \]
                                                    11. mul-1-negN/A

                                                      \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right)\right) \]
                                                    12. lower-neg.f6471.1

                                                      \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right) \]
                                                  5. Applied rewrites71.1%

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

                                                    \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) - \color{blue}{-1 \cdot a} \]
                                                  7. Step-by-step derivation
                                                    1. fp-cancel-sub-sign-invN/A

                                                      \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \color{blue}{a} \]
                                                    2. metadata-evalN/A

                                                      \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + 1 \cdot a \]
                                                    3. *-lft-identityN/A

                                                      \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
                                                    4. lower-+.f64N/A

                                                      \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
                                                    5. associate-+r+N/A

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

                                                      \[\leadsto \left(-2 \cdot b + \left(x + z\right)\right) + a \]
                                                    7. lower-fma.f64N/A

                                                      \[\leadsto \mathsf{fma}\left(-2, b, x + z\right) + a \]
                                                    8. +-commutativeN/A

                                                      \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
                                                    9. lower-+.f6469.4

                                                      \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
                                                  8. Applied rewrites69.4%

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

                                                  if 4.89999999999999993e-19 < t < 5.8000000000000004e112

                                                  1. Initial program 92.0%

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

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

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

                                                  Alternative 13: 61.5% accurate, 1.4× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -2.5 \cdot 10^{+33}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\ \;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+112}:\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                  (FPCore (x y z t a b)
                                                   :precision binary64
                                                   (let* ((t_1 (* (- b a) t)))
                                                     (if (<= t -2.5e+33)
                                                       t_1
                                                       (if (<= t 4.9e-19)
                                                         (+ (fma -2.0 b (+ z x)) a)
                                                         (if (<= t 3.1e+112) (fma y b x) t_1)))))
                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                  	double t_1 = (b - a) * t;
                                                  	double tmp;
                                                  	if (t <= -2.5e+33) {
                                                  		tmp = t_1;
                                                  	} else if (t <= 4.9e-19) {
                                                  		tmp = fma(-2.0, b, (z + x)) + a;
                                                  	} else if (t <= 3.1e+112) {
                                                  		tmp = fma(y, b, x);
                                                  	} else {
                                                  		tmp = t_1;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(x, y, z, t, a, b)
                                                  	t_1 = Float64(Float64(b - a) * t)
                                                  	tmp = 0.0
                                                  	if (t <= -2.5e+33)
                                                  		tmp = t_1;
                                                  	elseif (t <= 4.9e-19)
                                                  		tmp = Float64(fma(-2.0, b, Float64(z + x)) + a);
                                                  	elseif (t <= 3.1e+112)
                                                  		tmp = fma(y, b, x);
                                                  	else
                                                  		tmp = t_1;
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -2.5e+33], t$95$1, If[LessEqual[t, 4.9e-19], N[(N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 3.1e+112], N[(y * b + x), $MachinePrecision], t$95$1]]]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  t_1 := \left(b - a\right) \cdot t\\
                                                  \mathbf{if}\;t \leq -2.5 \cdot 10^{+33}:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  \mathbf{elif}\;t \leq 4.9 \cdot 10^{-19}:\\
                                                  \;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\
                                                  
                                                  \mathbf{elif}\;t \leq 3.1 \cdot 10^{+112}:\\
                                                  \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;t\_1\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 3 regimes
                                                  2. if t < -2.49999999999999986e33 or 3.09999999999999983e112 < t

                                                    1. Initial program 93.4%

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

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

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

                                                        \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                                                      3. lower--.f6481.4

                                                        \[\leadsto \left(b - a\right) \cdot t \]
                                                    5. Applied rewrites81.4%

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

                                                    if -2.49999999999999986e33 < t < 4.89999999999999993e-19

                                                    1. Initial program 96.8%

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

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

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

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

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right)\right) \]
                                                      7. +-commutativeN/A

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

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

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

                                                        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -1 \cdot z\right)\right) \]
                                                      11. mul-1-negN/A

                                                        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, \mathsf{neg}\left(z\right)\right)\right) \]
                                                      12. lower-neg.f6471.1

                                                        \[\leadsto \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right) \]
                                                    5. Applied rewrites71.1%

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

                                                      \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) - \color{blue}{-1 \cdot a} \]
                                                    7. Step-by-step derivation
                                                      1. fp-cancel-sub-sign-invN/A

                                                        \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \color{blue}{a} \]
                                                      2. metadata-evalN/A

                                                        \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + 1 \cdot a \]
                                                      3. *-lft-identityN/A

                                                        \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
                                                      4. lower-+.f64N/A

                                                        \[\leadsto \left(x + \left(z + -2 \cdot b\right)\right) + a \]
                                                      5. associate-+r+N/A

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

                                                        \[\leadsto \left(-2 \cdot b + \left(x + z\right)\right) + a \]
                                                      7. lower-fma.f64N/A

                                                        \[\leadsto \mathsf{fma}\left(-2, b, x + z\right) + a \]
                                                      8. +-commutativeN/A

                                                        \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
                                                      9. lower-+.f6469.4

                                                        \[\leadsto \mathsf{fma}\left(-2, b, z + x\right) + a \]
                                                    8. Applied rewrites69.4%

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

                                                    if 4.89999999999999993e-19 < t < 3.09999999999999983e112

                                                    1. Initial program 92.0%

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

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

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

                                                        \[\leadsto x + \left(\color{blue}{y} - 2\right) \cdot b \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites64.7%

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

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

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

                                                            \[\leadsto \color{blue}{\left(y - 2\right) \cdot b} + x \]
                                                          4. lower-fma.f6464.7

                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(y - 2, b, x\right)} \]
                                                        3. Applied rewrites64.7%

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

                                                          \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
                                                        5. Step-by-step derivation
                                                          1. Applied rewrites64.9%

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

                                                        Alternative 14: 46.3% accurate, 1.4× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(1 - t\right) \cdot a\\ \mathbf{if}\;a \leq -4.1 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.4 \cdot 10^{-18}:\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                        (FPCore (x y z t a b)
                                                         :precision binary64
                                                         (let* ((t_1 (* (- 1.0 t) a)))
                                                           (if (<= a -4.1e+68)
                                                             t_1
                                                             (if (<= a -1.4e-18) (fma y b x) (if (<= a 1.4e+54) (fma t b x) t_1)))))
                                                        double code(double x, double y, double z, double t, double a, double b) {
                                                        	double t_1 = (1.0 - t) * a;
                                                        	double tmp;
                                                        	if (a <= -4.1e+68) {
                                                        		tmp = t_1;
                                                        	} else if (a <= -1.4e-18) {
                                                        		tmp = fma(y, b, x);
                                                        	} else if (a <= 1.4e+54) {
                                                        		tmp = fma(t, b, x);
                                                        	} else {
                                                        		tmp = t_1;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        function code(x, y, z, t, a, b)
                                                        	t_1 = Float64(Float64(1.0 - t) * a)
                                                        	tmp = 0.0
                                                        	if (a <= -4.1e+68)
                                                        		tmp = t_1;
                                                        	elseif (a <= -1.4e-18)
                                                        		tmp = fma(y, b, x);
                                                        	elseif (a <= 1.4e+54)
                                                        		tmp = fma(t, b, x);
                                                        	else
                                                        		tmp = t_1;
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -4.1e+68], t$95$1, If[LessEqual[a, -1.4e-18], N[(y * b + x), $MachinePrecision], If[LessEqual[a, 1.4e+54], N[(t * b + x), $MachinePrecision], t$95$1]]]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        t_1 := \left(1 - t\right) \cdot a\\
                                                        \mathbf{if}\;a \leq -4.1 \cdot 10^{+68}:\\
                                                        \;\;\;\;t\_1\\
                                                        
                                                        \mathbf{elif}\;a \leq -1.4 \cdot 10^{-18}:\\
                                                        \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\
                                                        
                                                        \mathbf{elif}\;a \leq 1.4 \cdot 10^{+54}:\\
                                                        \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;t\_1\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if a < -4.0999999999999999e68 or 1.40000000000000008e54 < a

                                                          1. Initial program 91.8%

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

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

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

                                                              \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} \]
                                                            3. lower--.f6468.8

                                                              \[\leadsto \left(1 - t\right) \cdot a \]
                                                          5. Applied rewrites68.8%

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

                                                          if -4.0999999999999999e68 < a < -1.40000000000000006e-18

                                                          1. Initial program 95.0%

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(y - 2, b, x\right)} \]
                                                              3. Applied rewrites57.0%

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

                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
                                                              5. Step-by-step derivation
                                                                1. Applied rewrites52.1%

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

                                                                if -1.40000000000000006e-18 < a < 1.40000000000000008e54

                                                                1. Initial program 97.1%

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

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

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

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

                                                                      \[\leadsto x + \color{blue}{t} \cdot b \]
                                                                    2. Step-by-step derivation
                                                                      1. lift-+.f64N/A

                                                                        \[\leadsto \color{blue}{x + t \cdot b} \]
                                                                      2. +-commutativeN/A

                                                                        \[\leadsto \color{blue}{t \cdot b + x} \]
                                                                      3. lift-*.f64N/A

                                                                        \[\leadsto \color{blue}{t \cdot b} + x \]
                                                                      4. lower-fma.f6446.2

                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(t, b, x\right)} \]
                                                                    3. Applied rewrites46.2%

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

                                                                  Alternative 15: 70.7% accurate, 1.4× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\ \mathbf{if}\;b \leq -7.8 \cdot 10^{+48}:\\ \;\;\;\;x + t\_1\\ \mathbf{elif}\;b \leq 1.65 \cdot 10^{+52}:\\ \;\;\;\;\left(x + z\right) - \left(t - 1\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;a + t\_1\\ \end{array} \end{array} \]
                                                                  (FPCore (x y z t a b)
                                                                   :precision binary64
                                                                   (let* ((t_1 (* (- (+ y t) 2.0) b)))
                                                                     (if (<= b -7.8e+48)
                                                                       (+ x t_1)
                                                                       (if (<= b 1.65e+52) (- (+ x z) (* (- t 1.0) a)) (+ a t_1)))))
                                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                                  	double t_1 = ((y + t) - 2.0) * b;
                                                                  	double tmp;
                                                                  	if (b <= -7.8e+48) {
                                                                  		tmp = x + t_1;
                                                                  	} else if (b <= 1.65e+52) {
                                                                  		tmp = (x + z) - ((t - 1.0) * a);
                                                                  	} else {
                                                                  		tmp = a + 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 = ((y + t) - 2.0d0) * b
                                                                      if (b <= (-7.8d+48)) then
                                                                          tmp = x + t_1
                                                                      else if (b <= 1.65d+52) then
                                                                          tmp = (x + z) - ((t - 1.0d0) * a)
                                                                      else
                                                                          tmp = a + 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 = ((y + t) - 2.0) * b;
                                                                  	double tmp;
                                                                  	if (b <= -7.8e+48) {
                                                                  		tmp = x + t_1;
                                                                  	} else if (b <= 1.65e+52) {
                                                                  		tmp = (x + z) - ((t - 1.0) * a);
                                                                  	} else {
                                                                  		tmp = a + t_1;
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  def code(x, y, z, t, a, b):
                                                                  	t_1 = ((y + t) - 2.0) * b
                                                                  	tmp = 0
                                                                  	if b <= -7.8e+48:
                                                                  		tmp = x + t_1
                                                                  	elif b <= 1.65e+52:
                                                                  		tmp = (x + z) - ((t - 1.0) * a)
                                                                  	else:
                                                                  		tmp = a + t_1
                                                                  	return tmp
                                                                  
                                                                  function code(x, y, z, t, a, b)
                                                                  	t_1 = Float64(Float64(Float64(y + t) - 2.0) * b)
                                                                  	tmp = 0.0
                                                                  	if (b <= -7.8e+48)
                                                                  		tmp = Float64(x + t_1);
                                                                  	elseif (b <= 1.65e+52)
                                                                  		tmp = Float64(Float64(x + z) - Float64(Float64(t - 1.0) * a));
                                                                  	else
                                                                  		tmp = Float64(a + t_1);
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  function tmp_2 = code(x, y, z, t, a, b)
                                                                  	t_1 = ((y + t) - 2.0) * b;
                                                                  	tmp = 0.0;
                                                                  	if (b <= -7.8e+48)
                                                                  		tmp = x + t_1;
                                                                  	elseif (b <= 1.65e+52)
                                                                  		tmp = (x + z) - ((t - 1.0) * a);
                                                                  	else
                                                                  		tmp = a + t_1;
                                                                  	end
                                                                  	tmp_2 = tmp;
                                                                  end
                                                                  
                                                                  code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -7.8e+48], N[(x + t$95$1), $MachinePrecision], If[LessEqual[b, 1.65e+52], N[(N[(x + z), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(a + t$95$1), $MachinePrecision]]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
                                                                  \mathbf{if}\;b \leq -7.8 \cdot 10^{+48}:\\
                                                                  \;\;\;\;x + t\_1\\
                                                                  
                                                                  \mathbf{elif}\;b \leq 1.65 \cdot 10^{+52}:\\
                                                                  \;\;\;\;\left(x + z\right) - \left(t - 1\right) \cdot a\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;a + t\_1\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if b < -7.8000000000000002e48

                                                                    1. Initial program 88.5%

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

                                                                      \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites79.0%

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

                                                                      if -7.8000000000000002e48 < b < 1.65e52

                                                                      1. Initial program 98.6%

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

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

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

                                                                          \[\leadsto \left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)} \]
                                                                      5. Applied rewrites98.7%

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

                                                                        \[\leadsto \left(x + z\right) - \left(\color{blue}{t} - 1\right) \cdot a \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites71.7%

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

                                                                        if 1.65e52 < b

                                                                        1. Initial program 91.3%

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

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

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

                                                                            \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                          3. lower--.f6476.7

                                                                            \[\leadsto \left(1 - t\right) \cdot a + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                        5. Applied rewrites76.7%

                                                                          \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                        6. Taylor expanded in t around 0

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

                                                                            \[\leadsto a + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                        8. Recombined 3 regimes into one program.
                                                                        9. Add Preprocessing

                                                                        Alternative 16: 38.4% accurate, 1.4× speedup?

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

                                                                          1. Initial program 91.8%

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

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

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

                                                                              \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                                                                            3. lower--.f6447.6

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

                                                                            \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                          6. Taylor expanded in a around inf

                                                                            \[\leadsto \left(-1 \cdot a\right) \cdot t \]
                                                                          7. Step-by-step derivation
                                                                            1. mul-1-negN/A

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

                                                                              \[\leadsto \left(-a\right) \cdot t \]
                                                                          8. Applied rewrites42.4%

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

                                                                          if -1.16000000000000007e73 < a < -1.40000000000000006e-18

                                                                          1. Initial program 95.0%

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(y - 2, b, x\right)} \]
                                                                              3. Applied rewrites57.0%

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

                                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
                                                                              5. Step-by-step derivation
                                                                                1. Applied rewrites52.1%

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

                                                                                if -1.40000000000000006e-18 < a < 1.6e54

                                                                                1. Initial program 97.1%

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

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

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

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

                                                                                      \[\leadsto x + \color{blue}{t} \cdot b \]
                                                                                    2. Step-by-step derivation
                                                                                      1. lift-+.f64N/A

                                                                                        \[\leadsto \color{blue}{x + t \cdot b} \]
                                                                                      2. +-commutativeN/A

                                                                                        \[\leadsto \color{blue}{t \cdot b + x} \]
                                                                                      3. lift-*.f64N/A

                                                                                        \[\leadsto \color{blue}{t \cdot b} + x \]
                                                                                      4. lower-fma.f6446.2

                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(t, b, x\right)} \]
                                                                                    3. Applied rewrites46.2%

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

                                                                                  Alternative 17: 60.3% accurate, 1.5× speedup?

                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+54} \lor \neg \left(b \leq 3.2 \cdot 10^{-21}\right):\\ \;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;x - \left(t - 1\right) \cdot a\\ \end{array} \end{array} \]
                                                                                  (FPCore (x y z t a b)
                                                                                   :precision binary64
                                                                                   (if (or (<= b -5.2e+54) (not (<= b 3.2e-21)))
                                                                                     (* (- (+ t y) 2.0) b)
                                                                                     (- x (* (- t 1.0) a))))
                                                                                  double code(double x, double y, double z, double t, double a, double b) {
                                                                                  	double tmp;
                                                                                  	if ((b <= -5.2e+54) || !(b <= 3.2e-21)) {
                                                                                  		tmp = ((t + y) - 2.0) * b;
                                                                                  	} else {
                                                                                  		tmp = x - ((t - 1.0) * 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) :: tmp
                                                                                      if ((b <= (-5.2d+54)) .or. (.not. (b <= 3.2d-21))) then
                                                                                          tmp = ((t + y) - 2.0d0) * b
                                                                                      else
                                                                                          tmp = x - ((t - 1.0d0) * a)
                                                                                      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 ((b <= -5.2e+54) || !(b <= 3.2e-21)) {
                                                                                  		tmp = ((t + y) - 2.0) * b;
                                                                                  	} else {
                                                                                  		tmp = x - ((t - 1.0) * a);
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  def code(x, y, z, t, a, b):
                                                                                  	tmp = 0
                                                                                  	if (b <= -5.2e+54) or not (b <= 3.2e-21):
                                                                                  		tmp = ((t + y) - 2.0) * b
                                                                                  	else:
                                                                                  		tmp = x - ((t - 1.0) * a)
                                                                                  	return tmp
                                                                                  
                                                                                  function code(x, y, z, t, a, b)
                                                                                  	tmp = 0.0
                                                                                  	if ((b <= -5.2e+54) || !(b <= 3.2e-21))
                                                                                  		tmp = Float64(Float64(Float64(t + y) - 2.0) * b);
                                                                                  	else
                                                                                  		tmp = Float64(x - Float64(Float64(t - 1.0) * a));
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  function tmp_2 = code(x, y, z, t, a, b)
                                                                                  	tmp = 0.0;
                                                                                  	if ((b <= -5.2e+54) || ~((b <= 3.2e-21)))
                                                                                  		tmp = ((t + y) - 2.0) * b;
                                                                                  	else
                                                                                  		tmp = x - ((t - 1.0) * a);
                                                                                  	end
                                                                                  	tmp_2 = tmp;
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.2e+54], N[Not[LessEqual[b, 3.2e-21]], $MachinePrecision]], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision], N[(x - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \begin{array}{l}
                                                                                  \mathbf{if}\;b \leq -5.2 \cdot 10^{+54} \lor \neg \left(b \leq 3.2 \cdot 10^{-21}\right):\\
                                                                                  \;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;x - \left(t - 1\right) \cdot a\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 2 regimes
                                                                                  2. if b < -5.20000000000000013e54 or 3.2000000000000002e-21 < b

                                                                                    1. Initial program 91.1%

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

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

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

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

                                                                                        \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
                                                                                      4. lower-+.f6463.9

                                                                                        \[\leadsto \left(\left(t + y\right) - 2\right) \cdot b \]
                                                                                    5. Applied rewrites63.9%

                                                                                      \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} \]

                                                                                    if -5.20000000000000013e54 < b < 3.2000000000000002e-21

                                                                                    1. Initial program 98.5%

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

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

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

                                                                                        \[\leadsto \left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - \color{blue}{a \cdot \left(t - 1\right)} \]
                                                                                    5. Applied rewrites98.5%

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

                                                                                      \[\leadsto x - \color{blue}{\left(t - 1\right)} \cdot a \]
                                                                                    7. Step-by-step derivation
                                                                                      1. Applied rewrites67.4%

                                                                                        \[\leadsto x - \color{blue}{\left(t - 1\right)} \cdot a \]
                                                                                    8. Recombined 2 regimes into one program.
                                                                                    9. Final simplification65.7%

                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+54} \lor \neg \left(b \leq 3.2 \cdot 10^{-21}\right):\\ \;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;x - \left(t - 1\right) \cdot a\\ \end{array} \]
                                                                                    10. Add Preprocessing

                                                                                    Alternative 18: 25.9% accurate, 1.5× speedup?

                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+40}:\\ \;\;\;\;b \cdot t\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{-52}:\\ \;\;\;\;a\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+112}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;b \cdot t\\ \end{array} \end{array} \]
                                                                                    (FPCore (x y z t a b)
                                                                                     :precision binary64
                                                                                     (if (<= t -1.8e+40)
                                                                                       (* b t)
                                                                                       (if (<= t 3.1e-52) a (if (<= t 3.1e+112) x (* b t)))))
                                                                                    double code(double x, double y, double z, double t, double a, double b) {
                                                                                    	double tmp;
                                                                                    	if (t <= -1.8e+40) {
                                                                                    		tmp = b * t;
                                                                                    	} else if (t <= 3.1e-52) {
                                                                                    		tmp = a;
                                                                                    	} else if (t <= 3.1e+112) {
                                                                                    		tmp = x;
                                                                                    	} else {
                                                                                    		tmp = b * t;
                                                                                    	}
                                                                                    	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 (t <= (-1.8d+40)) then
                                                                                            tmp = b * t
                                                                                        else if (t <= 3.1d-52) then
                                                                                            tmp = a
                                                                                        else if (t <= 3.1d+112) then
                                                                                            tmp = x
                                                                                        else
                                                                                            tmp = b * t
                                                                                        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 (t <= -1.8e+40) {
                                                                                    		tmp = b * t;
                                                                                    	} else if (t <= 3.1e-52) {
                                                                                    		tmp = a;
                                                                                    	} else if (t <= 3.1e+112) {
                                                                                    		tmp = x;
                                                                                    	} else {
                                                                                    		tmp = b * t;
                                                                                    	}
                                                                                    	return tmp;
                                                                                    }
                                                                                    
                                                                                    def code(x, y, z, t, a, b):
                                                                                    	tmp = 0
                                                                                    	if t <= -1.8e+40:
                                                                                    		tmp = b * t
                                                                                    	elif t <= 3.1e-52:
                                                                                    		tmp = a
                                                                                    	elif t <= 3.1e+112:
                                                                                    		tmp = x
                                                                                    	else:
                                                                                    		tmp = b * t
                                                                                    	return tmp
                                                                                    
                                                                                    function code(x, y, z, t, a, b)
                                                                                    	tmp = 0.0
                                                                                    	if (t <= -1.8e+40)
                                                                                    		tmp = Float64(b * t);
                                                                                    	elseif (t <= 3.1e-52)
                                                                                    		tmp = a;
                                                                                    	elseif (t <= 3.1e+112)
                                                                                    		tmp = x;
                                                                                    	else
                                                                                    		tmp = Float64(b * t);
                                                                                    	end
                                                                                    	return tmp
                                                                                    end
                                                                                    
                                                                                    function tmp_2 = code(x, y, z, t, a, b)
                                                                                    	tmp = 0.0;
                                                                                    	if (t <= -1.8e+40)
                                                                                    		tmp = b * t;
                                                                                    	elseif (t <= 3.1e-52)
                                                                                    		tmp = a;
                                                                                    	elseif (t <= 3.1e+112)
                                                                                    		tmp = x;
                                                                                    	else
                                                                                    		tmp = b * t;
                                                                                    	end
                                                                                    	tmp_2 = tmp;
                                                                                    end
                                                                                    
                                                                                    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.8e+40], N[(b * t), $MachinePrecision], If[LessEqual[t, 3.1e-52], a, If[LessEqual[t, 3.1e+112], x, N[(b * t), $MachinePrecision]]]]
                                                                                    
                                                                                    \begin{array}{l}
                                                                                    
                                                                                    \\
                                                                                    \begin{array}{l}
                                                                                    \mathbf{if}\;t \leq -1.8 \cdot 10^{+40}:\\
                                                                                    \;\;\;\;b \cdot t\\
                                                                                    
                                                                                    \mathbf{elif}\;t \leq 3.1 \cdot 10^{-52}:\\
                                                                                    \;\;\;\;a\\
                                                                                    
                                                                                    \mathbf{elif}\;t \leq 3.1 \cdot 10^{+112}:\\
                                                                                    \;\;\;\;x\\
                                                                                    
                                                                                    \mathbf{else}:\\
                                                                                    \;\;\;\;b \cdot t\\
                                                                                    
                                                                                    
                                                                                    \end{array}
                                                                                    \end{array}
                                                                                    
                                                                                    Derivation
                                                                                    1. Split input into 3 regimes
                                                                                    2. if t < -1.79999999999999998e40 or 3.09999999999999983e112 < t

                                                                                      1. Initial program 93.1%

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

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

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

                                                                                          \[\leadsto \left(b - a\right) \cdot \color{blue}{t} \]
                                                                                        3. lower--.f6481.9

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

                                                                                        \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
                                                                                      6. Taylor expanded in a around 0

                                                                                        \[\leadsto b \cdot t \]
                                                                                      7. Step-by-step derivation
                                                                                        1. Applied rewrites43.5%

                                                                                          \[\leadsto b \cdot t \]

                                                                                        if -1.79999999999999998e40 < t < 3.0999999999999999e-52

                                                                                        1. Initial program 96.7%

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

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

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

                                                                                            \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} \]
                                                                                          3. lower--.f6429.6

                                                                                            \[\leadsto \left(1 - t\right) \cdot a \]
                                                                                        5. Applied rewrites29.6%

                                                                                          \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                                                                                        6. Taylor expanded in t around 0

                                                                                          \[\leadsto a \]
                                                                                        7. Step-by-step derivation
                                                                                          1. Applied rewrites26.2%

                                                                                            \[\leadsto a \]

                                                                                          if 3.0999999999999999e-52 < t < 3.09999999999999983e112

                                                                                          1. Initial program 93.8%

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

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

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

                                                                                          Alternative 19: 40.7% accurate, 1.9× speedup?

                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+72} \lor \neg \left(y \leq 1.05 \cdot 10^{+158}\right):\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\ \end{array} \end{array} \]
                                                                                          (FPCore (x y z t a b)
                                                                                           :precision binary64
                                                                                           (if (or (<= y -1.45e+72) (not (<= y 1.05e+158))) (fma y b x) (fma t b x)))
                                                                                          double code(double x, double y, double z, double t, double a, double b) {
                                                                                          	double tmp;
                                                                                          	if ((y <= -1.45e+72) || !(y <= 1.05e+158)) {
                                                                                          		tmp = fma(y, b, x);
                                                                                          	} else {
                                                                                          		tmp = fma(t, b, x);
                                                                                          	}
                                                                                          	return tmp;
                                                                                          }
                                                                                          
                                                                                          function code(x, y, z, t, a, b)
                                                                                          	tmp = 0.0
                                                                                          	if ((y <= -1.45e+72) || !(y <= 1.05e+158))
                                                                                          		tmp = fma(y, b, x);
                                                                                          	else
                                                                                          		tmp = fma(t, b, x);
                                                                                          	end
                                                                                          	return tmp
                                                                                          end
                                                                                          
                                                                                          code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.45e+72], N[Not[LessEqual[y, 1.05e+158]], $MachinePrecision]], N[(y * b + x), $MachinePrecision], N[(t * b + x), $MachinePrecision]]
                                                                                          
                                                                                          \begin{array}{l}
                                                                                          
                                                                                          \\
                                                                                          \begin{array}{l}
                                                                                          \mathbf{if}\;y \leq -1.45 \cdot 10^{+72} \lor \neg \left(y \leq 1.05 \cdot 10^{+158}\right):\\
                                                                                          \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\
                                                                                          
                                                                                          \mathbf{else}:\\
                                                                                          \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
                                                                                          
                                                                                          
                                                                                          \end{array}
                                                                                          \end{array}
                                                                                          
                                                                                          Derivation
                                                                                          1. Split input into 2 regimes
                                                                                          2. if y < -1.45000000000000009e72 or 1.0499999999999999e158 < y

                                                                                            1. Initial program 88.9%

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

                                                                                              \[\leadsto \color{blue}{x} + \left(\left(y + t\right) - 2\right) \cdot b \]
                                                                                            4. Step-by-step derivation
                                                                                              1. Applied rewrites51.8%

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

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

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

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

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

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

                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(y - 2, b, x\right)} \]
                                                                                                3. Applied rewrites49.4%

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

                                                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{y}, b, x\right) \]
                                                                                                5. Step-by-step derivation
                                                                                                  1. Applied rewrites49.4%

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

                                                                                                  if -1.45000000000000009e72 < y < 1.0499999999999999e158

                                                                                                  1. Initial program 97.3%

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

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

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

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

                                                                                                        \[\leadsto x + \color{blue}{t} \cdot b \]
                                                                                                      2. Step-by-step derivation
                                                                                                        1. lift-+.f64N/A

                                                                                                          \[\leadsto \color{blue}{x + t \cdot b} \]
                                                                                                        2. +-commutativeN/A

                                                                                                          \[\leadsto \color{blue}{t \cdot b + x} \]
                                                                                                        3. lift-*.f64N/A

                                                                                                          \[\leadsto \color{blue}{t \cdot b} + x \]
                                                                                                        4. lower-fma.f6440.1

                                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(t, b, x\right)} \]
                                                                                                      3. Applied rewrites40.1%

                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(t, b, x\right)} \]
                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                    5. Final simplification42.7%

                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+72} \lor \neg \left(y \leq 1.05 \cdot 10^{+158}\right):\\ \;\;\;\;\mathsf{fma}\left(y, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\ \end{array} \]
                                                                                                    6. Add Preprocessing

                                                                                                    Alternative 20: 33.9% accurate, 1.9× speedup?

                                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+115}:\\ \;\;\;\;a\\ \mathbf{elif}\;a \leq 3.5 \cdot 10^{+86}:\\ \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\ \mathbf{else}:\\ \;\;\;\;a\\ \end{array} \end{array} \]
                                                                                                    (FPCore (x y z t a b)
                                                                                                     :precision binary64
                                                                                                     (if (<= a -5.5e+115) a (if (<= a 3.5e+86) (fma t b x) a)))
                                                                                                    double code(double x, double y, double z, double t, double a, double b) {
                                                                                                    	double tmp;
                                                                                                    	if (a <= -5.5e+115) {
                                                                                                    		tmp = a;
                                                                                                    	} else if (a <= 3.5e+86) {
                                                                                                    		tmp = fma(t, b, x);
                                                                                                    	} else {
                                                                                                    		tmp = a;
                                                                                                    	}
                                                                                                    	return tmp;
                                                                                                    }
                                                                                                    
                                                                                                    function code(x, y, z, t, a, b)
                                                                                                    	tmp = 0.0
                                                                                                    	if (a <= -5.5e+115)
                                                                                                    		tmp = a;
                                                                                                    	elseif (a <= 3.5e+86)
                                                                                                    		tmp = fma(t, b, x);
                                                                                                    	else
                                                                                                    		tmp = a;
                                                                                                    	end
                                                                                                    	return tmp
                                                                                                    end
                                                                                                    
                                                                                                    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5.5e+115], a, If[LessEqual[a, 3.5e+86], N[(t * b + x), $MachinePrecision], a]]
                                                                                                    
                                                                                                    \begin{array}{l}
                                                                                                    
                                                                                                    \\
                                                                                                    \begin{array}{l}
                                                                                                    \mathbf{if}\;a \leq -5.5 \cdot 10^{+115}:\\
                                                                                                    \;\;\;\;a\\
                                                                                                    
                                                                                                    \mathbf{elif}\;a \leq 3.5 \cdot 10^{+86}:\\
                                                                                                    \;\;\;\;\mathsf{fma}\left(t, b, x\right)\\
                                                                                                    
                                                                                                    \mathbf{else}:\\
                                                                                                    \;\;\;\;a\\
                                                                                                    
                                                                                                    
                                                                                                    \end{array}
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Split input into 2 regimes
                                                                                                    2. if a < -5.5e115 or 3.50000000000000019e86 < a

                                                                                                      1. Initial program 92.0%

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

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

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

                                                                                                          \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} \]
                                                                                                        3. lower--.f6473.0

                                                                                                          \[\leadsto \left(1 - t\right) \cdot a \]
                                                                                                      5. Applied rewrites73.0%

                                                                                                        \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                                                                                                      6. Taylor expanded in t around 0

                                                                                                        \[\leadsto a \]
                                                                                                      7. Step-by-step derivation
                                                                                                        1. Applied rewrites31.6%

                                                                                                          \[\leadsto a \]

                                                                                                        if -5.5e115 < a < 3.50000000000000019e86

                                                                                                        1. Initial program 96.4%

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

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

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

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

                                                                                                              \[\leadsto x + \color{blue}{t} \cdot b \]
                                                                                                            2. Step-by-step derivation
                                                                                                              1. lift-+.f64N/A

                                                                                                                \[\leadsto \color{blue}{x + t \cdot b} \]
                                                                                                              2. +-commutativeN/A

                                                                                                                \[\leadsto \color{blue}{t \cdot b + x} \]
                                                                                                              3. lift-*.f64N/A

                                                                                                                \[\leadsto \color{blue}{t \cdot b} + x \]
                                                                                                              4. lower-fma.f6442.7

                                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(t, b, x\right)} \]
                                                                                                            3. Applied rewrites42.7%

                                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(t, b, x\right)} \]
                                                                                                          4. Recombined 2 regimes into one program.
                                                                                                          5. Add Preprocessing

                                                                                                          Alternative 21: 19.7% accurate, 2.8× speedup?

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

                                                                                                            1. Initial program 92.9%

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

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

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

                                                                                                                \[\leadsto \left(1 - t\right) \cdot \color{blue}{a} \]
                                                                                                              3. lower--.f6459.2

                                                                                                                \[\leadsto \left(1 - t\right) \cdot a \]
                                                                                                            5. Applied rewrites59.2%

                                                                                                              \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                                                                                                            6. Taylor expanded in t around 0

                                                                                                              \[\leadsto a \]
                                                                                                            7. Step-by-step derivation
                                                                                                              1. Applied rewrites25.0%

                                                                                                                \[\leadsto a \]

                                                                                                              if -2.7000000000000001e72 < a < 1.34999999999999997e-73

                                                                                                              1. Initial program 96.9%

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

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

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

                                                                                                              Alternative 22: 16.2% accurate, 37.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 94.9%

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

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

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

                                                                                                                Reproduce

                                                                                                                ?
                                                                                                                herbie shell --seed 2025026 
                                                                                                                (FPCore (x y z t a b)
                                                                                                                  :name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
                                                                                                                  :precision binary64
                                                                                                                  (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))