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

Percentage Accurate: 95.2% → 96.2%
Time: 8.4s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 95.2% 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.2% 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 95.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 \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
    2. lower--.f64N/A

      \[\leadsto \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
  5. Applied rewrites97.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. Add Preprocessing

Alternative 2: 84.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - 1\right) \cdot a\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{+183}:\\ \;\;\;\;t \cdot b - t\_1\\ \mathbf{elif}\;t \leq -0.031:\\ \;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) - t\_1\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+42}:\\ \;\;\;\;\left(\mathsf{fma}\left(-2, b, z\right) + \mathsf{fma}\left(b - z, y, x\right)\right) + a\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (- t 1.0) a)))
   (if (<= t -2.1e+183)
     (- (* t b) t_1)
     (if (<= t -0.031)
       (- (fma (- 1.0 y) z x) t_1)
       (if (<= t 1.6e+42)
         (+ (+ (fma -2.0 b z) (fma (- b z) y x)) a)
         (* (- b a) t))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (t - 1.0) * a;
	double tmp;
	if (t <= -2.1e+183) {
		tmp = (t * b) - t_1;
	} else if (t <= -0.031) {
		tmp = fma((1.0 - y), z, x) - t_1;
	} else if (t <= 1.6e+42) {
		tmp = (fma(-2.0, b, z) + fma((b - z), y, x)) + a;
	} else {
		tmp = (b - a) * t;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(t - 1.0) * a)
	tmp = 0.0
	if (t <= -2.1e+183)
		tmp = Float64(Float64(t * b) - t_1);
	elseif (t <= -0.031)
		tmp = Float64(fma(Float64(1.0 - y), z, x) - t_1);
	elseif (t <= 1.6e+42)
		tmp = Float64(Float64(fma(-2.0, b, z) + fma(Float64(b - z), y, x)) + a);
	else
		tmp = Float64(Float64(b - a) * t);
	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[t, -2.1e+183], N[(N[(t * b), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, -0.031], N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 1.6e+42], N[(N[(N[(-2.0 * b + z), $MachinePrecision] + N[(N[(b - z), $MachinePrecision] * y + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(t - 1\right) \cdot a\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+183}:\\
\;\;\;\;t \cdot b - t\_1\\

\mathbf{elif}\;t \leq -0.031:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) - t\_1\\

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

\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.1e183

    1. Initial program 93.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 \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
      2. lower--.f64N/A

        \[\leadsto \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
    5. Applied rewrites96.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 t around inf

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

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

      if -2.1e183 < t < -0.031

      1. Initial program 92.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 \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
        2. lower--.f64N/A

          \[\leadsto \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
      5. Applied rewrites92.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 b around 0

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

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

        if -0.031 < t < 1.60000000000000001e42

        1. Initial program 97.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 \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
          2. lower--.f64N/A

            \[\leadsto \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - 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 t around 0

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

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

          if 1.60000000000000001e42 < t

          1. Initial program 93.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 t around inf

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

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

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

              \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
          5. Applied rewrites81.3%

            \[\leadsto \color{blue}{\left(b - a\right) \cdot t} \]
        8. Recombined 4 regimes into one program.
        9. Add Preprocessing

        Alternative 3: 66.5% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1 - y, z, x\right) + a\\ t_2 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -25500:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -4.5 \cdot 10^{-106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-214}:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (+ (fma (- 1.0 y) z x) a)) (t_2 (* (- b a) t)))
           (if (<= t -25500.0)
             t_2
             (if (<= t -4.5e-106)
               t_1
               (if (<= t 1.85e-214)
                 (+ (fma (- y 2.0) b x) a)
                 (if (<= t 6.2e+41) t_1 t_2))))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = fma((1.0 - y), z, x) + a;
        	double t_2 = (b - a) * t;
        	double tmp;
        	if (t <= -25500.0) {
        		tmp = t_2;
        	} else if (t <= -4.5e-106) {
        		tmp = t_1;
        	} else if (t <= 1.85e-214) {
        		tmp = fma((y - 2.0), b, x) + a;
        	} else if (t <= 6.2e+41) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(fma(Float64(1.0 - y), z, x) + a)
        	t_2 = Float64(Float64(b - a) * t)
        	tmp = 0.0
        	if (t <= -25500.0)
        		tmp = t_2;
        	elseif (t <= -4.5e-106)
        		tmp = t_1;
        	elseif (t <= 1.85e-214)
        		tmp = Float64(fma(Float64(y - 2.0), b, x) + a);
        	elseif (t <= 6.2e+41)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] + a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -25500.0], t$95$2, If[LessEqual[t, -4.5e-106], t$95$1, If[LessEqual[t, 1.85e-214], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 6.2e+41], t$95$1, t$95$2]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(1 - y, z, x\right) + a\\
        t_2 := \left(b - a\right) \cdot t\\
        \mathbf{if}\;t \leq -25500:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t \leq -4.5 \cdot 10^{-106}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 1.85 \cdot 10^{-214}:\\
        \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\
        
        \mathbf{elif}\;t \leq 6.2 \cdot 10^{+41}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -25500 or 6.2e41 < t

          1. Initial program 93.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 t around inf

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

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

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

              \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
          5. Applied rewrites72.5%

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

          if -25500 < t < -4.49999999999999955e-106 or 1.8500000000000001e-214 < t < 6.2e41

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

              \[\leadsto \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - 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 t around 0

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

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

              \[\leadsto \left(x + \left(z + -1 \cdot \left(y \cdot z\right)\right)\right) + a \]
            3. Step-by-step derivation
              1. Applied rewrites72.6%

                \[\leadsto \mathsf{fma}\left(1 - y, z, x\right) + a \]

              if -4.49999999999999955e-106 < t < 1.8500000000000001e-214

              1. Initial program 98.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 z around 0

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

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

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

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

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

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

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

              Alternative 4: 88.7% accurate, 1.1× speedup?

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

                1. Initial program 93.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 \color{blue}{\left(b \cdot \left(t - 2\right) + x\right)} - \left(-1 \cdot z + a \cdot \left(t - 1\right)\right) \]
                  2. associate--l+N/A

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(t - 2, b, \color{blue}{\left(x - a \cdot \left(t - 1\right)\right) - -1 \cdot z}\right) \]
                  8. fp-cancel-sub-sign-invN/A

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

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

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

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

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

                if -22000 < t < 4.5999999999999997e41

                1. Initial program 97.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 \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
                  2. lower--.f64N/A

                    \[\leadsto \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - 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 t around 0

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

                    \[\leadsto \left(\mathsf{fma}\left(-2, b, z\right) + \mathsf{fma}\left(b - z, y, x\right)\right) + \color{blue}{a} \]
                8. Recombined 2 regimes into one program.
                9. Final simplification93.3%

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

                Alternative 5: 88.9% accurate, 1.1× speedup?

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

                  1. Initial program 93.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 0

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

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

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

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

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

                  if -1400 < t < 4.5999999999999997e41

                  1. Initial program 97.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 \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
                    2. lower--.f64N/A

                      \[\leadsto \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - 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 t around 0

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

                      \[\leadsto \left(\mathsf{fma}\left(-2, b, z\right) + \mathsf{fma}\left(b - z, y, x\right)\right) + \color{blue}{a} \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification91.0%

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

                  Alternative 6: 54.4% accurate, 1.1× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -3.4 \cdot 10^{-273}:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-256}:\\ \;\;\;\;\mathsf{fma}\left(-2, b, x\right) + a\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+41}:\\ \;\;\;\;\left(b - z\right) \cdot y\\ \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.8e+24)
                       t_1
                       (if (<= t -3.4e-273)
                         (fma (- y 2.0) b a)
                         (if (<= t 4.6e-256)
                           (+ (fma -2.0 b x) a)
                           (if (<= t 4.6e+41) (* (- b z) y) 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.8e+24) {
                  		tmp = t_1;
                  	} else if (t <= -3.4e-273) {
                  		tmp = fma((y - 2.0), b, a);
                  	} else if (t <= 4.6e-256) {
                  		tmp = fma(-2.0, b, x) + a;
                  	} else if (t <= 4.6e+41) {
                  		tmp = (b - z) * y;
                  	} 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.8e+24)
                  		tmp = t_1;
                  	elseif (t <= -3.4e-273)
                  		tmp = fma(Float64(y - 2.0), b, a);
                  	elseif (t <= 4.6e-256)
                  		tmp = Float64(fma(-2.0, b, x) + a);
                  	elseif (t <= 4.6e+41)
                  		tmp = Float64(Float64(b - z) * y);
                  	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.8e+24], t$95$1, If[LessEqual[t, -3.4e-273], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 4.6e-256], N[(N[(-2.0 * b + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 4.6e+41], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_1 := \left(b - a\right) \cdot t\\
                  \mathbf{if}\;t \leq -2.8 \cdot 10^{+24}:\\
                  \;\;\;\;t\_1\\
                  
                  \mathbf{elif}\;t \leq -3.4 \cdot 10^{-273}:\\
                  \;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
                  
                  \mathbf{elif}\;t \leq 4.6 \cdot 10^{-256}:\\
                  \;\;\;\;\mathsf{fma}\left(-2, b, x\right) + a\\
                  
                  \mathbf{elif}\;t \leq 4.6 \cdot 10^{+41}:\\
                  \;\;\;\;\left(b - z\right) \cdot y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_1\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if t < -2.8000000000000002e24 or 4.5999999999999997e41 < t

                    1. Initial program 92.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 \color{blue}{\left(b - a\right) \cdot t} \]
                      2. lower-*.f64N/A

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

                        \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                    5. Applied rewrites73.7%

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

                    if -2.8000000000000002e24 < t < -3.39999999999999991e-273

                    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 0

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

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

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

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

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

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

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

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

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

                        if -3.39999999999999991e-273 < t < 4.6e-256

                        1. Initial program 99.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 z around 0

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

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

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

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

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

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

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

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

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

                            if 4.6e-256 < t < 4.5999999999999997e41

                            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 inf

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

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

                                \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                              3. lower--.f6452.5

                                \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                            5. Applied rewrites52.5%

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

                          Alternative 7: 51.0% accurate, 1.1× speedup?

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

                            1. Initial program 92.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 \color{blue}{\left(b - a\right) \cdot t} \]
                              2. lower-*.f64N/A

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

                                \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                            5. Applied rewrites73.7%

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

                            if -1.48e26 < t < -3.39999999999999991e-273 or 6.99999999999999988e-236 < t < 4.5999999999999997e41

                            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 inf

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

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

                                \[\leadsto \color{blue}{\left(b - z\right) \cdot y} \]
                              3. lower--.f6453.4

                                \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                            5. Applied rewrites53.4%

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

                            if -3.39999999999999991e-273 < t < 6.99999999999999988e-236

                            1. Initial program 99.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 z around 0

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

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

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

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

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

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

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

                                \[\leadsto a + x \]
                              3. Step-by-step derivation
                                1. Applied rewrites56.1%

                                  \[\leadsto a + x \]
                              4. Recombined 3 regimes into one program.
                              5. Add Preprocessing

                              Alternative 8: 49.4% accurate, 1.1× 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 -25500:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -6.3 \cdot 10^{-111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-6}:\\ \;\;\;\;a + x\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \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 -25500.0)
                                   t_2
                                   (if (<= t -6.3e-111)
                                     t_1
                                     (if (<= t 8.8e-6) (+ a x) (if (<= t 2.6e+41) t_1 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 <= -25500.0) {
                              		tmp = t_2;
                              	} else if (t <= -6.3e-111) {
                              		tmp = t_1;
                              	} else if (t <= 8.8e-6) {
                              		tmp = a + x;
                              	} else if (t <= 2.6e+41) {
                              		tmp = t_1;
                              	} else {
                              		tmp = t_2;
                              	}
                              	return tmp;
                              }
                              
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x, y, z, t, a, b)
                              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) :: t_2
                                  real(8) :: tmp
                                  t_1 = (1.0d0 - y) * z
                                  t_2 = (b - a) * t
                                  if (t <= (-25500.0d0)) then
                                      tmp = t_2
                                  else if (t <= (-6.3d-111)) then
                                      tmp = t_1
                                  else if (t <= 8.8d-6) then
                                      tmp = a + x
                                  else if (t <= 2.6d+41) then
                                      tmp = t_1
                                  else
                                      tmp = t_2
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a, double b) {
                              	double t_1 = (1.0 - y) * z;
                              	double t_2 = (b - a) * t;
                              	double tmp;
                              	if (t <= -25500.0) {
                              		tmp = t_2;
                              	} else if (t <= -6.3e-111) {
                              		tmp = t_1;
                              	} else if (t <= 8.8e-6) {
                              		tmp = a + x;
                              	} else if (t <= 2.6e+41) {
                              		tmp = t_1;
                              	} else {
                              		tmp = t_2;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b):
                              	t_1 = (1.0 - y) * z
                              	t_2 = (b - a) * t
                              	tmp = 0
                              	if t <= -25500.0:
                              		tmp = t_2
                              	elif t <= -6.3e-111:
                              		tmp = t_1
                              	elif t <= 8.8e-6:
                              		tmp = a + x
                              	elif t <= 2.6e+41:
                              		tmp = t_1
                              	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 <= -25500.0)
                              		tmp = t_2;
                              	elseif (t <= -6.3e-111)
                              		tmp = t_1;
                              	elseif (t <= 8.8e-6)
                              		tmp = Float64(a + x);
                              	elseif (t <= 2.6e+41)
                              		tmp = t_1;
                              	else
                              		tmp = t_2;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a, b)
                              	t_1 = (1.0 - y) * z;
                              	t_2 = (b - a) * t;
                              	tmp = 0.0;
                              	if (t <= -25500.0)
                              		tmp = t_2;
                              	elseif (t <= -6.3e-111)
                              		tmp = t_1;
                              	elseif (t <= 8.8e-6)
                              		tmp = a + x;
                              	elseif (t <= 2.6e+41)
                              		tmp = t_1;
                              	else
                              		tmp = t_2;
                              	end
                              	tmp_2 = 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, -25500.0], t$95$2, If[LessEqual[t, -6.3e-111], t$95$1, If[LessEqual[t, 8.8e-6], N[(a + x), $MachinePrecision], If[LessEqual[t, 2.6e+41], t$95$1, 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 -25500:\\
                              \;\;\;\;t\_2\\
                              
                              \mathbf{elif}\;t \leq -6.3 \cdot 10^{-111}:\\
                              \;\;\;\;t\_1\\
                              
                              \mathbf{elif}\;t \leq 8.8 \cdot 10^{-6}:\\
                              \;\;\;\;a + x\\
                              
                              \mathbf{elif}\;t \leq 2.6 \cdot 10^{+41}:\\
                              \;\;\;\;t\_1\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_2\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if t < -25500 or 2.6000000000000001e41 < t

                                1. Initial program 93.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 t around inf

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

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

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

                                    \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                                5. Applied rewrites72.5%

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

                                if -25500 < t < -6.3000000000000004e-111 or 8.8000000000000004e-6 < t < 2.6000000000000001e41

                                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 \color{blue}{\left(1 - y\right) \cdot z} \]
                                  2. lower-*.f64N/A

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

                                    \[\leadsto \color{blue}{\left(1 - y\right)} \cdot z \]
                                5. Applied rewrites52.9%

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

                                if -6.3000000000000004e-111 < t < 8.8000000000000004e-6

                                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 0

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

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

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

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

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

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

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

                                    \[\leadsto a + x \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites40.1%

                                      \[\leadsto a + x \]
                                  4. Recombined 3 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 9: 85.4% accurate, 1.1× speedup?

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

                                    1. Initial program 89.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 z around 0

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

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

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

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

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

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

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

                                      if -1.09999999999999996e51 < b < 6.80000000000000051e61

                                      1. Initial program 99.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 + \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 \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
                                        2. lower--.f64N/A

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

                                        \[\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 b around 0

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

                                          \[\leadsto \mathsf{fma}\left(1 - y, z, x\right) - \color{blue}{\left(t - 1\right)} \cdot a \]
                                      8. Recombined 2 regimes into one program.
                                      9. Final simplification87.6%

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

                                      Alternative 10: 72.5% accurate, 1.2× speedup?

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

                                        1. Initial program 93.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 t around inf

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

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

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

                                            \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                                        5. Applied rewrites80.3%

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

                                        if -4.30000000000000021e129 < t < 6.2e41

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

                                            \[\leadsto \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
                                        5. Applied rewrites98.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 t around 0

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

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

                                            \[\leadsto \left(z + \left(-2 \cdot b + y \cdot \left(b - z\right)\right)\right) + a \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites75.5%

                                              \[\leadsto \mathsf{fma}\left(-2, b, \mathsf{fma}\left(b - z, y, z\right)\right) + a \]
                                          4. Recombined 2 regimes into one program.
                                          5. Final simplification77.2%

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.3 \cdot 10^{+129} \lor \neg \left(t \leq 6.2 \cdot 10^{+41}\right):\\ \;\;\;\;\left(b - a\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-2, b, \mathsf{fma}\left(b - z, y, z\right)\right) + a\\ \end{array} \]
                                          6. Add Preprocessing

                                          Alternative 11: 56.9% accurate, 1.4× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b - a\right) \cdot t\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+41}:\\ \;\;\;\;\left(b - z\right) \cdot y\\ \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.8e+24)
                                               t_1
                                               (if (<= t 2.9e-8)
                                                 (fma (- y 2.0) b a)
                                                 (if (<= t 4.6e+41) (* (- b z) y) 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.8e+24) {
                                          		tmp = t_1;
                                          	} else if (t <= 2.9e-8) {
                                          		tmp = fma((y - 2.0), b, a);
                                          	} else if (t <= 4.6e+41) {
                                          		tmp = (b - z) * y;
                                          	} 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.8e+24)
                                          		tmp = t_1;
                                          	elseif (t <= 2.9e-8)
                                          		tmp = fma(Float64(y - 2.0), b, a);
                                          	elseif (t <= 4.6e+41)
                                          		tmp = Float64(Float64(b - z) * y);
                                          	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.8e+24], t$95$1, If[LessEqual[t, 2.9e-8], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 4.6e+41], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_1 := \left(b - a\right) \cdot t\\
                                          \mathbf{if}\;t \leq -2.8 \cdot 10^{+24}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;t \leq 2.9 \cdot 10^{-8}:\\
                                          \;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
                                          
                                          \mathbf{elif}\;t \leq 4.6 \cdot 10^{+41}:\\
                                          \;\;\;\;\left(b - z\right) \cdot y\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if t < -2.8000000000000002e24 or 4.5999999999999997e41 < t

                                            1. Initial program 92.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 \color{blue}{\left(b - a\right) \cdot t} \]
                                              2. lower-*.f64N/A

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

                                                \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                                            5. Applied rewrites73.7%

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

                                            if -2.8000000000000002e24 < t < 2.9000000000000002e-8

                                            1. Initial program 97.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 z around 0

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

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

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

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

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

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

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

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

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

                                                if 2.9000000000000002e-8 < t < 4.5999999999999997e41

                                                1. Initial program 99.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 inf

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

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

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

                                                    \[\leadsto \color{blue}{\left(b - z\right)} \cdot y \]
                                                5. Applied rewrites75.1%

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

                                              Alternative 12: 36.2% accurate, 1.4× speedup?

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

                                                1. Initial program 93.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 \color{blue}{\left(1 - t\right) \cdot a} \]
                                                  2. lower-*.f64N/A

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

                                                    \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                                                5. Applied rewrites43.9%

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

                                                  \[\leadsto \left(-1 \cdot t\right) \cdot a \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites43.5%

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

                                                  if -14000 < t < 2.54999999999999998e-5

                                                  1. Initial program 97.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 z around 0

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

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

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

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

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

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

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

                                                      \[\leadsto a + x \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites37.6%

                                                        \[\leadsto a + x \]

                                                      if 2.54999999999999998e-5 < t < 2.89999999999999988e41

                                                      1. Initial program 99.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 z around inf

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

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

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

                                                          \[\leadsto \color{blue}{\left(1 - y\right)} \cdot z \]
                                                      5. Applied rewrites66.8%

                                                        \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                      6. Taylor expanded in y around inf

                                                        \[\leadsto \left(-1 \cdot y\right) \cdot z \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites57.7%

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

                                                        if 2.89999999999999988e41 < t

                                                        1. Initial program 93.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 0

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

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

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

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

                                                            \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right) \]
                                                          5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto b \cdot \color{blue}{t} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites46.5%

                                                            \[\leadsto b \cdot \color{blue}{t} \]
                                                        8. Recombined 4 regimes into one program.
                                                        9. Add Preprocessing

                                                        Alternative 13: 65.9% accurate, 1.5× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.3 \cdot 10^{+25} \lor \neg \left(t \leq 65000000\right):\\ \;\;\;\;\left(b - a\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\ \end{array} \end{array} \]
                                                        (FPCore (x y z t a b)
                                                         :precision binary64
                                                         (if (or (<= t -6.3e+25) (not (<= t 65000000.0)))
                                                           (* (- b a) t)
                                                           (+ (fma (- y 2.0) b x) a)))
                                                        double code(double x, double y, double z, double t, double a, double b) {
                                                        	double tmp;
                                                        	if ((t <= -6.3e+25) || !(t <= 65000000.0)) {
                                                        		tmp = (b - a) * t;
                                                        	} else {
                                                        		tmp = fma((y - 2.0), b, x) + a;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        function code(x, y, z, t, a, b)
                                                        	tmp = 0.0
                                                        	if ((t <= -6.3e+25) || !(t <= 65000000.0))
                                                        		tmp = Float64(Float64(b - a) * t);
                                                        	else
                                                        		tmp = Float64(fma(Float64(y - 2.0), b, x) + a);
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.3e+25], N[Not[LessEqual[t, 65000000.0]], $MachinePrecision]], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;t \leq -6.3 \cdot 10^{+25} \lor \neg \left(t \leq 65000000\right):\\
                                                        \;\;\;\;\left(b - a\right) \cdot t\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\mathsf{fma}\left(y - 2, b, x\right) + a\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if t < -6.29999999999999973e25 or 6.5e7 < 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 \color{blue}{\left(b - a\right) \cdot t} \]
                                                            2. lower-*.f64N/A

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

                                                              \[\leadsto \color{blue}{\left(b - a\right)} \cdot t \]
                                                          5. Applied rewrites71.1%

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

                                                          if -6.29999999999999973e25 < t < 6.5e7

                                                          1. Initial program 97.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 z around 0

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

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

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

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

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

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

                                                              \[\leadsto \mathsf{fma}\left(y - 2, b, x\right) + \color{blue}{a} \]
                                                          8. Recombined 2 regimes into one program.
                                                          9. Final simplification71.2%

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

                                                          Alternative 14: 60.7% accurate, 1.5× speedup?

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

                                                            1. Initial program 90.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 \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
                                                              2. lower--.f64N/A

                                                                \[\leadsto \color{blue}{\left(\left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right) - -1 \cdot z\right) - a \cdot \left(t - 1\right)} \]
                                                            5. Applied rewrites93.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 t around 0

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

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

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

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

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

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

                                                                  \[\leadsto \left(\color{blue}{\left(t + y\right)} - 2\right) \cdot b \]
                                                              4. Applied rewrites76.4%

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

                                                              if -2.2500000000000001e98 < b < 4.9999999999999998e30

                                                              1. Initial program 98.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 z around 0

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

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

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

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

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

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

                                                                  \[\leadsto \mathsf{fma}\left(1 - t, \color{blue}{a}, x\right) \]
                                                              8. Recombined 2 regimes into one program.
                                                              9. Final simplification63.6%

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

                                                              Alternative 15: 35.2% accurate, 1.5× speedup?

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

                                                                1. Initial program 93.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 \color{blue}{\left(1 - t\right) \cdot a} \]
                                                                  2. lower-*.f64N/A

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

                                                                    \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                                                                5. Applied rewrites43.9%

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

                                                                  \[\leadsto \left(-1 \cdot t\right) \cdot a \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites43.5%

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

                                                                  if -14000 < t < 3.59999999999999981e-90

                                                                  1. Initial program 98.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 z around 0

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

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

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

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

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

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

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

                                                                      \[\leadsto a + x \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites38.7%

                                                                        \[\leadsto a + x \]

                                                                      if 3.59999999999999981e-90 < t < 3.3e55

                                                                      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 z around 0

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

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

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

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

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

                                                                        \[\leadsto b \cdot \color{blue}{y} \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites37.6%

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

                                                                        if 3.3e55 < t

                                                                        1. Initial program 92.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 a around 0

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

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

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

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

                                                                            \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right) \]
                                                                          5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto b \cdot \color{blue}{t} \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites48.5%

                                                                            \[\leadsto b \cdot \color{blue}{t} \]
                                                                        8. Recombined 4 regimes into one program.
                                                                        9. Add Preprocessing

                                                                        Alternative 16: 34.3% accurate, 1.5× speedup?

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

                                                                          1. Initial program 92.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 a around 0

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

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

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

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

                                                                              \[\leadsto \color{blue}{\left(\left(t + y\right) - 2\right) \cdot b} + \left(x + \left(\mathsf{neg}\left(z\right)\right) \cdot \left(y - 1\right)\right) \]
                                                                            5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto b \cdot \color{blue}{t} \]
                                                                          7. Step-by-step derivation
                                                                            1. Applied rewrites37.4%

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

                                                                            if -1.75e40 < t < 3.59999999999999981e-90

                                                                            1. Initial program 98.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 z around 0

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

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

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

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

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

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

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

                                                                                \[\leadsto a + x \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites37.3%

                                                                                  \[\leadsto a + x \]

                                                                                if 3.59999999999999981e-90 < t < 3.3e55

                                                                                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 z around 0

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

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

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

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

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

                                                                                  \[\leadsto b \cdot \color{blue}{y} \]
                                                                                7. Step-by-step derivation
                                                                                  1. Applied rewrites37.6%

                                                                                    \[\leadsto y \cdot \color{blue}{b} \]
                                                                                8. Recombined 3 regimes into one program.
                                                                                9. Add Preprocessing

                                                                                Alternative 17: 41.8% accurate, 1.8× speedup?

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

                                                                                  1. Initial program 91.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 \color{blue}{\left(1 - y\right) \cdot z} \]
                                                                                    2. lower-*.f64N/A

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

                                                                                      \[\leadsto \color{blue}{\left(1 - y\right)} \cdot z \]
                                                                                  5. Applied rewrites65.9%

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

                                                                                  if -1.6000000000000001e45 < z < 1.35e156

                                                                                  1. Initial program 98.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 a around inf

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

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

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

                                                                                      \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                                                                                  5. Applied rewrites38.9%

                                                                                    \[\leadsto \color{blue}{\left(1 - t\right) \cdot a} \]
                                                                                3. Recombined 2 regimes into one program.
                                                                                4. Final simplification48.3%

                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+45} \lor \neg \left(z \leq 1.35 \cdot 10^{+156}\right):\\ \;\;\;\;\left(1 - y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \end{array} \]
                                                                                5. Add Preprocessing

                                                                                Alternative 18: 34.0% accurate, 1.8× speedup?

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

                                                                                  1. Initial program 91.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 \color{blue}{\left(1 - y\right) \cdot z} \]
                                                                                    2. lower-*.f64N/A

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

                                                                                      \[\leadsto \color{blue}{\left(1 - y\right)} \cdot z \]
                                                                                  5. Applied rewrites65.9%

                                                                                    \[\leadsto \color{blue}{\left(1 - y\right) \cdot z} \]
                                                                                  6. Taylor expanded in y around inf

                                                                                    \[\leadsto \left(-1 \cdot y\right) \cdot z \]
                                                                                  7. Step-by-step derivation
                                                                                    1. Applied rewrites46.4%

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

                                                                                    if -1.95e45 < z < 1.35e156

                                                                                    1. Initial program 98.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 a around inf

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

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

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

                                                                                        \[\leadsto \color{blue}{\left(1 - t\right)} \cdot a \]
                                                                                    5. Applied rewrites38.9%

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

                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.95 \cdot 10^{+45} \lor \neg \left(z \leq 1.35 \cdot 10^{+156}\right):\\ \;\;\;\;\left(-y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(1 - t\right) \cdot a\\ \end{array} \]
                                                                                  10. Add Preprocessing

                                                                                  Alternative 19: 33.6% accurate, 2.1× speedup?

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

                                                                                    1. Initial program 90.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 z around 0

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

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

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

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

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

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

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

                                                                                      if -2.10000000000000011e124 < y < 1.09999999999999995e54

                                                                                      1. Initial program 98.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 z around 0

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

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

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

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

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

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

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

                                                                                          \[\leadsto a + x \]
                                                                                        3. Step-by-step derivation
                                                                                          1. Applied rewrites30.7%

                                                                                            \[\leadsto a + x \]
                                                                                        4. Recombined 2 regimes into one program.
                                                                                        5. Final simplification34.9%

                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+124} \lor \neg \left(y \leq 1.1 \cdot 10^{+54}\right):\\ \;\;\;\;y \cdot b\\ \mathbf{else}:\\ \;\;\;\;a + x\\ \end{array} \]
                                                                                        6. Add Preprocessing

                                                                                        Alternative 20: 24.6% accurate, 9.3× speedup?

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto a + x \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites23.3%

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

                                                                                            Reproduce

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